Privacy
An open-source, flexible 3D physical simulation framework
mars::graphics::SphereDrawObject Class Reference

#include <SphereDrawObject.h>

Public Member Functions

 SphereDrawObject (GraphicsManager *g)
 
 ~SphereDrawObject ()
 
- Public Member Functions inherited from mars::graphics::DrawObject
 DrawObject (GraphicsManager *g)
 
virtual ~DrawObject ()
 
virtual void createObject (unsigned long id, const mars::utils::Vector &_pivot, unsigned long sharedID)
 
void setStateFilename (const std::string &filename, int create)
 
void exportState (void)
 
void exportModel (const std::string &filename)
 
virtual void setMaterial (const std::string &name)
 
virtual void collideSphere (mars::utils::Vector pos, mars::interfaces::sReal radius)
 
virtual void setPosition (const mars::utils::Vector &_pos)
 
virtual void setQuaternion (const mars::utils::Quaternion &_q)
 
virtual const mars::utils::VectorgetPosition ()
 
virtual const mars::utils::QuaterniongetQuaternion ()
 
virtual void setScaledSize (const mars::utils::Vector &scaledSize)
 
void setScale (const mars::utils::Vector &scale)
 
void removeBits (unsigned int bits)
 
void setBits (unsigned int bits)
 
void setNodeMask (unsigned int mask)
 
void setBrightness (double v)
 
void setRenderBinNumber (int number)
 
bool containsNode (osg::Node *node)
 
virtual void setSelected (bool val)
 
bool isSelected (void)
 
void setSelectable (bool val)
 
void setShowSelected (bool val)
 
unsigned long getID (void) const
 
void setID (unsigned long _id)
 
void showNormals (bool val)
 
osg::ref_ptr< osg::PositionAttitudeTransform > getTransform ()
 
osg::ref_ptr< osg::MatrixTransform > getScaleMatrix ()
 
osg::Group * getObject (void) const
 
osg::PositionAttitudeTransform * getPosTransform (void) const
 
osg::MatrixTransform * getScaleTransform (void) const
 
void setExperimentalLineLaser (utils::Vector lineLasePos, utils::Vector lineLaserNormal, utils::Vector lineLaserColor, utils::Vector LaserAngle, float openingAngle)
 Sets the line laser : position of the laser : normalvector of the laser-plane : color of the laser in RGB : Angle of the laser, as an direction-vector : Opening angle of the laser; for complete laserLine, choose PI. More...
 
void setMaxNumLights (int n)
 
void show ()
 
void hide ()
 
osg_material_manager::MaterialNodegetStateGroup ()
 
void addLODGeodes (std::list< osg::ref_ptr< osg::Geode > > geodes, float start, float end)
 
void seperateMaterial ()
 
void addSelectionChild (DrawObject *c)
 

Static Public Member Functions

static void createGeometry (osg::Vec3Array *vertices, osg::Vec3Array *normals, osg::Vec2Array *uv, float radius, const osg::Vec3 &topOffset, const osg::Vec3 &bottomOffset, bool backfaces=false, unsigned int levelOfDetail=4)
 

Protected Member Functions

virtual std::list< osg::ref_ptr< osg::Geode > > createGeometry ()
 

Static Protected Attributes

static osg::ref_ptr< osg::Geode > sharedCube
 

Additional Inherited Members

- Static Public Attributes inherited from mars::graphics::DrawObject
static osg::ref_ptr< osg::Material > selectionMaterial = makeSelectionMaterial()
 
- Protected Attributes inherited from mars::graphics::DrawObject
unsigned long id_
 
unsigned int nodeMask_
 
std::string stateFilename_
 
bool selected_
 
bool selectable_
 
bool showSelected
 
osg::ref_ptr< osg_material_manager::MaterialNodematerialNode
 
osg::ref_ptr< osg::Group > group_
 
std::list< osg::ref_ptr< osg::Geometry > > geometry_
 
osg::ref_ptr< osg::Geode > normal_geode
 
osg::ref_ptr< osg::LOD > lod
 
osg::ref_ptr< osg::PositionAttitudeTransform > posTransform_
 
osg::ref_ptr< osg::MatrixTransform > scaleTransform_
 
std::vector< DrawObject * > selectionChilds
 
mars::utils::Vector position_
 
mars::utils::Vector pivot_
 
mars::utils::Vector geometrySize_
 
mars::utils::Vector scaledSize_
 
mars::utils::Quaternion quaternion_
 
osg::ref_ptr< osg::Program > selectShader
 
int maxNumLights
 
bool sharedStateGroup
 
bool isHidden
 
double brightness
 
GraphicsManagerg
 

Detailed Description

Definition at line 39 of file SphereDrawObject.h.

Constructor & Destructor Documentation

◆ SphereDrawObject()

mars::graphics::SphereDrawObject::SphereDrawObject ( GraphicsManager g)

Definition at line 43 of file SphereDrawObject.cpp.

◆ ~SphereDrawObject()

mars::graphics::SphereDrawObject::~SphereDrawObject ( )

Definition at line 48 of file SphereDrawObject.cpp.

Member Function Documentation

◆ createGeometry() [1/2]

void mars::graphics::SphereDrawObject::createGeometry ( osg::Vec3Array *  vertices,
osg::Vec3Array *  normals,
osg::Vec2Array *  uv,
float  radius,
const osg::Vec3 &  topOffset,
const osg::Vec3 &  bottomOffset,
bool  backfaces = false,
unsigned int  levelOfDetail = 4 
)
static

Definition at line 111 of file SphereDrawObject.cpp.

◆ createGeometry() [2/2]

std::list< osg::ref_ptr< osg::Geode > > mars::graphics::SphereDrawObject::createGeometry ( )
protectedvirtual

Implements mars::graphics::DrawObject.

Definition at line 216 of file SphereDrawObject.cpp.

Member Data Documentation

◆ sharedCube

osg::ref_ptr<osg::Geode> mars::graphics::SphereDrawObject::sharedCube
staticprotected

Definition at line 57 of file SphereDrawObject.h.


The documentation for this class was generated from the following files: