public

Inheritance Graph

graph BT
	FrameContext
	FrameContext --> ReferenceCounter
	click FrameContext "classMinSG_1_1FrameContext"
	click ReferenceCounter "classUtil_1_1ReferenceCounter"

Description

FrameContext .

Main

   
   
  FrameContext()
   
  ~FrameContext()

Camera (and Projection)

   
   
bool hasCamera() const
Check if the context has a camera.
   
AbstractCameraNode * getCamera()
   
const AbstractCameraNode * getCamera() const
   
void setCamera( AbstractCameraNode * newCamera)
   
void pushCamera()
Push the current camera onto the camera stack.
   
void popCamera()
Pop a camera from the top of the camera stack and make it the current camera.
   
void pushAndSetCamera( AbstractCameraNode * newCamera)
   
Geometry::Vec3 convertWorldPosToScreenPos(const Geometry::Vec3 & objPos) const
   
Geometry::Vec3 convertScreenPosToWorldPos(const Geometry::Vec3 & screenPos) const
   
Geometry::Rect getProjectedRect( Node * node, const Geometry::Rect & screenRect) const
   
Geometry::Rect getProjectedRect( Node * node) const

visual world coordinate system

   
   
void setWorldUpVector(const Geometry::Vec3 & v)
   
void setWorldFrontVector(const Geometry::Vec3 & v)
   
void setWorldRightVector(const Geometry::Vec3 & v)
   
const Geometry::Vec3 & getWorldUpVector() const
   
const Geometry::Vec3 & getWorldFrontVector() const
   
const Geometry::Vec3 & getWorldRightVector() const

Frame handling

   
   
typedef std::function< bool( FrameContext &)> FrameListenerFunction
   
void beginFrame(int frameNumber)
   
void endFrame(bool waitForGlFinish)
   
void addBeginFrameListener(const FrameListenerFunction & listener)
   
void addEndFrameListener(const FrameListenerFunction & listener)

Rendering

   
   
typedef Util::Registry < std::list< NodeRenderer > > renderingChannel_t
   
typedef renderingChannel_t::handle_t node_renderer_registration_t
   
typedef std::unordered_map< Util::StringIdentifier , renderingChannel_t > channelMap_t
   
const Util::StringIdentifier DEFAULT_CHANNEL
   
const Util::StringIdentifier TRANSPARENCY_CHANNEL
   
const Util::StringIdentifier APPROXIMATION_CHANNEL
   
bool displayNode( Node * node, const RenderParam & rp)
   
node_renderer_registration_t registerNodeRenderer(const Util::StringIdentifier & channelName, NodeRenderer renderer)
   
void unregisterNodeRenderer(const Util::StringIdentifier & channelName, node_renderer_registration_t handle)
   
const channelMap_t & getRenderingChannels() const
   
Rendering::RenderingContext & getRenderingContext()
   
const Rendering::RenderingContext & getRenderingContext() const
   
void displayMesh( Rendering::Mesh * mesh)
   
void displayMesh( Rendering::Mesh * mesh, uint32_t firstElement, uint32_t elementCount)
   
void showAnnotation( Node * node, const std::string & text, const int yPosOffset, const bool showRectangle, const Util::Color4f & textColor, const Util::Color4f & bgColor)
   
void showAnnotation( Node * node, const std::string & text, const int yPosOffset, const bool showRectangle)

Text Rendering

   
   
void setTextRenderer(const Rendering::TextRenderer & newTextRenderer)
   
const Rendering::TextRenderer & getTextRenderer() const

Statistics

   
   
Statistics & getStatistics()

Documentation

function
MinSG::FrameContext::FrameContext

public
   
   
FrameContext( )

Defined in MinSG/Core/FrameContext.h:61


function
MinSG::FrameContext::~FrameContext

public
   
   
~FrameContext( )

Defined in MinSG/Core/FrameContext.h:62


function
MinSG::FrameContext::hasCamera

public const inline
   
   
bool hasCamera( ) const

Check if the context has a camera.

Defined in MinSG/Core/FrameContext.h:74


function
MinSG::FrameContext::getCamera

public inline
   
   
AbstractCameraNode * getCamera( )

Returns

The associated camera ornullptr, if no camera is associated.

Defined in MinSG/Core/FrameContext.h:77


function
MinSG::FrameContext::getCamera

public const inline
   
   
const AbstractCameraNode * getCamera( ) const

Returns

The associated camera ornullptr, if no camera is associated.

Defined in MinSG/Core/FrameContext.h:80


function
MinSG::FrameContext::setCamera

public
     
     
void setCamera( AbstractCameraNode * newCamera )

