AnimatLab  2
Test
BlTerrain.h
1 
2 #pragma once
3 
4 namespace BulletAnimatSim
5 {
6  namespace Environment
7  {
8  namespace Bodies
9  {
10 
11  class BULLET_PORT BlTerrain : public AnimatSim::Environment::Bodies::Terrain, public BlMeshBase
12  {
13  protected:
14  osg::HeightField *m_osgHeightField;
15  btHeightfieldTerrainShape *m_btHeightField;
16 
18  btDefaultMotionState *m_btMotionState;
19 
22 
25 
26  //The adjustment height to set the btPart position so it will match the
27  //position of the osg terrain graphics.
28  float m_fltTerrainHeightAdjust;
29 
31  btScalar *m_aryHeightData;
32 
33  virtual void CreateGraphicsGeometry();
34  virtual void CreatePhysicsGeometry();
35  virtual void LoadMeshNode();
36 
37  virtual void CreateDynamicPart();
38  virtual void DeleteDynamicPart();
39 
40  public:
41  BlTerrain();
42  virtual ~BlTerrain();
43 
44  virtual void SetTexture(std::string strTexture);
45  virtual void Physics_FluidDataChanged();
46 
47  virtual void CreateParts();
48  virtual void CreateJoints();
49  };
50 
51  } //Bodies
52  } // Environment
53 } //BulletAnimatSim
btScalar * m_aryHeightData
The array of height data used by the btHeightfieldTerrainShape.
Definition: BlTerrain.h:31
Classes for implementing the cm-labs vortex physics engine for AnimatLab.
float m_fltMaxTerrainHeight
The maximum height returned by the CreateHeightField method.
Definition: BlTerrain.h:24
float m_fltMinTerrainHeight
The minimum height returned by the CreateHeightField method.
Definition: BlTerrain.h:21
The Terrain base class.
Definition: Terrain.h:25
btDefaultMotionState * m_btMotionState
Standard bullet motion state pointer.
Definition: BlTerrain.h:18