Public Member Functions |
| Text () |
| Text (const Text &text, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) |
virtual osg::Object * | cloneType () const |
| Clone the type of an object, with Object* return type.
|
virtual osg::Object * | clone (const osg::CopyOp ©op) const |
| Clone an object, with Object* return type.
|
virtual bool | isSameKindAs (const osg::Object *obj) const |
virtual const char * | className () const |
| return the name of the object's class type.
|
virtual const char * | libraryName () const |
| return the name of the object's library.
|
virtual void | setFont (Font *font=0) |
| Set the Font to use to render the text.
|
virtual void | setFont (osg::ref_ptr< Font > font) |
| Set the Font to use to render the text.
|
virtual void | setFont (const std::string &fontfile) |
| Set the font, loaded from the specified front file, to use to render the text, setFont("") sets the use of the default font.
|
void | setEnableDepthWrites (bool enable) |
| Turns off writing to the depth buffer when rendering text.
|
bool | getEnableDepthWrites () const |
void | setBackdropType (BackdropType type) |
| BackdropType gives you a background shadow text behind your regular text.
|
BackdropType | getBackdropType () const |
void | setBackdropOffset (float offset=0.07f) |
| Sets the amount text is offset to create the backdrop/shadow effect.
|
void | setBackdropOffset (float horizontal, float vertical) |
| This overloaded version lets you specify the offset for the horizontal and vertical components separately.
|
float | getBackdropHorizontalOffset () const |
float | getBackdropVerticalOffset () const |
void | setBackdropColor (const osg::Vec4 &color) |
| This specifies the color of the backdrop text.
|
const osg::Vec4 & | getBackdropColor () const |
void | setBackdropImplementation (BackdropImplementation implementation) |
| This specifies the underlying backdrop rendering implementation.
|
BackdropImplementation | getBackdropImplementation () const |
void | setColorGradientMode (ColorGradientMode mode) |
| This sets different types of text coloring modes.
|
ColorGradientMode | getColorGradientMode () const |
void | setColorGradientCorners (const osg::Vec4 &topLeft, const osg::Vec4 &bottomLeft, const osg::Vec4 &bottomRight, const osg::Vec4 &topRight) |
| Used only for gradient mode, let's you specify the colors of the 4 corners.
|
const osg::Vec4 & | getColorGradientTopLeft () const |
const osg::Vec4 & | getColorGradientBottomLeft () const |
const osg::Vec4 & | getColorGradientBottomRight () const |
const osg::Vec4 & | getColorGradientTopRight () const |
virtual void | drawImplementation (osg::RenderInfo &renderInfo) const |
| Draw the text.
|
virtual bool | supports (const osg::Drawable::AttributeFunctor &) const |
| return false, osgText::Text does not support accept(AttributeFunctor&).
|
virtual bool | supports (const osg::Drawable::ConstAttributeFunctor &) const |
| return true, osgText::Text does support accept(ConstAttributeFunctor&).
|
virtual void | accept (osg::Drawable::ConstAttributeFunctor &af) const |
| accept an ConstAttributeFunctor and call its methods to tell it about the internal attributes that this Drawable has.
|
virtual bool | supports (const osg::PrimitiveFunctor &) const |
| return true, osgText::Text does support accept(PrimitiveFunctor&) .
|
virtual void | accept (osg::PrimitiveFunctor &pf) const |
| accept a PrimtiveFunctor and call its methods to tell it about the internal primitives that this Drawable has.
|
virtual void | setThreadSafeRefUnref (bool threadSafe) |
| Set whether to use a mutex to ensure ref() and unref() are thread safe.
|
virtual void | resizeGLObjectBuffers (unsigned int maxSize) |
| Resize any per context GLObject buffers to specified size.
|
virtual void | releaseGLObjects (osg::State *state=0) const |
| If State is non-zero, this function releases OpenGL objects for the specified graphics context.
|
const GlyphQuads * | getGlyphQuads (GlyphTexture *texture) const |
| Direct Access to GlyphQuads.
|
const TextureGlyphQuadMap & | getTextureGlyphQuadMap () const |
| TextBase () |
| TextBase (const TextBase &text, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) |
void | setColor (const osg::Vec4 &color) |
const osg::Vec4 & | getColor () const |
const Font * | getFont () const |
| Get the font.
|
void | setStyle (Style *style) |
| Set the text style.
|
Style * | getStyle () |
| Get the text style.
|
const Style * | getStyle () const |
| Get the const text style.
|
Style * | getOrCreateStyle () |
| Get or create the text style.
|
void | setFontResolution (unsigned int width, unsigned int height) |
| Set the Font reference width and height resolution in texels.
|
unsigned int | getFontWidth () const |
unsigned int | getFontHeight () const |
void | setText (const String &text) |
| Set the text using a osgText::String.
|
void | setText (const std::string &text) |
| Set the text using a std::string, which is converted to an internal TextString.
|
void | setText (const std::string &text, String::Encoding encoding) |
| Set the text using a Unicode encoded std::string, which is converted to an internal TextString.
|
void | setText (const wchar_t *text) |
| Set the text using a wchar_t string, which is converted to an internal TextString.
|
String & | getText () |
| Get the text string.
|
const String & | getText () const |
| Get the const text string.
|
void | update () |
| update internal glyph respresentation used for rendering, and bounding volume.
|
void | setCharacterSize (float height) |
| Set the rendered character size in object coordinates.
|
void | setCharacterSize (float height, float aspectRatio) |
| Set the rendered character size in object coordinates.
|
float | getCharacterHeight () const |
float | getCharacterAspectRatio () const |
void | setCharacterSizeMode (CharacterSizeMode mode) |
| Set how the CharacterSize value relates to the final rendered character.
|
CharacterSizeMode | getCharacterSizeMode () const |
| Get the CharacterSizeMode.
|
void | setMaximumWidth (float maximumWidth) |
| Set the maximum width of the text box.
|
float | getMaximumWidth () const |
| Get the maximim width of the text box.
|
void | setMaximumHeight (float maximumHeight) |
| Set the maximum height of the text box.
|
float | getMaximumHeight () const |
| Get the maximum height of the text box.
|
void | setLineSpacing (float lineSpacing) |
| Set the line spacing of the text box, given as a percentage of the character height.
|
float | getLineSpacing () const |
| Get the line spacing of the text box.
|
void | setPosition (const osg::Vec3 &pos) |
| Set the position of text.
|
const osg::Vec3 & | getPosition () const |
| Get the position of text.
|
void | setAlignment (AlignmentType alignment) |
AlignmentType | getAlignment () const |
void | setAxisAlignment (AxisAlignment axis) |
AxisAlignment | getAxisAlignment () const |
void | setRotation (const osg::Quat &quat) |
const osg::Quat & | getRotation () const |
void | setAutoRotateToScreen (bool autoRotateToScreen) |
bool | getAutoRotateToScreen () const |
void | setLayout (Layout layout) |
Layout | getLayout () const |
void | setDrawMode (unsigned int mode) |
unsigned int | getDrawMode () const |
void | setBoundingBoxMargin (float margin) |
float | getBoundingBoxMargin () const |
void | setBoundingBoxColor (const osg::Vec4 &color) |
const osg::Vec4 & | getBoundingBoxColor () const |
void | setKerningType (KerningType kerningType) |
KerningType | getKerningType () const |
unsigned int | getLineCount () const |
| Get the number of wrapped lines - only valid after computeGlyphRepresentation() has been called, returns 0 otherwise.
|
virtual osg::BoundingBox | computeBound () const |
| Compute the bounding box around Drawables's geometry.
|
| Drawable () |
| Drawable (const Drawable &drawable, const CopyOp ©op=CopyOp::SHALLOW_COPY) |
| Copy constructor using CopyOp to manage deep vs shallow copy.
|
virtual Geometry * | asGeometry () |
| Convert 'this' into a Geometry pointer if Drawable is a Geometry, otherwise return 0.
|
virtual const Geometry * | asGeometry () const |
| Convert 'const this' into a const Geometry pointer if Drawable is a Geometry, otherwise return 0.
|
virtual void | computeDataVariance () |
| Compute the DataVariance based on an assessment of callback etc.
|
const ParentList & | getParents () const |
| Get the parent list of drawable.
|
ParentList | getParents () |
| Get the a copy of parent list of node.
|
Node * | getParent (unsigned int i) |
| Get a single parent of Drawable.
|
const Node * | getParent (unsigned int i) const |
| Get a single const parent of Drawable.
|
unsigned int | getNumParents () const |
| Get the number of parents of node.
|
MatrixList | getWorldMatrices (const osg::Node *haltTraversalAtNode=0) const |
| Get the list of matrices that transform this node from local coordinates to world coordinates.
|
void | setStateSet (StateSet *stateset) |
| Set the StateSet attached to the Drawable.
|
StateSet * | getStateSet () |
| Get the attached StateSet.
|
const StateSet * | getStateSet () const |
| Get the attached const StateSet.
|
StateSet * | getOrCreateStateSet () |
| Get the attached const StateSet, if one is not already attached create one, attach it to the drawable and return a pointer to it.
|
void | setInitialBound (const osg::BoundingBox &bbox) |
| Set the initial bounding volume to use when computing the overall bounding volume.
|
const BoundingBox & | getInitialBound () const |
| Set the initial bounding volume to use when computing the overall bounding volume.
|
void | dirtyBound () |
| Dirty the bounding box, forcing a computeBound() on the next call to getBound().
|
const BoundingBox & | getBound () const |
| Get BoundingBox of Drawable.
|
void | setComputeBoundingBoxCallback (ComputeBoundingBoxCallback *callback) |
| Set the compute bound callback to override the default computeBound.
|
ComputeBoundingBoxCallback * | getComputeBoundingBoxCallback () |
| Get the compute bound callback.
|
const ComputeBoundingBoxCallback * | getComputeBoundingBoxCallback () const |
| Get the const compute bound callback.
|
void | setShape (Shape *shape) |
| Set the Shape of the Drawable .
|
Shape * | getShape () |
| Get the Shape of the Drawable.
|
const Shape * | getShape () const |
| Get the const Shape of the const Drawable.
|
void | setSupportsDisplayList (bool flag) |
| Set the drawable so that it can or cannot be used in conjunction with OpenGL display lists.
|
bool | getSupportsDisplayList () const |
| Get whether display lists are supported for this drawable instance.
|
void | setUseDisplayList (bool flag) |
| When set to true, force the draw method to use OpenGL Display List for rendering.
|
bool | getUseDisplayList () const |
| Return whether OpenGL display lists are being used for rendering.
|
GLuint & | getDisplayList (unsigned int contextID) const |
| Return OpenGL display list for specified contextID.
|
virtual void | setUseVertexBufferObjects (bool flag) |
| When set to true, ignore the setUseDisplayList() settings, and hints to the drawImplementation method to use OpenGL vertex buffer objects for rendering.
|
bool | getUseVertexBufferObjects () const |
| Return whether OpenGL vertex buffer objects should be used when supported by OpenGL driver.
|
virtual void | dirtyDisplayList () |
| Force a recompile on next draw() of any OpenGL display list associated with this geoset.
|
virtual unsigned int | getGLObjectSizeHint () const |
| Return the estimated size of GLObjects (display lists/vertex buffer objects) that are associated with this drawable.
|
void | draw (RenderInfo &renderInfo) const |
| Draw OpenGL primitives.
|
virtual void | compileGLObjects (RenderInfo &renderInfo) const |
| Immediately compile this Drawable into an OpenGL Display List/VertexBufferObjects.
|
virtual void | setUpdateCallback (UpdateCallback *ac) |
| Set the UpdateCallback which allows users to attach customize the updating of an object during the update traversal.
|
UpdateCallback * | getUpdateCallback () |
| Get the non const UpdateCallback.
|
const UpdateCallback * | getUpdateCallback () const |
| Get the const UpdateCallback.
|
bool | requiresUpdateTraversal () const |
| Return whether this Drawable has update callbacks associated with it, and therefore must be traversed.
|
virtual void | setEventCallback (EventCallback *ac) |
| Set the EventCallback which allows users to attach customize the updating of an object during the Event traversal.
|
EventCallback * | getEventCallback () |
| Get the non const EventCallback.
|
const EventCallback * | getEventCallback () const |
| Get the const EventCallback.
|
bool | requiresEventTraversal () const |
| Return whether this Drawable has event callbacks associated with it, and therefore must be traversed.
|
virtual void | setCullCallback (CullCallback *cc) |
| Set the CullCallback which allows users to customize the culling of Drawable during the cull traversal.
|
CullCallback * | getCullCallback () |
| Get the non const CullCallback.
|
const CullCallback * | getCullCallback () const |
| Get the const CullCallback.
|
virtual void | setDrawCallback (DrawCallback *dc) |
| Set the DrawCallback which allows users to attach customize the drawing of existing Drawable object.
|
DrawCallback * | getDrawCallback () |
| Get the non const DrawCallback.
|
const DrawCallback * | getDrawCallback () const |
| Get the const DrawCallback.
|
virtual void | accept (AttributeFunctor &) |
| accept an AttributeFunctor and call its methods to tell it about the internal attributes that this Drawable has.
|
virtual bool | supports (const PrimitiveIndexFunctor &) const |
| Return true if the Drawable subclass supports accept(PrimitiveIndexFunctor&).
|
virtual void | accept (PrimitiveIndexFunctor &) const |
| Accept a PrimitiveIndexFunctor and call its methods to tell it about the internal primitives that this Drawable has.
|
| Object () |
| Construct an object.
|
| Object (bool threadSafeRefUnref) |
| Object (const Object &, const CopyOp ©op=CopyOp::SHALLOW_COPY) |
| Copy constructor, optional CopyOp object can be used to control shallow vs deep copying of dynamic data.
|
virtual void | setName (const std::string &name) |
| Set the name of object using C++ style string.
|
void | setName (const char *name) |
| Set the name of object using a C style string.
|
const std::string & | getName () const |
| Get the name of object.
|
void | setDataVariance (DataVariance dv) |
| Set the data variance of this object.
|
DataVariance | getDataVariance () const |
| Get the data variance of this object.
|
void | setUserDataContainer (osg::UserDataContainer *udc) |
| set the UserDataContainer object.
|
osg::UserDataContainer * | getUserDataContainer () |
| get the UserDataContainer attached to this object.
|
const osg::UserDataContainer * | getUserDataContainer () const |
| get the const UserDataContainer attached to this object.
|
osg::UserDataContainer * | getOrCreateUserDataContainer () |
| Convinience method that returns the UserDataContainer, and if one doesn't already exist creates and assigns a DefaultUserDataContainer to the Object and then return this new UserDataContainer.
|
virtual void | setUserData (Referenced *obj) |
| Set user data, data must be subclassed from Referenced to allow automatic memory handling.
|
virtual Referenced * | getUserData () |
| Get user data.
|
virtual const Referenced * | getUserData () const |
| Get const user data.
|
template<typename T > |
bool | getUserValue (const std::string &name, T &value) const |
| Convinience method that casts the named UserObject to osg::TemplateValueObject<T> and gets the value.
|
template<typename T > |
void | setUserValue (const std::string &name, const T &value) |
| Convinience method that creates the osg::TemplateValueObject<T> to store the specified value and adds it as a named UserObject.
|
| Referenced () |
| Referenced (bool threadSafeRefUnref) |
| Referenced (const Referenced &) |
Referenced & | operator= (const Referenced &) |
bool | getThreadSafeRefUnref () const |
| Get whether a mutex is used to ensure ref() and unref() are thread safe.
|
OpenThreads::Mutex * | getRefMutex () const |
| Get the mutex used to ensure thread safety of ref()/unref().
|
int | ref () const |
| Increment the reference count by one, indicating that this object has another pointer which is referencing it.
|
int | unref () const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it.
|
int | unref_nodelete () const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it.
|
int | referenceCount () const |
| Return the number of pointers currently referencing this object.
|
ObserverSet * | getObserverSet () const |
| Get the ObserverSet if one is attached, otherwise return NULL.
|
ObserverSet * | getOrCreateObserverSet () const |
| Get the ObserverSet if one is attached, otherwise create an ObserverSet, attach it, then return this newly created ObserverSet.
|
void | addObserver (Observer *observer) const |
| Add a Observer that is observing this object, notify the Observer when this object gets deleted.
|
void | removeObserver (Observer *observer) const |
| Remove Observer that is observing this object.
|