|
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. | |
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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
Static Public Member Functions | |
| static const char * | classType () |
Public Attributes | |
| DEFINE_FIELD_RTTI_CONCRETE_CLASS | |
Private Types | |
| typedef FieldMapping | base |
| Convenience typedef for referring to base class. | |
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 218 of file FieldMapping.h.
| typedef boost::intrusive_ptr<NullFieldMapping> NullFieldMapping::Ptr |
Convenience typedef.
Reimplemented from FieldMapping.
Definition at line 225 of file FieldMapping.h.
Reimplemented from FieldMapping.
Definition at line 229 of file FieldMapping.h.
typedef FieldMapping NullFieldMapping::base [private] |
Convenience typedef for referring to base class.
Reimplemented from FieldMapping.
Definition at line 293 of file FieldMapping.h.
| NullFieldMapping::NullFieldMapping | ( | ) | [inline] |
Definition at line 242 of file FieldMapping.h.
Referenced by clone().
: FieldMapping() { /* Empty */ }
| NullFieldMapping::NullFieldMapping | ( | const Box3i & | extents | ) | [inline] |
Definition at line 245 of file FieldMapping.h.
: FieldMapping(extents) { /* Empty */ }
| static const char* NullFieldMapping::classType | ( | ) | [inline, static] |
Reimplemented from FieldMapping.
Definition at line 232 of file FieldMapping.h.
Referenced by className().
{
return "NullFieldMapping";
}
Transform from world space position into voxel space.
Implements FieldMapping.
Definition at line 256 of file FieldMapping.h.
References FieldMapping::localToVoxel().
{ localToVoxel(wsP, vsP); }
| virtual void NullFieldMapping::worldToVoxel | ( | const V3d & | wsP, |
| V3d & | vsP, | ||
| float | |||
| ) | const [inline, virtual] |
Implements FieldMapping.
Definition at line 258 of file FieldMapping.h.
References FieldMapping::localToVoxel().
{ localToVoxel(wsP, vsP); }
Transform from voxel space position into world space.
Implements FieldMapping.
Definition at line 261 of file FieldMapping.h.
References FieldMapping::voxelToLocal().
{ voxelToLocal(vsP, wsP); }
| virtual void NullFieldMapping::voxelToWorld | ( | const V3d & | vsP, |
| V3d & | wsP, | ||
| float | |||
| ) | const [inline, virtual] |
Implements FieldMapping.
Definition at line 263 of file FieldMapping.h.
References FieldMapping::voxelToLocal().
{ voxelToLocal(vsP, wsP); }
Transform from world space position into local space.
Implements FieldMapping.
Definition at line 266 of file FieldMapping.h.
{ lsP = wsP; }
Transform from local space position into world space.
Implements FieldMapping.
Definition at line 271 of file FieldMapping.h.
{ wsP = lsP; }
| std::string NullFieldMapping::className | ( | ) | const [virtual] |
Returns the FieldMapping type name. Used when writing/reading from disk.
Implements FieldMapping.
Definition at line 169 of file FieldMapping.cpp.
References classType().
{
return std::string(classType());
}
| bool NullFieldMapping::isIdentical | ( | FieldMapping::Ptr | other, |
| double | tolerance = 0.0 |
||
| ) | const [virtual] |
Whether the mapping is identical to another mapping.
Implements FieldMapping.
Definition at line 176 of file FieldMapping.cpp.
References FIELD3D_NAMESPACE_OPEN::k_nullMappingName().
{
// For null mappings it's simple - if the other one is also a null mapping
// then true, otherwise it's false.
return other->className() == k_nullMappingName;
}
| virtual V3d NullFieldMapping::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 281 of file FieldMapping.h.
References FieldMapping::m_res.
| FieldMapping::Ptr NullFieldMapping::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 187 of file FieldMapping.cpp.
References NullFieldMapping().
{
return Ptr(new NullFieldMapping(*this));
}
Definition at line 230 of file FieldMapping.h.