openscenegraph
|
Public Attributes | |
osg::Vec4 | _color |
Protected Member Functions | |
ImpostorSprite (const ImpostorSprite &) | |
ImpostorSprite & | operator= (const ImpostorSprite &) |
virtual | ~ImpostorSprite () |
![]() | |
Drawable & | operator= (const Drawable &) |
virtual | ~Drawable () |
void | setBound (const BoundingBox &bb) const |
void | addParent (osg::Node *node) |
void | removeParent (osg::Node *node) |
void | setNumChildrenRequiringUpdateTraversal (unsigned int num) |
unsigned int | getNumChildrenRequiringUpdateTraversal () const |
void | setNumChildrenRequiringEventTraversal (unsigned int num) |
unsigned int | getNumChildrenRequiringEventTraversal () const |
![]() | |
virtual | ~Object () |
![]() | |
virtual | ~Referenced () |
void | signalObserversAndDelete (bool signalDelete, bool doDelete) const |
void | deleteUsingDeleteHandler () const |
Friends | |
class | osgSim::ImpostorSpriteManager |
Additional Inherited Members | |
![]() | |
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 std::vector< Node * > | ParentList |
typedef unsigned int | AttributeType |
![]() | |
static GLuint | generateDisplayList (unsigned int contextID, unsigned int sizeHint=0) |
static void | setMinimumNumberOfDisplayListsToRetainInCache (unsigned int minimum) |
static unsigned int | getMinimumNumberOfDisplayListsToRetainInCache () |
static void | deleteDisplayList (unsigned int contextID, GLuint globj, unsigned int sizeHint=0) |
static void | flushAllDeletedDisplayLists (unsigned int contextID) |
static void | discardAllDeletedDisplayLists (unsigned int contextID) |
static void | flushDeletedDisplayLists (unsigned int contextID, double &availableTime) |
static Extensions * | getExtensions (unsigned int contextID, bool createIfNotInitalized) |
static void | setExtensions (unsigned int contextID, Extensions *extensions) |
![]() | |
static unsigned int | s_numberDrawablesReusedLastInLastFrame |
static unsigned int | s_numberNewDrawablesInLastFrame |
static unsigned int | s_numberDeletedDrawablesInLastFrame |
![]() | |
typedef osg::buffered_value < GLuint > | GLObjectList |
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.
osgSim::ImpostorSprite::ImpostorSprite | ( | ) |
|
protected |
|
protectedvirtual |
|
virtual |
Accept an Drawable::AttributeFunctor and call its methods to tell it about the internal attributes that this Drawable has.
|
virtual |
Accept a Drawable::ConstAttributeFunctor and call its methods to tell it about the internal attributes that this Drawable has.
|
virtual |
Accept a PrimtiveFunctor and call its methods to tell it about the internal primitives that this Drawable has.
Reimplemented from osg::Drawable.
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.
|
inlinevirtual |
return the name of the object's class type. Must be defined by derived classes.
Reimplemented from osg::Drawable.
|
inlinevirtual |
Clone on ImpostorSprite just returns a clone of type, since it is not appropriate to share data of an ImpostorSprite.
Implements osg::Object.
|
inlinevirtual |
Clone an object of the same type as an ImpostorSprite.
Implements osg::Object.
|
virtual |
Compute the bounding box around Drawables's geometry.
Reimplemented from osg::Drawable.
|
virtual |
Draw ImpostorSprite directly.
Implements osg::Drawable.
|
inline |
Get the camera node to use for pre rendering the impostor sprite's texture.
|
inline |
Get the const camera node to use for pre rendering the impostor sprite's texture.
|
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.
|
inline |
Get the const control coordinates of the corners of the quad.
|
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.
|
inline |
Get the const coordinates of the corners of the quad.
|
inline |
Get the frame number for when the ImpostorSprite was last used in rendering.
|
inline |
Get the const parent, which is an Impostor.
|
inline |
Get the eye point for when the ImpostorSprite was snapped.
|
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.
|
inline |
Get the const texture coordinates of the corners of the quad.
|
inline |
|
inline |
|
inlinevirtual |
Reimplemented from osg::Drawable.
References NULL.
|
inlinevirtual |
return the name of the object's library. Must be defined by derived classes. The OpenSceneGraph convention is that the namespace of a library is the same as the library name.
Reimplemented from osg::Drawable.
|
inlineprotected |
|
inline |
|
inline |
Set the camera node to use for pre rendering the impostor sprite's texture.
|
inline |
Set the frame number for when the ImpostorSprite was last used in rendering.
|
inline |
Set the parent, which must be an Impostor. Unlike conventional Drawables, ImpostorSprites can only ever have one parent.
|
inline |
Set the eye point for when the ImpostorSprite was snapped.
void osgSim::ImpostorSprite::setTexture | ( | osg::Texture2D * | tex, |
int | s, | ||
int | t | ||
) |
|
inlinevirtual |
Return true, osg::ImpostorSprite does support accept(Drawable::AttributeFunctor&).
|
inlinevirtual |
Return true, osg::ImpostorSprite does support accept(Drawable::ConstAttributeFunctor&).
|
inlinevirtual |
Return true, osg::ImpostorSprite does support accept(PrimitiveFunctor&).
Reimplemented from osg::Drawable.
|
inline |
|
friend |
|
protected |
osg::Vec4 osgSim::ImpostorSprite::_color |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |