All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Typedefs | Functions | Variables
SurgSim::Graphics Namespace Reference

Classes

class  AxesRepresentation
 Displays the coordinate axes, as three lines from the origin default size is 1.0, the X/Y/Z axis are indicated by R/G/B respectively. More...
 
class  BoxRepresentation
 Base graphics box representation class, which defines the basic interface for a box that can be visualized. More...
 
class  Camera
 Base graphics camera class, which defines the basic interface for all graphics cameras. More...
 
class  CapsuleRepresentation
 Base graphics capsule representation class, which defines the basic interface for a capsule that can be visualized. More...
 
class  CylinderRepresentation
 Base graphics cylinder representation class, which defines the basic interface for a cylinder that can be visualized. More...
 
class  Group
 Base graphics group class, which defines the interface that all graphics groups must implement. More...
 
class  Light
 Abstract interface for a light, a light needs to be assigned to a group to be active, only the members of this group will be considered to be lit by this light. More...
 
class  Manager
 Basic graphics manager class which manages graphics components to provide a visualization of the scene to the user. More...
 
class  Material
 Base class that defines the interface for graphics materials. More...
 
class  Mesh
 
class  MeshPlyReaderDelegate
 Implementation of PlyReaderDelegate for graphicsmeshes. More...
 
class  MeshRepresentation
 Graphics representation of a mesh, can be initialized from a Mesh structure. More...
 
class  OctreeRepresentation
 Graphic representation of an Octree. More...
 
class  OsgAbstractRenderTarget
 Osg abstract render target, this hides the type of the actual osg texture and lets us use OsgRenderTarget without the template type. More...
 
class  OsgAxesRepresentation
 Osg axes representation implementation for the AxesRepresentation interface in graphics. More...
 
class  OsgBoxRepresentation
 OSG implementation of a graphics box representation. More...
 
struct  OsgBoxRepresentationRenderTests
 
class  OsgCamera
 OSG implementation of a graphics camera. More...
 
struct  OsgCameraRenderTests
 
class  OsgCapsuleRepresentation
 OSG implementation of a graphics capsule representation. More...
 
struct  OsgCapsuleRepresentationRenderTests
 
class  OsgCylinderRepresentation
 OSG implementation of a graphics Cylinder representation. More...
 
struct  OsgCylinderRepresentationRenderTests
 
class  OsgGroup
 OSG implementation of a graphics group. More...
 
class  OsgLight
 OpenScenegraph implementation for the Light interface. More...
 
class  OsgLog
 Enable logging of OSG through SurgSim Logging System To use this, an object of OsgLog class must be created. More...
 
class  OsgManager
 OSG-based implementation of graphics manager class. More...
 
class  OsgMaterial
 OSG-based implementation of a graphics material. More...
 
class  OsgMeshRepresentation
 Implementation of a MeshRepresentation for rendering under osg. More...
 
struct  OsgMeshRepresentationRenderTests
 
class  OsgOctreeRepresentation
 OSG octree representation, implements an OctreeRepresenation using OSG. More...
 
class  OsgPlane
 OSG plane geode to be used as a primitive shape The plane is the XZ plane, with normal +Y. More...
 
class  OsgPlaneRepresentation
 OSG implementation of a graphics plane representation. More...
 
class  OsgPointCloudRepresentation
 Osg point cloud representation, implementation of a PointCloudRepresenation using OSG. More...
 
struct  OsgPointCloudRepresentationRenderTests
 
class  OsgRenderTarget
 Specific implementation of the render target class. More...
 
class  OsgRepresentation
 Base OSG implementation of a graphics representation. More...
 
struct  OsgRepresentationRenderTests
 
class  OsgSceneryRepresentation
 A OsgSceneryRepresentation is used to load osg object/node from file. More...
 
struct  OsgSceneryRepresentationRenderTests
 
class  OsgScreenSpacePass
 Special RenderPass to draw items using a orthogonal projection, this is specific to the Osg implementation of the SurgSim rendering. More...
 
struct  OsgScreenSpaceQuadRenderTests
 
class  OsgScreenSpaceQuadRepresentation
 Implements the ScreenSpaceQuadRepresentation, provides the uniform 'texture' for the texture that it carries. More...
 
class  OsgShader
 OSG-based implementation of a graphics shader. More...
 
struct  OsgShaderRenderTests
 
class  OsgSphereRepresentation
 OSG implementation of a graphics sphere representation. More...
 
class  OsgTexture
 Base class for OSG implementations of Graphics Textures. More...
 
class  OsgTexture1d
 OSG implementation of a 1D Texture. More...
 
class  OsgTexture2d
 OSG implementation of a 2D Texture. More...
 
class  OsgTexture3d
 OSG implementation of a 3D Texture. More...
 
class  OsgTextureCubeMap
 OSG implementation of a Cube Map Texture. More...
 
class  OsgTextureRectangle
 OSG implementation of a Rectangle Texture. More...
 
class  OsgTextureUniform
 OSG implementation of graphics uniform with a texture value. More...
 
class  OsgTrackballZoomManipulator
 Trackball manipulator that uses the mouse wheel to control zoom amount. More...
 
class  OsgUniform
 OSG implementation of graphics uniform with a value of type T. More...
 
class  OsgUniform< std::shared_ptr< OsgTexture1d > >
 Specialization of OsgUniform for OsgTexture1d. More...
 
class  OsgUniform< std::shared_ptr< OsgTexture2d > >
 Specialization of OsgUniform for OsgTexture2d. More...
 
class  OsgUniform< std::shared_ptr< OsgTexture3d > >
 Specialization of OsgUniform for OsgTexture3d. More...
 
class  OsgUniform< std::shared_ptr< OsgTextureCubeMap > >
 Specialization of OsgUniform for OsgTextureCubeMap. More...
 
class  OsgUniform< std::shared_ptr< OsgTextureRectangle > >
 Specialization of OsgUniform for OsgTextureRectangle. More...
 
class  OsgUniform< std::vector< T > >
 Specialization of OsgUniform for vectors of values. More...
 
