osg::HeightField Class Reference

Inheritance diagram for osg::HeightField:

Inheritance graph
[legend]

List of all members.

Public Types

typedef std::vector
< float > 
HeightList

Public Member Functions

 HeightField ()
 HeightField (const HeightField &mesh, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 META_Shape (osg, HeightField)
void allocate (unsigned int numColumns, unsigned int numRows)
unsigned int getNumColumns () const
unsigned int getNumRows () const
void setOrigin (const osg::Vec3 &origin)
const osg::Vec3getOrigin () const
void setXInterval (float dx)
float getXInterval () const
void setYInterval (float dy)
float getYInterval () const
osg::FloatArraygetFloatArray ()
 Get the FloatArray height data.
const osg::FloatArraygetFloatArray () const
 Get the const sFloatArray height data.
HeightListgetHeightList ()
const HeightListgetHeightList () const
void setSkirtHeight (float skirtHeight)
 Set the height of the skirt to render around the edge of HeightField.
float getSkirtHeight () const
 Get the height of the skirt to render around the edge of HeightField.
void setBorderWidth (unsigned int borderWidth)
 Set the width in number of cells in from the edge that the height field should be rendered from.
unsigned int getBorderWidth () const
 Get the width in number of cells in from the edge that the height field should be rendered from.
void setRotation (const Quat &quat)
const QuatgetRotation () const
Matrix computeRotationMatrix () const
bool zeroRotation () const
void setHeight (unsigned int c, unsigned int r, float value)
float & getHeight (unsigned int c, unsigned int r)
float getHeight (unsigned int c, unsigned int r) const
Vec3 getVertex (unsigned int c, unsigned int r) const
Vec3 getNormal (unsigned int c, unsigned int r) const
Vec2 getHeightDelta (unsigned int c, unsigned int r) const

Protected Member Functions

virtual ~HeightField ()

Protected Attributes

unsigned int _columns
unsigned int _rows
osg::Vec3 _origin
float _dx
float _dy
float _skirtHeight
unsigned int _borderWidth
Quat _rotation
osg::ref_ptr
< osg::FloatArray
_heights


Member Typedef Documentation

typedef std::vector<float> osg::HeightField::HeightList


Constructor & Destructor Documentation

osg::HeightField::HeightField (  ) 

osg::HeightField::HeightField ( const HeightField mesh,
const CopyOp copyop = CopyOp::SHALLOW_COPY 
)

virtual osg::HeightField::~HeightField (  )  [protected, virtual]


Member Function Documentation

osg::HeightField::META_Shape ( osg  ,
HeightField   
)

void osg::HeightField::allocate ( unsigned int  numColumns,
unsigned int  numRows 
)

unsigned int osg::HeightField::getNumColumns (  )  const [inline]

unsigned int osg::HeightField::getNumRows (  )  const [inline]

void osg::HeightField::setOrigin ( const osg::Vec3 origin  )  [inline]

const osg::Vec3& osg::HeightField::getOrigin (  )  const [inline]

void osg::HeightField::setXInterval ( float  dx  )  [inline]

float osg::HeightField::getXInterval (  )  const [inline]

void osg::HeightField::setYInterval ( float  dy  )  [inline]

float osg::HeightField::getYInterval (  )  const [inline]

osg::FloatArray* osg::HeightField::getFloatArray (  )  [inline]

Get the FloatArray height data.

const osg::FloatArray* osg::HeightField::getFloatArray (  )  const [inline]

Get the const sFloatArray height data.

HeightList& osg::HeightField::getHeightList (  )  [inline]

const HeightList& osg::HeightField::getHeightList (  )  const [inline]

void osg::HeightField::setSkirtHeight ( float  skirtHeight  )  [inline]

Set the height of the skirt to render around the edge of HeightField.

The skirt is used as a means of disguising edge boundaries between adjacent HeightField, particularly of ones with different resolutions.

float osg::HeightField::getSkirtHeight (  )  const [inline]

Get the height of the skirt to render around the edge of HeightField.

void osg::HeightField::setBorderWidth ( unsigned int  borderWidth  )  [inline]

Set the width in number of cells in from the edge that the height field should be rendered from.

This exists to allow gradient and curvature continutity to be maintained between adjacent HeightField, where the border cells will overlap adjacent HeightField.

unsigned int osg::HeightField::getBorderWidth (  )  const [inline]

Get the width in number of cells in from the edge that the height field should be rendered from.

void osg::HeightField::setRotation ( const Quat quat  )  [inline]

const Quat& osg::HeightField::getRotation (  )  const [inline]

Matrix osg::HeightField::computeRotationMatrix (  )  const [inline]

bool osg::HeightField::zeroRotation (  )  const [inline]

void osg::HeightField::setHeight ( unsigned int  c,
unsigned int  r,
float  value 
) [inline]

float& osg::HeightField::getHeight ( unsigned int  c,
unsigned int  r 
) [inline]

float osg::HeightField::getHeight ( unsigned int  c,
unsigned int  r 
) const [inline]

Vec3 osg::HeightField::getVertex ( unsigned int  c,
unsigned int  r 
) const [inline]

Vec3 osg::HeightField::getNormal ( unsigned int  c,
unsigned int  r 
) const

Vec2 osg::HeightField::getHeightDelta ( unsigned int  c,
unsigned int  r 
) const


Member Data Documentation

unsigned int osg::HeightField::_columns [protected]

unsigned int osg::HeightField::_rows [protected]

osg::Vec3 osg::HeightField::_origin [protected]

float osg::HeightField::_dx [protected]

float osg::HeightField::_dy [protected]

float osg::HeightField::_skirtHeight [protected]

unsigned int osg::HeightField::_borderWidth [protected]

Quat osg::HeightField::_rotation [protected]

osg::ref_ptr<osg::FloatArray> osg::HeightField::_heights [protected]


The documentation for this class was generated from the following file:
Generated at Sun Oct 14 02:12:16 2007 for the OpenSceneGraph by doxygen 1.5.3.