Associate a new camera with the context.

Parameters

newCamera
New camera ornullptr, if the camera should be removed.

Defined in MinSG/Core/FrameContext.h:84


function
MinSG::FrameContext::pushCamera

public
   
   
void pushCamera( )

Push the current camera onto the camera stack.

Defined in MinSG/Core/FrameContext.h:87


function
MinSG::FrameContext::popCamera

public
   
   
void popCamera( )

Pop a camera from the top of the camera stack and make it the current camera.

Defined in MinSG/Core/FrameContext.h:90


function
MinSG::FrameContext::pushAndSetCamera

public inline
     
     
void pushAndSetCamera( AbstractCameraNode * newCamera )

Defined in MinSG/Core/FrameContext.h:92


function
MinSG::FrameContext::convertWorldPosToScreenPos

public const
     
     
Geometry::Vec3 convertWorldPosToScreenPos( const Geometry::Vec3 & objPos ) const

Defined in MinSG/Core/FrameContext.h:97


function
MinSG::FrameContext::convertScreenPosToWorldPos

public const
     
     
Geometry::Vec3 convertScreenPosToWorldPos( const Geometry::Vec3 & screenPos ) const

Defined in MinSG/Core/FrameContext.h:98


function
MinSG::FrameContext::getProjectedRect

public const
     
     
Geometry::Rect getProjectedRect( Node * node,
  const Geometry::Rect & screenRect
) const    

Projects the BoundingBox of the given Node into the given screenRect using the current camera and projection matrix of the RenderingContext.

Defined in MinSG/Core/FrameContext.h:102


function
MinSG::FrameContext::getProjectedRect

public const
     
     
Geometry::Rect getProjectedRect( Node * node ) const

Projects the BoundingBox of the given Node into the current view port using the current camera and projection matrix of the RenderingContext.

Defined in MinSG/Core/FrameContext.h:106


function
MinSG::FrameContext::setWorldUpVector

public inline
     
     
void setWorldUpVector( const Geometry::Vec3 & v )

Defined in MinSG/Core/FrameContext.h:118


function
MinSG::FrameContext::setWorldFrontVector

public inline
     
     
void setWorldFrontVector( const Geometry::Vec3 & v )

Defined in MinSG/Core/FrameContext.h:122


function
MinSG::FrameContext::setWorldRightVector

public inline
     
     
void setWorldRightVector( const Geometry::Vec3 & v )

Defined in MinSG/Core/FrameContext.h:126


function
MinSG::FrameContext::getWorldUpVector

public const inline
   
   
const Geometry::Vec3 & getWorldUpVector( ) const

Defined in MinSG/Core/FrameContext.h:130


function
MinSG::FrameContext::getWorldFrontVector

public const inline
   
   
const Geometry::Vec3 & getWorldFrontVector( ) const

Defined in MinSG/Core/FrameContext.h:133


function
MinSG::FrameContext::getWorldRightVector

public const inline
   
   
const Geometry::Vec3 & getWorldRightVector( ) const

Defined in MinSG/Core/FrameContext.h:136


typedef
MinSG::FrameContext::FrameListenerFunction

public
 
 
typedef std::function< bool( FrameContext &)> FrameListenerFunction

Called before the next frame starts The listener may register event listeners at the given FrameContext .

Parameters

** FrameContext **

Returns

finished? true if FrameListener should be removed and deleted false if FrameListener should be executed again next frame

Defined in MinSG/Core/FrameContext.h:166


function
MinSG::FrameContext::beginFrame

public
     
     
void beginFrame( int frameNumber )
  • Initializes rendering statistics ( Statistics & FrameStats).

  • Inform Rendering::MeshDataStrategy about the start of a new frame.

  • Inform the frameListeners about the start of a new frame by calling onBeginFrame().

    Parameters

    frameNumber
    If <0 the internal frameNumber is taken and increased; used for statistics

Defined in MinSG/Core/FrameContext.h:152


function
MinSG::FrameContext::endFrame

public
     
     
void endFrame( bool waitForGlFinish )
  • Mark the end of the frame for the rendering statistics ( Statistics & FrameStats)

    Parameters

    waitForGLfinish
    defines if finish on the rendering context is called before marking the end of the frame

Defined in MinSG/Core/FrameContext.h:156


function
MinSG::FrameContext::addBeginFrameListener

public
     
     
void addBeginFrameListener( const FrameListenerFunction & listener )

Register a new event listener.

Parameters

listener
New event listener

Defined in MinSG/Core/FrameContext.h:170


function
MinSG::FrameContext::addEndFrameListener

public
     
     
void addEndFrameListener( const FrameListenerFunction & listener )