class  OsgUniformBase
 Base OSG implementation of graphics uniforms. More...
 
class  OsgUniformFactory
 This class can create the appropriate OsgUniform from an OpenGl glsl type, use the appropriate name from glsl in the create() function to recieve the correctly typed uniform. More...
 
class  OsgUnitAxes
 
class  OsgUnitBox
 OSG unit box geode to be used as a primitive shape The box is located at (0, 0, 0) and has a size of 1 on all three axes. More...
 
class  OsgUnitCylinder
 OSG unit cylinder geode to be used as a primitive shape The cylinder is located at (0, 0, 0) and has a radius of 1 and height of 1. More...
 
class  OsgUnitSphere
 OSG unit sphere geode to be used as a primitive shape The sphere is located at (0, 0, 0) and has a radius of 1. More...
 
class  OsgVectorFieldRepresentation
 OSG vector field representation, implements a VectorFieldRepresenation using OSG. More...
 
class  OsgView
 OSG-based implementation of graphics view class. More...
 
class  OsgViewElement
 OSG-based implementation of graphics view element. More...
 
class  PlaneRepresentation
 Base graphics plane representation class, which defines the basic interface for a plane that can be visualized. More...
 
class  PointCloudRepresentation
 Graphic representation of a point cloud, hase a very basic interface and is intentionally kept generic. More...
 
class  RenderPass
 Encapsulation of all the components necessary needed to implement a full renderpass, this SceneElement contains a Camera and Group, it can also take a Material (for shaders and uniforms) and a RenderTarget for textures that are used as the output for the camera. More...
 
class  RenderTarget
 RenderTarget is an abstraction of the target buffers that a Camera should use to render it's scene valid targets are a given number of color buffers, and an optional depth buffer. More...
 
struct  RenderTest
 
class  Representation
 Base graphics representation class, which defines the interface that all graphics representations must implement. More...
 
class  SceneryRepresentation
 Base class defining the interface for a Graphics Scenery Object. More...
 
class  ScreenSpaceQuadRepresentation
 A quad to display on the screen in screen space coordinates, use setPose() to set the position but x,y are presumed to be in screen space with 0|0 being in the lower left corner. More...
 
class  Shader
 Base class that defines the interface for graphics shaders. More...
 
class  SphereRepresentation
 Base graphics sphere representation class, which defines the basic interface for a sphere that can be visualized. More...
 
class  Texture
 Base class defining the interface for a Graphics Texture. More...
 
class  Texture1d
 Base class defining the interface for a 1D Graphics Texture. More...
 
class  Texture2d
 Base class defining the interface for a 2D Graphics Texture. More...
 
class  Texture3d
 Base class defining the interface for a 3D Graphics Texture. More...
 
class  TextureCubeMap
 Base class defining the interface for a Cube Map Graphics Texture. More...
 
class  TextureRectangle
 Base class defining the interface for a Rectangle Graphics Texture. More...
 
class  TriangleNormalGenerator
 Triangle index functor which calculates normals for the vertices of a geometry, use createNormalGenerator to instantiate this. More...
 
class  Uniform
 Base class for a graphics uniform with a value of type T. More...
 
class  Uniform< std::vector< T > >
 Specialization of Uniform for vectors of values. More...
 
class  UniformBase
 Common base class for all graphics uniforms. More...
 
struct  VectorFieldData
 A (mathematical) vector is represented as (X,Y,Z) associated with an optional color (R,G,B,alpha) information. More...
 
class  VectorFieldRepresentation
 Graphic representation of a vector field Each point/location, i.e. More...
 
struct  VertexData
 
class  View
 Base graphics view class, which defines the basic interface for all graphics views. More...
 
class  ViewElement
 Basic SceneElement that wraps a View so that it can be added to the Scene. More...
 

Typedefs

typedef
SurgSim::DataStructures::Vertices
< SurgSim::DataStructures::EmptyData
PointCloud
 
typedef
SurgSim::DataStructures::Vertices
< VectorFieldData
VectorField
 
typedef OsgRenderTarget
< OsgTexture2d
OsgRenderTarget2d
 
typedef OsgRenderTarget
< OsgTextureRectangle
OsgRenderTargetRectangle
 

Functions

 SURGSIM_REGISTER (SurgSim::Framework::Component, SurgSim::Graphics::OsgBoxRepresentation, OsgBoxRepresentation)
 
 SURGSIM_STATIC_REGISTRATION (OsgBoxRepresentation)
 
 SURGSIM_REGISTER (SurgSim::Framework::Component, SurgSim::Graphics::OsgCamera, OsgCamera)
 
 SURGSIM_STATIC_REGISTRATION (OsgCamera)
 
 SURGSIM_REGISTER (SurgSim::Framework::Component, SurgSim::Graphics::OsgCapsuleRepresentation, OsgCapsuleRepresentation)
 
 SURGSIM_STATIC_REGISTRATION (OsgCapsuleRepresentation)
 
 SURGSIM_REGISTER (SurgSim::Framework::Component, SurgSim::Graphics::OsgCylinderRepresentation, OsgCylinderRepresentation)
 
 SURGSIM_STATIC_REGISTRATION (OsgCylinderRepresentation)
 
template<int MOpt>
const osg::Matrix2 toOsg (const Eigen::Matrix< float, 2, 2, MOpt > &matrix)
 Convert a fixed-size 2x2 matrix of floats to OSG. More...
 
template<int MOpt>
const osg::Matrix2d toOsg (const Eigen::Matrix< double, 2, 2, MOpt > &matrix)
 Convert a fixed-size 2x2 matrix of doubles to OSG. More...
 
const Eigen::Matrix< float,
2, 2, Eigen::RowMajor > 
fromOsg (const osg::Matrix2 &matrix)
 Convert from OSG to a 2x2 matrix of floats. More...
 
const Eigen::Matrix< double,
2, 2, Eigen::RowMajor > 
fromOsg (const osg::Matrix2d &matrix)
 Convert from OSG to a 2x2 matrix of doubles. More...
 
