Go to the documentation of this file.
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
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
static std::shared_ptr< OsgUnitCylinder > getSharedUnitCylinder()
Returns the shared geometry.
Definition: OsgCapsuleRepresentation.cpp:109
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
SURGSIM_CLASSNAME(SurgSim::Graphics::OsgCapsuleRepresentation)
Base graphics capsule representation class, which defines the basic interface for a capsule that can ...
Definition: CapsuleRepresentation.h:31
Definition: CompoundShapeToGraphics.cpp:30
void setRadius(double radius) override
Sets the radius of the capsule.
Definition: OsgCapsuleRepresentation.cpp:51
std::shared_ptr< OsgUnitSphere > m_sharedUnitSphere
Definition: OsgCapsuleRepresentation.h:90
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
Eigen::Matrix< double, 2, 1 > Vector2d
A 2D vector of doubles.
Definition: Vector.h:53
OSG implementation of a graphics capsule representation.
Definition: OsgCapsuleRepresentation.h:45
string(TOUPPER ${DEVICE} DEVICE_UPPER_CASE) option(BUILD_DEVICE_$
Definition: CMakeLists.txt:38
void setSize(double radius, double height) override
Sets the size of the capsule.
Definition: OsgCapsuleRepresentation.cpp:75
osg::ref_ptr< osg::PositionAttitudeTransform > m_patCylinder
Definition: OsgCapsuleRepresentation.h:95
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
osg::ref_ptr< osg::PositionAttitudeTransform > m_patSphere2
Definition: OsgCapsuleRepresentation.h:97
Base OSG implementation of a graphics representation.
Definition: OsgRepresentation.h:56