H3D API  2.4.1
Classes | Public Member Functions | Public Attributes | Static Public Attributes | Protected Attributes | List of all members
H3D::FBODebugger Class Reference

The FBODebugger node provides a convenient way to check the result of all FrameBufferTextureGenerator nodes in the scene. More...

#include <H3D/FBODebugger.h>

Inheritance diagram for H3D::FBODebugger:
Inheritance graph

Classes

class  UpdateSaveToURL
 A field used to execute the save to URL operation when the URL is set. More...
 

Public Member Functions

 FBODebugger (Inst< SFNode > _metadata=0, Inst< SFString > _fbo=0, Inst< SFString > _buffer=0, Inst< SFFloat > _transparency=0, Inst< UpdateSaveToURL > _saveToUrl=0, Inst< SFBool > _saveSuccess=0)
 Constructor.
 
virtual void traverseSG (TraverseInfo &ti)
 Traverse the scenegraph.
 
virtual void render ()
 Render the node. Render the FBO texture in fullscreen.
 
- Public Member Functions inherited from H3D::X3DChildNode
 X3DChildNode (Inst< SFNode > _metadata=0)
 Constructor.
 
- Public Member Functions inherited from H3D::X3DNode
 X3DNode (Inst< SFNode > _metadata=0)
 Constructor.
 
X3DMetadataObjectgetMetadataByName (const string &_name)
 Given a name, the first X3DMetadataObject in the metadata field that matches that name is returned. More...
 
- Public Member Functions inherited from H3D::Node
 Node ()
 Constructor.
 
virtual Nodeclone (bool deepCopy=true, DeepCopyMap *deepCopyMap=NULL)
 Returns a new instance of this node type with the same state as this one. More...
 
virtual ~Node ()
 Destructor.
 
X3DPrototypeInstancegetProtoInstanceParent ()
 If this node is the root node in the proto body of a X3DPrototypeInstance then this will return that node. More...
 
void setProtoInstanceParent (X3DPrototypeInstance *p)
 Set the X3DPrototypeInstance this node is the the root node if applicaple.
 
virtual bool lineIntersect (const Vec3f &from, const Vec3f &to, LineIntersectResult &result)
 Detect intersection between a line segment and the Node. More...
 
virtual void closestPoint (const Vec3f &p, NodeIntersectResult &result)
 Find closest point on Node to p. More...
 
virtual bool movingSphereIntersect (H3DFloat radius, const Vec3f &from, const Vec3f &to, NodeIntersectResult &result)
 Detect collision between a moving sphere and the Node. More...
 
virtual string defaultXMLContainerField ()
 Returns the default xml containerField attribute value. More...
 
virtual FieldgetField (const string &_name) const
 return a pointer to the field specified by name within this instance
 
int addDestructCallback (void(*func)(Node *, void *), void *args)
 Add a callback function to be run on destruction of node. More...
 
int removeDestructCallback (void(*func)(Node *, void *), void *args)
 Add a callback function to be run on destruction of node. More...
 

Public Attributes

H3DUniquePtr< SFStringfbo
 The fbo field contains the name of the FrameBufferTextureGenerator that you want to see the buffers in. More...
 
H3DUniquePtr< SFStringbuffer
 The buffer field specifies which buffer to display. More...
 
H3DUniquePtr< SFFloattransparency
 Transparency value is used to affect how transparent the current selected texture will be rendered , so it will not completely occlude the actual rendered scene, can be useful for debugging. More...
 
H3DUniquePtr< UpdateSaveToURLsaveToUrl
 When a new value is specified for saveToUrl the current selected FBO depth/color texture is rendered to a buffer and saved to the specified filename. More...
 
H3DUniquePtr< SFBoolsaveSuccess
 Contains the result of the last save operation. More...
 
- Public Attributes inherited from H3D::X3DNode
H3DUniquePtr< SFNodemetadata
 Meta data about the node. More...
 

Static Public Attributes

static H3DNodeDatabase database
 The H3DNodeDatabase for this node.
 
- Static Public Attributes inherited from H3D::X3DNode
static H3DNodeDatabase database
 The H3DNodeDatabase for this node.
 

Protected Attributes

AutoRef< Grouptexture_scene
 The scene used to render the selected texture in fullscreen.
 