template<int MOpt>
const osg::Matrix3 toOsg (const Eigen::Matrix< float, 3, 3, MOpt > &matrix)
 Convert a fixed-size 3x3 matrix of floats to OSG. More...
 
template<int MOpt>
const osg::Matrix3d toOsg (const Eigen::Matrix< double, 3, 3, MOpt > &matrix)
 Convert a fixed-size 3x3 matrix of doubles to OSG. More...
 
const Eigen::Matrix< float,
3, 3, Eigen::RowMajor > 
fromOsg (const osg::Matrix3 &matrix)
 Convert from OSG to a 3x3 matrix of floats. More...
 
const Eigen::Matrix< double,
3, 3, Eigen::RowMajor > 
fromOsg (const osg::Matrix3d &matrix)
 Convert from OSG to a 3x3 matrix of doubles. More...
 
template<int MOpt>
const osg::Matrixf toOsg (const Eigen::Matrix< float, 4, 4, MOpt > &matrix)
 Convert a fixed-size 4x4 matrix of floats to OSG. More...
 
const Eigen::Matrix< float,
4, 4, Eigen::RowMajor > 
fromOsg (const osg::Matrixf &matrix)
 Convert from OSG to a 4x4 matrix of floats. More...
 
template<int MOpt>
const osg::Matrixd toOsg (const Eigen::Matrix< double, 4, 4, MOpt > &matrix)
 Convert a fixed-size 4x4 matrix of doubles to OSG. More...
 
const Eigen::Matrix< double,
4, 4, Eigen::RowMajor > 
fromOsg (const osg::Matrixd &matrix)
 Convert from OSG to a 4x4 matrix of doubles. More...
 
 SURGSIM_REGISTER (SurgSim::Framework::Component, SurgSim::Graphics::OsgMeshRepresentation, OsgMeshRepresentation)
 
 SURGSIM_STATIC_REGISTRATION (OsgMeshRepresentation)
 
 SURGSIM_REGISTER (SurgSim::Framework::Component, SurgSim::Graphics::OsgOctreeRepresentation, OsgOctreeRepresentation)
 
 SURGSIM_STATIC_REGISTRATION (OsgOctreeRepresentation)
 
 SURGSIM_REGISTER (SurgSim::Framework::Component, SurgSim::Graphics::OsgPlaneRepresentation, OsgPlaneRepresentation)
 
 SURGSIM_STATIC_REGISTRATION (OsgPlaneRepresentation)
 
 SURGSIM_REGISTER (SurgSim::Framework::Component, SurgSim::Graphics::OsgPointCloudRepresentation, OsgPointCloudRepresentation)
 
 SURGSIM_STATIC_REGISTRATION (OsgPointCloudRepresentation)
 
osg::Quat toOsg (const SurgSim::Math::Quaternionf &quaternion)
 Convert quaternion of floats to OSG. More...
 
osg::Quat toOsg (const SurgSim::Math::Quaterniond &quaternion)
 Convert quaternion of doubles to OSG. More...
 
template<typename T >
Eigen::Quaternion< T > fromOsg (const osg::Quat &quaternion)
 Convert from OSG to either quaternion of floats or doubles. More...
 
std::pair< osg::Quat, osg::Vec3f > toOsg (const SurgSim::Math::RigidTransform3f &transform)
 Convert 3D rigid body (isometric) transform, represented as floats, to OSG. More...
 
std::pair< osg::Quat, osg::Vec3d > toOsg (const SurgSim::Math::RigidTransform3d &transform)
 Convert 3D rigid body (isometric) transform, represented as doubles, to OSG. More...
 
SurgSim::Math::RigidTransform3f fromOsg (const osg::Quat &rotation, const osg::Vec3f &translation)
 Convert from OSG to 3D rigid body (isometric) transform, represented as floats. More...
 
SurgSim::Math::RigidTransform3f fromOsg (const std::pair< osg::Quat, osg::Vec3f > &transform)
 Convert from OSG to 3D rigid body (isometric) transform, represented as floats. More...
 
SurgSim::Math::RigidTransform3d fromOsg (const osg::Quat &rotation, const osg::Vec3d &translation)
 Convert from OSG to 3D rigid body (isometric) transform, represented as doubles. More...
 
SurgSim::Math::RigidTransform3d fromOsg (const std::pair< osg::Quat, osg::Vec3d > &transform)
 Convert from OSG to 3D rigid body (isometric) transform, represented as doubles. More...
 
 SURGSIM_REGISTER (SurgSim::Framework::Component, SurgSim::Graphics::OsgSceneryRepresentation, OsgSceneryRepresentation)
 
 SURGSIM_STATIC_REGISTRATION (OsgSceneryRepresentation)
 
std::shared_ptr
< SurgSim::Graphics::OsgShader
loadShader (const SurgSim::Framework::ApplicationData &data, const std::string &name)
 
 SURGSIM_REGISTER (SurgSim::Framework::Component, SurgSim::Graphics::OsgSphereRepresentation, OsgSphereRepresentation)
 
 SURGSIM_STATIC_REGISTRATION (OsgSphereRepresentation)
 
template<typename T >
const T & toOsg (const T &value)
 Default type conversion to OSG. More...
 
template<class T >
osg::Uniform::Type getOsgUniformType ()
 Returns the OSG uniform type enum value for the template parameter type. More...
 
template<>
osg::Uniform::Type getOsgUniformType< float > ()
 
template<>
osg::Uniform::Type getOsgUniformType< double > ()
 
template<>
osg::Uniform::Type getOsgUniformType< int > ()
 
template<>
osg::Uniform::Type getOsgUniformType< unsigned int > ()
 
template<>
osg::Uniform::Type getOsgUniformType< bool > ()
 
template<>
osg::Uniform::Type getOsgUniformType< SurgSim::Math::Vector2f > ()
 
template<>
osg::Uniform::Type getOsgUniformType< SurgSim::Math::Vector3f > ()
 
