Go to the documentation of this file.
16 #ifndef SURGSIM_GRAPHICS_OSGCYLINDERREPRESENTATION_H
17 #define SURGSIM_GRAPHICS_OSGCYLINDERREPRESENTATION_H
23 #include <osg/PositionAttitudeTransform>
27 #pragma warning(disable:4250)
35 class OsgUnitCylinder;
37 SURGSIM_STATIC_REGISTRATION(OsgCylinderRepresentation);
66 void setSize(
double radius,
double height)
override;
70 void getSize(
double* radius,
double* height)
override;
99 #endif // SURGSIM_GRAPHICS_OSGCYLINDERREPRESENTATION_H
double getHeight() const override
Returns the height of the cylinder.
Definition: OsgCylinderRepresentation.cpp:63
static std::shared_ptr< OsgUnitCylinder > getSharedUnitCylinder()
Returns the shared unit cylinder.
Definition: OsgCylinderRepresentation.cpp:90
OsgCylinderRepresentation(const std::string &name)
Constructor.
Definition: OsgCylinderRepresentation.cpp:34
SurgSim::Math::Vector2d getSize() const override
Returns the size of the cylinder.
Definition: OsgCylinderRepresentation.cpp:85
Definition: CompoundShapeToGraphics.cpp:29
std::shared_ptr< OsgUnitCylinder > m_sharedUnitCylinder
Shared unit Cylinder, so that the geometry can be instanced rather than having multiple copies.
Definition: OsgCylinderRepresentation.h:84
void setRadius(double radius) override
Sets the radius of the cylinder.
Definition: OsgCylinderRepresentation.cpp:48
osg::ref_ptr< osg::PositionAttitudeTransform > m_patCylinder
Definition: OsgCylinderRepresentation.h:88
Eigen::Matrix< double, 2, 1 > Vector2d
A 2D vector of doubles.
Definition: Vector.h:53
void setSize(double radius, double height) override
Sets the size of the cylinder.
Definition: OsgCylinderRepresentation.cpp:68
Base graphics cylinder representation class, which defines the basic interface for a cylinder that ca...
Definition: CylinderRepresentation.h:31
double getRadius() const override
Returns the radius of the cylinder.
Definition: OsgCylinderRepresentation.cpp:53
void setHeight(double height) override
Sets the height of the cylinder.
Definition: OsgCylinderRepresentation.cpp:58
osg::Vec2d m_scale
The OSG Cylinder shape is a unit Cylinder and this transform scales it to the size set.
Definition: OsgCylinderRepresentation.h:81
SURGSIM_CLASSNAME(SurgSim::Graphics::OsgCylinderRepresentation)
Base OSG implementation of a graphics representation.
Definition: OsgRepresentation.h:55
OSG implementation of a graphics Cylinder representation.
Definition: OsgCylinderRepresentation.h:40