16 #ifndef SURGSIM_GRAPHICS_OSGCAPSULEREPRESENTATION_H
17 #define SURGSIM_GRAPHICS_OSGCAPSULEREPRESENTATION_H
25 #include <osg/PositionAttitudeTransform>
29 #pragma warning(disable:4250)
38 class OsgUnitCylinder;
55 virtual void setRadius(
double radius)
override;
58 virtual double getRadius()
const override;
62 virtual void setHeight(
double height)
override;
65 virtual double getHeight()
const override;
70 virtual void setSize(
double radius,
double height)
override;
74 virtual void getSize(
double* radius,
double* height)
override;
104 #if defined(_MSC_VER)
108 #endif // SURGSIM_GRAPHICS_OSGCAPSULEREPRESENTATION_H
Definition: DriveElementFromInputBehavior.cpp:27
osg::Vec2d m_scale
The OSG Capsule shape consist of one unit cylinder and two unit spheres This transform scales it to t...
Definition: OsgCapsuleRepresentation.h:86
OsgCapsuleRepresentation(const std::string &name)
Constructor.
Definition: OsgCapsuleRepresentation.cpp:26
std::shared_ptr< OsgUnitCylinder > m_sharedUnitCylinder
Shared capsule, so that the geometry can be instanced rather than having multiple copies...
Definition: OsgCapsuleRepresentation.h:89
SURGSIM_STATIC_REGISTRATION(OsgBoxRepresentation)
SURGSIM_CLASSNAME(SurgSim::Graphics::OsgCapsuleRepresentation)
osg::ref_ptr< osg::PositionAttitudeTransform > m_patSphere2
Definition: OsgCapsuleRepresentation.h:97
virtual void setRadius(double radius) override
Sets the radius of the capsule.
Definition: OsgCapsuleRepresentation.cpp:51
OSG implementation of a graphics capsule representation.
Definition: OsgCapsuleRepresentation.h:44
virtual double getRadius() const override
Returns the radius of the capsule.
Definition: OsgCapsuleRepresentation.cpp:58
osg::ref_ptr< osg::PositionAttitudeTransform > m_patSphere1
Definition: OsgCapsuleRepresentation.h:96
virtual double getHeight() const override
Returns the height of the capsule.
Definition: OsgCapsuleRepresentation.cpp:70
virtual void setHeight(double height) override
Sets the height of the capsule.
Definition: OsgCapsuleRepresentation.cpp:63
Eigen::Matrix< double, 2, 1 > Vector2d
A 2D vector of doubles.
Definition: Vector.h:52
Base graphics capsule representation class, which defines the basic interface for a capsule that can ...
Definition: CapsuleRepresentation.h:30
osg::ref_ptr< osg::PositionAttitudeTransform > m_patCylinder
Definition: OsgCapsuleRepresentation.h:95
virtual void setSize(double radius, double height) override
Sets the size of the capsule.
Definition: OsgCapsuleRepresentation.cpp:75
virtual SurgSim::Math::Vector2d getSize() const override
Returns the radius of the capsule.
Definition: OsgCapsuleRepresentation.cpp:104
static std::shared_ptr< OsgUnitSphere > getSharedUnitSphere()
Definition: OsgCapsuleRepresentation.cpp:115
std::shared_ptr< OsgUnitSphere > m_sharedUnitSphere
Definition: OsgCapsuleRepresentation.h:90
static std::shared_ptr< OsgUnitCylinder > getSharedUnitCylinder()
Returns the shared geometry.
Definition: OsgCapsuleRepresentation.cpp:109
Base OSG implementation of a graphics representation.
Definition: OsgRepresentation.h:42