template<>
osg::Uniform::Type getOsgUniformType< SurgSim::Math::Vector4f > ()
 
template<>
osg::Uniform::Type getOsgUniformType< SurgSim::Math::Vector2d > ()
 
template<>
osg::Uniform::Type getOsgUniformType< SurgSim::Math::Vector3d > ()
 
template<>
osg::Uniform::Type getOsgUniformType< SurgSim::Math::Vector4d > ()
 
template<>
osg::Uniform::Type getOsgUniformType< SurgSim::Math::Matrix22f > ()
 
template<>
osg::Uniform::Type getOsgUniformType< SurgSim::Math::Matrix33f > ()
 
template<>
osg::Uniform::Type getOsgUniformType< SurgSim::Math::Matrix44f > ()
 
template<>
osg::Uniform::Type getOsgUniformType< SurgSim::Math::Matrix22d > ()
 
template<>
osg::Uniform::Type getOsgUniformType< SurgSim::Math::Matrix33d > ()
 
template<>
osg::Uniform::Type getOsgUniformType< SurgSim::Math::Matrix44d > ()
 
template<>
osg::Uniform::Type getOsgUniformType< std::shared_ptr< OsgTexture1d > > ()
 
template<>
osg::Uniform::Type getOsgUniformType< std::shared_ptr< OsgTexture2d > > ()
 
template<>
osg::Uniform::Type getOsgUniformType< std::shared_ptr< OsgTexture3d > > ()
 
template<>
osg::Uniform::Type getOsgUniformType< std::shared_ptr< OsgTextureCubeMap > > ()
 
template<>
osg::Uniform::Type getOsgUniformType< std::shared_ptr< OsgTextureRectangle > > ()
 
osg::Vec2f toOsg (const SurgSim::Math::Vector2f &vector)
 Convert 2D vector of floats to OSG. More...
 
SurgSim::Math::Vector2f fromOsg (const osg::Vec2f &vector)
 Convert from OSG to 2D vector of floats. More...
 
osg::Vec2d toOsg (const SurgSim::Math::Vector2d &vector)
 Convert 2D vector of doubles to OSG. More...
 
SurgSim::Math::Vector2d fromOsg (const osg::Vec2d &vector)
 Convert from OSG to 2D vector of doubles. More...
 
osg::Vec3f toOsg (const SurgSim::Math::Vector3f &vector)
 Convert 3D vector of floats to OSG. More...
 
SurgSim::Math::Vector3f fromOsg (const osg::Vec3f &vector)
 Convert from OSG to 3D vector of floats. More...
 
osg::Vec3d toOsg (SurgSim::Math::Vector3d vector)
 Convert 3D vector of doubles to OSG. More...
 
SurgSim::Math::Vector3d fromOsg (const osg::Vec3d &vector)
 Convert from OSG to 3D vector of doubles. More...
 
osg::Vec4f toOsg (const SurgSim::Math::Vector4f &vector)
 Convert 4D vector of floats to OSG. More...
 
SurgSim::Math::Vector4f fromOsg (const osg::Vec4f &vector)
 Convert from OSG to 4D vector of floats. More...
 
osg::Vec4d toOsg (const SurgSim::Math::Vector4d &vector)
 Convert 4D vector of doubles to OSG. More...
 
SurgSim::Math::Vector4d fromOsg (const osg::Vec4d &vector)
 Convert from OSG to 4D vector of doubles. More...
 
 SURGSIM_REGISTER (SurgSim::Framework::Component, SurgSim::Graphics::OsgView, OsgView)
 
 SURGSIM_STATIC_REGISTRATION (OsgView)
 
 TEST_F (OsgBoxRepresentationRenderTests, MovingBoxesTest)
 
 TEST_F (OsgCameraRenderTests, PassTest)
 
 TEST_F (OsgCapsuleRepresentationRenderTests, MovingCapsuleTest)
 
 TEST_F (OsgCylinderRepresentationRenderTests, MovingCylinderTest)
 
 TEST (OsgManagerRenderTests, StartUpTest)
 
 TEST_F (OsgMeshRepresentationRenderTests, BasicCubeTest)
 
 TEST_F (OsgMeshRepresentationRenderTests, TextureTest)
 
 TEST_F (OsgMeshRepresentationRenderTests, ShaderTest)
 
 TEST_F (OsgMeshRepresentationRenderTests, TriangleDeletionTest)
 
 TEST (OsgPlaneRepresentationRenderTests, MovingPlanesTest)
 Pops up a window with two planes that are translating and rotating. More...
 
 TEST_F (OsgPointCloudRepresentationRenderTests, PointAdd)
 
 TEST_F (OsgPointCloudRepresentationRenderTests, StaticRotate)
 
 TEST_F (OsgPointCloudRepresentationRenderTests, DynamicRotate)
 
 TEST_F (OsgPointCloudRepresentationRenderTests, PointSizeAndColor)
 
 TEST_F (OsgRepresentationRenderTests, RepresentationTest)
 This test will put all shape one by one along the X-axis To make sure all shapes are aligned. More...
 
 TEST_F (OsgSceneryRepresentationRenderTests, RenderTest)
 
 TEST_F (OsgScreenSpaceQuadRenderTests, InitTest)
 
 TEST_F (OsgScreenSpaceQuadRenderTests, TextureTest)
 
 TEST_F (OsgScreenSpaceQuadRenderTests, RenderTextureTest)
 
std::shared_ptr< ShaderloadExampleShader (const SurgSim::Framework::ApplicationData &data)
 
std::shared_ptr< MaterialcreateShinyMaterial (const SurgSim::Framework::ApplicationData &data)
 
 TEST_F (OsgShaderRenderTests, SphereShaderTest)
 Pops up a window with a sphere colored by its normals and its mirror along the x-axis is also drawn using the geometry shader. More...
 
 TEST_F (OsgShaderRenderTests, ShinyShaderTest)
 
 TEST_F (OsgShaderRenderTests, TexturedShinyShaderTest)
 
 TEST (OsgSphereRepresentationRenderTests, MovingSpheresTest)
 Pops up a window with two spheres that are translating and changing radius. More...
 
 TEST (OsgViewElementRenderTests, MoveAndResizeWindowTest)
 
 TEST (OsgViewElementRenderTest, FullScreenView)
 
 TEST (OsgViewElementRenderTest, StereoView)
 
 TEST (OsgViewElementRenderTest, KeyBoardMouseTest)
 
