osgSim::ImpostorSprite Class Reference

`#include <ImpostorSprite>`

Inheritance diagram for osgSim::ImpostorSprite:

## Public Member Functions

| ImpostorSprite ()
virtual osg::Object * | cloneType () const
virtual osg::Object * | clone (const osg::CopyOp &) const
virtual bool | isSameKindAs (const osg::Object *obj) const
virtual const char * | libraryName () const
virtual const char * | className () const
void | setParent (Impostor *parent)
Impostor * | getParent ()
const Impostor * | getParent () const
void | setStoredLocalEyePoint (const osg::Vec3 &v)
const osg::Vec3 & | getStoredLocalEyePoint () const
void | setLastFrameUsed (unsigned int frameNumber)
unsigned int | getLastFrameUsed () const
void | dirty ()
osg::Vec3 * | getCoords ()
const osg::Vec3 * | getCoords () const
osg::Vec2 * | getTexCoords ()
const osg::Vec2 * | getTexCoords () const
osg::Vec3 * | getControlCoords ()
const osg::Vec3 * | getControlCoords () const
float | calcPixelError (const osg::Matrix &MVPW) const
void | setTexture (osg::Texture2D *tex, int s, int t)
osg::Texture2D * | getTexture ()
const osg::Texture2D * | getTexture () const
int | s () const
int | t () const
void | setCamera (osg::Camera *camera)
osg::Camera * | getCamera ()
const osg::Camera * | getCamera () const
Public Member Functions inherited from osg::Geometry
| Geometry ()
| Geometry (const Geometry &geometry, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
| META_Node (osg, Geometry)
virtual Geometry * | asGeometry ()
virtual const Geometry * | asGeometry () const
bool | empty () const
void | setVertexArray (Array *array)
Array * | getVertexArray ()
const Array * | getVertexArray () const
void | setNormalArray (Array *array)
void | setNormalArray (Array *array, osg::Array::Binding binding)
Array * | getNormalArray ()
const Array * | getNormalArray () const
void | setColorArray (Array *array)
void | setColorArray (Array *array, osg::Array::Binding binding)
Array * | getColorArray ()
const Array * | getColorArray () const
void | setSecondaryColorArray (Array *array)
void | setSecondaryColorArray (Array *array, osg::Array::Binding binding)
Array * | getSecondaryColorArray ()
const Array * | getSecondaryColorArray () const
void | setFogCoordArray (Array *array)
void | setFogCoordArray (Array *array, osg::Array::Binding binding)
Array * | getFogCoordArray ()
const Array * | getFogCoordArray () const
void | setTexCoordArray (unsigned int unit, Array *array)
void | setTexCoordArray (unsigned int unit, Array *array, osg::Array::Binding binding)
Array * | getTexCoordArray (unsigned int unit)
const Array * | getTexCoordArray (unsigned int unit) const
unsigned int | getNumTexCoordArrays () const
void | setTexCoordArrayList (const ArrayList &arrrayList)
ArrayList & | getTexCoordArrayList ()
const ArrayList & | getTexCoordArrayList () const
void | setVertexAttribArray (unsigned int index, Array *array)
void | setVertexAttribArray (unsigned int index, Array *array, osg::Array::Binding binding)
Array * | getVertexAttribArray (unsigned int index)
const Array * | getVertexAttribArray (unsigned int index) const
unsigned int | getNumVertexAttribArrays () const
void | setVertexAttribArrayList (const ArrayList &arrayList)
ArrayList & | getVertexAttribArrayList ()
const ArrayList & | getVertexAttribArrayList () const
void | setPrimitiveSetList (const PrimitiveSetList &primitives)
PrimitiveSetList & | getPrimitiveSetList ()
const PrimitiveSetList & | getPrimitiveSetList () const
unsigned int | getNumPrimitiveSets () const
PrimitiveSet * | getPrimitiveSet (unsigned int pos)
const PrimitiveSet * | getPrimitiveSet (unsigned int pos) const
bool | addPrimitiveSet (PrimitiveSet *primitiveset)
bool | setPrimitiveSet (unsigned int i, PrimitiveSet *primitiveset)
bool | insertPrimitiveSet (unsigned int i, PrimitiveSet *primitiveset)
bool | removePrimitiveSet (unsigned int i, unsigned int numElementsToRemove=1)
unsigned int | getPrimitiveSetIndex (const PrimitiveSet *primitiveset) const
void | configureBufferObjects ()
bool | containsSharedArrays () const
void | duplicateSharedArrays ()
virtual void | setUseVertexBufferObjects (bool flag)
virtual void | dirtyGLObjects ()
virtual void | resizeGLObjectBuffers (unsigned int maxSize)
virtual void | releaseGLObjects (State *state=0) const
bool | getArrayList (ArrayList &arrayList) const
bool | getDrawElementsList (DrawElementsList &drawElementsList) const
osg::VertexBufferObject * | getOrCreateVertexBufferObject ()
osg::ElementBufferObject * | getOrCreateElementBufferObject ()
virtual unsigned int | getGLObjectSizeHint () const
virtual void | compileGLObjects (RenderInfo &renderInfo) const
virtual void | drawImplementation (RenderInfo &renderInfo) const
void | drawVertexArraysImplementation (RenderInfo &renderInfo) const
void | drawPrimitivesImplementation (RenderInfo &renderInfo) const
virtual bool | supports (const Drawable::AttributeFunctor &) const
virtual void | accept (Drawable::AttributeFunctor &af)
virtual bool | supports (const Drawable::ConstAttributeFunctor &) const
virtual void | accept (Drawable::ConstAttributeFunctor &af) const
virtual bool | supports (const PrimitiveFunctor &) const
virtual void | accept (PrimitiveFunctor &pf) const
virtual bool | supports (const PrimitiveIndexFunctor &) const
virtual void | accept (PrimitiveIndexFunctor &pf) const
bool | containsDeprecatedData () const
bool | checkForDeprecatedData ()
void | fixDeprecatedData ()
void | setNormalBinding (AttributeBinding ab)
void | setColorBinding (AttributeBinding ab)
void | setSecondaryColorBinding (AttributeBinding ab)
void | setFogCoordBinding (AttributeBinding ab)
void | setVertexAttribBinding (unsigned int index, AttributeBinding ab)
AttributeBinding | getNormalBinding () const
AttributeBinding | getColorBinding () const
AttributeBinding | getSecondaryColorBinding () const
AttributeBinding | getFogCoordBinding () const
AttributeBinding | getVertexAttribBinding (unsigned int index) const
void | setVertexAttribNormalize (unsigned int index, GLboolean norm)
GLboolean | getVertexAttribNormalize (unsigned int index) const
Public Member Functions inherited from osg::Drawable
| Drawable ()
| Drawable (const Drawable &drawable, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
| META_Node (osg, Drawable)
virtual Drawable * | asDrawable ()
virtual const Drawable * | asDrawable () const
virtual void | computeDataVariance ()
MatrixList | getWorldMatrices (const osg::Node *haltTraversalAtNode=0) const
void | setInitialBound (const osg::BoundingBox &bbox)
const BoundingBox & | getInitialBound () const
const BoundingSphere & | getBound () const
const BoundingBox & | getBoundingBox () const
virtual BoundingSphere | computeBound () const
virtual BoundingBox | computeBoundingBox () const
void | setComputeBoundingBoxCallback (ComputeBoundingBoxCallback *callback)
ComputeBoundingBoxCallback * | getComputeBoundingBoxCallback ()
const ComputeBoundingBoxCallback * | getComputeBoundingBoxCallback () const
virtual void | setShape (Shape *shape)
template<class T>
void | setShape (const ref_ptr< T > &shape)
Shape * | getShape ()
const Shape * | getShape () const
void | setSupportsDisplayList (bool flag)
bool | getSupportsDisplayList () const
void | setUseDisplayList (bool flag)
bool | getUseDisplayList () const
GLuint & | getDisplayList (unsigned int contextID) const
bool | getUseVertexBufferObjects () const
void | setUseVertexArrayObject (bool flag)
bool | getUseVertexArrayObject () const
void | draw (RenderInfo &renderInfo) const
void | drawInner (RenderInfo &renderInfo) const
void | setCreateVertexArrayStateCallback (CreateVertexArrayStateCallback *cb)
CreateVertexArrayStateCallback * | getCreateVertexArrayStateCallback ()
const CreateVertexArrayStateCallback * | getCreateVertexArrayStateCallback () const
VertexArrayState * | createVertexArrayState (RenderInfo &renderInfo) const
void | setVertexArrayStateList (VertexArrayStateList &vasl)
VertexArrayStateList & | getVertexArrayStateList ()
const VertexArrayStateList & | getVertexArrayStateList () const
virtual void | setThreadSafeRefUnref (bool threadSafe)
virtual void | setDrawCallback (DrawCallback *dc)
DrawCallback * | getDrawCallback ()
const DrawCallback * | getDrawCallback () const
Public Member Functions inherited from osg::Node
| Node ()
| Node (const Node &, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
virtual Node * | asNode ()
virtual const Node * | asNode () const
virtual Group * | asGroup ()
virtual const Group * | asGroup () const
virtual Transform * | asTransform ()
virtual const Transform * | asTransform () const
virtual Switch * | asSwitch ()
virtual const Switch * | asSwitch () const
virtual Geode * | asGeode ()
virtual const Geode * | asGeode () const
virtual osgTerrain::Terrain * | asTerrain ()
virtual const osgTerrain::Terrain * | asTerrain () const
virtual void | accept (NodeVisitor &nv)
virtual void | ascend (NodeVisitor &nv)
virtual void | traverse (NodeVisitor &)
const ParentList & | getParents () const
ParentList | getParents ()
Group * | getParent (unsigned int i)
const Group * | getParent (unsigned int i) const
unsigned int | getNumParents () const
NodePathList | getParentalNodePaths (osg::Node *haltTraversalAtNode=0) const
MatrixList | getWorldMatrices (const osg::Node *haltTraversalAtNode=0) const
void | setUpdateCallback (Callback *nc)
template<class T>
void | setUpdateCallback (const ref_ptr< T > &nc)
Callback * | getUpdateCallback ()
const Callback * | getUpdateCallback () const
void | addUpdateCallback (Callback *nc)
template<class T>
void | addUpdateCallback (const ref_ptr< T > &nc)
void | removeUpdateCallback (Callback *nc)
template<class T>
void | removeUpdateCallback (const ref_ptr< T > &nc)
unsigned int | getNumChildrenRequiringUpdateTraversal () const
void | setEventCallback (Callback *nc)
template<class T>
void | setEventCallback (const ref_ptr< T > &nc)
Callback * | getEventCallback ()
const Callback * | getEventCallback () const
void | addEventCallback (Callback *nc)
template<class T>
void | addEventCallback (const ref_ptr< T > &nc)
void | removeEventCallback (Callback *nc)
template<class T>
void | removeEventCallback (const ref_ptr< T > &nc)
unsigned int | getNumChildrenRequiringEventTraversal () const
void | setCullCallback (Callback *nc)
template<class T>
void | setCullCallback (const ref_ptr< T > &nc)
Callback * | getCullCallback ()
const Callback * | getCullCallback () const
void | addCullCallback (Callback *nc)
template<class T>
void | addCullCallback (const ref_ptr< T > &nc)
void | removeCullCallback (Callback *nc)
template<class T>
void | removeCullCallback (const ref_ptr< T > &nc)
void | setCullingActive (bool active)
bool | getCullingActive () const
unsigned int | getNumChildrenWithCullingDisabled () const
bool | isCullingActive () const
unsigned int | getNumChildrenWithOccluderNodes () const
bool | containsOccluderNodes () const
void | setNodeMask (NodeMask nm)
NodeMask | getNodeMask () const
void | setStateSet (osg::StateSet *stateset)
template<class T>
void | setStateSet (const osg::ref_ptr< T > &stateset)
osg::StateSet * | getOrCreateStateSet ()
osg::StateSet * | getStateSet ()
const osg::StateSet * | getStateSet () const
void | setDescriptions (const DescriptionList &descriptions)
DescriptionList & | getDescriptions ()
const DescriptionList & | getDescriptions () const
const std::string & | getDescription (unsigned int i) const
std::string & | getDescription (unsigned int i)
unsigned int | getNumDescriptions () const
void | addDescription (const std::string &desc)
void | setInitialBound (const osg::BoundingSphere &bsphere)
const BoundingSphere & | getInitialBound () const
void | dirtyBound ()
const BoundingSphere & | getBound () const
void | setComputeBoundingSphereCallback (ComputeBoundingSphereCallback *callback)
template<class T>
void | setComputeBoundingSphereCallback (const ref_ptr< T > &callback)
ComputeBoundingSphereCallback * | getComputeBoundingSphereCallback ()
const ComputeBoundingSphereCallback * | getComputeBoundingSphereCallback () const
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 NodeVisitor * | asNodeVisitor ()
virtual const NodeVisitor * | asNodeVisitor () const
virtual StateSet * | asStateSet ()
virtual const StateSet * | asStateSet () const
virtual StateAttribute * | asStateAttribute ()
virtual const StateAttribute * | asStateAttribute () const
virtual Uniform * | asUniform ()
virtual const Uniform * | asUniform () const
virtual Camera * | asCamera ()
virtual const Camera * | asCamera () const
virtual Callback * | asCallback ()
virtual const Callback * | asCallback () const
virtual CallbackObject * | asCallbackObject ()
virtual const CallbackObject * | asCallbackObject () const
virtual UserDataContainer * | asUserDataContainer ()
virtual const UserDataContainer * | asUserDataContainer () const
virtual ValueObject * | asValueObject ()
virtual const ValueObject * | asValueObject () const
virtual Image * | asImage ()
virtual const Image * | asImage () const
virtual void | setName (const std::string &name)
void | setName (const char *name)
const std::string & | getName () const
void | setDataVariance (DataVariance dv)
DataVariance | getDataVariance () const
void | setUserDataContainer (osg::UserDataContainer *udc)
template<class T>
void | setUserDataContainer (const ref_ptr< T > &udc)
osg::UserDataContainer * | getUserDataContainer ()
const osg::UserDataContainer * | getUserDataContainer () const
osg::UserDataContainer * | getOrCreateUserDataContainer ()
virtual void | setUserData (Referenced *obj)
template<class T>
void | setUserData (const ref_ptr< T > &ud)
virtual Referenced * | getUserData ()
virtual const Referenced * | getUserData () 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)
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 &)
Referenced & | operator= (const Referenced &)
bool | getThreadSafeRefUnref () const
OpenThreads::Mutex * | getRefMutex () const
int | ref () const
int | unref () const
int | unref_nodelete () const
int | referenceCount () const
ObserverSet * | getObserverSet () const
ObserverSet * | getOrCreateObserverSet () const
void | addObserver (Observer *observer) const
void | removeObserver (Observer *observer) const

## Protected Member Functions

| ImpostorSprite (const ImpostorSprite &)
ImpostorSprite & | operator= (const ImpostorSprite &)
virtual | ~ImpostorSprite ()
void | init ()
Protected Member Functions inherited from osg::Geometry
Geometry & | operator= (const Geometry &)
virtual | ~Geometry ()
void | addVertexBufferObjectIfRequired (osg::Array *array)
void | addElementBufferObjectIfRequired (osg::PrimitiveSet *primitiveSet)
virtual VertexArrayState * | createVertexArrayStateImplementation (RenderInfo &renderInfo) const
Protected Member Functions inherited from osg::Drawable
Drawable & | operator= (const Drawable &)
virtual | ~Drawable ()
void | setBound (const BoundingBox &bb) const
Protected Member Functions inherited from osg::Node
virtual | ~Node ()
void | addParent (osg::Group *parent)
void | removeParent (osg::Group *parent)
void | setNumChildrenRequiringUpdateTraversal (unsigned int num)
void | setNumChildrenRequiringEventTraversal (unsigned int num)
void | setNumChildrenWithCullingDisabled (unsigned int num)
void | setNumChildrenWithOccluderNodes (unsigned int num)
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

Impostor * | _parent
osg::ref_ptr< osg::Camera > | _camera
ImpostorSpriteManager * | _ism
ImpostorSprite * | _previous
ImpostorSprite * | _next
unsigned int | _lastFrameUsed
osg::Vec3 | _storedLocalEyePoint
osg::ref_ptr< osg::Vec3Array > | _coords
osg::ref_ptr< osg::Vec2Array > | _texcoords
osg::Vec3 | _controlcoords [4]
osg::Texture2D * | _texture
int | _s
int | _t
Protected Attributes inherited from osg::Geometry
PrimitiveSetList | _primitives
osg::ref_ptr< Array > | _vertexArray
osg::ref_ptr< Array > | _normalArray
osg::ref_ptr< Array > | _colorArray
osg::ref_ptr< Array > | _secondaryColorArray
osg::ref_ptr< Array > | _fogCoordArray
ArrayList | _texCoordList
ArrayList | _vertexAttribList
bool | _containsDeprecatedData
Protected Attributes inherited from osg::Drawable
BoundingBox | _initialBoundingBox
ref_ptr< ComputeBoundingBoxCallback > | _computeBoundingBoxCallback
BoundingBox | _boundingBox
ref_ptr< Shape > | _shape
bool | _supportsDisplayList
bool | _useDisplayList
bool | _supportsVertexBufferObjects
bool | _useVertexBufferObjects
bool | _useVertexArrayObject
GLObjectList | _globjList
VertexArrayStateList | _vertexArrayStateList
ref_ptr< DrawCallback > | _drawCallback
ref_ptr< CreateVertexArrayStateCallback > | _createVertexArrayStateCallback
Protected Attributes inherited from osg::Node
BoundingSphere | _initialBound
ref_ptr< ComputeBoundingSphereCallback > | _computeBoundCallback
BoundingSphere | _boundingSphere
bool | _boundingSphereComputed
ParentList | _parents
ref_ptr< Callback > | _updateCallback
unsigned int | _numChildrenRequiringUpdateTraversal
ref_ptr< Callback > | _eventCallback
unsigned int | _numChildrenRequiringEventTraversal
ref_ptr< Callback > | _cullCallback
bool | _cullingActive
unsigned int | _numChildrenWithCullingDisabled
unsigned int | _numChildrenWithOccluderNodes
NodeMask | _nodeMask
ref_ptr< StateSet > | _stateset
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

## Friends

class | osgSim::ImpostorSpriteManager

## Additional Inherited Members

Public Types inherited from osg::Geometry
enum | AttributeBinding { BIND_OFF =0 , BIND_OVERALL =1 , BIND_PER_PRIMITIVE_SET =2 , BIND_PER_VERTEX =4 }
typedef std::vector< osg::ref_ptr< osg::Array > > | ArrayList
typedef std::vector< ref_ptr< PrimitiveSet > > | PrimitiveSetList
typedef std::vector< osg::DrawElements * > | DrawElementsList
Public Types inherited from osg::Drawable

enum

AttributeTypes {
VERTICES = 0 , WEIGHTS = 1 , NORMALS = 2 , COLORS = 3 ,
SECONDARY_COLORS = 4 , FOG_COORDS = 5 , ATTRIBUTE_6 = 6 , ATTRIBUTE_7 = 7 ,
TEXTURE_COORDS = 8 , TEXTURE_COORDS_0 = TEXTURE_COORDS , TEXTURE_COORDS_1 = TEXTURE_COORDS_0+1 , TEXTURE_COORDS_2 = TEXTURE_COORDS_0+2 ,
TEXTURE_COORDS_3 = TEXTURE_COORDS_0+3 , TEXTURE_COORDS_4 = TEXTURE_COORDS_0+4 , TEXTURE_COORDS_5 = TEXTURE_COORDS_0+5 , TEXTURE_COORDS_6 = TEXTURE_COORDS_0+6 ,
TEXTURE_COORDS_7 = TEXTURE_COORDS_0+7
}

typedef DrawableUpdateCallback | UpdateCallback
typedef DrawableEventCallback | EventCallback
typedef DrawableCullCallback | CullCallback
typedef unsigned int | AttributeType
Public Types inherited from osg::Node
typedef std::vector< Group * > | ParentList
typedef unsigned int | NodeMask
typedef std::vector< std::string > | DescriptionList
Public Types inherited from osg::Object
enum | DataVariance { DYNAMIC , STATIC , UNSPECIFIED }
Static Public Member Functions inherited from osg::Drawable
static GLuint | generateDisplayList (unsigned int contextID, unsigned int sizeHint=0)
static void | deleteDisplayList (unsigned int contextID, GLuint globj, unsigned int sizeHint=0)
static void | setMinimumNumberOfDisplayListsToRetainInCache (unsigned int minimum)
static unsigned int | getMinimumNumberOfDisplayListsToRetainInCache ()
Static Public Member Functions inherited from osg::Referenced
static OpenThreads::Mutex * | getGlobalReferencedMutex ()
static void | setDeleteHandler (DeleteHandler *handler)
static DeleteHandler * | getDeleteHandler ()
Protected Types inherited from osg::Drawable
typedef osg::buffered_value< GLuint > | GLObjectList

## Detailed Description

An ImposterSprite is a textured quad which is rendered in place of 3D geometry. The ImposterSprite is generated by rendering the original 3D geometry to a texture as an image cache. The ImpostorSprite is automatically generated by the osgUtil::CullVisitor so it not necessary to deal with it directly.

## Constructor & Destructor Documentation

## ImpostorSprite() [1/2]

osgSim::ImpostorSprite::ImpostorSprite | ( |  | ) |

Referenced by clone(), cloneType(), ImpostorSprite(), isSameKindAs(), and operator=().

## ImpostorSprite() [2/2]

osgSim::ImpostorSprite::ImpostorSprite | ( | const ImpostorSprite & |  | ) |

protected

References ImpostorSprite().

## ~ImpostorSprite()

virtual osgSim::ImpostorSprite::~ImpostorSprite | ( |  | ) |

protected virtual

## Member Function Documentation

## calcPixelError()

float osgSim::ImpostorSprite::calcPixelError | ( | const osg::Matrix & | MVPW | ) | const

Calculate the pixel error value for passing in the ModelViewProjectionWindow transform, which transform local coords into screen space.

## className()

virtual const char * osgSim::ImpostorSprite::className | ( |  | ) | const

inline virtual

return the name of the node's class type.

Reimplemented from osg::Node.

## clone()

virtual osg::Object * osgSim::ImpostorSprite::clone | ( | const osg::CopyOp & |  | ) | const

inline virtual

Clone on ImpostorSprite just returns a clone of type, since it is not appropriate to share data of an ImpostorSprite.

Reimplemented from osg::Node.

References ImpostorSprite().

## cloneType()

virtual osg::Object * osgSim::ImpostorSprite::cloneType | ( |  | ) | const

inline virtual

Clone an object of the same type as an ImpostorSprite.

Reimplemented from osg::Node.

References ImpostorSprite().

## dirty()

void osgSim::ImpostorSprite::dirty | ( |  | ) |

## getCamera() [1/2]

osg::Camera * osgSim::ImpostorSprite::getCamera | ( |  | ) |

inline

Get the camera node to use for pre rendering the impostor sprite's texture.

References _camera.

## getCamera() [2/2]

const osg::Camera * osgSim::ImpostorSprite::getCamera | ( |  | ) | const

inline

Get the const camera node to use for pre rendering the impostor sprite's texture.

References _camera.

## getControlCoords() [1/2]

osg::Vec3 * osgSim::ImpostorSprite::getControlCoords | ( |  | ) |

inline

Get the control coordinates of the corners of the quad. The control coordinates are the corners of the quad projected out onto the front face of bounding box which enclosed the impostor geometry when it was pre-rendered into the impostor sprite's texture. At the point of creation/or update of the impostor sprite the control coords will lie on top of the corners of the quad in screen space - with a pixel error of zero. Once the camera moves relative to the impostor sprite the control coords will no longer lie on top of the corners of the quad in screen space - a pixel error will have accumulated. This pixel error can then be used to determine whether the impostor needs to be updated. Stored in the order, [0] - top_left, [1] - bottom_left, [2] - bottom_right, [3] - top_left.

References _controlcoords.

## getControlCoords() [2/2]

const osg::Vec3 * osgSim::ImpostorSprite::getControlCoords | ( |  | ) | const

inline

Get the const control coordinates of the corners of the quad.

References _controlcoords.

## getCoords() [1/2]

osg::Vec3 * osgSim::ImpostorSprite::getCoords | ( |  | ) |

inline

Get the coordinates of the corners of the quad. Stored in the order, [0] - top_left, [1] - bottom_left, [2] - bottom_right, [3] - top_left.

References _coords.

## getCoords() [2/2]

const osg::Vec3 * osgSim::ImpostorSprite::getCoords | ( |  | ) | const

inline

Get the const coordinates of the corners of the quad.

References _coords.

## getLastFrameUsed()

unsigned int osgSim::ImpostorSprite::getLastFrameUsed | ( |  | ) | const

inline

Get the frame number for when the ImpostorSprite was last used in rendering.

References _lastFrameUsed.

## getParent() [1/2]

Impostor * osgSim::ImpostorSprite::getParent | ( |  | ) |

inline

Get the parent, which is an Impostor.

References _parent.

## getParent() [2/2]

const Impostor * osgSim::ImpostorSprite::getParent | ( |  | ) | const

inline

Get the const parent, which is an Impostor.

References _parent.

## getStoredLocalEyePoint()

const osg::Vec3 & osgSim::ImpostorSprite::getStoredLocalEyePoint | ( |  | ) | const

inline

Get the eye point for when the ImpostorSprite was snapped.

References _storedLocalEyePoint.

## getTexCoords() [1/2]

osg::Vec2 * osgSim::ImpostorSprite::getTexCoords | ( |  | ) |

inline

Get the texture coordinates of the corners of the quad. Stored in the order, [0] - top_left, [1] - bottom_left, [2] - bottom_right, [3] - top_left.

References _texcoords.

## getTexCoords() [2/2]

const osg::Vec2 * osgSim::ImpostorSprite::getTexCoords | ( |  | ) | const

inline

Get the const texture coordinates of the corners of the quad.

References _texcoords.

## getTexture() [1/2]

osg::Texture2D * osgSim::ImpostorSprite::getTexture | ( |  | ) |

inline

References _texture.

## getTexture() [2/2]

const osg::Texture2D * osgSim::ImpostorSprite::getTexture | ( |  | ) | const

inline

References _texture.

## init()

void osgSim::ImpostorSprite::init | ( |  | ) |

protected

## isSameKindAs()

virtual bool osgSim::ImpostorSprite::isSameKindAs | ( | const osg::Object * | obj | ) | const

inline virtual

return true if this and obj are of the same kind of object.

Reimplemented from osg::Node.

References ImpostorSprite(), and NULL.

## libraryName()

virtual const char * osgSim::ImpostorSprite::libraryName | ( |  | ) | const

inline virtual

return the name of the node's library.

Reimplemented from osg::Node.

## operator=()

ImpostorSprite & osgSim::ImpostorSprite::operator= | ( | const ImpostorSprite & |  | ) |

inline protected

References ImpostorSprite().

## s()

int osgSim::ImpostorSprite::s | ( |  | ) | const

inline

References _s.

Referenced by setTexture().

## setCamera()

void osgSim::ImpostorSprite::setCamera | ( | osg::Camera * | camera | ) |

inline

Set the camera node to use for pre rendering the impostor sprite's texture.

References _camera.

## setLastFrameUsed()

void osgSim::ImpostorSprite::setLastFrameUsed | ( | unsigned int | frameNumber | ) |

inline

Set the frame number for when the ImpostorSprite was last used in rendering.

References _lastFrameUsed.

## setParent()

void osgSim::ImpostorSprite::setParent | ( | Impostor * | parent | ) |

inline

Set the parent, which must be an Impostor. Unlike conventional Drawables, ImpostorSprites can only ever have one parent.

References _parent.

## setStoredLocalEyePoint()

void osgSim::ImpostorSprite::setStoredLocalEyePoint | ( | const osg::Vec3 & | v | ) |

inline

Set the eye point for when the ImpostorSprite was snapped.

References _storedLocalEyePoint.

## setTexture()

void osgSim::ImpostorSprite::setTexture | ( | osg::Texture2D * | tex,
|  | int | s,
|  | int | t )

References s(), and t().

## t()

int osgSim::ImpostorSprite::t | ( |  | ) | const

inline

References _t.

Referenced by setTexture().

## Friends And Related Symbol Documentation

## osgSim::ImpostorSpriteManager

friend class osgSim::ImpostorSpriteManager

friend

## Member Data Documentation

## _camera

osg::ref_ptr<osg::Camera> osgSim::ImpostorSprite::_camera

protected

Referenced by getCamera(), getCamera(), and setCamera().

## _controlcoords

osg::Vec3 osgSim::ImpostorSprite::_controlcoords[4]

protected

Referenced by getControlCoords(), and getControlCoords().

## _coords

osg::ref_ptr<osg::Vec3Array> osgSim::ImpostorSprite::_coords

protected

Referenced by getCoords(), and getCoords().

## _ism

ImpostorSpriteManager* osgSim::ImpostorSprite::_ism

protected

## _lastFrameUsed

unsigned int osgSim::ImpostorSprite::_lastFrameUsed

protected

Referenced by getLastFrameUsed(), and setLastFrameUsed().

## _next

ImpostorSprite* osgSim::ImpostorSprite::_next

protected

## _parent

Impostor* osgSim::ImpostorSprite::_parent

protected

Referenced by getParent(), getParent(), and setParent().

## _previous

ImpostorSprite* osgSim::ImpostorSprite::_previous

protected

## _s

int osgSim::ImpostorSprite::_s

protected

Referenced by s().

## _storedLocalEyePoint

osg::Vec3 osgSim::ImpostorSprite::_storedLocalEyePoint

protected

Referenced by getStoredLocalEyePoint(), and setStoredLocalEyePoint().

## _t

int osgSim::ImpostorSprite::_t

protected

Referenced by t().

## _texcoords

osg::ref_ptr<osg::Vec2Array> osgSim::ImpostorSprite::_texcoords

protected

Referenced by getTexCoords(), and getTexCoords().

## _texture

osg::Texture2D* osgSim::ImpostorSprite::_texture

protected

Referenced by getTexture(), and getTexture().

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

- ImpostorSprite