openscenegraph
|
Classes | |
struct | AutoTransformCache |
Public Member Functions | |
TextBase () | |
TextBase (const TextBase &text, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) | |
virtual bool | isSameKindAs (const osg::Object *obj) const |
virtual const char * | className () const |
virtual const char * | libraryName () const |
void | setColor (const osg::Vec4 &color) |
const osg::Vec4 & | getColor () const |
virtual void | setFont (Font *font=0) |
virtual void | setFont (osg::ref_ptr< Font > font) |
virtual void | setFont (const std::string &fontfile) |
const Font * | getFont () const |
void | setStyle (Style *style) |
Style * | getStyle () |
const Style * | getStyle () const |
Style * | getOrCreateStyle () |
void | setFontResolution (unsigned int width, unsigned int height) |
unsigned int | getFontWidth () const |
unsigned int | getFontHeight () const |
void | setText (const String &text) |
void | setText (const std::string &text) |
void | setText (const std::string &text, String::Encoding encoding) |
void | setText (const wchar_t *text) |
String & | getText () |
const String & | getText () const |
void | update () |
void | setCharacterSize (float height) |
void | setCharacterSize (float height, float aspectRatio) |
float | getCharacterHeight () const |
float | getCharacterAspectRatio () const |
void | setCharacterSizeMode (CharacterSizeMode mode) |
CharacterSizeMode | getCharacterSizeMode () const |
void | setMaximumWidth (float maximumWidth) |
float | getMaximumWidth () const |
void | setMaximumHeight (float maximumHeight) |
float | getMaximumHeight () const |
void | setLineSpacing (float lineSpacing) |
float | getLineSpacing () const |
void | setPosition (const osg::Vec3 &pos) |
const osg::Vec3 & | getPosition () const |
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 |
virtual void | setThreadSafeRefUnref (bool threadSafe) |
virtual void | resizeGLObjectBuffers (unsigned int maxSize) |
virtual void | releaseGLObjects (osg::State *state=0) const |
virtual osg::BoundingBox | computeBound () const |
![]() | |
Drawable () | |
Drawable (const Drawable &drawable, const CopyOp ©op=CopyOp::SHALLOW_COPY) | |
virtual Geometry * | asGeometry () |
virtual const Geometry * | asGeometry () const |
virtual void | computeDataVariance () |
const ParentList & | getParents () const |
ParentList | getParents () |
Node * | getParent (unsigned int i) |
const Node * | getParent (unsigned int i) const |
unsigned int | getNumParents () const |
MatrixList | getWorldMatrices (const osg::Node *haltTraversalAtNode=0) const |
void | setStateSet (StateSet *stateset) |
StateSet * | getStateSet () |
const StateSet * | getStateSet () const |
StateSet * | getOrCreateStateSet () |
void | setInitialBound (const osg::BoundingBox &bbox) |
const BoundingBox & | getInitialBound () const |
void | dirtyBound () |
const BoundingBox & | getBound () const |
void | setComputeBoundingBoxCallback (ComputeBoundingBoxCallback *callback) |
ComputeBoundingBoxCallback * | getComputeBoundingBoxCallback () |
const ComputeBoundingBoxCallback * | getComputeBoundingBoxCallback () const |
void | setShape (Shape *shape) |
Shape * | getShape () |
const Shape * | getShape () const |
void | setSupportsDisplayList (bool flag) |
bool | getSupportsDisplayList () const |
void | setUseDisplayList (bool flag) |
bool | getUseDisplayList () const |
GLuint & | getDisplayList (unsigned int contextID) const |
virtual void | setUseVertexBufferObjects (bool flag) |
bool | getUseVertexBufferObjects () const |
virtual void | dirtyDisplayList () |
virtual unsigned int | getGLObjectSizeHint () const |
void | draw (RenderInfo &renderInfo) const |
virtual void | compileGLObjects (RenderInfo &renderInfo) const |
virtual void | setUpdateCallback (UpdateCallback *ac) |
UpdateCallback * | getUpdateCallback () |
const UpdateCallback * | getUpdateCallback () const |
bool | requiresUpdateTraversal () const |
virtual void | setEventCallback (EventCallback *ac) |
EventCallback * | getEventCallback () |
const EventCallback * | getEventCallback () const |
bool | requiresEventTraversal () const |
virtual void | setCullCallback (CullCallback *cc) |
CullCallback * | getCullCallback () |
const CullCallback * | getCullCallback () const |
virtual void | setDrawCallback (DrawCallback *dc) |
DrawCallback * | getDrawCallback () |
const DrawCallback * | getDrawCallback () const |
virtual void | drawImplementation (RenderInfo &renderInfo) const =0 |
virtual bool | supports (const AttributeFunctor &) const |
virtual void | accept (AttributeFunctor &) |
virtual bool | supports (const ConstAttributeFunctor &) const |
virtual void | accept (ConstAttributeFunctor &) const |
virtual bool | supports (const PrimitiveFunctor &) const |
virtual void | accept (PrimitiveFunctor &) const |
virtual bool | supports (const PrimitiveIndexFunctor &) const |
virtual void | accept (PrimitiveIndexFunctor &) const |
![]() | |
Object () | |
Object (bool threadSafeRefUnref) | |
Object (const Object &, const CopyOp ©op=CopyOp::SHALLOW_COPY) | |
virtual Object * | cloneType () const =0 |
virtual Object * | clone (const CopyOp &) const =0 |
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) |
osg::UserDataContainer * | getUserDataContainer () |
const osg::UserDataContainer * | getUserDataContainer () const |
osg::UserDataContainer * | getOrCreateUserDataContainer () |
virtual void | setUserData (Referenced *obj) |
virtual Referenced * | getUserData () |
virtual const Referenced * | getUserData () 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 bool | getUserValue (const std::string &name, T &value) const |
![]() | |
Referenced () | |
Referenced (bool threadSafeRefUnref) | |
Referenced (const Referenced &) | |
Referenced & | operator= (const Referenced &) |
bool | getThreadSafeRefUnref () const |
OpenThreads::Mutex * | getRefMutex () const |
int | ref () const |
int | unref () const |
int | unref_nodelete () const |
int | referenceCount () const |
ObserverSet * | getObserverSet () const |
ObserverSet * | getOrCreateObserverSet () const |
void | addObserver (Observer *observer) const |
void | removeObserver (Observer *observer) const |
Protected Member Functions | |
virtual | ~TextBase () |
void | positionCursor (const osg::Vec2 &endOfLine_coords, osg::Vec2 &cursor, unsigned int linelength) |
void | computePositions () |
String::iterator | computeLastCharacterOnLine (osg::Vec2 &cursor, String::iterator first, String::iterator last) |
virtual void | computePositions (unsigned int contextID) const =0 |
virtual void | computeGlyphRepresentation ()=0 |
![]() | |
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 |
Additional Inherited Members | |
![]() | |
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 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 |
osgText::TextBase::TextBase | ( | ) |
osgText::TextBase::TextBase | ( | const TextBase & | text, |
const osg::CopyOp & | copyop = osg::CopyOp::SHALLOW_COPY |
||
) |
|
protectedvirtual |
|
inlinevirtual |
return the name of the object's class type. Must be defined by derived classes.
Reimplemented from osg::Drawable.
Reimplemented in osgText::Text.
|
virtual |
Compute the bounding box around Drawables's geometry.
Reimplemented from osg::Drawable.
Reimplemented in osgText::Text3D.
|
protectedpure virtual |
Implemented in osgText::Text, and osgText::Text3D.
|
protected |
|
protected |
|
protectedpure virtual |
Implemented in osgText::Text, and osgText::Text3D.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get the CharacterSizeMode.
|
inline |
|
inline |
|
inline |
Get the font. Return 0 if default is being used.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get the number of wrapped lines - only valid after computeGlyphRepresentation() has been called, returns 0 otherwise
|
inline |
Get the line spacing of the text box.
|
inline |
Get the maximum height of the text box.
|
inline |
Get the maximim width of the text box.
|
inline |
Get or create the text style.
|
inline |
Get the position of text.
|
inline |
|
inline |
Get the text style.
|
inline |
Get the const text style.
|
inline |
Get the text string. Note, if you modify the string you must call Text::update() for the internal glyph reprentation to be updated.
|
inline |
Get the const text string.
|
inlinevirtual |
Reimplemented from osg::Drawable.
Reimplemented in osgText::Text.
|
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.
Reimplemented in osgText::Text.
|
protected |
|
virtual |
If State is non-zero, this function releases OpenGL objects for the specified graphics context. Otherwise, releases OpenGL objexts for all graphics contexts.
Reimplemented from osg::Drawable.
Reimplemented in osgText::Text, and osgText::Text3D.
|
virtual |
Resize any per context GLObject buffers to specified size.
Reimplemented from osg::Drawable.
Reimplemented in osgText::Text, and osgText::Text3D.
void osgText::TextBase::setAlignment | ( | AlignmentType | alignment | ) |
void osgText::TextBase::setAutoRotateToScreen | ( | bool | autoRotateToScreen | ) |
void osgText::TextBase::setAxisAlignment | ( | AxisAlignment | axis | ) |
|
inline |
void osgText::TextBase::setBoundingBoxMargin | ( | float | margin | ) |
void osgText::TextBase::setCharacterSize | ( | float | height | ) |
Set the rendered character size in object coordinates.
void osgText::TextBase::setCharacterSize | ( | float | height, |
float | aspectRatio | ||
) |
Set the rendered character size in object coordinates.
|
inline |
Set how the CharacterSize value relates to the final rendered character.
void osgText::TextBase::setColor | ( | const osg::Vec4 & | color | ) |
void osgText::TextBase::setDrawMode | ( | unsigned int | mode | ) |
|
inlinevirtual |
Set the Font to use to render the text. setFont(0) sets the use of the default font.
Reimplemented in osgText::Text.
|
virtual |
Set the Font to use to render the text.
Reimplemented in osgText::Text.
|
virtual |
Set the font, loaded from the specified front file, to use to render the text, setFont("") sets the use of the default font. See the osgText::readFontFile function for how the font file will be located.
Reimplemented in osgText::Text.
void osgText::TextBase::setFontResolution | ( | unsigned int | width, |
unsigned int | height | ||
) |
Set the Font reference width and height resolution in texels. Note, the size may not be supported by current font, the closest supported font size will be selected.
|
inline |
void osgText::TextBase::setLayout | ( | Layout | layout | ) |
void osgText::TextBase::setLineSpacing | ( | float | lineSpacing | ) |
Set the line spacing of the text box, given as a percentage of the character height. The default value is 0 for backward compatibility. For longer paragraphs of text, a value of at least 25% (i.e. set line spacing to 0.25) is recommended.
void osgText::TextBase::setMaximumHeight | ( | float | maximumHeight | ) |
Set the maximum height of the text box. With horizontal layouts any characters which do not fit are wrapped around. 0 or negative values indicate that no maximum height is set, lines can be as long as they need be to fit the required text
void osgText::TextBase::setMaximumWidth | ( | float | maximumWidth | ) |
Set the maximum width of the text box. With horizontal layouts any characters which do not fit are wrapped around. 0 or negative values indicate that no maximum width is set, lines can be as long as they need be to fit thre required text
void osgText::TextBase::setPosition | ( | const osg::Vec3 & | pos | ) |
Set the position of text.
void osgText::TextBase::setRotation | ( | const osg::Quat & | quat | ) |
|
inline |
Set the text style.
void osgText::TextBase::setText | ( | const String & | text | ) |
Set the text using a osgText::String.
void osgText::TextBase::setText | ( | const std::string & | text | ) |
Set the text using a std::string, which is converted to an internal TextString.
void osgText::TextBase::setText | ( | const std::string & | text, |
String::Encoding | encoding | ||
) |
Set the text using a Unicode encoded std::string, which is converted to an internal TextString. The encoding parameter specificies which Unicode encodeding is used in the std::string.
void osgText::TextBase::setText | ( | const wchar_t * | text | ) |
Set the text using a wchar_t string, which is converted to an internal TextString.
|
virtual |
Set whether to use a mutex to ensure ref() and unref() are thread safe.
Reimplemented from osg::Drawable.
Reimplemented in osgText::Text, and osgText::Text3D.
|
inline |
update internal glyph respresentation used for rendering, and bounding volume.
|
protected |
|
protected |
|
mutableprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
mutableprotected |
|
mutableprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
mutableprotected |
|
protected |
|
protected |