osg::TriangleIndexFunctor
< TriangleNormalGenerator
createNormalGenerator (osg::Vec3Array *vertexArray, osg::Vec3Array *normalArray)
 

Variables

const int OsgSupportedTextureCount = 16 + 1
 

Typedef Documentation

Predefine specialized render targets

Predefine specialized render targets

Function Documentation

osg::TriangleIndexFunctor< TriangleNormalGenerator > SurgSim::Graphics::createNormalGenerator ( osg::Vec3Array *  vertexArray,
osg::Vec3Array *  normalArray 
)
std::shared_ptr<Material> SurgSim::Graphics::createShinyMaterial ( const SurgSim::Framework::ApplicationData data)
SurgSim::Math::Vector2f SurgSim::Graphics::fromOsg ( const osg::Vec2f &  vector)
inline

Convert from OSG to 2D vector of floats.

template<typename T >
Eigen::Quaternion<T> SurgSim::Graphics::fromOsg ( const osg::Quat &  quaternion)
inline

Convert from OSG to either quaternion of floats or doubles.

Template Parameters
TValue type (float or double)
SurgSim::Math::RigidTransform3f SurgSim::Graphics::fromOsg ( const osg::Quat &  rotation,
const osg::Vec3f &  translation 
)
inline

Convert from OSG to 3D rigid body (isometric) transform, represented as floats.

SurgSim::Math::Vector2d SurgSim::Graphics::fromOsg ( const osg::Vec2d &  vector)
inline

Convert from OSG to 2D vector of doubles.

SurgSim::Math::RigidTransform3f SurgSim::Graphics::fromOsg ( const std::pair< osg::Quat, osg::Vec3f > &  transform)
inline

Convert from OSG to 3D rigid body (isometric) transform, represented as floats.

SurgSim::Math::RigidTransform3d SurgSim::Graphics::fromOsg ( const osg::Quat &  rotation,
const osg::Vec3d &  translation 
)
inline

Convert from OSG to 3D rigid body (isometric) transform, represented as doubles.

SurgSim::Math::RigidTransform3d SurgSim::Graphics::fromOsg ( const std::pair< osg::Quat, osg::Vec3d > &  transform)
inline

Convert from OSG to 3D rigid body (isometric) transform, represented as doubles.

SurgSim::Math::Vector3f SurgSim::Graphics::fromOsg ( const osg::Vec3f &  vector)
inline

Convert from OSG to 3D vector of floats.

const Eigen::Matrix<float, 2, 2, Eigen::RowMajor> SurgSim::Graphics::fromOsg ( const osg::Matrix2 &  matrix)
inline

Convert from OSG to a 2x2 matrix of floats.

const Eigen::Matrix<double, 2, 2, Eigen::RowMajor> SurgSim::Graphics::fromOsg ( const osg::Matrix2d &  matrix)
inline

Convert from OSG to a 2x2 matrix of doubles.

SurgSim::Math::Vector3d SurgSim::Graphics::fromOsg ( const osg::Vec3d &  vector)
inline

Convert from OSG to 3D vector of doubles.

SurgSim::Math::Vector4f SurgSim::Graphics::fromOsg ( const osg::Vec4f &  vector)
inline

Convert from OSG to 4D vector of floats.

const Eigen::Matrix<float, 3, 3, Eigen::RowMajor> SurgSim::Graphics::fromOsg ( const osg::Matrix3 &  matrix)
inline

Convert from OSG to a 3x3 matrix of floats.

const Eigen::Matrix<double, 3, 3, Eigen::RowMajor> SurgSim::Graphics::fromOsg ( const osg::Matrix3d &  matrix)
inline

Convert from OSG to a 3x3 matrix of doubles.

SurgSim::Math::Vector4d SurgSim::Graphics::fromOsg ( const osg::Vec4d &  vector)
inline

Convert from OSG to 4D vector of doubles.

const Eigen::Matrix<float, 4, 4, Eigen::RowMajor> SurgSim::Graphics::fromOsg ( const osg::Matrixf &  matrix)
inline

Convert from OSG to a 4x4 matrix of floats.

const Eigen::Matrix<double, 4, 4, Eigen::RowMajor> SurgSim::Graphics::fromOsg ( const osg::Matrixd &  matrix)
inline

Convert from OSG to a 4x4 matrix of doubles.

template<class T >
osg::Uniform::Type SurgSim::Graphics::getOsgUniformType ( )
inline

Returns the OSG uniform type enum value for the template parameter type.

This template function is specialized to match each type with an enum value. Any types for which the function is not specialized will return osg::Uniform::UNDEFINED.

