This class describes spatial domains. More...
Public Attributes | |
SBDTypeSpatialTransform *const | transform |
The pointer to the spatial transform. | |
SBLength3 *const | halfSize |
The pointer to the half extent vector. | |
Static Public Attributes | |
static const SBDTypeSpatialDomain | empty |
The empty spatial domain. | |
Constructors and destructor | |
SBDTypeSpatialDomain () | |
Constructs an identity domain. | |
SBDTypeSpatialDomain (const SBDTypeSpatialDomain &domain) | |
Copy constructor. | |
SBDTypeSpatialDomain (const SBDTypeSpatialTransform &transform, const SBLength3 &halfSize) | |
Constructs a domain from a spatial transform and a half size. | |
SBDTypeSpatialDomain (const SBVector< SBPosition3 > &positionVector) | |
Constructs a domain from a vector of positions. More... | |
~SBDTypeSpatialDomain () | |
Destroys the spatial domain. | |
Serialization | |
virtual bool | isSerializable () const |
Returns true. | |
virtual void | serialize (SBCSerializer *serializer, const SBVersionNumber &sdkVersionNumber=SB_SDK_VERSION_NUMBER) const |
Serializes the spatial domain. | |
virtual void | unserialize (SBCSerializer *serializer, const SBVersionNumber &sdkVersionNumber=SB_SDK_VERSION_NUMBER) |
Unserializes the spatial domain. | |
Operators | |
SBDTypeSpatialDomain & | operator= (const SBDTypeSpatialDomain &domain) |
Sets this domain to domain . | |
bool | operator== (const SBDTypeSpatialDomain &domain) const |
Returns true if and only if this domain is equal to domain . | |
bool | operator!= (const SBDTypeSpatialDomain &domain) const |
Returns true if and only if this domain is not equal to domain . | |
Useful functions | |
void | setEmpty () |
Sets this domain to the empty domain. | |
void | print () const |
Prints the spatial domain. | |
This class handles spatial domains, i.e. oriented boxes that are represented through a spatial transform and the vector containing the half sizes of the box.
Short name: SBSpatialDomain
SBDTypeSpatialDomain::SBDTypeSpatialDomain | ( | const SBVector< SBPosition3 > & | positionVector | ) |
This constructor constructs a domain aligned with the principal axes of the positions contained in positionVector
. The principal axes are the eigenvectors of the covariance matrix of the positions. The domain axes are sorted: the first axis corresponds to the longest domain dimension, while the third axis corresponds to the smallest domain dimension.