Class SBDTypeSpatialDomain#
ClassList > SBDTypeSpatialDomain
This class describes spatial domains. More...
#include <SBDTypeSpatialDomain.hpp>
Public Attributes#
| Type | Name |
|---|---|
| SBLength3 * | halfSize The pointer to the half extent vector. |
| SBDTypeSpatialTransform * | transform The pointer to the spatial transform. |
Public Static Attributes#
| Type | Name |
|---|---|
| const SBDTypeSpatialDomain | empty The empty spatial domain. |
Public Functions#
| Type | Name |
|---|---|
| SBDTypeSpatialDomain () Constructs an identity domain. |
|
| SBDTypeSpatialDomain (const SBDTypeSpatialDomain & domain) Copy constructor. |
|
| SBDTypeSpatialDomain (SBDTypeSpatialDomain && domain) Move constructor. |
|
| SBDTypeSpatialDomain (const SBDTypeSpatialTransform & transform, const SBLength3 & halfSize) Constructs a domain from a spatial transform and ahalf size. |
|
| SBDTypeSpatialDomain (const SBVector< SBPosition3 > & positionVector) Constructs a domain from a vector of positions. |
|
| virtual bool | isSerializable () const Returns true __ |
| bool | operator!= (const SBDTypeSpatialDomain & domain) const Returns true if and only if this domain is not equal todomain . |
| SBDTypeSpatialDomain & | operator= (const SBDTypeSpatialDomain & domain) Copy assignment. |
| SBDTypeSpatialDomain & | operator= (SBDTypeSpatialDomain && domain) Move assignment. |
| bool | operator== (const SBDTypeSpatialDomain & domain) const Returns true if and only if this domain is equal todomain . |
| void | print (std::ostream & os) const Prints the spatial domain. |
| void | print () const Prints the spatial domain. |
| virtual void | serialize (SBCSerializer * serializer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER) const Serializes the spatial domain. |
| void | setEmpty () Sets this domain to the empty domain. |
| virtual void | unserialize (SBCSerializer * serializer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER) Unserializes the spatial domain. |
| ~SBDTypeSpatialDomain () Destroys the spatial domain. |
Detailed Description#
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
See also: SBDTypeSpatialTransform
See also: SAMSON's unit system
Public Attributes Documentation#
variable halfSize#
The pointer to the half extent vector.
variable transform#
The pointer to the spatial transform.
Public Static Attributes Documentation#
variable empty#
The empty spatial domain.
Public Functions Documentation#
function SBDTypeSpatialDomain [1/5]#
Constructs an identity domain.
Constructs an identity spatial domain.
The domain is initialized with an identity transform and zero half sizes.
function SBDTypeSpatialDomain [2/5]#
Copy constructor.
Parameters:
domainThe spatial domain to copy.
function SBDTypeSpatialDomain [3/5]#
Move constructor.
Parameters:
domainThe spatial domain to move from.
function SBDTypeSpatialDomain [4/5]#
Constructs a domain from a spatial transform and ahalf size.
SBDTypeSpatialDomain::SBDTypeSpatialDomain (
const SBDTypeSpatialTransform & transform,
const SBLength3 & halfSize
)
Constructs a spatial domain from a transform and a half size.
Parameters:
tThe spatial transform defining the domain's position and orientation.hThe half extents of the domain.
function SBDTypeSpatialDomain [5/5]#
Constructs a domain from a vector of positions.
Constructs a domain aligned with the principal axes of the positions contained in 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.
Parameters:
positionVectorThe vector of positions used to compute the domain.
function isSerializable#
Returns true __
Returns whether the spatial domain is serializable.
Returns:
Always true for this class.
function operator!=#
Returns true if and only if this domain is not equal todomain .
Inequality comparison operator.
Parameters:
uThe spatial domain to compare with.
Returns:
true if either the transforms or the half sizes differ, false otherwise.
function operator=#
Copy assignment.
Copy assignment operator.
Parameters:
uThe spatial domain to assign from.
Returns:
Reference to this spatial domain after assignment.
function operator=#
Move assignment.
Move assignment operator.
Parameters:
uThe spatial domain to move from.
Returns:
Reference to this spatial domain after assignment.
function operator==#
Returns true if and only if this domain is equal todomain .
Equality comparison operator.
Parameters:
uThe spatial domain to compare with.
Returns:
true if both domains have equal transforms and half sizes, false otherwise.
function print [1/2]#
Prints the spatial domain.
Prints the spatial domain to an output stream.
Parameters:
osThe output stream to print to.
function print [2/2]#
Prints the spatial domain.
Prints the spatial domain to the standard output.
function serialize#
Serializes the spatial domain.
virtual void SBDTypeSpatialDomain::serialize (
SBCSerializer * serializer,
const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER
) const
Parameters:
serializerThe serializer used to write the domain data.sdkVersionNumberThe SDK version number for compatibility.
function setEmpty#
Sets this domain to the empty domain.
Sets the spatial domain to the empty domain.
The transform is set to identity and the half size to zero.
function unserialize#
Unserializes the spatial domain.
virtual void SBDTypeSpatialDomain::unserialize (
SBCSerializer * serializer,
const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER
)
Parameters:
serializerThe serializer used to read the domain data.sdkVersionNumberThe SDK version number for compatibility.
function ~SBDTypeSpatialDomain#
Destroys the spatial domain.
Destructor.
Releases resources associated with the spatial domain.