Field3D
MatrixFieldMapping Class Reference

Represents the mapping of a field by a matrix transform. More...

#include <FieldMapping.h>

Inheritance diagram for MatrixFieldMapping:
FieldMapping FieldMapping RefBase RefBase RefBase RefBase

List of all members.

Public Types

typedef boost::intrusive_ptr
< MatrixFieldMapping
Ptr
 Convenience typedef.
typedef boost::intrusive_ptr
< MatrixFieldMapping
Ptr
 Convenience typedef.

Public Member Functions

const M44dlocalToWorld () const
 Returns a reference to the local to world transform.
const M44dlocalToWorld () const
 Returns a reference to the local to world transform.
void makeIndentity ()
 Sets the transform to identity. This makes it functionally equivalend to a NullFieldMapping.
void makeIndentity ()
 Sets the transform to identity. This makes it functionally equivalend to a NullFieldMapping.
void setLocalToWorld (const M44d &lsToWs)
 Sets the local to world transform. All other matrices will be updated based on this.
void setLocalToWorld (const M44d &lsToWs)
 Sets the local to world transform. All other matrices will be updated based on this.
const M44dworldToVoxel () const
 Returns a reference to the world to voxel space transform.
const M44dworldToVoxel () const
 Returns a reference to the world to voxel space transform.
Constructors & destructor
 MatrixFieldMapping ()
 MatrixFieldMapping (const Box3i &extents)
 MatrixFieldMapping ()
 MatrixFieldMapping (const Box3i &extents)
From FieldMapping
virtual void worldToVoxel (const V3d &wsP, V3d &vsP) const
 Transform from world space position into voxel space.
virtual void worldToVoxel (const V3d &wsP, V3d &vsP, float) const
virtual void worldToVoxel (std::vector< V3d >::const_iterator wsP, std::vector< V3d >::const_iterator end, std::vector< V3d >::iterator vsP) const
virtual void voxelToWorld (const V3d &vsP, V3d &wsP) const
 Transform from voxel space position into world space.
virtual void voxelToWorld (std::vector< V3d >::const_iterator vsP, std::vector< V3d >::const_iterator end, std::vector< V3d >::iterator wsP) const
 Transforms multiple positions at once. Mainly used to avoid the overhead of virtual calls when transforming large quantities of points.
virtual void worldToLocal (const V3d &wsP, V3d &lsP) const
 Transform from world space position into local space.
virtual void worldToLocal (const V3d &wsP, V3d &lsP, float) const
virtual void worldToLocal (std::vector< V3d >::const_iterator wsP, std::vector< V3d >::const_iterator end, std::vector< V3d >::iterator lsP) const
virtual void localToWorld (const V3d &lsP, V3d &wsP) const
 Transform from local space position into world space.
void worldToVoxelDir (const V3d &wsV, V3d &vsV) const
void voxelToWorldDir (const V3d &vsV, V3d &wsV) const
void worldToLocalDir (const V3d &wsV, V3d &lsV) const
void localToWorldDir (const V3d &lsV, V3d &wsV) const
virtual void extentsChanged ()
 Implement this if the subclass needs to update itself when the resolution changes.
virtual std::string className () const
 Returns the FieldMapping type name. Used when writing/reading from disk.
virtual bool isIdentical (FieldMapping::Ptr other, double tolerance=0.0) const
 Whether the mapping is identical to another mapping.
virtual V3d wsVoxelSize (int, int, int) const
 Returns world-space size of a voxel at the specified coordinate.
virtual FieldMapping::Ptr clone () const
 Returns a pointer to a copy of the mapping, pure virtual so ensure derived classes properly implement it.
virtual void worldToVoxel (const V3d &wsP, V3d &vsP) const
 Transform from world space position into voxel space.
virtual void worldToVoxel (const V3d &wsP, V3d &vsP, float) const
virtual void worldToVoxel (std::vector< V3d >::const_iterator wsP, std::vector< V3d >::const_iterator end, std::vector< V3d >::iterator vsP) const
virtual void voxelToWorld (const V3d &vsP, V3d &wsP) const
 Transform from voxel space position into world space.
virtual void voxelToWorld (std::vector< V3d >::const_iterator vsP, std::vector< V3d >::const_iterator end, std::vector< V3d >::iterator wsP) const
 Transforms multiple positions at once. Mainly used to avoid the overhead of virtual calls when transforming large quantities of points.
virtual void worldToLocal (const V3d &wsP, V3d &lsP) const
 Transform from world space position into local space.
