Physics::HeightFieldHandler Class Reference

GeometryHandler for height fields. More...

#include <GeometryHandlers.h>

Inheritance diagram for Physics::HeightFieldHandler:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 HeightFieldHandler (const osg::HeightField *pGfxHeightField, float thickness=1, const graphVec3 &offset_from_graph=graphVec3(0, 0, 0), bool bWarp=false)
 Builds a height field geometry handler from a graphical height field.
 HeightFieldHandler (const HeightFieldHandler &hf)
 Copy constructor used for clone() method.
virtual EGeomType type () const
virtual GeometryHandlerclone () const

Protected Member Functions

virtual dGeomID create (dSpaceID spaceId)
virtual ~HeightFieldHandler ()

Protected Attributes

float * pData
 Raw data.
float width
float depth
 Size of the height field.
UINT widthSamples
UINT depthSamples
 Number of points in the height field.
float scale
float offset
float thickness
bool bPlaceable
bool bWarp
dVector3 pos
 Initial position.
dQuaternion rot
 Initial rotation.
dHeightfieldDataID idHFData
 Data object for height field.
dGeomID idHF
 Height field itself (will be encapsulated in a transform).


Detailed Description

GeometryHandler for height fields.

Used for terrains that do not morph often (= a data copy is needed each time you change height data).

Version:
0.2.0 Simple version - Not morphable at this time !
Author:
Sukender

Definition at line 340 of file GeometryHandlers.h.


Constructor & Destructor Documentation

Physics::HeightFieldHandler::HeightFieldHandler ( const osg::HeightField *  pGfxHeightField,
float  thickness = 1,
const graphVec3 &  offset_from_graph = graphVec3(0,0,0),
bool  bWarp = false 
)

Builds a height field geometry handler from a graphical height field.

Parameters:
pGfxHeightField Graphical height field to copy data from.
thickness Volume size added at the bottom of the height field (from the lowest point) to ensure collisions are detected if a geom pass throught the height field.
offset_from_graph Offset from the pGfxHeightField, if needed (Ex: to put the physics slightly ontop of the graphics).
bWarp true to repeat the height field infinitely.

Definition at line 567 of file GeometryHandlers.cpp.

References ASSERT, depth, depthSamples, graphVec3, idHFData, pData, pos, rot, Physics::toPhyQuat(), Physics::toPhyVec3(), width, and widthSamples.

Physics::HeightFieldHandler::HeightFieldHandler ( const HeightFieldHandler hf  ) 

Copy constructor used for clone() method.

Definition at line 595 of file GeometryHandlers.cpp.

References ASSERT, depthSamples, idHFData, pData, pos, rot, and widthSamples.

virtual Physics::HeightFieldHandler::~HeightFieldHandler (  )  [inline, protected, virtual]

Definition at line 379 of file GeometryHandlers.h.


Member Function Documentation

virtual GeometryHandler* Physics::HeightFieldHandler::clone (  )  const [inline, virtual]

Implements Physics::GeometryHandler.

Definition at line 364 of file GeometryHandlers.h.

dGeomID Physics::HeightFieldHandler::create ( dSpaceID  spaceId  )  [protected, virtual]

virtual EGeomType Physics::HeightFieldHandler::type (  )  const [inline, virtual]

Implements Physics::GeometryHandler.

Definition at line 355 of file GeometryHandlers.h.


Member Data Documentation

Definition at line 373 of file GeometryHandlers.h.

Referenced by create().

Definition at line 373 of file GeometryHandlers.h.

Referenced by create().

Size of the height field.

Definition at line 370 of file GeometryHandlers.h.

Referenced by create(), and HeightFieldHandler().

Number of points in the height field.

Definition at line 371 of file GeometryHandlers.h.

Referenced by create(), and HeightFieldHandler().

dGeomID Physics::HeightFieldHandler::idHF [protected]

Height field itself (will be encapsulated in a transform).

Definition at line 377 of file GeometryHandlers.h.

Referenced by create().

dHeightfieldDataID Physics::HeightFieldHandler::idHFData [protected]

Data object for height field.

Definition at line 376 of file GeometryHandlers.h.

Referenced by create(), and HeightFieldHandler().

Definition at line 372 of file GeometryHandlers.h.

Referenced by create().

Raw data.

Definition at line 369 of file GeometryHandlers.h.

Referenced by create(), and HeightFieldHandler().

dVector3 Physics::HeightFieldHandler::pos [protected]

Initial position.

Definition at line 374 of file GeometryHandlers.h.

Referenced by create(), and HeightFieldHandler().

dQuaternion Physics::HeightFieldHandler::rot [protected]

Initial rotation.

Definition at line 375 of file GeometryHandlers.h.

Referenced by create(), and HeightFieldHandler().

Definition at line 372 of file GeometryHandlers.h.

Referenced by create().

Definition at line 372 of file GeometryHandlers.h.

Referenced by create().

Definition at line 370 of file GeometryHandlers.h.

Referenced by create(), and HeightFieldHandler().

Definition at line 371 of file GeometryHandlers.h.

Referenced by create(), and HeightFieldHandler().


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

Generated on Sun Jan 17 11:39:36 2010 for PVLE (Pro-Vocation Light Engine) by  doxygen 1.5.9