An ImposterSprite is a textured quad which is rendered in place a 3D geometry.
Inheritance:
Public Methods
-
ImpostorSprite()
-
virtual Object* clone() const
-
virtual bool isSameKindAs(const Object* obj) const
-
virtual const char* className() const
-
void setParent(Impostor* parent)
- Set the parent, which must be an Impostor.
-
Impostor* getParent()
- Get the parent, which is an Impostor.
-
const Impostor* getParent() const
- Get the const parent, which is an Impostor.
-
inline void setStoredLocalEyePoint(const Vec3& v)
- Set the eye point for when the ImpsotorSprite was snapped
-
inline const Vec3& getStoredLocalEyePoint() const
- Get the eye point for when the ImpsotorSprite was snapped
-
inline void setLastFrameUsed(const int frameNumber)
- Set the frame number for when the ImpostorSprite was last used in rendering
-
inline int getLastFrameUsed() const
- Get the frame number for when the ImpostorSprite was last used in rendering
-
inline Vec3* getCoords()
- Get the coordinates of the corners of the quad.
-
inline const Vec3* getCoords() const
- Get the const coordinates of the corners of the quad
-
inline Vec2* getTexCoords()
- Get the texture coordinates of the corners of the quad.
-
inline const Vec2* getTexCoords() const
- Get the const texture coordinates of the corners of the quad
-
inline Vec3* getControlCoords()
- Get the control coordinates of the corners of the quad.
-
inline const Vec3* getControlCoords() const
- Get the const control coordinates of the corners of the quad
-
const float calcPixelError(const Camera& camera, const int* viewport, const osg::Matrix* matrix) const
- calculate the pixel error value for current camera position and object position
-
void setTexture(Texture* tex, int s, int t)
-
Texture* getTexture()
-
const Texture* getTexture() const
-
const int s() const
-
const int t() const
-
virtual void drawImmediateMode(State& state)
- draw ImpostorSprite directly.
Protected Fields
-
Impostor* _parent
-
ImpostorSpriteManager* _ism
-
ImpostorSprite* _previous
-
ImpostorSprite* _next
-
int _lastFrameUsed
-
Vec3 _storedLocalEyePoint
-
Vec3 _coords[4]
-
Vec2 _texcoords[4]
-
Vec3 _controlcoords[4]
-
Texture* _texture
-
int _s
-
int _t
Protected Methods
-
ImpostorSprite(const ImpostorSprite&)
-
ImpostorSprite& operator = (const ImpostorSprite&)
-
virtual ~ImpostorSprite()
-
virtual const bool computeBound() const
Public Methods
-
inline void setStateSet(StateSet* state)
-
inline StateSet* getStateSet()
-
inline const StateSet* getStateSet() const
-
void setSupportsDisplayList(const bool flag)
-
inline const bool getSupportsDisplayList() const
-
void setUseDisplayList(const bool flag)
-
inline const bool getUseDisplayList() const
-
void dirtyDisplayList()
-
inline void dirtyBound()
-
inline const BoundingBox& getBound() const
-
inline void draw(State& state)
-
void compile(State& state)
-
static void deleteDisplayList(uint contextID, uint globj)
-
static void flushDeletedDisplayLists(uint contextID)
Protected Fields
-
ref_ptr<StateSet> _dstate
-
bool _supportsDisplayList
-
bool _useDisplayList
-
mutable BoundingBox _bbox
-
mutable bool _bbox_computed
Protected Members
-
typedef std::vector<uint> GLObjectList mutable GLObjectList _globjList
-
typedef std::map<uint,std::set<uint> >static DeletedDisplayListCache DeletedDisplayListCache s_deletedDisplayListCache
Inherited from Object:
Public Methods
-
inline void ref() const
-
inline void unref() const
-
inline const int referenceCount() const
Protected Fields
-
mutable int _refCount
Documentation
An ImposterSprite is a textured quad which is rendered in place a
3D geometry. The ImposterSprite is generated by rendering the original
3D geometry to a texture as an image cache. The ImpostorSprite is
automatiacally generatated by the osgUtil::CullVisitor so it not
necessary to deal with it directly.
- ImpostorSprite()
- virtual Object* clone() const
- virtual bool isSameKindAs(const Object* obj) const
- virtual const char* className() const
- void setParent(Impostor* parent)
- Set the parent, which must be an Impostor.
Unlike conventional Drawables, ImpostorSprite's can only ever have
one parent.
- Impostor* getParent()
- Get the parent, which is an Impostor.
- const Impostor* getParent() const
- Get the const parent, which is an Impostor.
- inline void setStoredLocalEyePoint(const Vec3& v)
- Set the eye point for when the ImpsotorSprite was snapped
- inline const Vec3& getStoredLocalEyePoint() const
- Get the eye point for when the ImpsotorSprite was snapped
- inline void setLastFrameUsed(const int frameNumber)
- Set the frame number for when the ImpostorSprite was last used in rendering
- inline int getLastFrameUsed() const
- Get the frame number for when the ImpostorSprite was last used in rendering
- inline Vec3* getCoords()
- 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 const Vec3* getCoords() const
- Get the const coordinates of the corners of the quad
- inline Vec2* getTexCoords()
- 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 const Vec2* getTexCoords() const
- Get the const texture coordinates of the corners of the quad
- inline Vec3* getControlCoords()
- Get the control coordinates of the corners of the quad.
The control coordinates are the cornders 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 ontop of the coorners of the quad in screen space - with a pixel error
or zero. Once the camera moves relative to the impostor sprite the
control coords will nolonger lie ontop of the corners of the quad in
screen space - a pixel error will have accumulated. This pixel error
can then be used to dertermine whether the impostor needs to be updated.
Stored in the order, [0] - top_left, [1] - bottom_left, [2] - bottom_right, [3] - top_left.
- inline const Vec3* getControlCoords() const
- Get the const control coordinates of the corners of the quad
- const float calcPixelError(const Camera& camera, const int* viewport, const osg::Matrix* matrix) const
- calculate the pixel error value for current camera position and object position
- void setTexture(Texture* tex, int s, int t)
- Texture* getTexture()
- const Texture* getTexture() const
- const int s() const
- const int t() const
- virtual void drawImmediateMode(State& state)
- draw ImpostorSprite directly.
- ImpostorSprite(const ImpostorSprite&)
- ImpostorSprite& operator = (const ImpostorSprite&)
- virtual ~ImpostorSprite()
- virtual const bool computeBound() const
- Impostor* _parent
- ImpostorSpriteManager* _ism
- ImpostorSprite* _previous
- ImpostorSprite* _next
- int _lastFrameUsed
- Vec3 _storedLocalEyePoint
- Vec3 _coords[4]
- Vec2 _texcoords[4]
- Vec3 _controlcoords[4]
- Texture* _texture
- int _s
- int _t
- This class has no child classes.
- Friends:
- ImpostorSpriteManager
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.