16 #ifndef SURGSIM_GRAPHICS_OSGCAPSULEREPRESENTATION_H 17 #define SURGSIM_GRAPHICS_OSGCAPSULEREPRESENTATION_H 25 #include <osg/PositionAttitudeTransform> 29 #pragma warning(disable:4250) 38 class OsgUnitCylinder;
41 SURGSIM_STATIC_REGISTRATION(OsgCapsuleRepresentation);
70 void setSize(
double radius,
double height)
override;
74 void getSize(
double* radius,
double* height)
override;
104 #if defined(_MSC_VER) 108 #endif // SURGSIM_GRAPHICS_OSGCAPSULEREPRESENTATION_H Definition: CompoundShapeToGraphics.cpp:29
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_CLASSNAME(SurgSim::Graphics::OsgCapsuleRepresentation)
osg::ref_ptr< osg::PositionAttitudeTransform > m_patSphere2
Definition: OsgCapsuleRepresentation.h:97
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
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
double getHeight() const override
Returns the height of the capsule.
Definition: OsgCapsuleRepresentation.cpp:70
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:53
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
void setSize(double radius, double height) override
Sets the size of the capsule.
Definition: OsgCapsuleRepresentation.cpp:75
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:55