virtual void worldToLocal (const V3d &wsP, V3d &lsP, float) const
virtual void worldToLocal (std::vector< V3d >::const_iterator wsP, std::vector< V3d >::const_iterator end, std::vector< V3d >::iterator lsP) const
virtual void localToWorld (const V3d &lsP, V3d &wsP) const
 Transform from local space position into world space.
void worldToVoxelDir (const V3d &wsV, V3d &vsV) const
void voxelToWorldDir (const V3d &vsV, V3d &wsV) const
void worldToLocalDir (const V3d &wsV, V3d &lsV) const
void localToWorldDir (const V3d &lsV, V3d &wsV) const
virtual void extentsChanged ()
 Implement this if the subclass needs to update itself when the resolution changes.
virtual std::string className () const
 Returns the FieldMapping type name. Used when writing/reading from disk.
virtual bool isIdentical (FieldMapping::Ptr other, double tolerance=0.0) const
 Whether the mapping is identical to another mapping.
virtual V3d wsVoxelSize (int, int, int) const
 Returns world-space size of a voxel at the specified coordinate.
virtual FieldMapping::Ptr clone () const
 Returns a pointer to a copy of the mapping, pure virtual so ensure derived classes properly implement it.

Private Member Functions

void getLocalToVoxelMatrix (M44d &result)
void getLocalToVoxelMatrix (M44d &result)
void updateTransform ()
 Updates the local to world transformation matrix.
void updateTransform ()
 Updates the local to world transformation matrix.

Private Attributes

M44d m_lsToWs
 Local space to world space.
M44d m_vsToWs
 Voxel space to world space.
M44d m_wsToLs
 World space to local space.
M44d m_wsToVs
 World space to voxel space.
V3d m_wsVoxelSize
 Precomputed world-space voxel size. Calculations may assume orthogonal transformation for efficiency.

Detailed Description

Represents the mapping of a field by a matrix transform.

Refer to using_mappings for examples of how to use this in your code.

Todo:
Add calls for easily specifying the transform given grid size, offset, rotation, etc.

Refer to using_mappings for examples of how to use this in your code.

Todo:
Add calls for easily specifying the transform given grid size, offset, rotation, etc.

Definition at line 301 of file FieldMapping.h.


Member Typedef Documentation

typedef boost::intrusive_ptr<MatrixFieldMapping> MatrixFieldMapping::Ptr

Convenience typedef.

Reimplemented from FieldMapping.

Definition at line 308 of file FieldMapping.h.

typedef boost::intrusive_ptr<MatrixFieldMapping> MatrixFieldMapping::Ptr

Convenience typedef.

Reimplemented from FieldMapping.

Definition at line 308 of file FieldMapping.h.


Constructor & Destructor Documentation

MatrixFieldMapping::MatrixFieldMapping ( )

Definition at line 176 of file FieldMapping.cpp.

References makeIndentity().

Referenced by clone().

MatrixFieldMapping::MatrixFieldMapping ( const Box3i extents)

Definition at line 184 of file FieldMapping.cpp.

References makeIndentity().

  : FieldMapping(extents)
{ 
  makeIndentity();
}
MatrixFieldMapping::MatrixFieldMapping ( )
MatrixFieldMapping::MatrixFieldMapping ( const Box3i extents)

Member Function Documentation

void MatrixFieldMapping::setLocalToWorld ( const M44d lsToWs)

Sets the local to world transform. All other matrices will be updated based on this.

Definition at line 192 of file FieldMapping.cpp.

References m_lsToWs, and updateTransform().

{
  m_lsToWs = lsToWs;
  updateTransform();
}
const M44d& MatrixFieldMapping::localToWorld ( ) const [inline]

Returns a reference to the local to world transform.

Definition at line 327 of file FieldMapping.h.

References m_lsToWs.

Referenced by convertCellCenteredToMAC(), convertMACToCellCentered(), and printMapping().

  { return m_lsToWs; }
const M44d& MatrixFieldMapping::worldToVoxel ( ) const [inline]

Returns a reference to the world to voxel space transform.

Definition at line 331 of file FieldMapping.h.

References m_wsToVs.

  { return m_wsToVs; }
void MatrixFieldMapping::makeIndentity ( )

Sets the transform to identity. This makes it functionally equivalend to a NullFieldMapping.

Definition at line 200 of file FieldMapping.cpp.

References m_lsToWs, and updateTransform().

Referenced by MatrixFieldMapping().

