AGX Dynamics 2.42.3.0
Loading...
Searching...
No Matches
agxTerrain::ForbiddenIndex2DBound Class Reference

Class for specifying a 2D terrain index bound where terrain operations like merging and avalanching is forbbiden. More...

#include <ForbiddenBound.h>

+ Inheritance diagram for agxTerrain::ForbiddenIndex2DBound:

Public Member Functions

 ForbiddenIndex2DBound (const agx::Bound2i &bound)
 Constructor for a 2D index ForbiddenBound.
 
virtual bool containsIndex (const agx::Vec3i &terrainIndex, agxTerrain::Terrain *terrain) const override
 Checks if the specified terrain index is contained in the ForbiddenBound for a specified terrain.
 
virtual bool containsPosition (const agx::Vec3 &position, agxTerrain::Terrain *terrain) const override
 Checks if the specified world position is contained in the ForbiddenBound for a specified terrain.
 
agx::Bound2i getBound () const
 
- Public Member Functions inherited from agxTerrain::IForbiddenBound
 AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE (IForbiddenBound)
 
virtual bool containsIndex (const agx::Vec3i &terrainIndex, agxTerrain::Terrain *terrain) const =0
 Checks if the specified terrain index is contained in the ForbiddenBound for a specified terrain.
 
virtual bool containsPosition (const agx::Vec3 &position, agxTerrain::Terrain *terrain) const =0
 Checks if the specified world position is contained in the ForbiddenBound for a specified terrain.
 
virtual void debugRender (agxTerrain::Terrain *terrain, agx::Real size, const agxRender::Color &color, bool isStatic) const =0
 
bool getEnable () const
 Get enable of the forbidden bound.
 
bool getEnableDebugRendering () const
 
void setEnable (bool enable)
 Set enable of the forbidden bound.
 
void setEnableDebugRendering (bool enable)
 Set enable of debug rendering of the forbidden bound.
 
- Public Member Functions inherited from agx::Referenced
 Referenced ()
 Default constructor.
 
 Referenced (const Referenced &)
 
template<typename T >
T * as ()
 Subclass casting.
 
template<typename T >
const T * as () const
 
template<typename T >
T * asSafe ()
 Safe subclass casting, return nullptr if template type does not match.
 
template<typename T >
const T * asSafe () const
 
int getReferenceCount () const
 
template<typename T >
bool is () const
 Subclass test.
 
Referenced & operator= (const Referenced &)
 Assignment operator. Will increment the number of references to the referenced object.
 
void reference (void *ptr=nullptr) const
 Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.
 
void unreference (void *ptr=nullptr) const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it.
 
void unreference_nodelete () const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it.
 
- Public Member Functions inherited from agxStream::Serializable
virtual ~Serializable ()
 Destructor for normal C++ use but hidden from SWIG bindings.
 
virtual const char * getClassName () const
 
bool getEnableSerialization () const
 
bool getEnableUuidGeneration ()
 
agx::UInt32 getIndex () const
 This index is given at creation of this object.
 
virtual StorageAgent * getStorageAgent () const =0
 
agx::Uuid getUuid () const
 
bool isFinished () const
 
void setEnableSerialization (bool flag)
 Set to false to disable serialization of this object.
 
void setFinished ()
 Tells this class that it is restored correctly and should not be deleted during destruction of an Archive.
 
void setUuid (const agx::Uuid &uuid)
 Explicitly set a Uuid on a serializable object.
 

Protected Member Functions

 ForbiddenIndex2DBound ()
 
virtual ~ForbiddenIndex2DBound ()=default
 
- Protected Member Functions inherited from agxTerrain::IForbiddenBound
 IForbiddenBound ()
 
virtual ~IForbiddenBound ()=default
 
void restore (agxStream::InputArchive &in) override
 Restore.
 
void store (agxStream::OutputArchive &out) const override
 Store.
 
- Protected Member Functions inherited from agx::Referenced
virtual ~Referenced ()
 Destructor.
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 
- Protected Member Functions inherited from agxStream::Serializable
 Serializable ()
 Default constructor.
 
 Serializable (const Serializable &other)
 Copy constructor.
 
void generateUuid ()
 

Protected Attributes

agx::Bound2i m_bound
 
- Protected Attributes inherited from agxTerrain::IForbiddenBound
bool m_enable
 
bool m_enableDebugRendering
 
- Protected Attributes inherited from agx::Referenced
Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

Additional Inherited Members

- Static Public Member Functions inherited from agx::Referenced
template<typename T >
static bool ValidateCast (const Referenced *object)
 
- Static Public Member Functions inherited from agxStream::Serializable
static void setEnableUuidGeneration (bool flag)
 Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled.
 
- Static Protected Member Functions inherited from agx::Referenced
static DeleteHandler * getDeleteHandler ()
 
static void setDeleteHandler (DeleteHandler *handler)
 Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
 

Detailed Description

Class for specifying a 2D terrain index bound where terrain operations like merging and avalanching is forbbiden.

Definition at line 255 of file ForbiddenBound.h.

Constructor & Destructor Documentation

◆ ForbiddenIndex2DBound() [1/2]

agxTerrain::ForbiddenIndex2DBound::ForbiddenIndex2DBound ( const agx::Bound2i &  bound)

Constructor for a 2D index ForbiddenBound.

Parameters
bound- The specified local terrain index 2D Axis-Alinged bound that will be used.
Note
containsPosition uses the supplied terrain to convert the world position to a local terrain index.

◆ ForbiddenIndex2DBound() [2/2]

agxTerrain::ForbiddenIndex2DBound::ForbiddenIndex2DBound ( )
protected

◆ ~ForbiddenIndex2DBound()

virtual agxTerrain::ForbiddenIndex2DBound::~ForbiddenIndex2DBound ( )
protectedvirtualdefault

Member Function Documentation

◆ containsIndex()

virtual bool agxTerrain::ForbiddenIndex2DBound::containsIndex ( const agx::Vec3i &  terrainIndex,
agxTerrain::Terrain *  terrain 
) const
overridevirtual

Checks if the specified terrain index is contained in the ForbiddenBound for a specified terrain.

Parameters
terrainIndex- The specified 3D index to test against the 2D bound. Note that only the x and y components of the specified index will be used in the check.
terrain- the terrain object that will be used to transform the index to a position that can be tested against the specified bound, if nessecary.
Note
only the x and y components of the supplied 3D index will be used in the bounds checking.

Implements agxTerrain::IForbiddenBound.

◆ containsPosition()

virtual bool agxTerrain::ForbiddenIndex2DBound::containsPosition ( const agx::Vec3 &  position,
agxTerrain::Terrain *  terrain 
) const
overridevirtual

Checks if the specified world position is contained in the ForbiddenBound for a specified terrain.

Parameters
position- The specified world position to test against bound.
terrain- the terrain object that will be used to transform the position to a local terrain index that can be tested against the specified bound, if nessecary.

Implements agxTerrain::IForbiddenBound.

◆ getBound()

agx::Bound2i agxTerrain::ForbiddenIndex2DBound::getBound ( ) const
inline
Returns
the internal bound.

Definition at line 291 of file ForbiddenBound.h.

Member Data Documentation

◆ m_bound

agx::Bound2i agxTerrain::ForbiddenIndex2DBound::m_bound
protected

Definition at line 309 of file ForbiddenBound.h.


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