27 #include <osg/Material> 44 Sphere(
const std::string &name );
45 Sphere(
const std::string &name,
const osg::Vec3 &color );
46 Sphere(
const std::string &name,
const osg::Vec4 &color );
47 Sphere(
const std::string &name ,
float r,
float g,
float b,
float a = 1.0 );
51 virtual void showContents(
bool showContents);
52 virtual bool getContentsShown()
const;
57 void restoreTexCoords();
61 void setRadius(
const double &radius );
62 double getRadius()
const;
65 void setSpherePosition(
const double &x,
const double &y,
const double &z );
67 void setSpherePosition(
const osg::Vec3d &pos )
68 { _sphereXform->setPosition(pos); }
70 void getSpherePosition(
double &x,
double &y,
double &z )
const 71 { _sphereXform->getPosition(x, y, z); }
73 void getSpherePosition( osg::Vec3d &pos )
const 74 { _sphereXform->getPosition(pos); }
79 { _sphereXform->setAttitude(att); }
81 void getSphereAttitude( osg::Quat &att )
const 82 { _sphereXform->getAttitude(att); }
86 void setSphereScale(
const double &sx,
const double &sy,
const double &sz);
88 void getSphereScale(
double &sx,
double &sy,
double &sz )
const 90 _sphereXform->getScale(sx, sy, sz);
95 bool setTextureMap(
const std::string &fname,
unsigned int unit = 0,
bool force_reload =
false );
98 bool setTexEnv(osg::StateAttribute* texenv,
unsigned int unit);
102 bool setNightTextureMap(
const std::string &fname,
unsigned int unit = 1,
bool force_reload =
false);
106 void setAutoLOD(
bool lod );
111 virtual void setColor(
const osg::Vec4 &color );
112 using ReferenceFrame::setColor;
117 void setMaterial( osg::Material *mat );
118 osg::Material* getMaterial()
const 119 {
return dynamic_cast<osg::Material*
>(_sphereSD->getStateSet()->getAttribute(osg::StateAttribute::MATERIAL)); }
122 virtual const osg::BoundingSphere& getBound()
const;
127 void repositionAxes();
132 osg::ref_ptr<osg::Geode> _geode;
133 osg::ref_ptr<osg::ShapeDrawable> _sphereSD;
osg::ref_ptr< FrameTransform > _sphereXform
Definition: Sphere.hpp:130
Definition: CoordinateAxes.hpp:29
A ReferenceFrame with a sphere at the origin.
Definition: Sphere.hpp:41
Definition: ReferenceFrame.hpp:54
void setSphereAttitude(const osg::Quat &att)
Definition: Sphere.hpp:78