Inheritance diagram for osgSim::SphereSegment:
Public Types | |
typedef std::vector< osg::ref_ptr< osg::Vec3Array > > | LineList |
SURFACE = 0x00000001 | |
Draw the specified area on the sphere's surface. | |
SPOKES = 0x00000002 | |
Draw the spokes from the sphere's centre to the surface's corners. | |
EDGELINE = 0x00000008 | |
Draw the line round the edge of the area on the sphere's surface. | |
SIDES = 0x00000010 | |
Draw the planes from the sphere's centre to the edge of the sphere's surface. | |
ALL = 0xffffffff | |
Draw every part of the sphere segment. | |
enum | DrawMask { SURFACE = 0x00000001, SPOKES = 0x00000002, EDGELINE = 0x00000008, SIDES = 0x00000010, ALL = 0xffffffff } |
Public Member Functions | |
SphereSegment () | |
SphereSegment (const osg::Vec3 ¢re, float radius, float azMin, float azMax, float elevMin, float elevMax, int density) | |
SphereSegment (const osg::Vec3 ¢re, float radius, const osg::Vec3 &vec, float azRange, float elevRange, int density) | |
SphereSegment (const SphereSegment &rhs, const osg::CopyOp &co) | |
void | setCentre (const osg::Vec3 &c) |
const osg::Vec3 & | getCentre () const |
void | setRadius (float r) |
float | getRadius () const |
void | setArea (const osg::Vec3 &vec, float azRange, float elevRange) |
void | getArea (osg::Vec3 &vec, float &azRange, float &elevRange) const |
void | setArea (float azMin, float azMax, float elevMin, float elevMax) |
void | getArea (float &azMin, float &azMax, float &elevMin, float &elevMax) const |
void | setDensity (int d) |
int | getDensity () const |
void | setDrawMask (DrawMask dm) |
DrawMask | getDrawMask () const |
void | setSurfaceColor (const osg::Vec4 &c) |
osg::Vec4 | getSurfaceColor () const |
void | setSpokeColor (const osg::Vec4 &c) |
osg::Vec4 | getSpokeColor () const |
void | setEdgeLineColor (const osg::Vec4 &c) |
osg::Vec4 | getEdgeLineColor () const |
void | setSideColor (const osg::Vec4 &c) |
osg::Vec4 | getSideColor () const |
void | setAllColors (const osg::Vec4 &c) |
META_Node (osgSim, SphereSegment) | |
LineList | computeIntersection (const osg::Matrixd &matrix, osg::Node *subgraph) |
LineList | computeIntersection (const osg::Matrixd &matrix, osg::Drawable *drawable) |
osg::Node * | computeIntersectionSubgraph (const osg::Matrixd &matrix, osg::Node *subgraph) |
osg::Node * | computeIntersectionSubgraph (const osg::Matrixd &matrix, osg::Drawable *drawable) |
Friends | |
class | Surface |
class | EdgeLine |
class | Side |
class | Spoke |
Caveats:
typedef std::vector< osg::ref_ptr<osg::Vec3Array> > osgSim::SphereSegment::LineList |
A list of vertex arrays representing a list of lines.
DrawMask represents a bit field, the values of which may be OR'ed together to specify which parts of the sphere segment should be drawn. E.g.
sphereSegment->setDrawMask(SphereSegment::DrawMask(SphereSegment::SURFACE|SphereSegment::SPOKES));
osgSim::SphereSegment::SphereSegment | ( | ) | [inline] |
Default constructor.
osgSim::SphereSegment::SphereSegment | ( | const osg::Vec3 & | centre, | |
float | radius, | |||
float | azMin, | |||
float | azMax, | |||
float | elevMin, | |||
float | elevMax, | |||
int | density | |||
) | [inline] |
Construct by angle ranges. Note that the azimuth 'zero' is the Y axis; specifying an azimuth range from azMin -osgPI/2.0f to azMax osg::PI/2.0f will cover the 'top half' of the circle in the XY plane. The elev angles are 'out' of the 'zero' XY plane with +ve angles above the plane, and -ve angles below.
centre | sphere centre | |
radius | radius of sphere | |
azMin | azimuth minimum | |
azMax | azimuth maximum | |
elevMin | elevation minimum | |
elevMax | elevation maximum | |
density | number of units to divide the azimuth and elevation ranges into |
osgSim::SphereSegment::SphereSegment | ( | const osg::Vec3 & | centre, | |
float | radius, | |||
const osg::Vec3 & | vec, | |||
float | azRange, | |||
float | elevRange, | |||
int | density | |||
) |
Construct by vector.
centre | sphere centre | |
radius | radius of sphere | |
vec | vector pointing from sphere centre to centre point of rendered area on sphere surface | |
azRange | azimuth range in radians (with centre along vec) | |
elevRange | elevation range in radians (with centre along vec) | |
density | number of units to divide the azimuth and elevation ranges into |
osgSim::SphereSegment::SphereSegment | ( | const SphereSegment & | rhs, | |
const osg::CopyOp & | co | |||
) | [inline] |
Copy constructor
LineList osgSim::SphereSegment::computeIntersection | ( | const osg::Matrixd & | matrix, | |
osg::Drawable * | drawable | |||
) |
Compute the interesection lines between specified drawable and this sphere segment. The matrix is the transform that takes the subgraph into the same coordiante frame as the sphere segment. The resulting intersections are in the coordinate frame of the sphere segment.
LineList osgSim::SphereSegment::computeIntersection | ( | const osg::Matrixd & | matrix, | |
osg::Node * | subgraph | |||
) |
Compute the interesection lines between subgraph and this sphere segment. The matrix is the transform that takes the subgraph into the same coordiante frame as the sphere segment. The resulting intersections are in the coordinate frame of the sphere segment.
osg::Node* osgSim::SphereSegment::computeIntersectionSubgraph | ( | const osg::Matrixd & | matrix, | |
osg::Drawable * | drawable | |||
) |
Compute the interesection lines between specified drawable and this sphere segment. The matrix is the transform that takes the subgraph into the same coordiante frame as the sphere segment. The resulting intersections are in the coordinate frame of the sphere segment.
osg::Node* osgSim::SphereSegment::computeIntersectionSubgraph | ( | const osg::Matrixd & | matrix, | |
osg::Node * | subgraph | |||
) |
Compute the interesection lines between subgraph and this sphere segment. The matrix is the transform that takes the subgraph into the same coordiante frame as the sphere segment. The resulting intersections are in the coordinate frame of the sphere segment.
void osgSim::SphereSegment::getArea | ( | float & | azMin, | |
float & | azMax, | |||
float & | elevMin, | |||
float & | elevMax | |||
) | const |
Get the area of the sphere segment
azMin | azimuth minimum | |
azMax | azimuth maximum | |
elevMin | elevation minimum | |
elevMax | elevation maximum |
void osgSim::SphereSegment::getArea | ( | osg::Vec3 & | vec, | |
float & | azRange, | |||
float & | elevRange | |||
) | const |
Get the area of the sphere segment
vec | vector pointing from sphere centre to centre point of rendered area on sphere surface (normalized) | |
azRange | azimuth range in radians (with centre along vec) | |
elevRange | elevation range in radians (with centre along vec) |
const osg::Vec3& osgSim::SphereSegment::getCentre | ( | ) | const |
Get the centre point of the SphereSegment
int osgSim::SphereSegment::getDensity | ( | ) | const |
Get the density of the sphere segment
DrawMask osgSim::SphereSegment::getDrawMask | ( | ) | const [inline] |
Get the DrawMask
osg::Vec4 osgSim::SphereSegment::getEdgeLineColor | ( | ) | const [inline] |
Get the color of the edge line.
float osgSim::SphereSegment::getRadius | ( | ) | const |
Get the radius of the SphereSegment
osg::Vec4 osgSim::SphereSegment::getSideColor | ( | ) | const [inline] |
Get the color of the planes.
osg::Vec4 osgSim::SphereSegment::getSpokeColor | ( | ) | const [inline] |
Get the color of the spokes.
osg::Vec4 osgSim::SphereSegment::getSurfaceColor | ( | ) | const [inline] |
Get the color of the surface.
osgSim::SphereSegment::META_Node | ( | osgSim | , | |
SphereSegment | ||||
) |
void osgSim::SphereSegment::setAllColors | ( | const osg::Vec4 & | c | ) |
Set color of all components.
void osgSim::SphereSegment::setArea | ( | float | azMin, | |
float | azMax, | |||
float | elevMin, | |||
float | elevMax | |||
) |
Set the area of the sphere segment
azMin | azimuth minimum | |
azMax | azimuth maximum | |
elevMin | elevation minimum | |
elevMax | elevation maximum |
void osgSim::SphereSegment::setArea | ( | const osg::Vec3 & | vec, | |
float | azRange, | |||
float | elevRange | |||
) |
Set the area of the sphere segment
vec | vector pointing from sphere centre to centre point of rendered area on sphere surface | |
azRange | azimuth range in radians (with centre along vec) | |
elevRange | elevation range in radians (with centre along vec) |
void osgSim::SphereSegment::setCentre | ( | const osg::Vec3 & | c | ) |
Set the centre point of the SphereSegment
void osgSim::SphereSegment::setDensity | ( | int | d | ) |
Set the density of the sphere segment
void osgSim::SphereSegment::setDrawMask | ( | DrawMask | dm | ) |
Specify the DrawMask.
dm | Bitmask specifying which parts of the sphere segment should be drawn. |
void osgSim::SphereSegment::setEdgeLineColor | ( | const osg::Vec4 & | c | ) |
Set the color of the edge line.
void osgSim::SphereSegment::setRadius | ( | float | r | ) |
Set the radius of the SphereSegment
void osgSim::SphereSegment::setSideColor | ( | const osg::Vec4 & | c | ) |
Set the color of the planes.
void osgSim::SphereSegment::setSpokeColor | ( | const osg::Vec4 & | c | ) |
Set the color of the spokes.
void osgSim::SphereSegment::setSurfaceColor | ( | const osg::Vec4 & | c | ) |
Set the color of the surface.
friend class EdgeLine [friend] |
friend class Side [friend] |
friend class Spoke [friend] |
friend class Surface [friend] |