Template Parameters
TData type
Returns
OSG uniform type enum value
template<>
osg::Uniform::Type SurgSim::Graphics::getOsgUniformType< bool > ( )
inline
template<>
osg::Uniform::Type SurgSim::Graphics::getOsgUniformType< double > ( )
inline
template<>
osg::Uniform::Type SurgSim::Graphics::getOsgUniformType< float > ( )
inline
template<>
osg::Uniform::Type SurgSim::Graphics::getOsgUniformType< int > ( )
inline
template<>
osg::Uniform::Type SurgSim::Graphics::getOsgUniformType< std::shared_ptr< OsgTexture1d > > ( )
inline
template<>
osg::Uniform::Type SurgSim::Graphics::getOsgUniformType< std::shared_ptr< OsgTexture2d > > ( )
inline
template<>
osg::Uniform::Type SurgSim::Graphics::getOsgUniformType< std::shared_ptr< OsgTexture3d > > ( )
inline
template<>
osg::Uniform::Type SurgSim::Graphics::getOsgUniformType< std::shared_ptr< OsgTextureCubeMap > > ( )
inline
template<>
osg::Uniform::Type SurgSim::Graphics::getOsgUniformType< std::shared_ptr< OsgTextureRectangle > > ( )
inline
template<>
osg::Uniform::Type SurgSim::Graphics::getOsgUniformType< SurgSim::Math::Matrix22d > ( )
inline
template<>
osg::Uniform::Type SurgSim::Graphics::getOsgUniformType< SurgSim::Math::Matrix22f > ( )
inline
template<>
osg::Uniform::Type SurgSim::Graphics::getOsgUniformType< SurgSim::Math::Matrix33d > ( )
inline
template<>
osg::Uniform::Type SurgSim::Graphics::getOsgUniformType< SurgSim::Math::Matrix33f > ( )
inline
template<>
osg::Uniform::Type SurgSim::Graphics::getOsgUniformType< SurgSim::Math::Matrix44d > ( )
inline
template<>
osg::Uniform::Type SurgSim::Graphics::getOsgUniformType< SurgSim::Math::Matrix44f > ( )
inline
template<>
osg::Uniform::Type SurgSim::Graphics::getOsgUniformType< SurgSim::Math::Vector2d > ( )
inline
template<>
osg::Uniform::Type SurgSim::Graphics::getOsgUniformType< SurgSim::Math::Vector2f > ( )
inline
template<>
osg::Uniform::Type SurgSim::Graphics::getOsgUniformType< SurgSim::Math::Vector3d > ( )
inline
template<>
osg::Uniform::Type SurgSim::Graphics::getOsgUniformType< SurgSim::Math::Vector3f > ( )
inline
template<>
osg::Uniform::Type SurgSim::Graphics::getOsgUniformType< SurgSim::Math::Vector4d > ( )
inline
template<>
osg::Uniform::Type SurgSim::Graphics::getOsgUniformType< SurgSim::Math::Vector4f > ( )
inline
template<>
osg::Uniform::Type SurgSim::Graphics::getOsgUniformType< unsigned int > ( )
inline
std::shared_ptr<Shader> SurgSim::Graphics::loadExampleShader ( const SurgSim::Framework::ApplicationData data)
std::shared_ptr< SurgSim::Graphics::OsgShader > SurgSim::Graphics::loadShader ( const SurgSim::Framework::ApplicationData data,
const std::string &  name 
)
SurgSim::Graphics::SURGSIM_REGISTER ( SurgSim::Framework::Component  ,
SurgSim::Graphics::OsgCapsuleRepresentation  ,
OsgCapsuleRepresentation   
)
SurgSim::Graphics::SURGSIM_REGISTER ( SurgSim::Framework::Component  ,
SurgSim::Graphics::OsgSceneryRepresentation  ,
OsgSceneryRepresentation   
)
SurgSim::Graphics::SURGSIM_REGISTER ( SurgSim::Framework::Component  ,
SurgSim::Graphics::OsgBoxRepresentation  ,
OsgBoxRepresentation   
)
SurgSim::Graphics::SURGSIM_REGISTER ( SurgSim::Framework::Component  ,
SurgSim::Graphics::OsgSphereRepresentation  ,
OsgSphereRepresentation   
)
SurgSim::Graphics::SURGSIM_REGISTER ( SurgSim::Framework::Component  ,
SurgSim::Graphics::OsgPlaneRepresentation  ,
OsgPlaneRepresentation   
)
SurgSim::Graphics::SURGSIM_REGISTER ( SurgSim::Framework::Component  ,
SurgSim::Graphics::OsgPointCloudRepresentation  ,
OsgPointCloudRepresentation   
)
SurgSim::Graphics::SURGSIM_REGISTER ( SurgSim::Framework::Component  ,
SurgSim::Graphics::OsgCylinderRepresentation  ,
OsgCylinderRepresentation   
)
SurgSim::Graphics::SURGSIM_REGISTER ( SurgSim::Framework::Component  ,
SurgSim::Graphics::OsgOctreeRepresentation  ,
OsgOctreeRepresentation   
)
SurgSim::Graphics::SURGSIM_REGISTER ( SurgSim::Framework::Component  ,
SurgSim::Graphics::OsgMeshRepresentation  ,
OsgMeshRepresentation   
)
SurgSim::Graphics::SURGSIM_REGISTER ( SurgSim::Framework::Component  ,
SurgSim::Graphics::OsgView  ,
OsgView   
)
SurgSim::Graphics::SURGSIM_REGISTER ( SurgSim::Framework::Component  ,
SurgSim::Graphics::OsgCamera  ,
OsgCamera   
)
SurgSim::Graphics::SURGSIM_STATIC_REGISTRATION ( OsgSceneryRepresentation  )
SurgSim::Graphics::SURGSIM_STATIC_REGISTRATION ( OsgCylinderRepresentation  )
SurgSim::Graphics::SURGSIM_STATIC_REGISTRATION ( OsgSphereRepresentation  )
SurgSim::Graphics::SURGSIM_STATIC_REGISTRATION ( OsgBoxRepresentation  )
SurgSim::Graphics::SURGSIM_STATIC_REGISTRATION ( OsgOctreeRepresentation  )
SurgSim::Graphics::SURGSIM_STATIC_REGISTRATION ( OsgPlaneRepresentation  )
SurgSim::Graphics::SURGSIM_STATIC_REGISTRATION ( OsgCapsuleRepresentation  )
SurgSim::Graphics::SURGSIM_STATIC_REGISTRATION ( OsgPointCloudRepresentation  )
SurgSim::Graphics::SURGSIM_STATIC_REGISTRATION ( OsgMeshRepresentation  )
SurgSim::Graphics::SURGSIM_STATIC_REGISTRATION ( OsgCamera  )
SurgSim::Graphics::SURGSIM_STATIC_REGISTRATION ( OsgView  )
SurgSim::Graphics::TEST ( OsgManagerRenderTests  ,
StartUpTest   
)

