Web Analytics Made Easy - Statcounter
Skip to content

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.

SBLength3* SBDTypeSpatialDomain::halfSize;


variable transform#

The pointer to the spatial transform.

SBDTypeSpatialTransform* SBDTypeSpatialDomain::transform;


Public Static Attributes Documentation#

variable empty#

The empty spatial domain.

SBDTypeSpatialDomain const SBDTypeSpatialDomain::empty;


Public Functions Documentation#

function SBDTypeSpatialDomain [1/5]#

Constructs an identity domain.

SBDTypeSpatialDomain::SBDTypeSpatialDomain () 

Constructs an identity spatial domain.

The domain is initialized with an identity transform and zero half sizes.


function SBDTypeSpatialDomain [2/5]#

Copy constructor.

SBDTypeSpatialDomain::SBDTypeSpatialDomain (
    const SBDTypeSpatialDomain & domain
) 

Parameters:

  • domain The spatial domain to copy.

function SBDTypeSpatialDomain [3/5]#

Move constructor.

SBDTypeSpatialDomain::SBDTypeSpatialDomain (
    SBDTypeSpatialDomain && domain
) 

Parameters:

  • domain The 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:

  • t The spatial transform defining the domain's position and orientation.
  • h The half extents of the domain.

function SBDTypeSpatialDomain [5/5]#

Constructs a domain from a vector of positions.

SBDTypeSpatialDomain::SBDTypeSpatialDomain (
    const SBVector< SBPosition3 > & positionVector
) 

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:

  • positionVector The vector of positions used to compute the domain.

function isSerializable#

Returns true __

virtual bool SBDTypeSpatialDomain::isSerializable () const

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 .

bool SBDTypeSpatialDomain::operator!= (
    const SBDTypeSpatialDomain & domain
) const

Inequality comparison operator.

Parameters:

  • u The spatial domain to compare with.

Returns:

true if either the transforms or the half sizes differ, false otherwise.


function operator=#

Copy assignment.

SBDTypeSpatialDomain & SBDTypeSpatialDomain::operator= (
    const SBDTypeSpatialDomain & domain
) 

Copy assignment operator.

Parameters:

  • u The spatial domain to assign from.

Returns:

Reference to this spatial domain after assignment.


function operator=#

Move assignment.

SBDTypeSpatialDomain & SBDTypeSpatialDomain::operator= (
    SBDTypeSpatialDomain && domain
) 

Move assignment operator.

Parameters:

  • u The 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 .

bool SBDTypeSpatialDomain::operator== (
    const SBDTypeSpatialDomain & domain
) const

Equality comparison operator.

Parameters:

  • u The 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.

void SBDTypeSpatialDomain::print (
    std::ostream & os
) const

Prints the spatial domain to an output stream.

Parameters:

  • os The output stream to print to.

function print [2/2]#

Prints the spatial domain.

void SBDTypeSpatialDomain::print () const

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:

  • serializer The serializer used to write the domain data.
  • sdkVersionNumber The SDK version number for compatibility.

function setEmpty#

Sets this domain to the empty domain.

void SBDTypeSpatialDomain::setEmpty () 

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:

  • serializer The serializer used to read the domain data.
  • sdkVersionNumber The SDK version number for compatibility.

function ~SBDTypeSpatialDomain#

Destroys the spatial domain.

SBDTypeSpatialDomain::~SBDTypeSpatialDomain () 

Destructor.

Releases resources associated with the spatial domain.