AGX Dynamics 2.42.3.0
Loading...
Searching...
No Matches
agxTerrain::IForbiddenBound Class Referenceabstract

Base abstract class for specifying different types of bounds bound where terrain operations like merging and avalanching is forbbiden. More...

#include <ForbiddenBound.h>

+ Inheritance diagram for agxTerrain::IForbiddenBound:

Public Member Functions

 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

 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

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

Base abstract class for specifying different types of bounds bound where terrain operations like merging and avalanching is forbbiden.

Definition at line 38 of file ForbiddenBound.h.

Constructor & Destructor Documentation

◆ IForbiddenBound()

agxTerrain::IForbiddenBound::IForbiddenBound ( )
protected

◆ ~IForbiddenBound()

virtual agxTerrain::IForbiddenBound::~IForbiddenBound ( )
protectedvirtualdefault

Member Function Documentation

◆ AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE()

agxTerrain::IForbiddenBound::AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE ( IForbiddenBound  )

◆ containsIndex()

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

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

Parameters
terrainIndex- The specified index to test against bound.
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.

Implemented in agxTerrain::ForbiddenBound, agxTerrain::ForbiddenIndexBound, and agxTerrain::ForbiddenIndex2DBound.

◆ containsPosition()

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

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.

Implemented in agxTerrain::ForbiddenBound, agxTerrain::ForbiddenIndexBound, and agxTerrain::ForbiddenIndex2DBound.

◆ debugRender()

virtual void agxTerrain::IForbiddenBound::debugRender ( agxTerrain::Terrain *  terrain,
agx::Real  size,
const agxRender::Color &  color,
bool  isStatic 
) const
pure virtual

◆ getEnable()

bool agxTerrain::IForbiddenBound::getEnable ( ) const
inline

Get enable of the forbidden bound.

If false all contains checks will return false.

Definition at line 77 of file ForbiddenBound.h.

◆ getEnableDebugRendering()

bool agxTerrain::IForbiddenBound::getEnableDebugRendering ( ) const
inline
Returns
if debug rendering of the forbidden bound. All debugRender() calls will produce nothing if this is disabled.

Definition at line 89 of file ForbiddenBound.h.

◆ restore()

void agxTerrain::IForbiddenBound::restore ( agxStream::InputArchive &  in)
overrideprotected

Restore.

Abstract serializable, so child classes must explicitly call these methods.

◆ setEnable()

void agxTerrain::IForbiddenBound::setEnable ( bool  enable)
inline

Set enable of the forbidden bound.

If false all contains checks will return false.

Definition at line 72 of file ForbiddenBound.h.

◆ setEnableDebugRendering()

void agxTerrain::IForbiddenBound::setEnableDebugRendering ( bool  enable)
inline

Set enable of debug rendering of the forbidden bound.

All debugRender() calls will produce nothing if this is disabled.

Definition at line 83 of file ForbiddenBound.h.

◆ store()

void agxTerrain::IForbiddenBound::store ( agxStream::OutputArchive &  out) const
overrideprotected

Store.

Abstract serializable, so child classes must explicitly call these methods.

Member Data Documentation

◆ m_enable

bool agxTerrain::IForbiddenBound::m_enable
protected

Definition at line 108 of file ForbiddenBound.h.

◆ m_enableDebugRendering

bool agxTerrain::IForbiddenBound::m_enableDebugRendering
protected

Definition at line 110 of file ForbiddenBound.h.


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