Add a graphics component to the scene

Run the thread for a moment

SurgSim::Graphics::TEST ( OsgSphereRepresentationRenderTests  ,
MovingSpheresTest   
)

Pops up a window with two spheres that are translating and changing radius.

Initial sphere 1 position

Final sphere 1 position

Initial sphere 1 radius;

Final sphere 1 radius;

Initial sphere 2 position

Final sphere 2 position

Initial sphere 2 radius;

Final sphere 2 radius;

Number of times to step the sphere position and radius from start to end. This number of steps will be done in 1 second.

Add a graphics view element to the scene

Add the sphere representation to the view element, no need to make another scene element

Run the thread

Calculate t in [0.0, 1.0]

Interpolate position and radius

The total number of steps should complete in 1 second

SurgSim::Graphics::TEST ( OsgPlaneRepresentationRenderTests  ,
MovingPlanesTest   
)

Pops up a window with two planes that are translating and rotating.

Initial plane 1 position

Final plane 1 position

Initial plane 1 angle

Final plane 1 angle

Initial plane 2 position

Final plane 2 position

Initial plane 2 angle

Final plane 2 angle

Number of times to step the sphere position and radius from start to end. This number of steps will be done in 1 second.

Add a graphics view element to the scene

Add the sphere representation to the view element, no need to make another scene element

Run the thread

Calculate t in [0.0, 1.0]

Interpolate pose

SurgSim::Graphics::TEST ( OsgViewElementRenderTests  ,
MoveAndResizeWindowTest   
)

Add a graphics component to the scene

Set initial position to (50, 60), dimensions to 200 x 100 and disable the window border

Run the thread

Move the window to (100, 200)

Enable the window border and resize the window to 400 x 500

SurgSim::Graphics::TEST ( OsgViewElementRenderTest  ,
FullScreenView   
)

Add a graphics component to the scene

SurgSim::Graphics::TEST ( OsgViewElementRenderTest  ,
StereoView   
)

Add a graphics component to the scene

SurgSim::Graphics::TEST ( OsgViewElementRenderTest  ,
KeyBoardMouseTest   
)

Add a graphics component to the scene

SurgSim::Graphics::TEST_F ( OsgSceneryRepresentationRenderTests  ,
RenderTest   
)

Initial position of object 1

Final position of object 1

Initial angles (X, Y, Z) of object 1

Final angles (X, Y, Z) of object 1

Initial position of object 2

Final position of object 2

Initial angles (X, Y, Z) of object 2

Final angles (X, Y, Z) of object 2

Number of times to step the objects' position from start to end. This number of steps will be done in 1 second.

Calculate t in [0.0, 1.0]

Interpolate position

The total number of steps should complete in 1 second

SurgSim::Graphics::TEST_F ( OsgCylinderRepresentationRenderTests  ,
MovingCylinderTest   
)

Add the two cylinder representation to the view element

Run the thread

Initial and final position (X, Y, Z) of cylinder 1

Initial size (radius, height) and final size of cylinder 1

Initial angles (X, Y, Z) and final of the cylinder 1

Initial and final position (X, Y, Z) cylinder 2

Initial and final size (radius, height) of cylinder 2

Initial and final angles (X, Y, Z) of the cylinder 2

Number of times to step the cylinder position and radius from start to end. This number of steps will be done in 1 second.

Calculate t in [0.0, 1.0]

Interpolate position and radius

The total number of steps should complete in 1 second

SurgSim::Graphics::TEST_F ( OsgCapsuleRepresentationRenderTests  ,
MovingCapsuleTest   
)

Add the two capsule representation to the view element

Run the thread

Initial position of capsule 1

Final position of capsule 1

Initial size (radius, height) of capsule 1

Final size (radius, height) of capsule 1

Initial angles (X, Y, Z) of the capsule 1

Final angles (X, Y, Z) of the capsule 1

Initial position capsule 2

Final position capsule 2

Initial size (radius, height) of capsule 2

Final size (radius, height) of capsule 2

Initial angles (X, Y, Z) of the capsule 2

Final angles (X, Y, Z) of the capsule 2

Number of times to step the capsule position and radius from start to end. This number of steps will be done in 1 second.

Calculate t in [0.0, 1.0]

Interpolate position and angle

Test different ways to set the size of capsule

The total number of steps should complete in 1 second

SurgSim::Graphics::TEST_F ( OsgBoxRepresentationRenderTests  ,
MovingBoxesTest   
)

Initial and final position (X, Y, Z) of box 1

Initial angles (X, Y, Z) and final of the cylinder 1

Initial box 1 sizeX;

Final box 1 sizeX;

Initial box 1 sizeY;

Final box 1 sizeY;

Initial box 1 sizeZ;

Final box 1 sizeZ;

Initial and final position (X, Y, Z) box 2

Initial and final angles (X, Y, Z) of the box 2

Initial box 2 sizeX;

Final box 2 sizeX;

Initial box 2 sizeX;

Final box 2 sizeX;

Initial box 2 sizeX;

Final box 2 sizeX;

Initial box 2 angleX;

Number of times to step the box position and radius from start to end. This number of steps will be done in 1 second.

Run the thread

Calculate t in [0.0, 1.0]

Interpolate position and orientation

The total number of steps should complete in 1 second

SurgSim::Graphics::TEST_F ( OsgScreenSpaceQuadRenderTests  ,
InitTest   
)

Run the thread

Calculate t in [0.0, 1.0]

SurgSim::Graphics::TEST_F ( OsgCameraRenderTests  ,
PassTest   
)

Run the thread

SurgSim::Graphics::TEST_F ( OsgMeshRepresentationRenderTests  ,
BasicCubeTest   
)

Run the thread

The total number of steps should complete in 1 second

SurgSim::Graphics::TEST_F ( OsgRepresentationRenderTests  ,
RepresentationTest   
)

This test will put all shape one by one along the X-axis To make sure all shapes are aligned.

X-axis points horizontally to the right Y-axis points vertically up Z-axis is perpendicular to the screen and points out