{
  m_lsToWs.makeIdentity();
  updateTransform();
}
virtual void MatrixFieldMapping::worldToVoxel ( const V3d wsP,
V3d vsP 
) const [inline, virtual]

Transform from world space position into voxel space.

Implements FieldMapping.

Definition at line 343 of file FieldMapping.h.

References m_wsToVs.

  { m_wsToVs.multVecMatrix(wsP, vsP); }
virtual void MatrixFieldMapping::worldToVoxel ( const V3d wsP,
V3d vsP,
float   
) const [inline, virtual]
Todo:
Make MatrixFieldMapping support time-varying matrices

Implements FieldMapping.

Definition at line 347 of file FieldMapping.h.

References m_wsToVs.

  { m_wsToVs.multVecMatrix(wsP, vsP); }
virtual void MatrixFieldMapping::worldToVoxel ( std::vector< V3d >::const_iterator  wsP,
std::vector< V3d >::const_iterator  end,
std::vector< V3d >::iterator  vsP 
) const [inline, virtual]

Implements FieldMapping.

Definition at line 351 of file FieldMapping.h.

References m_wsToVs.

  { 
    for (; wsP != end; ++wsP, ++vsP) 
      m_wsToVs.multVecMatrix(*wsP, *vsP);
  }
virtual void MatrixFieldMapping::voxelToWorld ( const V3d vsP,
V3d wsP 
) const [inline, virtual]

Transform from voxel space position into world space.

Implements FieldMapping.

Definition at line 359 of file FieldMapping.h.

References m_vsToWs.

  { m_vsToWs.multVecMatrix(vsP, wsP); }
virtual void MatrixFieldMapping::voxelToWorld ( std::vector< V3d >::const_iterator  vsP,
std::vector< V3d >::const_iterator  end,
std::vector< V3d >::iterator  wsP 
) const [inline, virtual]

Transforms multiple positions at once. Mainly used to avoid the overhead of virtual calls when transforming large quantities of points.

Note:
This would ideally be templated on the storage container, but since we can't have templated virtual calls, we only support std::vector for now

Implements FieldMapping.

Definition at line 362 of file FieldMapping.h.

References m_vsToWs.

  { 
    for (; vsP != end; ++vsP, ++wsP) 
      m_vsToWs.multVecMatrix(*vsP, *wsP);
  }
virtual void MatrixFieldMapping::worldToLocal ( const V3d wsP,
V3d lsP 
) const [inline, virtual]

Transform from world space position into local space.

Implements FieldMapping.

Definition at line 370 of file FieldMapping.h.

References m_wsToLs.

  { m_wsToLs.multVecMatrix(wsP, lsP); }
virtual void MatrixFieldMapping::worldToLocal ( const V3d wsP,
V3d lsP,
float   
) const [inline, virtual]
Todo:
Make MatrixFieldMapping support time-varying matrices

Implements FieldMapping.

Definition at line 374 of file FieldMapping.h.

References m_wsToLs.

  { m_wsToLs.multVecMatrix(wsP, lsP); }
virtual void MatrixFieldMapping::worldToLocal ( std::vector< V3d >::const_iterator  wsP,
std::vector< V3d >::const_iterator  end,
std::vector< V3d >::iterator  lsP 
) const [inline, virtual]

Implements FieldMapping.

Definition at line 378 of file FieldMapping.h.

References m_wsToLs.

  { 
    for (; wsP != end; ++wsP, ++lsP) 
      m_wsToLs.multVecMatrix(*wsP, *lsP);
  }
virtual void MatrixFieldMapping::localToWorld ( const V3d lsP,
V3d wsP 
) const [inline, virtual]

Transform from local space position into world space.

Implements FieldMapping.

Definition at line 386 of file FieldMapping.h.

References m_lsToWs.

  { m_lsToWs.multVecMatrix(lsP, wsP); }
void MatrixFieldMapping::worldToVoxelDir ( const V3d wsV,
V3d vsV 
) const [inline]

Definition at line 389 of file FieldMapping.h.

References m_wsToVs.

  { m_wsToVs.multDirMatrix(wsV, vsV); }
void MatrixFieldMapping::voxelToWorldDir ( const V3d vsV,
V3d wsV 
) const [inline]

Definition at line 392 of file FieldMapping.h.

References m_vsToWs.

  { m_vsToWs.multDirMatrix(vsV, wsV); }
void MatrixFieldMapping::worldToLocalDir ( const V3d wsV,
V3d lsV 
) const [inline]

Definition at line 395 of file FieldMapping.h.

References m_wsToLs.

  { m_wsToLs.multDirMatrix(wsV, lsV); }
