OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
osg::HeightField Class Reference

#include <Shape.h>

Inheritance diagram for osg::HeightField:
Inheritance graph
[legend]
Collaboration diagram for osg::HeightField:
Collaboration graph
[legend]

Public Types

typedef std::vector< float > HeightList
 
- Public Types inherited from osg::Object
enum  DataVariance { DYNAMIC, STATIC, UNSPECIFIED }
 

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 ()
 
const osg::FloatArraygetFloatArray () const
 
HeightListgetHeightList ()
 
const HeightListgetHeightList () const
 
void setSkirtHeight (float skirtHeight)
 
float getSkirtHeight () const
 
void setBorderWidth (unsigned int borderWidth)
 
unsigned int getBorderWidth () const
 
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
 
- Public Member Functions inherited from osg::Shape
 Shape ()
 
 Shape (const Shape &sa, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 
virtual ObjectcloneType () const =0
 
virtual Objectclone (const CopyOp &) const =0
 
virtual bool isSameKindAs (const Object *obj) const
 
virtual const char * libraryName () const
 
virtual const char * className () const
 
virtual void accept (ShapeVisitor &)=0
 
virtual void accept (ConstShapeVisitor &) const =0
 
- Public Member Functions inherited from osg::Object
 Object ()
 
 Object (bool threadSafeRefUnref)
 
 Object (const Object &, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 
std::string getCompoundClassName () const
 
virtual NodeasNode ()
 
virtual const NodeasNode () const
 
virtual NodeVisitorasNodeVisitor ()
 
virtual const NodeVisitorasNodeVisitor () const
 
virtual StateAttributeasStateAttribute ()
 
virtual const StateAttributeasStateAttribute () const
 
virtual UniformasUniform ()
 
virtual const UniformasUniform () const
 
virtual void setThreadSafeRefUnref (bool threadSafe)
 
virtual void setName (const std::string &name)
 
void setName (const char *name)
 
const std::string & getName () const
 
void setDataVariance (DataVariance dv)
 
DataVariance getDataVariance () const
 
virtual void computeDataVariance ()
 
void setUserDataContainer (osg::UserDataContainer *udc)
 
osg::UserDataContainergetUserDataContainer ()
 
const osg::UserDataContainergetUserDataContainer () const
 
osg::UserDataContainergetOrCreateUserDataContainer ()
 
virtual void setUserData (Referenced *obj)
 
virtual ReferencedgetUserData ()
 
virtual const ReferencedgetUserData () const
 
template<typename T >
bool getUserValue (const std::string &name, T &value) const
 
template<typename T >
void setUserValue (const std::string &name, const T &value)
 
virtual void resizeGLObjectBuffers (unsigned int)
 
virtual void releaseGLObjects (osg::State *=0) const
 
template<typename T >
BoolValueObject
UCharValueObject
UShortValueObject
UIntValueObject
DoubleValueObject
Vec3fValueObject
Vec2dValueObject
Vec4dValueObject
PlaneValueObject
MatrixdValueObject
BoundingBoxdValueObject
BoundingSpheredValueObject
bool 
getUserValue (const std::string &name, T &value) const
 
- Public Member Functions inherited from osg::Referenced
 Referenced ()
 
 Referenced (bool threadSafeRefUnref)
 
 Referenced (const Referenced &)
 
Referencedoperator= (const Referenced &)
 
bool getThreadSafeRefUnref () const
 
OpenThreads::MutexgetRefMutex () const
 
int ref () const
 
int unref () const
 
int unref_nodelete () const
 
int referenceCount () const
 
ObserverSetgetObserverSet () const
 
ObserverSetgetOrCreateObserverSet () const
 
void addObserver (Observer *observer) const
 
void removeObserver (Observer *observer) const
 

Protected Member Functions

virtual ~HeightField ()
 
- Protected Member Functions inherited from osg::Shape
virtual ~Shape ()
 
- Protected Member Functions inherited from osg::Object
virtual ~Object ()
 
- Protected Member Functions inherited from osg::Referenced
virtual ~Referenced ()
 
void signalObserversAndDelete (bool signalDelete, bool doDelete) const
 
void deleteUsingDeleteHandler () const
 

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
 
- Protected Attributes inherited from osg::Object
std::string _name
 
DataVariance _dataVariance
 
osg::UserDataContainer_userDataContainer
 
- Protected Attributes inherited from osg::Referenced
OpenThreads::AtomicPtr _observerSet
 
OpenThreads::Atomic _refCount
 

Additional Inherited Members

- Static Public Member Functions inherited from osg::Referenced
static OpenThreads::MutexgetGlobalReferencedMutex ()
 
static void setThreadSafeReferenceCounting (bool enableThreadSafeReferenceCounting)
 
static bool getThreadSafeReferenceCounting ()
 
static void setDeleteHandler (DeleteHandler *handler)
 
static DeleteHandlergetDeleteHandler ()
 

Detailed Description

Definition at line 481 of file Shape.h.

Member Typedef Documentation

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

Definition at line 491 of file Shape.h.

Constructor & Destructor Documentation

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

Member Function Documentation

void osg::HeightField::allocate ( unsigned int  numColumns,
unsigned int  numRows 
)
Matrix osg::HeightField::computeRotationMatrix ( ) const
inline

Definition at line 535 of file Shape.h.

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.

Definition at line 531 of file Shape.h.

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

Get the FloatArray height data.

Definition at line 508 of file Shape.h.

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

Get the const FloatArray height data.

Definition at line 511 of file Shape.h.

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

Definition at line 545 of file Shape.h.

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

Definition at line 551 of file Shape.h.

Vec2 osg::HeightField::getHeightDelta ( unsigned int  c,
unsigned int  r 
) const
HeightList& osg::HeightField::getHeightList ( )
inline

Definition at line 513 of file Shape.h.

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

Definition at line 515 of file Shape.h.

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

Definition at line 495 of file Shape.h.

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

Definition at line 496 of file Shape.h.

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

Definition at line 499 of file Shape.h.

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

Definition at line 534 of file Shape.h.

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

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

Definition at line 523 of file Shape.h.

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

Definition at line 556 of file Shape.h.

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

Definition at line 502 of file Shape.h.

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

Definition at line 505 of file Shape.h.

osg::HeightField::META_Shape ( osg  ,
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.

Definition at line 528 of file Shape.h.

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

Definition at line 539 of file Shape.h.

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

Definition at line 498 of file Shape.h.

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

Definition at line 533 of file Shape.h.

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.

Definition at line 520 of file Shape.h.

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

Definition at line 501 of file Shape.h.

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

Definition at line 504 of file Shape.h.

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

Definition at line 536 of file Shape.h.

Member Data Documentation

unsigned int osg::HeightField::_borderWidth
protected

Definition at line 578 of file Shape.h.

unsigned int osg::HeightField::_columns
protected

Definition at line 571 of file Shape.h.

float osg::HeightField::_dx
protected

Definition at line 574 of file Shape.h.

float osg::HeightField::_dy
protected

Definition at line 575 of file Shape.h.

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

Definition at line 581 of file Shape.h.

osg::Vec3 osg::HeightField::_origin
protected

Definition at line 573 of file Shape.h.

Quat osg::HeightField::_rotation
protected

Definition at line 580 of file Shape.h.

unsigned int osg::HeightField::_rows
protected

Definition at line 571 of file Shape.h.

float osg::HeightField::_skirtHeight
protected

Definition at line 577 of file Shape.h.


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