From Tree, addition of ; after MACRO_'s to help with Java port.
From Tree + Robert, Addition of LEFT_BASE_LINE,RIGHT_BASE_LINE,CENTER_BASE_LINE Alignment options in Text.
This commit is contained in:
@@ -37,7 +37,7 @@ class SG_EXPORT AnimationPath : public virtual osg::Object
|
||||
_timeControlPointMap(ap._timeControlPointMap),
|
||||
_loopMode(ap._loopMode) {}
|
||||
|
||||
META_Object(osg,AnimationPath)
|
||||
META_Object(osg,AnimationPath);
|
||||
|
||||
struct ControlPoint
|
||||
{
|
||||
@@ -162,7 +162,7 @@ class SG_EXPORT AnimationPathCallback : public NodeCallback
|
||||
_animationTime(apc._animationTime) {}
|
||||
|
||||
|
||||
META_Object(osg,AnimationPathCallback)
|
||||
META_Object(osg,AnimationPathCallback);
|
||||
|
||||
AnimationPathCallback(AnimationPath* ap,double timeOffset=0.0f,double timeMultiplier=1.0f):
|
||||
_animationPath(ap),
|
||||
|
||||
@@ -34,7 +34,7 @@ class SG_EXPORT ConvexPlanarOccluder : public Object
|
||||
_occluder(cpo._occluder),
|
||||
_holeList(cpo._holeList) {}
|
||||
|
||||
META_Object(osg,ConvexPlanarOccluder)
|
||||
META_Object(osg,ConvexPlanarOccluder);
|
||||
|
||||
void setOccluder(const ConvexPlanarPolygon& cpp) { _occluder = cpp; }
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ class Sphere : public Shape
|
||||
_center(sphere._center),
|
||||
_radius(sphere._radius) {}
|
||||
|
||||
META_Shape(osg, Sphere)
|
||||
META_Shape(osg, Sphere);
|
||||
|
||||
inline bool valid() const { return _radius>=0.0f; }
|
||||
|
||||
@@ -200,7 +200,7 @@ class Box : public Shape
|
||||
_halfLengths(box._halfLengths),
|
||||
_rotation(box._rotation) {}
|
||||
|
||||
META_Shape(osg, Box)
|
||||
META_Shape(osg, Box);
|
||||
|
||||
inline bool valid() const { return _halfLengths.x()>=0.0f; }
|
||||
|
||||
@@ -254,7 +254,7 @@ class Cone : public Shape
|
||||
_height(cone._height),
|
||||
_rotation(cone._rotation) {}
|
||||
|
||||
META_Shape(osg, Cone)
|
||||
META_Shape(osg, Cone);
|
||||
|
||||
inline bool valid() const { return _radius>=0.0f; }
|
||||
|
||||
@@ -314,7 +314,7 @@ class Cylinder : public Shape
|
||||
_height(cylinder._height),
|
||||
_rotation(cylinder._rotation) {}
|
||||
|
||||
META_Shape(osg, Cylinder)
|
||||
META_Shape(osg, Cylinder);
|
||||
|
||||
inline bool valid() const { return _radius>=0.0f; }
|
||||
|
||||
@@ -359,7 +359,7 @@ class InfinitePlane : public Shape, public Plane
|
||||
Shape(plane,copyop),
|
||||
Plane(plane) {}
|
||||
|
||||
META_Shape(osg, InfinitePlane)
|
||||
META_Shape(osg, InfinitePlane);
|
||||
|
||||
protected:
|
||||
|
||||
@@ -377,7 +377,7 @@ class TriangleMesh : public Shape
|
||||
_vertices(mesh._vertices),
|
||||
_indices(mesh._indices) {}
|
||||
|
||||
META_Shape(osg, TriangleMesh)
|
||||
META_Shape(osg, TriangleMesh);
|
||||
|
||||
|
||||
void setVertices(Vec3Array* vertices) { _vertices = vertices; }
|
||||
@@ -407,7 +407,7 @@ class ConvexHull : public TriangleMesh
|
||||
ConvexHull(const ConvexHull& hull,const CopyOp& copyop=CopyOp::SHALLOW_COPY):
|
||||
TriangleMesh(hull,copyop) {}
|
||||
|
||||
META_Shape(osg, TriangleMesh)
|
||||
META_Shape(osg, TriangleMesh);
|
||||
|
||||
protected:
|
||||
|
||||
@@ -477,7 +477,7 @@ class SG_EXPORT Grid : public HeightField
|
||||
|
||||
Grid(const Grid& mesh,const CopyOp& copyop=CopyOp::SHALLOW_COPY);
|
||||
|
||||
META_Shape(osg,Grid)
|
||||
META_Shape(osg,Grid);
|
||||
|
||||
void allocateGrid(unsigned int numColumns,unsigned int numRows);
|
||||
|
||||
@@ -512,7 +512,7 @@ class CompositeShape : public Shape
|
||||
Shape(cs,copyop),
|
||||
_children(cs._children) {}
|
||||
|
||||
META_Shape(osg, CompositeShape)
|
||||
META_Shape(osg, CompositeShape);
|
||||
|
||||
/** Set the shape that encloses all of the children.*/
|
||||
void setShape(Shape* shape) { _shape = shape; }
|
||||
|
||||
@@ -51,7 +51,7 @@ class TessellationHints : public Object
|
||||
_createBody(tess._createBody),
|
||||
_createBottom(tess._createBottom) {}
|
||||
|
||||
META_Object(osg,TessellationHints)
|
||||
META_Object(osg,TessellationHints);
|
||||
|
||||
|
||||
enum TessellationMode
|
||||
|
||||
@@ -133,7 +133,11 @@ public:
|
||||
RIGHT_TOP,
|
||||
RIGHT_CENTER,
|
||||
RIGHT_BOTTOM,
|
||||
BASE_LINE /// default.
|
||||
|
||||
LEFT_BASE_LINE,
|
||||
CENTER_BASE_LINE,
|
||||
RIGHT_BASE_LINE,
|
||||
BASE_LINE = LEFT_BASE_LINE /// default.
|
||||
|
||||
};
|
||||
|
||||
@@ -240,17 +244,38 @@ protected:
|
||||
osg::Vec4 _color;
|
||||
unsigned int _drawMode;
|
||||
|
||||
public:
|
||||
|
||||
// internal structures, variable and methods used for rendering of characters.
|
||||
struct GlyphQuads
|
||||
struct OSGTEXT_EXPORT GlyphQuads
|
||||
{
|
||||
typedef std::vector<osg::Vec2> Coords;
|
||||
typedef std::vector<osg::Vec2> TexCoords;
|
||||
|
||||
Coords _coords;
|
||||
TexCoords _texcoords;
|
||||
|
||||
Coords& getCoords() { return _coords; }
|
||||
const Coords& getCoords() const { return _coords; }
|
||||
|
||||
TexCoords& getTexCoords() { return _texcoords; }
|
||||
const TexCoords& getTexCoords() const { return _texcoords; }
|
||||
};
|
||||
|
||||
typedef std::map<osg::ref_ptr<osg::StateSet>,GlyphQuads> TextureGlyphQuadMap;
|
||||
|
||||
/** Direct Access to GlyphQuads */
|
||||
const GlyphQuads* getGlyphQuad(unsigned int index) const
|
||||
{
|
||||
if (index>=_textureGlyphQuadMap.size()) return NULL;
|
||||
|
||||
TextureGlyphQuadMap::const_iterator itGlyph = _textureGlyphQuadMap.begin();
|
||||
while((index--) && (itGlyph!=_textureGlyphQuadMap.end())) itGlyph++;
|
||||
return &itGlyph->second;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
// iternal map used for rendering. Set up by the computeGlyphRepresentation() method.
|
||||
TextureGlyphQuadMap _textureGlyphQuadMap;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user