16 #ifndef SURGSIM_GRAPHICS_OSGBOXREPRESENTATION_H 17 #define SURGSIM_GRAPHICS_OSGBOXREPRESENTATION_H 25 #include <osg/PositionAttitudeTransform> 30 #pragma warning(disable:4250) 40 SURGSIM_STATIC_REGISTRATION(OsgBoxRepresentation);
54 void setSizeX(
double sizeX)
override;
62 void setSizeY(
double sizeY)
override;
70 void setSizeZ(
double sizeZ)
override;
80 virtual void setSizeXYZ(
double sizeX,
double sizeY,
double sizeZ);
85 virtual void getSizeXYZ(
double* sizeX,
double* sizeY,
double* sizeZ)
const;
109 #if defined(_MSC_VER) 113 #endif // SURGSIM_GRAPHICS_OSGBOXREPRESENTATION_H Definition: CompoundShapeToGraphics.cpp:29
SurgSim::Math::Vector3d getSize() const override
Returns the extents of the box.
Definition: OsgBoxRepresentation.cpp:92
std::shared_ptr< OsgUnitBox > m_sharedUnitBox
Shared unit box, so that the geometry can be instanced rather than having multiple copies...
Definition: OsgBoxRepresentation.h:100
virtual void getSizeXYZ(double *sizeX, double *sizeY, double *sizeZ) const
Gets the size of the box.
Definition: OsgBoxRepresentation.cpp:80
osg::Vec3d m_scale
The OSG box shape is a unit box and this transform scales it to the size set.
Definition: OsgBoxRepresentation.h:97
Base graphics box representation class, which defines the basic interface for a box that can be visua...
Definition: BoxRepresentation.h:31
void setSize(const SurgSim::Math::Vector3d &size) override
Sets the size of the box.
Definition: OsgBoxRepresentation.cpp:87
SURGSIM_CLASSNAME(SurgSim::Graphics::OsgBoxRepresentation)
OsgBoxRepresentation(const std::string &name)
Constructor.
Definition: OsgBoxRepresentation.cpp:32
double getSizeX() const override
Returns the size along X-axis of the box.
Definition: OsgBoxRepresentation.cpp:48
OSG implementation of a graphics box representation.
Definition: OsgBoxRepresentation.h:43
void setSizeZ(double sizeZ) override
Sets the size along Z-axis of the box.
Definition: OsgBoxRepresentation.cpp:63
virtual void setSizeXYZ(double sizeX, double sizeY, double sizeZ)
Sets the size of the box.
Definition: OsgBoxRepresentation.cpp:73
void setSizeX(double sizeX) override
Sets the size along X-axis of the box.
Definition: OsgBoxRepresentation.cpp:43
double getSizeY() const override
Returns the size along Y-axis of the box.
Definition: OsgBoxRepresentation.cpp:58
static std::shared_ptr< OsgUnitBox > getSharedUnitBox()
Returns the shared unit box.
Definition: OsgBoxRepresentation.cpp:97
void setSizeY(double sizeY) override
Sets the size along Y-axis of the box.
Definition: OsgBoxRepresentation.cpp:53
Base OSG implementation of a graphics representation.
Definition: OsgRepresentation.h:55
Eigen::Matrix< double, 3, 1 > Vector3d
A 3D vector of doubles.
Definition: Vector.h:57
double getSizeZ() const override
Returns the size along Z-axis of the box.
Definition: OsgBoxRepresentation.cpp:68