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

#include <FieldGroup.h>

Public Member Functions

 GetWsBounds (Box3d &wsBounds)
 Ctor. More...
 
template<typename T >
void operator() (const T &vec) const
 Functor. More...
 

Public Attributes

Box3dm_wsBounds
 

Detailed Description

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

Definition at line 1168 of file FieldGroup.h.

Constructor & Destructor Documentation

◆ GetWsBounds()

template<typename BaseTypeList_T , int Dims_T>
FieldGroup< BaseTypeList_T, Dims_T >::GetWsBounds::GetWsBounds ( Box3d wsBounds)
inline

Ctor.

Definition at line 1171 of file FieldGroup.h.

1172  : m_wsBounds(wsBounds)
1173  { }

Member Function Documentation

◆ operator()()

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

Functor.

Definition at line 1176 of file FieldGroup.h.

1177  {
1178  for (size_t field = 0, end = vec.size(); field < end; ++field) {
1179  // Pointer to mapping
1180  const FieldMapping* mapping = vec[field].mapping;
1181  if (mapping) {
1182  // Corner vertices in local space
1183  std::vector<V3d> lsP = detail::unitCornerPoints();
1184  // Transform to world space and pad resulting bounds
1185  for (size_t i = 0; i < 8; ++i) {
1186  V3d wsP;
1187  if (vec[field].doOsToWs) {
1188  V3d osP;
1189  mapping->localToWorld(lsP[i], osP);
1190  vec[field].osToWs.multVecMatrix(osP, wsP);
1191  } else {
1192  mapping->localToWorld(lsP[i], wsP);
1193  }
1194  m_wsBounds.extendBy(wsP);
1195  }
1196  }
1197  }
1198  }

References FieldMapping::localToWorld(), and detail::unitCornerPoints().

Member Data Documentation

◆ m_wsBounds

template<typename BaseTypeList_T , int Dims_T>
Box3d& FieldGroup< BaseTypeList_T, Dims_T >::GetWsBounds::m_wsBounds

Definition at line 1200 of file FieldGroup.h.


The documentation for this struct was generated from the following file:
V3d
Imath::V3d V3d
Definition: SpiMathLib.h:74
detail::unitCornerPoints
std::vector< V3d > unitCornerPoints()
Definition: FieldGroup.h:228
FieldMapping
Base class for mapping between world-, local- and voxel coordinates.
Definition: FieldMapping.h:87
FieldGroup::GetWsBounds::m_wsBounds
Box3d & m_wsBounds
Definition: FieldGroup.h:1200
FieldGroup::wsBounds
Box3d wsBounds() const
Returns the bounds of the group.
Definition: FieldGroup.h:811
FieldMapping::localToWorld
virtual void localToWorld(const V3d &lsP, V3d &wsP) const =0
Transform from local space position into world space.