openscenegraph
osgSim::ImpostorSprite Class Reference

#include <ImpostorSprite>

Inheritance diagram for osgSim::ImpostorSprite:
osg::Geometry osg::Drawable osg::Node osg::Object osg::Referenced

Public Member Functions

 ImpostorSprite ()
virtual osg::ObjectcloneType () const
virtual osg::Objectclone (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)
ImpostorgetParent ()
const ImpostorgetParent () const
void setStoredLocalEyePoint (const osg::Vec3 &v)
const osg::Vec3getStoredLocalEyePoint () const
void setLastFrameUsed (unsigned int frameNumber)
unsigned int getLastFrameUsed () const
void dirty ()
osg::Vec3getCoords ()
const osg::Vec3getCoords () const
osg::Vec2getTexCoords ()
const osg::Vec2getTexCoords () const
osg::Vec3getControlCoords ()
const osg::Vec3getControlCoords () const
float calcPixelError (const osg::Matrix &MVPW) const
void setTexture (osg::Texture2D *tex, int s, int t)
osg::Texture2DgetTexture ()
const osg::Texture2DgetTexture () const
int s () const
int t () const
void setCamera (osg::Camera *camera)
osg::CameragetCamera ()
const osg::CameragetCamera () const
Public Member Functions inherited from osg::Geometry
 Geometry ()
 Geometry (const Geometry &geometry, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 META_Node (osg, Geometry)
virtual GeometryasGeometry ()
virtual const GeometryasGeometry () const
bool empty () const
void setVertexArray (Array *array)
ArraygetVertexArray ()
const ArraygetVertexArray () const
void setNormalArray (Array *array)
void setNormalArray (Array *array, osg::Array::Binding binding)
ArraygetNormalArray ()
const ArraygetNormalArray () const
void setColorArray (Array *array)
void setColorArray (Array *array, osg::Array::Binding binding)
ArraygetColorArray ()
const ArraygetColorArray () const
void setSecondaryColorArray (Array *array)
void setSecondaryColorArray (Array *array, osg::Array::Binding binding)
ArraygetSecondaryColorArray ()
const ArraygetSecondaryColorArray () const
void setFogCoordArray (Array *array)
void setFogCoordArray (Array *array, osg::Array::Binding binding)
ArraygetFogCoordArray ()
const ArraygetFogCoordArray () const
void setTexCoordArray (unsigned int unit, Array *array)
void setTexCoordArray (unsigned int unit, Array *array, osg::Array::Binding binding)
ArraygetTexCoordArray (unsigned int unit)
const ArraygetTexCoordArray (unsigned int unit) const
unsigned int getNumTexCoordArrays () const
void setTexCoordArrayList (const ArrayList &arrrayList)
ArrayListgetTexCoordArrayList ()
const ArrayListgetTexCoordArrayList () const
void setVertexAttribArray (unsigned int index, Array *array)
void setVertexAttribArray (unsigned int index, Array *array, osg::Array::Binding binding)
ArraygetVertexAttribArray (unsigned int index)
const ArraygetVertexAttribArray (unsigned int index) const
unsigned int getNumVertexAttribArrays () const
void setVertexAttribArrayList (const ArrayList &arrayList)
ArrayListgetVertexAttribArrayList ()
const ArrayListgetVertexAttribArrayList () const
void setPrimitiveSetList (const PrimitiveSetList &primitives)
PrimitiveSetListgetPrimitiveSetList ()
const PrimitiveSetListgetPrimitiveSetList () const
unsigned int getNumPrimitiveSets () const
PrimitiveSetgetPrimitiveSet (unsigned int pos)
const PrimitiveSetgetPrimitiveSet (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::VertexBufferObjectgetOrCreateVertexBufferObject ()
osg::ElementBufferObjectgetOrCreateElementBufferObject ()
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 DrawableasDrawable ()
virtual const DrawableasDrawable () const
virtual void computeDataVariance ()
MatrixList getWorldMatrices (const osg::Node *haltTraversalAtNode=0) const
void setInitialBound (const osg::BoundingBox &bbox)
const BoundingBoxgetInitialBound () const
const BoundingSpheregetBound () const
const BoundingBoxgetBoundingBox () const
virtual BoundingSphere computeBound () const
virtual BoundingBox computeBoundingBox () const
void setComputeBoundingBoxCallback (ComputeBoundingBoxCallback *callback)
ComputeBoundingBoxCallbackgetComputeBoundingBoxCallback ()
const ComputeBoundingBoxCallbackgetComputeBoundingBoxCallback () const
virtual void setShape (Shape *shape)
template<class T>
void setShape (const ref_ptr< T > &shape)
ShapegetShape ()
const ShapegetShape () 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)
CreateVertexArrayStateCallbackgetCreateVertexArrayStateCallback ()
const CreateVertexArrayStateCallbackgetCreateVertexArrayStateCallback () const
VertexArrayStatecreateVertexArrayState (RenderInfo &renderInfo) const
void setVertexArrayStateList (VertexArrayStateList &vasl)
VertexArrayStateListgetVertexArrayStateList ()
const VertexArrayStateListgetVertexArrayStateList () const
virtual void setThreadSafeRefUnref (bool threadSafe)
virtual void setDrawCallback (DrawCallback *dc)
DrawCallbackgetDrawCallback ()
const DrawCallbackgetDrawCallback () const
Public Member Functions inherited from osg::Node
 Node ()
 Node (const Node &, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
virtual NodeasNode ()
virtual const NodeasNode () const
virtual GroupasGroup ()
virtual const GroupasGroup () const
virtual TransformasTransform ()
virtual const TransformasTransform () const
virtual SwitchasSwitch ()
virtual const SwitchasSwitch () const
virtual GeodeasGeode ()
virtual const GeodeasGeode () const
virtual osgTerrain::TerrainasTerrain ()
virtual const osgTerrain::TerrainasTerrain () const
virtual void accept (NodeVisitor &nv)
virtual void ascend (NodeVisitor &nv)
virtual void traverse (NodeVisitor &)
const ParentListgetParents () const
ParentList getParents ()
GroupgetParent (unsigned int i)
const GroupgetParent (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)
CallbackgetUpdateCallback ()
const CallbackgetUpdateCallback () 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)
CallbackgetEventCallback ()
const CallbackgetEventCallback () 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)
CallbackgetCullCallback ()
const CallbackgetCullCallback () 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::StateSetgetOrCreateStateSet ()
osg::StateSetgetStateSet ()
const osg::StateSetgetStateSet () const
void setDescriptions (const DescriptionList &descriptions)
DescriptionListgetDescriptions ()
const DescriptionListgetDescriptions () 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 BoundingSpheregetInitialBound () const
void dirtyBound ()
const BoundingSpheregetBound () const
void setComputeBoundingSphereCallback (ComputeBoundingSphereCallback *callback)
template<class T>
void setComputeBoundingSphereCallback (const ref_ptr< T > &callback)
ComputeBoundingSphereCallbackgetComputeBoundingSphereCallback ()
const ComputeBoundingSphereCallbackgetComputeBoundingSphereCallback () 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 NodeVisitorasNodeVisitor ()
virtual const NodeVisitorasNodeVisitor () const
virtual StateSetasStateSet ()
virtual const StateSetasStateSet () const
virtual StateAttributeasStateAttribute ()
virtual const StateAttributeasStateAttribute () const
virtual UniformasUniform ()
virtual const UniformasUniform () const
virtual CameraasCamera ()
virtual const CameraasCamera () const
virtual CallbackasCallback ()
virtual const CallbackasCallback () const
virtual CallbackObjectasCallbackObject ()
virtual const CallbackObjectasCallbackObject () const
virtual UserDataContainerasUserDataContainer ()
virtual const UserDataContainerasUserDataContainer () const
virtual ValueObjectasValueObject ()
virtual const ValueObjectasValueObject () const
virtual ImageasImage ()
virtual const ImageasImage () 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::UserDataContainergetUserDataContainer ()
const osg::UserDataContainergetUserDataContainer () const
osg::UserDataContainergetOrCreateUserDataContainer ()
virtual void setUserData (Referenced *obj)
template<class T>
void setUserData (const ref_ptr< T > &ud)
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)
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

 ImpostorSprite (const ImpostorSprite &)
