19 #include <agx/config/AGX_USE_AGXTERRAIN.h>
235 bool m_loadedFromArchive;
240 return m_sampleLength;
245 m_sampleLength = length;
#define AGX_DECLARE_POINTER_TYPES(type)
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
#define AGXTERRAIN_EXPORT
The geometry representation used by the collision detection engine.
Class for writing serialized data in binary format to a stream.
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
This class provides a concrete, serializable base class which classes written in other languages can ...
~ExternalTerrainDataSource()
virtual bool raycast(agx::Vec3 start, agx::Vec3 end, agx::Vec3 &raycastResult) override
Overload of TerrainDataSource::raycast for performing raycast against the data source.
ExternalTerrainDataSource()
Constructor.
virtual TerrainHeightType fetchTerrainTile(const TileSpecification &ts, agxTerrain::TileId id) override
Overload of TerrainDataSource::fetchTerrainTile for fetching terrain data.
Abstract interface for requesting height data for a Terrain tile.
agx::RealVector TerrainHeightType
Datatype used for returning height values.
virtual TerrainHeightType fetchTerrainTile(const TileSpecification &ts, agxTerrain::TileId id)=0
Return height data for requested tile according to the TileSpecification.
AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(agxTerrain::TerrainDataSource)
virtual void store(agxStream::OutputArchive &out) const override
virtual bool raycast(agx::Vec3 start, agx::Vec3 end, agx::Vec3 &raycastResult)
Perform raycasting against the terrain.
virtual void restore(agxStream::InputArchive &in) override
This class performs raycasting against the source geometry to get height data for tiles.
bool removeSourceGeometry(agxCollide::Geometry *geom)
Removes a geometry from the TerrainRasterizer.
void setRayLength(agx::Real length)
Set the length of the ray.
virtual bool raycast(agx::Vec3 start, agx::Vec3 end, agx::Vec3 &raycastResult) override
Overload of TerrainDataSource::raycast for testing against source geometry.
virtual TerrainHeightType fetchTerrainTile(const TileSpecification &ts, agxTerrain::TileId id) override
Return height data for requested tile according to the TileSpecification.
agx::Real getRayLength() const
TerrainRasterizer(agx::Real sampleRayLength=1000.0)
Constructor.
bool addSourceGeometry(agxCollide::Geometry *geom)
The rasterizer can have one or more source geometries which are used when creating the terrain tiles.
A TileSpecification determines where in the world a 2D TileId is located and contains utility methods...
ReaderWriterLock provides shared access for readers and exclusive access for writers.
Base class providing referencing counted objects.
InputRef< T > in(const char *name, T &obj)
Create an object with a name and a reference to the object that should be restored (usually a pointer...
OutputRef< Serializable > out(const char *name, const Serializable *obj)
Return an object that contain the name and the object that should be serialized to an archive.
The agxTerrain namespace contains a 3D model for a dynamic deformable Terrain and related classes.
LinearProbingHashSetImplementation< KeyT, HashT >::iterator end(LinearProbingHashSetImplementation< KeyT, HashT > &set)