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

#include <CylinderDrawObject.h>

Public Member Functions

 CylinderDrawObject (GraphicsManager *g, mars::interfaces::sReal radius, mars::interfaces::sReal height)
 
virtual void setScaledSize (const mars::utils::Vector &scaledSize)
 
- 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 ()
 
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 createShellGeometry (osg::Vec3Array *vertices, osg::Vec3Array *normals, osg::Vec2Array *uv, float radius, float height, float theta)
 

Private Member Functions

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

Private Attributes

mars::interfaces::sReal radius_
 
mars::interfaces::sReal height_
 

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 41 of file CylinderDrawObject.h.

Constructor & Destructor Documentation

◆ CylinderDrawObject()

mars::graphics::CylinderDrawObject::CylinderDrawObject ( GraphicsManager g,
mars::interfaces::sReal  radius,
mars::interfaces::sReal  height 
)

Definition at line 38 of file CylinderDrawObject.cpp.

Member Function Documentation

◆ createGeometry()

std::list< osg::ref_ptr< osg::Geode > > mars::graphics::CylinderDrawObject::createGeometry ( )
privatevirtual

Implements mars::graphics::DrawObject.

Definition at line 123 of file CylinderDrawObject.cpp.

◆ createShellGeometry()

void mars::graphics::CylinderDrawObject::createShellGeometry ( osg::Vec3Array *  vertices,
osg::Vec3Array *  normals,
osg::Vec2Array *  uv,
float  radius,
float  height,
float  theta 
)
static

Definition at line 45 of file CylinderDrawObject.cpp.

◆ setScaledSize()

void mars::graphics::CylinderDrawObject::setScaledSize ( const mars::utils::Vector scaledSize)
virtual

Reimplemented from mars::graphics::DrawObject.

Definition at line 166 of file CylinderDrawObject.cpp.

Member Data Documentation

◆ height_

mars::interfaces::sReal mars::graphics::CylinderDrawObject::height_
private

Definition at line 57 of file CylinderDrawObject.h.

◆ radius_

mars::interfaces::sReal mars::graphics::CylinderDrawObject::radius_
private

Definition at line 56 of file CylinderDrawObject.h.


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