Public Member Functions | Private Member Functions | Private Attributes | List of all members
SurgSim::Graphics::OsgScreenSpacePass Class Reference

Special RenderPass to draw items using a orthogonal projection, this is specific to the Osg implementation of the SurgSim rendering. More...

#include <SurgSim/Graphics/OsgScreenSpacePass.h>

Inheritance diagram for SurgSim::Graphics::OsgScreenSpacePass:
SurgSim::Graphics::RenderPass SurgSim::Framework::SceneElement

Public Member Functions

 OsgScreenSpacePass (const std::string &name)
 Constructor. More...
 
virtual ~OsgScreenSpacePass ()
 Destructor. More...
 
void setViewPort (int width, int height)
 Set viewport dimensions. More...
 
virtual bool doInitialize () override
 Initialize this Component. More...
 
- Public Member Functions inherited from SurgSim::Graphics::RenderPass
 RenderPass (const std::string &name)
 Constructor. More...
 
 ~RenderPass ()
 
bool setRenderTarget (std::shared_ptr< RenderTarget > target)
 Sets render target for the camera, this abstracts the textures that are being used for rendering into. More...
 
std::shared_ptr< RenderTargetgetRenderTarget ()
 Gets render target that is being used in this pass. More...
 
virtual void setRenderOrder (SurgSim::Graphics::Camera::RenderOrder order, int value)
 Sets render order. More...
 
std::shared_ptr< CameragetCamera ()
 Gets the camera. More...
 
bool setMaterial (std::shared_ptr< Material > material)
 Sets the material used for rendering. More...
 
std::shared_ptr< MaterialgetMaterial ()
 Gets the current material. More...
 
void showColorTarget (int x, int y, int width, int height)
 Shows a quad on the screen with the texture used as the color target for this pass. More...
 
void hideColorTarget ()
 Hides the color target display. More...
 
void showDepthTarget (int x, int y, int width, int height)
 Shows a quad on the screen with the texture used as the depth target for this pass. More...
 
void hideDepthTarget ()
 Hides the depth target display. More...
 
- Public Member Functions inherited from SurgSim::Framework::SceneElement
 SceneElement (const std::string &name)
 Constructor. More...
 
virtual ~SceneElement ()
 Destructor. More...
 
virtual std::string getClassName () const
 
bool addComponent (std::shared_ptr< Component > component)
 Adds a component, calls initialize() on the component, if SceneElement::isInitialized() is true. More...
 
bool removeComponent (std::shared_ptr< Component > component)
 Removes a given component. More...
 
bool removeComponent (const std::string &name)
 Removes the component described by name. More...
 
std::shared_ptr< ComponentgetComponent (const std::string &name) const
 Gets the component identified by name. More...
 
std::vector< std::shared_ptr< Component > > getComponents () const
 Gets all the components of this SceneElement. More...
 
template<class T >
std::vector< std::shared_ptr< T > > getComponents () const
 Template version of getComponents method to get all the components with type T. More...
 
bool initialize ()
 Executes the initialize operation. More...
 
std::string getName () const
 Return the name of this SceneElement. More...
 
void setPose (const SurgSim::Math::RigidTransform3d &pose)
 Set the pose of this SceneElement. More...
 
const SurgSim::Math::RigidTransform3dgetPose () const
 Get the pose of this SceneElement. More...
 
std::shared_ptr< PoseComponentgetPoseComponent ()
 Get the PoseComponent that controls the pose all Representations in this SceneElement. More...
 
void setScene (std::weak_ptr< Scene > scene)
 Sets the Scene. More...
 
std::shared_ptr< ScenegetScene ()
 Gets the Scene. More...
 
void setRuntime (std::weak_ptr< Runtime > runtime)
 Sets the Runtime. More...
 
std::shared_ptr< RuntimegetRuntime ()
 Gets the runtime. More...
 
bool isInitialized () const
 Return if this SceneElement is initialized. More...
 
void setActive (bool val)
 Set this SceneElement's status (active/inactive) More...
 
bool isActive () const
 
std::shared_ptr< SceneElementgetSharedPtr ()
 Gets a shared pointer to this SceneElement. More...
 
virtual YAML::Node encode (bool standalone) const
 Convert to a YAML::Node. More...
 
virtual bool decode (const YAML::Node &node)
 Pull data from a YAML::Node. More...
 

Private Member Functions

void updateViewport (int width, int height)
 Update the projection matrix. More...
 

Private Attributes

osg::ref_ptr< osg::Camera > m_camera
 The osg camera reference. More...
 
int m_width
 The width of the viewport. More...
 
int m_height
 The height of the viewport. More...
 

Detailed Description

Special RenderPass to draw items using a orthogonal projection, this is specific to the Osg implementation of the SurgSim rendering.

Constructor & Destructor Documentation

SurgSim::Graphics::OsgScreenSpacePass::OsgScreenSpacePass ( const std::string name)
explicit

Constructor.

Parameters
nameThe name of the component
SurgSim::Graphics::OsgScreenSpacePass::~OsgScreenSpacePass ( )
virtual

Destructor.

Member Function Documentation

bool SurgSim::Graphics::OsgScreenSpacePass::doInitialize ( )
overridevirtual

Initialize this Component.

Reimplemented from SurgSim::Graphics::RenderPass.

void SurgSim::Graphics::OsgScreenSpacePass::setViewPort ( int  width,
int  height 
)

Set viewport dimensions.

void SurgSim::Graphics::OsgScreenSpacePass::updateViewport ( int  width,
int  height 
)
private

Update the projection matrix.

Member Data Documentation

osg::ref_ptr<osg::Camera> SurgSim::Graphics::OsgScreenSpacePass::m_camera
private

The osg camera reference.

int SurgSim::Graphics::OsgScreenSpacePass::m_height
private

The height of the viewport.

int SurgSim::Graphics::OsgScreenSpacePass::m_width
private

The width of the viewport.


The documentation for this class was generated from the following files: