14 #ifndef OSGSIM_SPHERESEGMENT
15 #define OSGSIM_SPHERESEGMENT 1
17 #include <osgSim/Export>
22 #include <osg/Matrixd>
23 #include <osg/BlendFunc>
73 EDGELINE = 0x00000008,
81 _centre(0.0f,0.0f,0.0f), _radius(1.0f),
82 _azMin(0.0f), _azMax(
osg::
PI/2.0f),
83 _elevMin(0.0f), _elevMax(
osg::
PI/2.0f),
104 float elevMin,
float elevMax,
int density):
106 _centre(centre), _radius(radius),
107 _azMin(azMin), _azMax(azMax),
108 _elevMin(elevMin), _elevMax(elevMax),
126 float elevRange,
int density);
131 _centre(rhs._centre), _radius(rhs._radius),
132 _azMin(rhs._azMin), _azMax(rhs._azMax),
133 _elevMin(rhs._elevMin), _elevMax(rhs._elevMax),
134 _density(rhs._density),
135 _drawMask(rhs._drawMask)
147 void setRadius(
float r);
150 float getRadius()
const;
159 void setArea(
const osg::Vec3& vec,
float azRange,
float elevRange);
168 void getArea(
osg::Vec3& vec,
float& azRange,
float& elevRange)
const;
176 void setArea(
float azMin,
float azMax,
float elevMin,
float elevMax);
184 void getArea(
float &azMin,
float &azMax,
float &elevMin,
float &elevMax)
const;
187 void setDensity(
int d);
190 int getDensity()
const;
197 void setDrawMask(
int dm);
203 void setSurfaceColor(
const osg::Vec4& c);
215 void setEdgeLineColor(
const osg::Vec4& c);
232 typedef std::vector< osg::ref_ptr<osg::Vec3Array> >
LineList;
259 void dirtyAllDrawableDisplayLists();
260 void dirtyAllDrawableBounds();
280 friend class Surface;
282 void Surface_drawImplementation(
osg::State&)
const;
285 friend class EdgeLine;
287 void EdgeLine_drawImplementation(
osg::State&)
const;
289 enum BoundaryAngle{MIN,MAX};
290 enum SideOrientation{AZIM,ELEV};
293 bool Side_computeBound(
osg::BoundingBox&, SideOrientation, BoundaryAngle)
const;
294 void Side_drawImplementation(
osg::State&, SideOrientation, BoundaryAngle)
const;
298 bool Spoke_computeBound(
osg::BoundingBox&, BoundaryAngle, BoundaryAngle)
const;
299 void Spoke_drawImplementation(
osg::State&, BoundaryAngle, BoundaryAngle)
const;
304 float _azMin, _azMax, _elevMin, _elevMax;
SphereSegment(const osg::Vec3 ¢re, float radius, float azMin, float azMax, float elevMin, float elevMax, int density)
const osg::Vec4 & getSpokeColor() const
#define META_Node(library, name)
const osg::Vec4 & getSideColor() const
std::vector< osg::ref_ptr< osg::Vec3Array > > LineList
const osg::Vec4 & getEdgeLineColor() const
SphereSegment(const SphereSegment &rhs, const osg::CopyOp &co)
const osg::Vec4 & getSurfaceColor() const