14#ifndef OSGSIM_SPHERESEGMENT
15#define OSGSIM_SPHERESEGMENT 1
82 _centre(0.0f,0.0f,0.0f), _radius(1.0f),
83 _azMin(0.0f), _azMax(
osg::PI/2.0f),
84 _elevMin(0.0f), _elevMax(
osg::PI/2.0f),
104 SphereSegment(
const osg::Vec3& centre,
float radius,
float azMin,
float azMax,
float elevMin,
float elevMax,
int density);
159 void setArea(
float azMin,
float azMax,
float elevMin,
float elevMax);
167 void getArea(
float &azMin,
float &azMax,
float &elevMin,
float &elevMax)
const;
215 typedef std::vector< osg::ref_ptr<osg::Vec3Array> >
LineList;
258 float _azMin, _azMax, _elevMin, _elevMax;
281 osg::StateSet* getLitStateSet(
const osg::Vec4& color) {
return (color.
a()<1.0) ? _litTransparentState.get() : _litOpaqueState.get(); }
const osg::Vec4 & getSideColor() const
Definition SphereSegment:207
void getArea(float &azMin, float &azMax, float &elevMin, float &elevMax) const
void getArea(osg::Vec3 &vec, float &azRange, float &elevRange) const
META_Node(osgSim, SphereSegment)
void setCentre(const osg::Vec3 &c)
DrawMask
Definition SphereSegment:71
@ ALL
Draw every part of the sphere segment.
Definition SphereSegment:76
@ EDGELINE
Draw the line round the edge of the area on the sphere's surface.
Definition SphereSegment:74
@ SIDES
Draw the planes from the sphere's centre to the edge of the sphere's surface.
Definition SphereSegment:75
@ SPOKES
Draw the spokes from the sphere's centre to the surface's corners.
Definition SphereSegment:73
@ SURFACE
Draw the specified area on the sphere's surface.
Definition SphereSegment:72
void setArea(const osg::Vec3 &vec, float azRange, float elevRange)
virtual void releaseGLObjects(osg::State *state=0) const
void setSurfaceColor(const osg::Vec4 &c)
void setArea(float azMin, float azMax, float elevMin, float elevMax)
void setSpokeColor(const osg::Vec4 &c)
void setAllColors(const osg::Vec4 &c)
osg::Node * computeIntersectionSubgraph(const osg::Matrixd &matrix, osg::Node *subgraph)
SphereSegment()
Definition SphereSegment:81
void setSideColor(const osg::Vec4 &c)
LineList computeIntersection(const osg::Matrixd &matrix, osg::Node *subgraph)
const osg::Vec4 & getSurfaceColor() const
Definition SphereSegment:189
SphereSegment(const SphereSegment &rhs, const osg::CopyOp &co)
virtual void resizeGLObjectBuffers(unsigned int maxSize)
int getDrawMask() const
Definition SphereSegment:183
std::vector< osg::ref_ptr< osg::Vec3Array > > LineList
Definition SphereSegment:215
const osg::Vec4 & getEdgeLineColor() const
Definition SphereSegment:201
void setEdgeLineColor(const osg::Vec4 &c)
osg::Node * computeIntersectionSubgraph(const osg::Matrixd &matrix, osg::Drawable *drawable)
SphereSegment(const osg::Vec3 ¢re, float radius, const osg::Vec3 &vec, float azRange, float elevRange, int density)
const osg::Vec3 & getCentre() const
LineList computeIntersection(const osg::Matrixd &matrix, osg::Drawable *drawable)
void traverse(osg::NodeVisitor &nv)
SphereSegment(const osg::Vec3 ¢re, float radius, float azMin, float azMax, float elevMin, float elevMax, int density)
virtual osg::BoundingSphere computeBound() const
const osg::Vec4 & getSpokeColor() const
Definition SphereSegment:195
Definition NodeVisitor:82
value_type & a()
Definition Vec4f:100
T * get() const
Definition ref_ptr:117
Definition BlinkSequence:27
Vec3f Vec3
Definition Vec3:21
BoundingSphered BoundingSphere
Definition BoundingSphere:314
Vec4f Vec4
Definition Vec4:21
#define OSGSIM_EXPORT
Definition osgSim/Export:38