OSG
3.4.0
|
#include <ImpostorSprite.h>
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 |
![]() | |
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) |
![]() | |
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 unsigned int | AttributeType |
![]() | |
typedef std::vector< Group * > | ParentList |
typedef unsigned int | NodeMask |
typedef std::vector< std::string > | DescriptionList |
![]() | |
enum | DataVariance { DYNAMIC, STATIC, UNSPECIFIED } |
![]() | |
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 OpenThreads::Mutex * | getGlobalReferencedMutex () |
static void | setThreadSafeReferenceCounting (bool enableThreadSafeReferenceCounting) |
static bool | getThreadSafeReferenceCounting () |
static void | setDeleteHandler (DeleteHandler *handler) |
static DeleteHandler * | getDeleteHandler () |
![]() | |
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.
Definition at line 38 of file ImpostorSprite.h.
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 node's class type.
Reimplemented from osg::Node.
Definition at line 53 of file ImpostorSprite.h.
|
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.
Definition at line 50 of file ImpostorSprite.h.
|
inlinevirtual |
Clone an object of the same type as an ImpostorSprite.
Reimplemented from osg::Node.
Definition at line 45 of file ImpostorSprite.h.
|
virtual |
Compute the bounding box around Drawables's geometry.
Reimplemented from osg::Drawable.
|
virtual |
Draw ImpostorSprite directly.
Reimplemented from osg::Drawable.
|
inline |
Get the camera node to use for pre rendering the impostor sprite's texture.
Definition at line 158 of file ImpostorSprite.h.
|
inline |
Get the const camera node to use for pre rendering the impostor sprite's texture.
Definition at line 161 of file ImpostorSprite.h.
|
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.
Definition at line 110 of file ImpostorSprite.h.
|
inline |
Get the const control coordinates of the corners of the quad.
Definition at line 113 of file ImpostorSprite.h.
|
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.
Definition at line 83 of file ImpostorSprite.h.
|
inline |
Get the const coordinates of the corners of the quad.
Definition at line 86 of file ImpostorSprite.h.
|
inline |
Get the frame number for when the ImpostorSprite was last used in rendering.
Definition at line 77 of file ImpostorSprite.h.
|
inline |
Get the parent, which is an Impostor.
Definition at line 62 of file ImpostorSprite.h.
|
inline |
Get the const parent, which is an Impostor.
Definition at line 65 of file ImpostorSprite.h.
|
inline |
Get the eye point for when the ImpostorSprite was snapped.
Definition at line 71 of file ImpostorSprite.h.
|
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.
Definition at line 93 of file ImpostorSprite.h.
|
inline |
Get the const texture coordinates of the corners of the quad.
Definition at line 96 of file ImpostorSprite.h.
|
inline |
Definition at line 122 of file ImpostorSprite.h.
|
inline |
Definition at line 123 of file ImpostorSprite.h.
|
inlinevirtual |
return true if this and obj are of the same kind of object.
Reimplemented from osg::Node.
Definition at line 51 of file ImpostorSprite.h.
|
inlinevirtual |
return the name of the node's library.
Reimplemented from osg::Node.
Definition at line 52 of file ImpostorSprite.h.
|
inlineprotected |
Definition at line 166 of file ImpostorSprite.h.
|
inline |
Definition at line 125 of file ImpostorSprite.h.
|
inline |
Set the camera node to use for pre rendering the impostor sprite's texture.
Definition at line 155 of file ImpostorSprite.h.
|
inline |
Set the frame number for when the ImpostorSprite was last used in rendering.
Definition at line 74 of file ImpostorSprite.h.
|
inline |
Set the parent, which must be an Impostor. Unlike conventional Drawables, ImpostorSprites can only ever have one parent.
Definition at line 59 of file ImpostorSprite.h.
|
inline |
Set the eye point for when the ImpostorSprite was snapped.
Definition at line 68 of file ImpostorSprite.h.
void osgSim::ImpostorSprite::setTexture | ( | osg::Texture2D * | tex, |
int | s, | ||
int | t | ||
) |
|
inlinevirtual |
Return true, osg::ImpostorSprite does support accept(Drawable::AttributeFunctor&).
Definition at line 132 of file ImpostorSprite.h.
|
inlinevirtual |
Return true, osg::ImpostorSprite does support accept(Drawable::ConstAttributeFunctor&).
Definition at line 138 of file ImpostorSprite.h.
|
inlinevirtual |
Return true, osg::ImpostorSprite does support accept(PrimitiveFunctor&).
Reimplemented from osg::Drawable.
Definition at line 144 of file ImpostorSprite.h.
|
inline |
Definition at line 126 of file ImpostorSprite.h.
|
friend |
Definition at line 172 of file ImpostorSprite.h.
|
protected |
Definition at line 175 of file ImpostorSprite.h.
osg::Vec4 osgSim::ImpostorSprite::_color |
Definition at line 150 of file ImpostorSprite.h.
|
protected |
Definition at line 189 of file ImpostorSprite.h.
|
protected |
Definition at line 187 of file ImpostorSprite.h.
|
protected |
Definition at line 179 of file ImpostorSprite.h.
|
protected |
Definition at line 183 of file ImpostorSprite.h.
|
protected |
Definition at line 181 of file ImpostorSprite.h.
|
protected |
Definition at line 170 of file ImpostorSprite.h.
|
protected |
Definition at line 180 of file ImpostorSprite.h.
|
protected |
Definition at line 192 of file ImpostorSprite.h.
|
protected |
Definition at line 185 of file ImpostorSprite.h.
|
protected |
Definition at line 193 of file ImpostorSprite.h.
|
protected |
Definition at line 188 of file ImpostorSprite.h.
|
protected |
Definition at line 191 of file ImpostorSprite.h.