Added Text::getCharacterCorners(...) method to help applications that want to find out the positions of characters being rendered.
This commit is contained in:
@@ -279,10 +279,12 @@ public:
|
||||
void getCoord(unsigned int i, osg::Vec2& c) const { c.set((*_coords)[i].x(), (*_coords)[i].y()); }
|
||||
void getCoord(unsigned int i, osg::Vec3& c) const { c = (*_coords)[i]; }
|
||||
|
||||
|
||||
/** Get the internal matrix used to provide positioning of text.*/
|
||||
/** Get the cached internal matrix used to provide positioning of text. The cached matrix is originally computed by computeMatrix(..). */
|
||||
const osg::Matrix& getMatrix() const { return _matrix; }
|
||||
|
||||
/** compute the matrix that positions the text in model space for the given viewpoint.*/
|
||||
bool computeMatrix(osg::Matrix& matrix, osg::State* state=0) const;
|
||||
|
||||
protected:
|
||||
|
||||
virtual ~TextBase();
|
||||
@@ -295,8 +297,6 @@ protected:
|
||||
|
||||
osg::VertexArrayState* createVertexArrayState(osg::RenderInfo& renderInfo) const;
|
||||
|
||||
bool computeMatrix(osg::Matrix& matrix, osg::State* state=0) const;
|
||||
|
||||
void positionCursor(const osg::Vec2 & endOfLine_coords, osg::Vec2 & cursor, unsigned int linelength);
|
||||
String::iterator computeLastCharacterOnLine(osg::Vec2& cursor, String::iterator first,String::iterator last);
|
||||
void computePositions();
|
||||
|
||||
Reference in New Issue
Block a user