void MatrixFieldMapping::localToWorldDir ( const V3d lsV,
V3d wsV 
) const [inline]

Definition at line 398 of file FieldMapping.h.

References m_lsToWs.

  { m_lsToWs.multDirMatrix(lsV, wsV); }
void MatrixFieldMapping::extentsChanged ( ) [virtual]

Implement this if the subclass needs to update itself when the resolution changes.

Reimplemented from FieldMapping.

Definition at line 208 of file FieldMapping.cpp.

References updateTransform().

std::string MatrixFieldMapping::className ( ) const [virtual]

Returns the FieldMapping type name. Used when writing/reading from disk.

Implements FieldMapping.

Definition at line 215 of file FieldMapping.cpp.

References FIELD3D_NAMESPACE_OPEN::k_matrixMappingName().

{
  return k_matrixMappingName;
}
bool MatrixFieldMapping::isIdentical ( FieldMapping::Ptr  other,
double  tolerance = 0.0 
) const [virtual]

Whether the mapping is identical to another mapping.

Implements FieldMapping.

Definition at line 222 of file FieldMapping.cpp.

References FIELD3D_EXTRACT_SHRT, FIELD3D_NAMESPACE_OPEN::k_matrixMappingName(), m_lsToWs, and m_wsToVs.

{
  if (other->className() != k_matrixMappingName) {
    return false;
  } else {
    MatrixFieldMapping::Ptr mm = 
      dynamic_pointer_cast<MatrixFieldMapping>(other);
    if (mm) {
      // first preserve the same test as before:
      if (mm->m_lsToWs.equalWithRelError(m_lsToWs, tolerance) && 
          mm->m_wsToVs.equalWithRelError(m_wsToVs, tolerance)) {
        return true;
      }

      // In case of precision problems, do a more robust test by
      // decomposing the matrices and comparing the components

      V3d s1, r1, t1, sh1;
      V3d s2, r2, t2, sh2;

      // Compare local-to-world matrices
      if (!FIELD3D_EXTRACT_SHRT(m_lsToWs, s1, sh1, r1, t1, false)) {
        return false;
      }
      if (!FIELD3D_EXTRACT_SHRT(mm->m_lsToWs, s2, sh2, r2, t2, false)) {
        return false;
      }
      if (!s1.equalWithRelError(s2, tolerance) ||
          !r1.equalWithAbsError(r2, tolerance) ||
          !t1.equalWithRelError(t2, tolerance)) {
        return false;
      }

      // Compare world-to-voxel matrices
      if (!FIELD3D_EXTRACT_SHRT(m_wsToVs, s1, sh1, r1, t1, false)) {
        return false;
      }
      if (!FIELD3D_EXTRACT_SHRT(mm->m_wsToVs, s2, sh2, r2, t2, false)) {
        return false;
      }
      if (!s1.equalWithRelError(s2, tolerance) ||
          !r1.equalWithAbsError(r2, tolerance) ||
          !t1.equalWithRelError(t2, tolerance)) {
        return false;
      }
      return true;
    } else {
      return false;
    }
  }
  return false;
}
virtual V3d MatrixFieldMapping::wsVoxelSize ( int  i,
int  j,
int  k 
) const [inline, virtual]

Returns world-space size of a voxel at the specified coordinate.

Implements FieldMapping.

Definition at line 407 of file FieldMapping.h.

References m_wsVoxelSize.

  { return m_wsVoxelSize; }
FieldMapping::Ptr MatrixFieldMapping::clone ( ) const [virtual]

Returns a pointer to a copy of the mapping, pure virtual so ensure derived classes properly implement it.

Implements FieldMapping.

Definition at line 311 of file FieldMapping.cpp.

References MatrixFieldMapping().

{
  return Ptr(new MatrixFieldMapping(*this));
}
void MatrixFieldMapping::updateTransform ( ) [private]

Updates the local to world transformation matrix.

Definition at line 278 of file FieldMapping.cpp.

References getLocalToVoxelMatrix(), m_lsToWs, m_vsToWs, m_wsToLs, m_wsToVs, and m_wsVoxelSize.

Referenced by extentsChanged(), makeIndentity(), and setLocalToWorld().

