Field3D
|
Trivial class, world space is equal to local space, i.e. the field is contained in the unit cube [0..1] in all axes. More...
#include <FieldMapping.h>
Public Types | |
typedef NullFieldMapping | class_type |
typedef boost::intrusive_ptr< NullFieldMapping > | Ptr |
Convenience typedef. More... | |
![]() | |
typedef FieldMapping | class_type |
typedef boost::intrusive_ptr< FieldMapping > | Ptr |
![]() | |
typedef boost::intrusive_ptr< RefBase > | Ptr |
typedef boost::weak_ptr< RefBase > | WeakPtr |
Public Member Functions | |
Constructors & destructor | |
NullFieldMapping () | |
NullFieldMapping (const Box3i &extents) | |
From FieldMapping | |
virtual void | worldToVoxel (const V3d &wsP, V3d &vsP) const |
Transform from world space position into voxel space. More... | |
virtual void | worldToVoxel (const V3d &wsP, V3d &vsP, float) const |
virtual void | voxelToWorld (const V3d &vsP, V3d &wsP) const |
Transform from voxel space position into world space. More... | |
virtual void | voxelToWorld (const V3d &vsP, V3d &wsP, float) const |
virtual void | worldToLocal (const V3d &wsP, V3d &lsP) const |
Transform from world space position into local space. More... | |
virtual void | worldToLocal (const V3d &wsP, V3d &lsP, float) const |
virtual void | localToWorld (const V3d &lsP, V3d &wsP) const |
Transform from local space position into world space. More... | |
virtual void | localToWorld (const V3d &lsP, V3d &wsP, float) const |
virtual std::string | className () const |
Returns the FieldMapping type name. Used when writing/reading from disk. More... | |
virtual bool | isIdentical (FieldMapping::Ptr other, double tolerance=0.0) const |
Whether the mapping is identical to another mapping. More... | |
virtual V3d | wsVoxelSize (int, int, int) const |
Returns world-space size of a voxel at the specified coordinate. More... | |
virtual FieldMapping::Ptr | clone () const |
Returns a pointer to a copy of the mapping, pure virtual so ensure derived classes properly implement it. More... | |
![]() | |
const V3d & | origin () const |
Returns the origin. More... | |
const V3d & | resolution () const |
Returns the resolution. More... | |
void | setExtents (const Box3i &extents) |
This sets the field extents information to use for defining the local coordinate space. More... | |
FieldMapping () | |
Constructor. More... | |
FieldMapping (const Box3i &extents) | |
Construct with known extents. More... | |
virtual | ~FieldMapping () |
Destructor. More... | |
virtual void | extentsChanged () |
Implement this if the subclass needs to update itself when the resolution changes. More... | |
void | localToVoxel (const V3d &lsP, V3d &vsP) const |
Transform from local space to voxel space. This is just a multiplication by the resolution of the Field that we're mapping. More... | |
void | voxelToLocal (const V3d &vsP, V3d &lsP) const |
Inverse of localToVoxel. More... | |
![]() | |
void | ref () const |
Used by boost::intrusive_pointer. More... | |
size_t | refcnt () |
Used by boost::intrusive_pointer. More... | |
void | unref () const |
Used by boost::intrusive_pointer. More... | |
WeakPtr | weakPtr () const |
RefBase () | |
RefBase (const RefBase &) | |
Copy constructor. More... | |
RefBase & | operator= (const RefBase &) |
Assignment operator. More... | |
virtual | ~RefBase () |
Destructor. More... | |
virtual bool | checkRTTI (const char *typenameStr)=0 |
This function is only implemented by concrete classes and triggers the actual RTTI check through matchRTTI();. More... | |
bool | matchRTTI (const char *typenameStr) |
Performs a check to see if the given typename string matches this class' This needs to be implemented in -all- subclasses, even abstract ones. More... | |
Static Public Member Functions | |
static const char * | staticClassType () |
![]() | |
static const char * | staticClassType () |
![]() | |
static const char * | staticClassType () |
Public Attributes | |
DEFINE_FIELD_RTTI_CONCRETE_CLASS | |
![]() | |
DEFINE_FIELD_RTTI_ABSTRACT_CLASS | |
Private Types | |
typedef FieldMapping | base |
Convenience typedef for referring to base class. More... | |
Additional Inherited Members | |
![]() | |
V3d | m_origin |
The integer voxel-space origin of the underlying Field object. Is equal to field.extents.min. More... | |
V3d | m_res |
The integer voxel-space resolution of the underlying Field object. Is equal to field.extents.max - field.extents.min + 1. More... | |
Trivial class, world space is equal to local space, i.e. the field is contained in the unit cube [0..1] in all axes.
Refer to using_mappings for examples of how to use this in your code.
Definition at line 229 of file FieldMapping.h.
typedef boost::intrusive_ptr<NullFieldMapping> NullFieldMapping::Ptr |
Convenience typedef.
Definition at line 236 of file FieldMapping.h.
Definition at line 240 of file FieldMapping.h.
|
private |
Convenience typedef for referring to base class.
Definition at line 304 of file FieldMapping.h.
|
inline |
Definition at line 253 of file FieldMapping.h.
|
inline |
Definition at line 256 of file FieldMapping.h.
|
inlinestatic |
Definition at line 243 of file FieldMapping.h.
Transform from world space position into voxel space.
Implements FieldMapping.
Definition at line 267 of file FieldMapping.h.
References FieldMapping::localToVoxel().
|
inlinevirtual |
Implements FieldMapping.
Definition at line 269 of file FieldMapping.h.
References FieldMapping::localToVoxel().
Transform from voxel space position into world space.
Implements FieldMapping.
Definition at line 272 of file FieldMapping.h.
References FieldMapping::voxelToLocal().
|
inlinevirtual |
Implements FieldMapping.
Definition at line 274 of file FieldMapping.h.
References FieldMapping::voxelToLocal().
Transform from world space position into local space.
Implements FieldMapping.
Definition at line 277 of file FieldMapping.h.
Transform from local space position into world space.
Implements FieldMapping.
Definition at line 282 of file FieldMapping.h.
|
inlinevirtual |
Implements FieldMapping.
Definition at line 284 of file FieldMapping.h.
References FieldMapping::className(), and FieldMapping::isIdentical().
|
virtual |
Returns the FieldMapping type name. Used when writing/reading from disk.
Implements FieldMapping.
Definition at line 202 of file FieldMapping.cpp.
References FieldMapping::staticClassType().
|
virtual |
Whether the mapping is identical to another mapping.
Implements FieldMapping.
Definition at line 209 of file FieldMapping.cpp.
References FIELD3D_NAMESPACE_OPEN::k_nullMappingName().
|
inlinevirtual |
Returns world-space size of a voxel at the specified coordinate.
Implements FieldMapping.
Definition at line 292 of file FieldMapping.h.
References FieldMapping::clone().
|
virtual |
Returns a pointer to a copy of the mapping, pure virtual so ensure derived classes properly implement it.
Implements FieldMapping.
Definition at line 220 of file FieldMapping.cpp.
NullFieldMapping::DEFINE_FIELD_RTTI_CONCRETE_CLASS |
Definition at line 241 of file FieldMapping.h.