Register a new event listener. @ param listener New event listener

Defined in MinSG/Core/FrameContext.h:174


typedef
MinSG::FrameContext::renderingChannel_t

public
 
 
typedef Util::Registry < std::list< NodeRenderer > > renderingChannel_t

Defined in MinSG/Core/FrameContext.h:186


typedef
MinSG::FrameContext::node_renderer_registration_t

public
 
 
typedef renderingChannel_t::handle_t node_renderer_registration_t

Defined in MinSG/Core/FrameContext.h:187


typedef
MinSG::FrameContext::channelMap_t

public
 
 
typedef std::unordered_map< Util::StringIdentifier , renderingChannel_t > channelMap_t

Defined in MinSG/Core/FrameContext.h:188


variable
MinSG::FrameContext::DEFAULT_CHANNEL

public static
 
 
const Util::StringIdentifier DEFAULT_CHANNEL

Defined in MinSG/Core/FrameContext.h:190


variable
MinSG::FrameContext::TRANSPARENCY_CHANNEL

public static
 
 
const Util::StringIdentifier TRANSPARENCY_CHANNEL

Defined in MinSG/Core/FrameContext.h:191


variable
MinSG::FrameContext::APPROXIMATION_CHANNEL

public static
 
 
const Util::StringIdentifier APPROXIMATION_CHANNEL

Defined in MinSG/Core/FrameContext.h:192


function
MinSG::FrameContext::displayNode

public
     
     
bool displayNode( Node * node,
  const RenderParam & rp
)    

Renders the node with the current renderer of the given rendering channel (rp.channel).

Returns

true if the node could be handled by a renderer.

Defined in MinSG/Core/FrameContext.h:196


function
MinSG::FrameContext::registerNodeRenderer

public
     
     
node_renderer_registration_t registerNodeRenderer( const Util::StringIdentifier & channelName,
  NodeRenderer renderer
)    

Defined in MinSG/Core/FrameContext.h:198


function
MinSG::FrameContext::unregisterNodeRenderer

public
     
     
void unregisterNodeRenderer( const Util::StringIdentifier & channelName,
  node_renderer_registration_t handle
)    

Defined in MinSG/Core/FrameContext.h:199


function
MinSG::FrameContext::getRenderingChannels

public const inline
   
   
const channelMap_t & getRenderingChannels( ) const

Defined in MinSG/Core/FrameContext.h:201


function
MinSG::FrameContext::getRenderingContext

public inline
   
   
Rendering::RenderingContext & getRenderingContext( )

Defined in MinSG/Core/FrameContext.h:205


function
MinSG::FrameContext::getRenderingContext

public const inline
   
   
const Rendering::RenderingContext & getRenderingContext( ) const

Defined in MinSG/Core/FrameContext.h:206


function
MinSG::FrameContext::displayMesh

public
     
     
void displayMesh( Rendering::Mesh * mesh )

Displaymesh. The mesh is uploaded if necessary and the number of triangles is counted for the frameStats (if enabled)

Defined in MinSG/Core/FrameContext.h:210


function
MinSG::FrameContext::displayMesh

public
     
     
void displayMesh( Rendering::Mesh * mesh,
  uint32_t firstElement,
  uint32_t elementCount
)    

Defined in MinSG/Core/FrameContext.h:211


function
MinSG::FrameContext::showAnnotation

public
     
     
void showAnnotation( Node * node,
  const std::string & text,
  const int yPosOffset,
  const bool showRectangle,
  const Util::Color4f & textColor,
  const Util::Color4f & bgColor
)    

Defined in MinSG/Core/FrameContext.h:213


function
MinSG::FrameContext::showAnnotation

public
     
     
void showAnnotation( Node * node,
  const std::string & text,
  const int yPosOffset,
  const bool showRectangle
)    

Defined in MinSG/Core/FrameContext.h:214


function
MinSG::FrameContext::setTextRenderer

public
     
     
void setTextRenderer( const Rendering::TextRenderer & newTextRenderer )

Set the default text renderer. The text renderer is used to display text (e.g., annotations of nodes).

Parameters

newTextRenderer
A copy of the given renderer will be stored as default text renderer.

Defined in MinSG/Core/FrameContext.h:235


function
MinSG::FrameContext::getTextRenderer

public const
   
   
const Rendering::TextRenderer & getTextRenderer( ) const

Access the default text renderer. The text renderer can be used to display text.

Returns

Default text renderer

Defined in MinSG/Core/FrameContext.h:243


function
MinSG::FrameContext::getStatistics

public inline
   
   
Statistics & getStatistics( )

Defined in MinSG/Core/FrameContext.h:251