X3D::DEFNodes texture_scene_dn
 DEFNodes from the texture_scene.
 
string current_buffer
 The type of buffer currently being used.
 
string current_fbo
 The name of the FrameBufferTextureGenerator currently being used.
 
AutoRef< RenderTargetTexturerender_target_texture
 RenderTargetTexture used to show the color buffers of a fbo if selected.
 
H3DUniquePtr< ToggleBlend > toggleBlend
 Field to monitor transparency field and toggle blending for the selected texture rendering if needed.
 
H3DUniquePtr< SFTextreNodeselected_texture
 texture used to keep the current selected texture
 

Additional Inherited Members

- Public Types inherited from H3D::Node
typedef std::map< Node *, Node * > DeepCopyMap
 A map type used during a deep copy clone() to map from original nodes to cloned nodes.
 
- Static Public Member Functions inherited from H3D::Node
static unsigned int nrNodesAlive ()
 Returns the nr of nodes currently alive, i.e. nodes created but not destructed.
 
static int nrNodesCreated ()
 Returns the number of nodes created in total since the start of the program.
 
- Protected Member Functions inherited from H3D::Node
void cloneFieldValue (Field &_from, Field &_to, bool deepCopy, DeepCopyMap &deepCopyMap)
 A helper function for the clone() method. More...
 
- Static Protected Member Functions inherited from H3D::Node
static NodegetClonedInstance (Node *original, bool deepCopy, DeepCopyMap &deepCopyMap)
 A helper function for nodes that implement clone() More...
 

Detailed Description

The FBODebugger node provides a convenient way to check the result of all FrameBufferTextureGenerator nodes in the scene.

The FBODebugger node can be put into the scene-graph and will draw the content of a buffer in a FrameBufferTextureGenerator in fullscreen when rendered.

The fbo field contains the name of the FrameBufferTextureGenerator that you want to see the buffers in. The valid values changes depending on the scene and it is easiest to use the Tree view to change between the different available buffers. If set to "NONE" it will do nothing.

The buffer field specifies which buffer to display. Valid values are:

-"DEPTH" - the depth buffer -"COLOR0" - the color buffer with index 0 -"COLOR1" - the color buffer with index 1

Examples:

Member Data Documentation

◆ buffer

H3DUniquePtr< SFString > H3D::FBODebugger::buffer

The buffer field specifies which buffer to display.

Valid values are:

-"DEPTH" - the depth buffer -"COLOR0" - the color buffer with index 0 -"COLOR1" - the color buffer with index 1

Access type: inputOutput Default value: "NONE" Valid values: "NONE" or the name of any FrameBufferTextureGenerator in the scene

Referenced by FBODebugger(), and traverseSG().

◆ fbo

H3DUniquePtr< SFString > H3D::FBODebugger::fbo

The fbo field contains the name of the FrameBufferTextureGenerator that you want to see the buffers in.

The valid values changes depending on the scene and it is easiest to use the Tree view to change between the different available buffers. If set to "NONE" it will do nothing.

Access type: inputOutput Default value: "NONE" Valid values: "NONE" or the name of any FrameBufferTextureGenerator in the scene

Referenced by FBODebugger(), render(), and traverseSG().

◆ saveSuccess

H3DUniquePtr< SFBool > H3D::FBODebugger::saveSuccess

Contains the result of the last save operation.

True if the last save operation was successful.

Access type: inputOutput
Default value: false

Referenced by FBODebugger(), and traverseSG().

◆ saveToUrl

H3DUniquePtr< UpdateSaveToURL > H3D::FBODebugger::saveToUrl

When a new value is specified for saveToUrl the current selected FBO depth/color texture is rendered to a buffer and saved to the specified filename.

The URL must be a local filename.

The texture is written immediately and the success of failure of the save operation can be checked using the saveSuccess field.

Access type: inputOutput
Default value: ""

Referenced by traverseSG().

◆ transparency

H3DUniquePtr< SFFloat > H3D::FBODebugger::transparency

Transparency value is used to affect how transparent the current selected texture will be rendered , so it will not completely occlude the actual rendered scene, can be useful for debugging.

Specially, when transparency equals to zero, blending will be disable for the selected texture rendering Access type: inputOutput
Default value: 0

Referenced by FBODebugger(), and traverseSG().


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