ImpostorSpriteoperator= (const ImpostorSprite &)
virtual ~ImpostorSprite ()
void init ()
Protected Member Functions inherited from osg::Geometry
Geometryoperator= (const Geometry &)
virtual ~Geometry ()
void addVertexBufferObjectIfRequired (osg::Array *array)
void addElementBufferObjectIfRequired (osg::PrimitiveSet *primitiveSet)
virtual VertexArrayStatecreateVertexArrayStateImplementation (RenderInfo &renderInfo) const
Protected Member Functions inherited from osg::Drawable
Drawableoperator= (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::MutexgetGlobalReferencedMutex ()
static void setDeleteHandler (DeleteHandler *handler)
static DeleteHandlergetDeleteHandler ()
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 ( )

◆ ImpostorSprite() [2/2]

osgSim::ImpostorSprite::ImpostorSprite ( const ImpostorSprite & )
protected

References ImpostorSprite().

◆ ~ImpostorSprite()

virtual osgSim::ImpostorSprite::~ImpostorSprite ( )
protectedvirtual

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
inlinevirtual

return the name of the node's class type.

Reimplemented from osg::Node.

◆ clone()

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

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
inlinevirtual

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
inlinevirtual

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
inlinevirtual

return the name of the node's library.

Reimplemented from osg::Node.

◆ operator=()

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

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().

◆ 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

◆ _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

◆ _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

◆ _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: