|
AGX Dynamics
2.37.2.0
|
This class provides a concrete, serializable base class which classes written in other languages can inherit from to create data sources. More...
#include <TerrainDataSource.h>
Inheritance diagram for agxTerrain::ExternalTerrainDataSource:Public Member Functions | |
| ExternalTerrainDataSource () | |
| Constructor. More... | |
| virtual TerrainHeightType | fetchTerrainTile (const TileSpecification &ts, agxTerrain::TileId id) override |
| Overload of TerrainDataSource::fetchTerrainTile for fetching terrain data. More... | |
| const char * | getClassName () const override |
| agxStream::StorageAgent * | getStorageAgent () const override |
| virtual bool | raycast (agx::Vec3 start, agx::Vec3 end, agx::Vec3 &raycastResult) override |
| Overload of TerrainDataSource::raycast for performing raycast against the data source. More... | |
| virtual void | restore (agxStream::InputArchive &in) override |
| virtual void | store (agxStream::OutputArchive &out) const override |
Public Member Functions inherited from agxTerrain::TerrainDataSource | |
| bool | addTerrainMaterialSourceGeometry (agxCollide::Geometry *geom, agx::UInt32 terrainMaterialIndex) |
| AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE (agxTerrain::TerrainDataSource) | |
| virtual TerrainMaterialsType | fetchTerrainMaterials (const TileSpecification &ts, agxTerrain::TileId id, agx::Real maxHeight) |
| Return assigned terrain material geometries in the requested tile. More... | |
| bool | removeMaterialSourceGeometry (agxCollide::Geometry *geom) |
| Removes a geometry from the TerrainRasterizer. More... | |
Public Member Functions inherited from agx::Referenced | |
| Referenced () | |
| Default constructor. More... | |
| Referenced (const Referenced &) | |
| template<typename T > | |
| T * | as () |
| Subclass casting. More... | |
| template<typename T > | |
| const T * | as () const |
| template<typename T > | |
| T * | asSafe () |
| Safe subclass casting, return nullptr if template type does not match. More... | |
| template<typename T > | |
| const T * | asSafe () const |
| int | getReferenceCount () const |
| template<typename T > | |
| bool | is () const |
| Subclass test. More... | |
| Referenced & | operator= (const Referenced &) |
| Assignment operator. Will increment the number of references to the referenced object. More... | |
| void | reference (void *ptr=nullptr) const |
| Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. More... | |
| void | unreference (void *ptr=nullptr) const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
| void | unreference_nodelete () const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
Public Member Functions inherited from agxStream::Serializable | |
| virtual | ~Serializable () |
| Destructor for normal C++ use but hidden from SWIG bindings. More... | |
| bool | getEnableSerialization () const |
| bool | getEnableUuidGeneration () |
| agx::UInt32 | getIndex () const |
| This index is given at creation of this object. More... | |
| agx::Uuid | getUuid () const |
| bool | isFinished () const |
| void | setEnableSerialization (bool flag) |
| Set to false to disable serialization of this object. More... | |
| void | setFinished () |
| Tells this class that it is restored correctly and should not be deleted during destruction of an Archive. More... | |
| void | setUuid (const agx::Uuid &uuid) |
| Explicitly set a Uuid on a serializable object. More... | |
Static Public Member Functions | |
| static agxStream::Serializable * | create () |
| static agxStream::Serializable * | create (agxStream::InputArchive &) |
| static const char * | getConstructClassId () |
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. More... | |
Protected Member Functions | |
| ~ExternalTerrainDataSource () | |
Protected Member Functions inherited from agx::Referenced | |
| virtual | ~Referenced () |
| Destructor. More... | |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
Protected Member Functions inherited from agxStream::Serializable | |
| Serializable () | |
| Default constructor. More... | |
| Serializable (const Serializable &other) | |
| Copy constructor. More... | |
| void | generateUuid () |
Additional Inherited Members | |
Public Types inherited from agxTerrain::TerrainDataSource | |
| typedef agx::RealVector | TerrainHeightType |
| Datatype used for returning height values. More... | |
| typedef agx::Vector< std::pair< agxCollide::Geometry *, agx::UInt32 > > | TerrainMaterialsType |
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. More... | |
Protected Attributes inherited from agxTerrain::TerrainDataSource | |
| agx::ReaderWriterLock | m_rwLock |
Protected Attributes inherited from agx::Referenced | |
| Mutex | m_mutex |
| ObserverContainer | m_observers |
| AtomicValue | m_refCount |
This class provides a concrete, serializable base class which classes written in other languages can inherit from to create data sources.
This class NOT meant to be used in C++ code or instantiated, only to provide an interface to child classes.
The need for this class arises from the TerrainDataSource class being an abstract class which in turn is not serializable, meaning that simulations containing external data source classes inheriting from TerrainDataSource fails during serialization.
The solution is to instead inherit from this class which disables serialization of the data source.
Definition at line 236 of file TerrainDataSource.h.
| agxTerrain::ExternalTerrainDataSource::ExternalTerrainDataSource | ( | ) |
Constructor.
Note that class should not be instantiated, only inherited
|
inlineprotected |
Definition at line 266 of file TerrainDataSource.h.
|
inlinestatic |
Definition at line 263 of file TerrainDataSource.h.
|
inlinestatic |
Definition at line 263 of file TerrainDataSource.h.
|
overridevirtual |
Overload of TerrainDataSource::fetchTerrainTile for fetching terrain data.
| ts | - The specification of how new tiles are created by the data source |
| id | - The id or position of the tile relative to other paged terrain tiles |
Implements agxTerrain::TerrainDataSource.
|
inlineoverridevirtual |
Reimplemented from agxStream::Serializable.
Definition at line 263 of file TerrainDataSource.h.
|
inlinestatic |
Definition at line 263 of file TerrainDataSource.h.
|
inlineoverridevirtual |
Implements agxStream::Serializable.
Definition at line 263 of file TerrainDataSource.h.
|
overridevirtual |
Overload of TerrainDataSource::raycast for performing raycast against the data source.
| start | - The start position of the raycast |
| end | - The end position of the raycast |
| raycastResult | - A reference to a Vec3 in which to store the point where the raycast hits the data source, |
Reimplemented from agxTerrain::TerrainDataSource.
|
overridevirtual |
Reimplemented from agxTerrain::TerrainDataSource.
|
overridevirtual |
Reimplemented from agxTerrain::TerrainDataSource.