Field3D
FieldInterp.cpp File Reference
#include "FieldInterp.h"

Go to the source code of this file.

Functions

bool isLegalVoxelCoord (const V3d &vsP, const Box3d &vsDataWindow)
 Checks whether the floating - point voxel coordinate is within the given (floating point) data window.
 
FIELD3D_NAMESPACE_OPEN bool isPointInField (const FieldRes::Ptr f, const V3d &wsP)
 Checks whether the point is within the given field.
 

Detailed Description

Contains implementations of interpolation-related functions.

Definition in file FieldInterp.cpp.

Function Documentation

◆ isPointInField()

FIELD3D_NAMESPACE_OPEN bool isPointInField ( const FieldRes::Ptr f,
const V3d & wsP )

Checks whether the point is within the given field.

Definition at line 52 of file FieldInterp.cpp.

53{
54 V3d lsP;
55 f->mapping()->worldToLocal(wsP, lsP);
56 return (lsP.x > 0.0 && lsP.x <= 1.0 &&
57 lsP.y > 0.0 && lsP.y <= 1.0 &&
58 lsP.z > 0.0 && lsP.z <= 1.0);
59}
Imath::V3d V3d
Definition SpiMathLib.h:74
#define FIELD3D_MTX_T
Definition StdMathLib.h:99

References FIELD3D_MTX_T.

◆ isLegalVoxelCoord()

bool isLegalVoxelCoord ( const V3d & vsP,
const Box3d & vsDataWindow )

Checks whether the floating - point voxel coordinate is within the given (floating point) data window.

Definition at line 63 of file FieldInterp.cpp.

64{
65 return vsP.x > (vsDataWindow.min.x) &&
66 vsP.x < (vsDataWindow.max.x) &&
67 vsP.y > (vsDataWindow.min.y) &&
68 vsP.y < (vsDataWindow.max.y) &&
69 vsP.z > (vsDataWindow.min.z) &&
70 vsP.z < (vsDataWindow.max.z);
71}

References FIELD3D_MTX_T.