Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions
TopLoc_Location Class Reference

A Location is a composite transition. It comprises a series of elementary reference coordinates, i.e. objects of type TopLoc_Datum3D, and the powers to which these objects are raised. More...

#include <TopLoc_Location.hxx>

Public Member Functions

 TopLoc_Location ()=default
 Constructs an empty local coordinate system object. Note: A Location constructed from a default datum is said to be "empty".
 
 TopLoc_Location (const TopLoc_Location &theOther)=default
 Copy constructor.
 
 TopLoc_Location (TopLoc_Location &&theOther) noexcept=default
 Move constructor.
 
TopLoc_Locationoperator= (const TopLoc_Location &theOther)=default
 Copy assignment operator.
 
TopLoc_Locationoperator= (TopLoc_Location &&theOther) noexcept=default
 Move assignment operator.
 
 TopLoc_Location (const gp_Trsf &T)
 Constructs the local coordinate system object defined by the transformation T. T invokes in turn, a TopLoc_Datum3D object.
 
 TopLoc_Location (const occ::handle< TopLoc_Datum3D > &D)
 Constructs the local coordinate system object defined by the 3D datum D. Exceptions Standard_ConstructionError if the transformation T does not represent a 3D coordinate system.
 
bool IsIdentity () const noexcept
 Returns true if this location is equal to the Identity transformation.
 
void Identity () noexcept
 Resets this location to the Identity transformation.
 
const occ::handle< TopLoc_Datum3D > & FirstDatum () const
 Returns the first elementary datum of the Location. Use the NextLocation function recursively to access the other data comprising this location. Exceptions Standard_NoSuchObject if this location is empty.
 
int FirstPower () const
 Returns the power elevation of the first elementary datum. Exceptions Standard_NoSuchObject if this location is empty.
 
const TopLoc_LocationNextLocation () const
 Returns a Location representing <me> without the first datum. We have the relation:
 
const gp_TrsfTransformation () const
 Returns the transformation associated to the coordinate system.
 
 operator gp_Trsf () const
 
TopLoc_Location Inverted () const
 Returns the inverse of <me>.
 
TopLoc_Location Multiplied (const TopLoc_Location &Other) const
 Returns <me> * <Other>, the elementary datums are concatenated.
 
TopLoc_Location operator* (const TopLoc_Location &Other) const
 
TopLoc_Location Divided (const TopLoc_Location &Other) const
 Returns <me> / <Other>.
 
TopLoc_Location operator/ (const TopLoc_Location &Other) const
 
TopLoc_Location Predivided (const TopLoc_Location &Other) const
 Returns <Other>.Inverted() * <me>.
 
TopLoc_Location Powered (const int pwr) const
 Returns me at the power <pwr>. If <pwr> is zero returns Identity. <pwr> can be lower than zero (usual meaning for powers).
 
size_t HashCode () const noexcept
 Returns a hashed value for this local coordinate system. This value is used, with map tables, to store and retrieve the object easily.
 
bool IsEqual (const TopLoc_Location &theOther) const noexcept
 Returns true if this location and the location Other have the same elementary data, i.e. contain the same series of TopLoc_Datum3D and respective powers. This method is an alias for operator ==.
 
bool operator== (const TopLoc_Location &theOther) const noexcept
 
bool IsDifferent (const TopLoc_Location &theOther) const noexcept
 Returns true if this location and the location Other do not have the same elementary data, i.e. do not contain the same series of TopLoc_Datum3D and respective powers. This method is an alias for operator !=.
 
bool operator!= (const TopLoc_Location &theOther) const noexcept
 
void DumpJson (Standard_OStream &theOStream, int theDepth=-1) const
 Dumps the content of me into the stream.
 
void ShallowDump (Standard_OStream &S) const
 Prints the contents of <me> on the stream .
 
void Clear () noexcept
 Clear myItems.
 

Static Public Member Functions

static constexpr double ScalePrec () noexcept
 

Detailed Description

A Location is a composite transition. It comprises a series of elementary reference coordinates, i.e. objects of type TopLoc_Datum3D, and the powers to which these objects are raised.

Constructor & Destructor Documentation

◆ TopLoc_Location() [1/5]

TopLoc_Location::TopLoc_Location ( )
default

Constructs an empty local coordinate system object. Note: A Location constructed from a default datum is said to be "empty".

◆ TopLoc_Location() [2/5]

TopLoc_Location::TopLoc_Location ( const TopLoc_Location & theOther)
default

Copy constructor.

◆ TopLoc_Location() [3/5]

TopLoc_Location::TopLoc_Location ( TopLoc_Location && theOther)
defaultnoexcept

Move constructor.

◆ TopLoc_Location() [4/5]

TopLoc_Location::TopLoc_Location ( const gp_Trsf & T)