Box position

Capsule position

Cylinder position

Sphere position

Size of the box

Size of the capsule (radius, height)

Size of the cylinder

Radius of the sphere

Add representations to the view element so we don't need to make another concrete scene element

Run the thread

Set the size of box

Set the size of capsule Capsule should use Y-axis as its axis

Set the size of cylinder Cylinder should use Y-axis as its axis

Set the size of sphere

SurgSim::Graphics::TEST_F ( OsgPointCloudRepresentationRenderTests  ,
PointAdd   
)

Run the thread

SurgSim::Graphics::TEST_F ( OsgScreenSpaceQuadRenderTests  ,
TextureTest   
)

Run the thread

SurgSim::Graphics::TEST_F ( OsgShaderRenderTests  ,
SphereShaderTest   
)

Pops up a window with a sphere colored by its normals and its mirror along the x-axis is also drawn using the geometry shader.

Add the sphere representation to the view element, no need to make another scene element

Add a shader to the sphere

Run the thread

SurgSim::Graphics::TEST_F ( OsgPointCloudRepresentationRenderTests  ,
StaticRotate   
)

Run the thread

Calculate t in [0.0, 1.0]

SurgSim::Graphics::TEST_F ( OsgShaderRenderTests  ,
ShinyShaderTest   
)

Add the sphere representation to the view element, no need to make another scene element

Run the thread

SurgSim::Graphics::TEST_F ( OsgPointCloudRepresentationRenderTests  ,
DynamicRotate   
)

Run the thread

Calculate t in [0.0, 1.0]

SurgSim::Graphics::TEST_F ( OsgScreenSpaceQuadRenderTests  ,
RenderTextureTest   
)

Run the thread

SurgSim::Graphics::TEST_F ( OsgShaderRenderTests  ,
TexturedShinyShaderTest   
)
SurgSim::Graphics::TEST_F ( OsgPointCloudRepresentationRenderTests  ,
PointSizeAndColor   
)

Run the thread

Calculate t in [0.0, 1.0]

SurgSim::Graphics::TEST_F ( OsgMeshRepresentationRenderTests  ,
TextureTest   
)
SurgSim::Graphics::TEST_F ( OsgMeshRepresentationRenderTests  ,
ShaderTest   
)
SurgSim::Graphics::TEST_F ( OsgMeshRepresentationRenderTests  ,
TriangleDeletionTest   
)

Run the thread

The total number of steps should complete in 1 second

template<typename T >
const T& SurgSim::Graphics::toOsg ( const T &  value)

Default type conversion to OSG.

Template Parameters
TType
Note
The input value is just returned. This allows this conversion method to be used with scalar types such as int and float, which are the same in Eigen and OSG.
osg::Quat SurgSim::Graphics::toOsg ( const SurgSim::Math::Quaternionf quaternion)
inline

Convert quaternion of floats to OSG.

osg::Vec2f SurgSim::Graphics::toOsg ( const SurgSim::Math::Vector2f vector)
inline

Convert 2D vector of floats to OSG.

std::pair<osg::Quat, osg::Vec3f> SurgSim::Graphics::toOsg ( const SurgSim::Math::RigidTransform3f transform)
inline

Convert 3D rigid body (isometric) transform, represented as floats, to OSG.

osg::Quat SurgSim::Graphics::toOsg ( const SurgSim::Math::Quaterniond quaternion)
inline

Convert quaternion of doubles to OSG.

std::pair<osg::Quat, osg::Vec3d> SurgSim::Graphics::toOsg ( const SurgSim::Math::RigidTransform3d transform)
inline

Convert 3D rigid body (isometric) transform, represented as doubles, to OSG.

osg::Vec2d SurgSim::Graphics::toOsg ( const SurgSim::Math::Vector2d vector)
inline

Convert 2D vector of doubles to OSG.

template<int MOpt>
const osg::Matrix2 SurgSim::Graphics::toOsg ( const Eigen::Matrix< float, 2, 2, MOpt > &  matrix)
inline

Convert a fixed-size 2x2 matrix of floats to OSG.

osg::Vec3f SurgSim::Graphics::toOsg ( const SurgSim::Math::Vector3f vector)
inline

Convert 3D vector of floats to OSG.

template<int MOpt>
const osg::Matrix2d SurgSim::Graphics::toOsg ( const Eigen::Matrix< double, 2, 2, MOpt > &  matrix)
inline

Convert a fixed-size 2x2 matrix of doubles to OSG.

osg::Vec3d SurgSim::Graphics::toOsg ( SurgSim::Math::Vector3d  vector)
inline

Convert 3D vector of doubles to OSG.

template<int MOpt>
const osg::Matrix3 SurgSim::Graphics::toOsg ( const Eigen::Matrix< float, 3, 3, MOpt > &  matrix)
inline

Convert a fixed-size 3x3 matrix of floats to OSG.

osg::Vec4f SurgSim::Graphics::toOsg ( const SurgSim::Math::Vector4f vector)
inline

Convert 4D vector of floats to OSG.

template<int MOpt>
const osg::Matrix3d SurgSim::Graphics::toOsg ( const Eigen::Matrix< double, 3, 3, MOpt > &  matrix)
inline

Convert a fixed-size 3x3 matrix of doubles to OSG.

osg::Vec4d SurgSim::Graphics::toOsg ( const SurgSim::Math::Vector4d vector)
inline

Convert 4D vector of doubles to OSG.

template<int MOpt>
const osg::Matrixf SurgSim::Graphics::toOsg ( const Eigen::Matrix< float, 4, 4, MOpt > &  matrix)
inline

Convert a fixed-size 4x4 matrix of floats to OSG.

template<int MOpt>
const osg::Matrixd SurgSim::Graphics::toOsg ( const Eigen::Matrix< double, 4, 4, MOpt > &  matrix)
inline

Convert a fixed-size 4x4 matrix of doubles to OSG.

Variable Documentation

const int SurgSim::Graphics::OsgSupportedTextureCount = 16 + 1