{
  m_wsToLs = m_lsToWs.inverse();
  M44d lsToVs;
  getLocalToVoxelMatrix(lsToVs);
  m_wsToVs = m_wsToLs * lsToVs;
  m_vsToWs = m_wsToVs.inverse();

  // Precompute the voxel size
  V3d voxelOrigin, nextVoxel;
  m_vsToWs.multVecMatrix(V3d(0, 0, 0), voxelOrigin);
  m_vsToWs.multVecMatrix(V3d(1, 0, 0), nextVoxel);
  m_wsVoxelSize.x = (nextVoxel - voxelOrigin).length();
  m_vsToWs.multVecMatrix(V3d(0, 1, 0), nextVoxel);
  m_wsVoxelSize.y = (nextVoxel - voxelOrigin).length();
  m_vsToWs.multVecMatrix(V3d(0, 0, 1), nextVoxel);
  m_wsVoxelSize.z = (nextVoxel - voxelOrigin).length();
}
void MatrixFieldMapping::getLocalToVoxelMatrix ( M44d result) [private]
Todo:
Unit test this

Definition at line 299 of file FieldMapping.cpp.

References FieldMapping::m_origin, and FieldMapping::m_res.

Referenced by updateTransform().

{
  // Local to voxel is a scale by the resolution of the field, offset
  // to the origin of the extents
  M44d scaling, translation;
  scaling.setScale(m_res);
  translation.setTranslation(m_origin);
  result = scaling * translation;
}
void MatrixFieldMapping::setLocalToWorld ( const M44d lsToWs)

Sets the local to world transform. All other matrices will be updated based on this.

const M44d& MatrixFieldMapping::localToWorld ( ) const [inline]

Returns a reference to the local to world transform.

Definition at line 327 of file FieldMapping.h.

References m_lsToWs.

  { return m_lsToWs; }
const M44d& MatrixFieldMapping::worldToVoxel ( ) const [inline]

Returns a reference to the world to voxel space transform.

Definition at line 331 of file FieldMapping.h.

References m_wsToVs.

  { return m_wsToVs; }
void MatrixFieldMapping::makeIndentity ( )

Sets the transform to identity. This makes it functionally equivalend to a NullFieldMapping.

virtual void MatrixFieldMapping::worldToVoxel ( const V3d wsP,
V3d vsP 
) const [inline, virtual]

Transform from world space position into voxel space.

Implements FieldMapping.

Definition at line 343 of file FieldMapping.h.

References m_wsToVs.

  { m_wsToVs.multVecMatrix(wsP, vsP); }
virtual void MatrixFieldMapping::worldToVoxel ( const V3d wsP,
V3d vsP,
float   
) const [inline, virtual]
Todo:
Make MatrixFieldMapping support time-varying matrices

Implements FieldMapping.

Definition at line 347 of file FieldMapping.h.

References m_wsToVs.

  { m_wsToVs.multVecMatrix(wsP, vsP); }
virtual void MatrixFieldMapping::worldToVoxel ( std::vector< V3d >::const_iterator  wsP,
std::vector< V3d >::const_iterator  end,
std::vector< V3d >::iterator  vsP 
) const [inline, virtual]

Implements FieldMapping.

Definition at line 351 of file FieldMapping.h.

References m_wsToVs.

  { 
    for (; wsP != end; ++wsP, ++vsP) 
      m_wsToVs.multVecMatrix(*wsP, *vsP);
  }
virtual void MatrixFieldMapping::voxelToWorld ( const V3d vsP,
V3d wsP 
) const [inline, virtual]

Transform from voxel space position into world space.

Implements FieldMapping.

Definition at line 359 of file FieldMapping.h.

References m_vsToWs.

  { m_vsToWs.multVecMatrix(vsP, wsP); }
virtual void MatrixFieldMapping::voxelToWorld ( std::vector< V3d >::const_iterator  vsP,
std::vector< V3d >::const_iterator  end,
std::vector< V3d >::iterator  wsP 
) const [inline, virtual]

Transforms multiple positions at once. Mainly used to avoid the overhead of virtual calls when transforming large quantities of points.

Note:
This would ideally be templated on the storage container, but since we can't have templated virtual calls, we only support std::vector for now

Implements FieldMapping.

Definition at line 362 of file FieldMapping.h.

References m_vsToWs.

  { 
    for (; vsP != end; ++vsP, ++wsP) 
      m_vsToWs.multVecMatrix(*vsP, *wsP);
  }
virtual void MatrixFieldMapping::worldToLocal ( const V3d wsP,
V3d lsP 
) const [inline, virtual]

Transform from world space position into local space.

Implements FieldMapping.

Definition at line 370 of file FieldMapping.h.

References m_wsToLs.

  { m_wsToLs.multVecMatrix(wsP, lsP); }
