Trax3 3.1.0
trax track library
Loading...
Searching...
No Matches
trax::GeomHeightField Struct Referenceabstract
Inheritance diagram for trax::GeomHeightField:

Public Member Functions

virtual bool Create (const short *pSamples, const bool *pbHoles, int nRows, int nCols, Real vertScale, Real horzScale)=0
 Creates a heightfield from data.
virtual bool CreateEEPStyle (const short *pSamples, const bool *pbHoles, int nRows, int nCols, Real vertScale, Real horzScale)=0
 creates a heightfield from data in the EEP style.
virtual Length Height (const spat::Position2D< Length > &parameter) const =0
virtual void Get (const spat::Position2D< Length > &parameter, spat::Position< Length > &pos) const =0
virtual void Get (const spat::Position2D< Length > &parameter, spat::Frame< Length, One > &frame) const =0
Public Member Functions inherited from trax::Geom
virtual const char * TypeName () const noexcept=0
virtual std::unique_ptr< GeomInstance () const noexcept=0
 Creates a new geom that will share shape data with the existing one.
virtual void SetName (const char *name) noexcept=0
 Sets the name of the Geom.
virtual const char * GetName () const noexcept=0
virtual void SetFrame (const spat::Frame< Length, One > &frame) noexcept=0
 Sets position and orientation (pose) relative to a Body's frame.
virtual void GetFrame (spat::Frame< Length, One > &frame) const noexcept=0
 Gets the pose relative to a Body's frame.
virtual spat::Box< LengthGetExtent () const noexcept=0
 Gets the minimum axis aligned box that includes the the Geom completely.
virtual void SetMaterial (const Material &material) noexcept=0
 Sets the material to be applied with the Geom.
virtual const MaterialGetMaterial () const noexcept=0
virtual GeomType GetGeomType () const noexcept=0
virtual void TypeFilter (Filters type) noexcept=0
 Specify a flag for the type of this Geom.
virtual Filters TypeFilter () const noexcept=0
virtual void CollisionFilter (unsigned int collideWith) noexcept=0
 Specify the collision bitfield.
virtual unsigned int CollisionFilter () const noexcept=0

Additional Inherited Members

Public Types inherited from trax::Geom
enum  Filters : unsigned int {
  none = 0 , fBogie = 0x00000001 , fChildBogie = 0x00000002 , fWheelset = 0x00000004 ,
  fCargo = 0x00000008 , fTerrain = 0x00000010 , fBogieSpace = 0x00000020 , fCrane = 0x00000040 ,
  fConstruction = 0x00000080 , fHook = 0x00000100 , fHookFixed = 0x00000200 , fCouplingNorth = 0x00000400 ,
  fCouplingSouth = 0x00000800 , fTriggerShape = 0x00001000 , fCabin = 0x00002000 , fBogieNoCabin = 0x00004000 ,
  fBuffer = 0x00008000 , fTrack = 0x00010000 , fMovableTrack = 0x00020000 , fAll = 0x2fffffff
}
 Filter flags that will serve in fast collision testing. More...

Member Function Documentation

◆ Create()

virtual bool trax::GeomHeightField::Create ( const short * pSamples,
const bool * pbHoles,
int nRows,
int nCols,
Real vertScale,
Real horzScale )
pure virtual

Creates a heightfield from data.

The quads are tesselated as [i],[i+nCols+1],[i+1] and [i],[i+nCols],[i+nCols+1]. If all three adjacent samples of a triangle have the cooresponding hole information flag set to true, the triangle would not be created as a collision shape.

Parameters
pSamplesArray with the elevation data of the sample points. Length must be at least nRows*nCols.
pbHolesArray with the hole information. Length must be at least nRows*nCols.
nRowsNumber of rows in the heightfield.
nColsNumber of columns in the heightfield.
vertScaleVertical scale factor.
horzScaleHorizontal scale factor.

◆ CreateEEPStyle()

virtual bool trax::GeomHeightField::CreateEEPStyle ( const short * pSamples,
const bool * pbHoles,
int nRows,
int nCols,
Real vertScale,
Real horzScale )
pure virtual

creates a heightfield from data in the EEP style.

There will only be quads erased, no single triangles. A quad is erased if its topleft, topright and bottomright sample show the hole flag.


The documentation for this struct was generated from the following file:
  • C:/Trend/Development/Trax3/Code/trax/rigid/Geom.h