Skip to content

class Extents

Extents holds calculated extents, and can be used to fetch extents positions and radius of scenes and selection sets.

Properties

PropertyDescription
NameThe name of the Extents object. (Inherited from Object)

Methods

MethodDescription
AddObserverAdds a user-defined observer object to the interface, that will receive events from the interface. (Inherited from Object)
AreValidReturns true if the extents are valid (all bounding box axes are >= 0).
GetBoundingBoxMaximumThe superior (maximum) extent.
GetBoundingBoxMinimumThe inferior (minimum) extent.
GetBoundingSphereCenterThe superior (maximum) extent.
GetBoundingSphereRadiusThe the radius of the bounding sphere.
GetClassGet the name of the Extents class. (Inherited from Object)
HaveVolumeReturns true if the extents are valid and define an actual volume (all axes are > 0).
IsAReturns true if Extents is a or is a descendant of the class named as the type parameter. (Inherited from Object)
IsNullReturns true if the Extents object is invalid. (Inherited from Object)
IsSameObjectAsReturns true if the Extents object is valid. (Inherited from Object)
NonNullReturns true if the Extents object is valid. (Inherited from Object)
PrintInfoPrints the content/info of the Extents object to the log. (Inherited from Object)
RemoveObserverRemoves a previously added observer object. (Inherited from Object)

Static methods

MethodDescription
IsClassAReturns true if the class is a or is a descendant of the class named as the type parameter. (Inherited from Object)
SafeCastSafeCast makes sure the input object is of a class that can be cast into spExtents, and if this is the case, returns the object cast into spExtents. (Inherited from Object)

Properties details

Name

The name of the Extents object. (Inherited from Object)

Syntax

cpp
// Setter
void SetName( const char * name ) const;

// Getter
spString GetName() const;

SetName parameters

TypeNameMinMaxDescription
const char *nameNew name of the object.

GetName return value

Type: spString

Methods details

AddObserver

Adds a user-defined observer object to the interface, that will receive events from the interface. (Inherited from Object)

Syntax

cpp
rid AddObserver( const spObserver & observer ) const;

Parameters

TypeNameMinMaxDescription
ObserverobserverObserver is the object that will receive events.

Return value

Type: rid

AreValid

Returns true if the extents are valid (all bounding box axes are >= 0).

Syntax

cpp
bool AreValid() const;

Parameters

AreValid takes no parameters.

Return value

Type: bool

Default: false

GetBoundingBoxMaximum

The superior (maximum) extent.

Syntax

cpp
spRealData GetBoundingBoxMaximum() const;

Parameters

GetBoundingBoxMaximum takes no parameters.

Return value

Type: spRealData

GetBoundingBoxMinimum

The inferior (minimum) extent.

Syntax

cpp
spRealData GetBoundingBoxMinimum() const;

Parameters

GetBoundingBoxMinimum takes no parameters.

Return value

Type: spRealData

GetBoundingSphereCenter

The superior (maximum) extent.

Syntax

cpp
spRealData GetBoundingSphereCenter() const;

Parameters

GetBoundingSphereCenter takes no parameters.

Return value

Type: spRealData

GetBoundingSphereRadius

The the radius of the bounding sphere.

Syntax

cpp
real GetBoundingSphereRadius() const;

Parameters

GetBoundingSphereRadius takes no parameters.

Return value

Type: real

GetClass

Get the name of the Extents class. (Inherited from Object)

Syntax

cpp
spString GetClass() const;

Parameters

GetClass takes no parameters.

Return value

Type: spString

HaveVolume

Returns true if the extents are valid and define an actual volume (all axes are > 0).

Syntax

cpp
bool HaveVolume() const;

Parameters

HaveVolume takes no parameters.

Return value

Type: bool

Default: false

IsA

Returns true if Extents is a or is a descendant of the class named as the type parameter. (Inherited from Object)

Syntax

cpp
bool IsA( const char * type ) const;

Parameters

TypeNameMinMaxDescription
const char *typeName of the class to check if Extents is, or is a descendant of.

Return value

Type: bool

IsNull

Returns true if the Extents object is invalid. (Inherited from Object)

Syntax

cpp
bool IsNull() const;

Parameters

IsNull takes no parameters.

Return value

Type: bool

IsSameObjectAs

Returns true if the Extents object is valid. (Inherited from Object)

Syntax

cpp
bool IsSameObjectAs( const spObject & object ) const;

Parameters

TypeNameMinMaxDescription
ObjectobjectObject to compare with.

Return value

Type: bool

NonNull

Returns true if the Extents object is valid. (Inherited from Object)

Syntax

cpp
bool NonNull() const;

Parameters

NonNull takes no parameters.

Return value

Type: bool

PrintInfo

Prints the content/info of the Extents object to the log. (Inherited from Object)

Syntax

cpp
void PrintInfo() const;

Parameters

PrintInfo takes no parameters.

RemoveObserver

Removes a previously added observer object. (Inherited from Object)

Syntax

cpp
void RemoveObserver( rid observerId ) const;

Parameters

TypeNameMinMaxDescription
ridobserverIdObserverId is the id returned by AddObserver when the observer was added.

Static methods details

IsClassA

Returns true if the class is a or is a descendant of the class named as the type parameter. (Inherited from Object)

Syntax

cpp
static bool IsClassA( const char * type ) const;

Parameters

TypeNameMinMaxDescription
const char *typeName of the class to check if the class is, or is a descendant of.

Return value

Type: bool

SafeCast

SafeCast makes sure the input object is of a class that can be cast into spExtents, and if this is the case, returns the object cast into spExtents. (Inherited from Object)

Syntax

cpp
static spExtents SafeCast( const spObject & object ) const;

Parameters

TypeNameMinMaxDescription
ObjectobjectObject to cast.

Return value

Type: Extents