virtual void MatrixFieldMapping::worldToLocal ( const V3d wsP,
V3d lsP,
float   
) const [inline, virtual]
Todo:
Make MatrixFieldMapping support time-varying matrices

Implements FieldMapping.

Definition at line 374 of file FieldMapping.h.

References m_wsToLs.

  { m_wsToLs.multVecMatrix(wsP, lsP); }
virtual void MatrixFieldMapping::worldToLocal ( std::vector< V3d >::const_iterator  wsP,
std::vector< V3d >::const_iterator  end,
std::vector< V3d >::iterator  lsP 
) const [inline, virtual]

Implements FieldMapping.

Definition at line 378 of file FieldMapping.h.

References m_wsToLs.

  { 
    for (; wsP != end; ++wsP, ++lsP) 
      m_wsToLs.multVecMatrix(*wsP, *lsP);
  }
virtual void MatrixFieldMapping::localToWorld ( const V3d lsP,
V3d wsP 
) const [inline, virtual]

Transform from local space position into world space.

Implements FieldMapping.

Definition at line 386 of file FieldMapping.h.

References m_lsToWs.

  { m_lsToWs.multVecMatrix(lsP, wsP); }
void MatrixFieldMapping::worldToVoxelDir ( const V3d wsV,
V3d vsV 
) const [inline]

Definition at line 389 of file FieldMapping.h.

References m_wsToVs.

  { m_wsToVs.multDirMatrix(wsV, vsV); }
void MatrixFieldMapping::voxelToWorldDir ( const V3d vsV,
V3d wsV 
) const [inline]

Definition at line 392 of file FieldMapping.h.

References m_vsToWs.

  { m_vsToWs.multDirMatrix(vsV, wsV); }
void MatrixFieldMapping::worldToLocalDir ( const V3d wsV,
V3d lsV 
) const [inline]

Definition at line 395 of file FieldMapping.h.

References m_wsToLs.

  { m_wsToLs.multDirMatrix(wsV, lsV); }
void MatrixFieldMapping::localToWorldDir ( const V3d lsV,
V3d wsV 
) const [inline]

Definition at line 398 of file FieldMapping.h.

References m_lsToWs.

  { m_lsToWs.multDirMatrix(lsV, wsV); }
virtual void MatrixFieldMapping::extentsChanged ( ) [virtual]

Implement this if the subclass needs to update itself when the resolution changes.

Reimplemented from FieldMapping.

virtual std::string MatrixFieldMapping::className ( ) const [virtual]

Returns the FieldMapping type name. Used when writing/reading from disk.

Implements FieldMapping.

virtual bool MatrixFieldMapping::isIdentical ( FieldMapping::Ptr  other,
double  tolerance = 0.0 
) const [virtual]

Whether the mapping is identical to another mapping.

Implements FieldMapping.

virtual V3d MatrixFieldMapping::wsVoxelSize ( int  i,
int  j,
int  k 
) const [inline, virtual]

Returns world-space size of a voxel at the specified coordinate.

Implements FieldMapping.

Definition at line 407 of file FieldMapping.h.

References m_wsVoxelSize.

  { return m_wsVoxelSize; }
virtual FieldMapping::Ptr MatrixFieldMapping::clone ( ) const [virtual]

Returns a pointer to a copy of the mapping, pure virtual so ensure derived classes properly implement it.

Implements FieldMapping.

void MatrixFieldMapping::updateTransform ( ) [private]

Updates the local to world transformation matrix.

void MatrixFieldMapping::getLocalToVoxelMatrix ( M44d result) [private]
Todo:
Unit test this

Member Data Documentation

Local space to world space.

Definition at line 423 of file FieldMapping.h.

Referenced by isIdentical(), localToWorld(), localToWorldDir(), makeIndentity(), setLocalToWorld(), and updateTransform().

World space to local space.

Definition at line 425 of file FieldMapping.h.

Referenced by updateTransform(), worldToLocal(), and worldToLocalDir().

Voxel space to world space.

Definition at line 427 of file FieldMapping.h.

Referenced by updateTransform(), voxelToWorld(), and voxelToWorldDir().

World space to voxel space.

Definition at line 429 of file FieldMapping.h.

Referenced by isIdentical(), updateTransform(), worldToVoxel(), and worldToVoxelDir().

Precomputed world-space voxel size. Calculations may assume orthogonal transformation for efficiency.

Definition at line 432 of file FieldMapping.h.

Referenced by updateTransform(), and wsVoxelSize().


The documentation for this class was generated from the following files: