From David Fries, add init() call to SphereSegment constructor, and

new get methods for draw mask and color.
This commit is contained in:
Robert Osfield
2004-03-31 08:52:47 +00:00
parent d73824f0a1
commit 316c646a8f
2 changed files with 56 additions and 1 deletions

View File

@@ -293,6 +293,28 @@ void SphereSegment::getArea(osg::Vec3& vec, float& azRange, float& elevRange) co
vec.set(cos(elev)*sin(az), cos(elev)*cos(az), sin(elev));
}
void SphereSegment::setArea(float azMin, float azMax,
float elevMin, float elevMax)
{
_azMin=azMin;
_azMax=azMax;
_elevMin=elevMin;
_elevMax=elevMax;
dirtyAllDrawableDisplayLists();
dirtyAllDrawableBounds();
dirtyBound();
}
void SphereSegment::getArea(float &azMin, float &azMax,
float &elevMin, float &elevMax) const
{
azMin=_azMin;
azMax=_azMax;
elevMin=_elevMin;
elevMax=_elevMax;
}
void SphereSegment::setDensity(int density)
{
_density = density;