Constructs the local coordinate system object defined by the transformation T. T invokes in turn, a TopLoc_Datum3D object.

◆ TopLoc_Location() [5/5]

TopLoc_Location::TopLoc_Location ( const occ::handle< TopLoc_Datum3D > & D)

Constructs the local coordinate system object defined by the 3D datum D. Exceptions Standard_ConstructionError if the transformation T does not represent a 3D coordinate system.

Member Function Documentation

◆ Clear()

void TopLoc_Location::Clear ( )
inlinenoexcept

Clear myItems.

◆ Divided()

TopLoc_Location TopLoc_Location::Divided ( const TopLoc_Location & Other) const

Returns <me> / <Other>.

◆ DumpJson()

void TopLoc_Location::DumpJson ( Standard_OStream & theOStream,
int theDepth = -1 ) const

Dumps the content of me into the stream.

◆ FirstDatum()

const occ::handle< TopLoc_Datum3D > & TopLoc_Location::FirstDatum ( ) const

Returns the first elementary datum of the Location. Use the NextLocation function recursively to access the other data comprising this location. Exceptions Standard_NoSuchObject if this location is empty.

◆ FirstPower()

int TopLoc_Location::FirstPower ( ) const

Returns the power elevation of the first elementary datum. Exceptions Standard_NoSuchObject if this location is empty.

◆ HashCode()

size_t TopLoc_Location::HashCode ( ) const
noexcept

Returns a hashed value for this local coordinate system. This value is used, with map tables, to store and retrieve the object easily.

Returns
a computed hash code

◆ Identity()

void TopLoc_Location::Identity ( )
noexcept

Resets this location to the Identity transformation.

◆ Inverted()

TopLoc_Location TopLoc_Location::Inverted ( ) const

Returns the inverse of <me>.

<me> * Inverted() is an Identity.

◆ IsDifferent()

bool TopLoc_Location::IsDifferent ( const TopLoc_Location & theOther) const
noexcept

Returns true if this location and the location Other do not have the same elementary data, i.e. do not contain the same series of TopLoc_Datum3D and respective powers. This method is an alias for operator !=.

◆ IsEqual()

bool TopLoc_Location::IsEqual ( const TopLoc_Location & theOther) const
noexcept

Returns true if this location and the location Other have the same elementary data, i.e. contain the same series of TopLoc_Datum3D and respective powers. This method is an alias for operator ==.

◆ IsIdentity()

bool TopLoc_Location::IsIdentity ( ) const
noexcept

Returns true if this location is equal to the Identity transformation.

◆ Multiplied()

TopLoc_Location TopLoc_Location::Multiplied ( const TopLoc_Location & Other) const

Returns <me> * <Other>, the elementary datums are concatenated.

◆ NextLocation()

const TopLoc_Location & TopLoc_Location::NextLocation ( ) const

Returns a Location representing <me> without the first datum. We have the relation:

<me> = NextLocation() * FirstDatum() ^ FirstPower() Exceptions Standard_NoSuchObject if this location is empty.

◆ operator gp_Trsf()

TopLoc_Location::operator gp_Trsf ( ) const

◆ operator!=()

bool TopLoc_Location::operator!= ( const TopLoc_Location & theOther) const
inlinenoexcept

◆ operator*()

TopLoc_Location TopLoc_Location::operator* ( const TopLoc_Location & Other) const
inline

◆ operator/()

TopLoc_Location TopLoc_Location::operator/ ( const TopLoc_Location & Other) const
inline

◆ operator=() [1/2]

TopLoc_Location & TopLoc_Location::operator= ( const TopLoc_Location & theOther)
default

Copy assignment operator.

◆ operator=() [2/2]

TopLoc_Location & TopLoc_Location::operator= ( TopLoc_Location && theOther)
defaultnoexcept

Move assignment operator.

◆ operator==()

bool TopLoc_Location::operator== ( const TopLoc_Location & theOther) const
inlinenoexcept

◆ Powered()

TopLoc_Location TopLoc_Location::Powered ( const int pwr) const

Returns me at the power <pwr>. If <pwr> is zero returns Identity. <pwr> can be lower than zero (usual meaning for powers).

◆ Predivided()

TopLoc_Location TopLoc_Location::Predivided ( const TopLoc_Location & Other) const

Returns <Other>.Inverted() * <me>.

◆ ScalePrec()

static constexpr double TopLoc_Location::ScalePrec ( )
inlinestaticconstexprnoexcept

◆ ShallowDump()

void TopLoc_Location::ShallowDump ( Standard_OStream & S) const

Prints the contents of <me> on the stream .

◆ Transformation()

const gp_Trsf & TopLoc_Location::Transformation ( ) const

Returns the transformation associated to the coordinate system.


The documentation for this class was generated from the following file: