Field3D
FieldGroup< BaseTypeList_T, Dims_T >::PointIsect Struct Reference

#include <FieldGroup.h>

Public Member Functions

template<typename T >
void operator() (const T &vec) const
 Functor. More...
 
 PointIsect (const V3d &wsP)
 Ctor. More...
 
bool result () const
 Result. More...
 

Private Attributes

bool m_doesIntersect
 
V3d m_wsP
 

Detailed Description

template<typename BaseTypeList_T, int Dims_T>
struct FieldGroup< BaseTypeList_T, Dims_T >::PointIsect

Definition at line 1424 of file FieldGroup.h.

Constructor & Destructor Documentation

◆ PointIsect()

template<typename BaseTypeList_T , int Dims_T>
FieldGroup< BaseTypeList_T, Dims_T >::PointIsect::PointIsect ( const V3d wsP)
inline

Ctor.

Definition at line 1427 of file FieldGroup.h.

1428  : m_wsP(wsP), m_doesIntersect(false)
1429  { }

Member Function Documentation

◆ operator()()

template<typename BaseTypeList_T , int Dims_T>
template<typename T >
void FieldGroup< BaseTypeList_T, Dims_T >::PointIsect::operator() ( const T &  vec) const
inline

Functor.

Definition at line 1432 of file FieldGroup.h.

1433  {
1434  for (size_t field = 0, end = vec.size(); field < end; ++field) {
1435  // Loop over fields in vector
1436  for (size_t i = 0, end = vec.size(); i < end; ++i) {
1437  V3d vsP;
1438  // Apply world to object transform
1439  if (vec[i].doOsToWs) {
1440  V3d osP;
1441  vec[i].wsToOs.multVecMatrix(m_wsP, osP);
1442  vec[i].mapping->worldToVoxel(osP, vsP);
1443  } else {
1444  vec[i].mapping->worldToVoxel(m_wsP, vsP);
1445  }
1446  // Sample
1447  if (vec[i].vsBounds.intersects(vsP)) {
1448  m_doesIntersect = true;
1449  }
1450  }
1451  }
1452  }

◆ result()

template<typename BaseTypeList_T , int Dims_T>
bool FieldGroup< BaseTypeList_T, Dims_T >::PointIsect::result ( ) const
inline

Result.

Definition at line 1454 of file FieldGroup.h.

1455  { return m_doesIntersect; }

Referenced by FieldGroup< BaseTypeList_T, Dims_T >::intersects().

Member Data Documentation

◆ m_wsP

template<typename BaseTypeList_T , int Dims_T>
V3d FieldGroup< BaseTypeList_T, Dims_T >::PointIsect::m_wsP
private

Definition at line 1458 of file FieldGroup.h.

◆ m_doesIntersect

template<typename BaseTypeList_T , int Dims_T>
bool FieldGroup< BaseTypeList_T, Dims_T >::PointIsect::m_doesIntersect
private

Definition at line 1459 of file FieldGroup.h.


The documentation for this struct was generated from the following file:
V3d
Imath::V3d V3d
Definition: SpiMathLib.h:74
FieldGroup::PointIsect::m_doesIntersect
bool m_doesIntersect
Definition: FieldGroup.h:1459
FieldGroup::PointIsect::m_wsP
V3d m_wsP
Definition: FieldGroup.h:1458