Developer Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ACG::SceneGraph Namespace Reference

Namespaces

namespace  DrawModes

Classes

class  QtManipulatorNode
class  QtTranslationManipulatorNode
class  QtWidgetNode
class  BaseNode
class  BoundingBoxNode
class  CartesianClippingNode
class  ClippingNode
class  CoordFrameNode
class  CoordsysNode
class  EnvMapNode
class  GlutPrimitiveNode
class  GridNode
class  LightSourceNode
class  LineNode
class  ManipulatorNode
class  Material
class  MaterialNode
class  MeshNodeT
class  OBJNode
class  OSDTransformNode
class  PointNode
class  QuadNode
struct  enable_if
struct  enable_if< false, T >
class  BoundingBoxAction
class  MultiPassInfoAction
class  FindNodeAction
class  CollectDrawModesAction
class  CollectActiveDrawModesAction
class  SetDrawModesAction
class  DrawAction
class  PickAction
class  MouseEventAction
class  CheckDirtyAction
class  SeparatorNode
class  ShaderNode
class  SliceNode
class  StatusNodeT
struct  StatusModT
struct  SelectionModT
class  SelectionNodeT
struct  LockModT
class  LockNodeT
class  StencilRefNode
class  Strip
 class for managing a single triangle strip. More...
class  TextureRenderInfo
class  StripProcessorT
class  SwitchNode
class  TextNode
class  Texture3DNode
class  TextureNode
class  TrackballNode
class  TransformNode
class  TranslationManipulatorNode
class  TriangleNode
class  TriStripNodeT
class  BSplineCurveNodeT
class  BSplineSurfaceNodeT
class  CameraNode
class  CoordinateSystemNode
 Node for displaying coordinate systems. More...
class  LightSource
 Structure to hold options for one LightSource. More...
class  LightNode
class  LightSourceHandle
class  PolyLineNodeT
class  SkeletonNodeT
class  SplatCloudNode
class  VolumeMeshNodeT

Typedefs

typedef unsigned int uint

Enumerations

enum  PickTarget {
  PICK_CELL, PICK_FACE, PICK_EDGE, PICK_VERTEX,
  PICK_ANYTHING, PICK_FRONT_EDGE, PICK_FRONT_VERTEX, PICK_SPLINE
}
 What target to use for picking. More...

Functions

const Vec4f cylinder_color (0.8, 0.4, 0.4, 1.0)
const Vec4f sphere_color (0.8, 0.4, 0.4, 1.0)
const Vec4f select_color (1.0, 0.1, 0.1, 1.0)
BaseNodefind_node (BaseNode *_root, unsigned int _node_idx)
 Find a node in the scene graph.
template<typename Action >
enable_if< has_enter< Action,
void(Action::*)(BaseNode *) >
::value, void >::type 
if_has_enter (Action &_action, BaseNode *_node)
template<typename Action >
enable_if< has_leave< Action,
void(Action::*)(BaseNode *) >
::value, void >::type 
if_has_leave (Action &_action, BaseNode *_node)
template<class Action >
void traverse (BaseNode *_node, Action &_action)
template<class Action >
void traverse_multipass (BaseNode *_node, Action &_action, const unsigned int &_pass)
template<class Action >
void traverse_multipass (BaseNode *_node, Action &_action, GLState &_state, DrawModes::DrawMode=DrawModes::DEFAULT)
bool stripTextureCompare (const Strip &i, const Strip &j)
 Compare function for sorting Strips depending on their texture index.
stream replacements

These stream provide replacements for clog, cout, and cerr. They have the advantage that they can easily be multiplexed.

See Also
OpenMesh::mostream
OpenMesh::mostream & omlog ()
OpenMesh::mostream & omout ()
OpenMesh::mostream & omerr ()

Variables

const float SCALE_CONST = 5.0
const Vec4f colors [4][6]

Detailed Description

This namespace holds the ACG scene graph, all its nodes and helpers.

Enumeration Type Documentation

enum ACG::SceneGraph::PickTarget

What target to use for picking.

Enumerator:
PICK_CELL 

picks faces (may not be implemented for all nodes)

PICK_FACE 

picks faces (should be implemented for all nodes)

PICK_EDGE 

picks edges (may not be implemented for all nodes)

PICK_VERTEX 

picks verices (may not be implemented for all nodes)

PICK_ANYTHING 

pick any of the prior targets (should be implemented for all nodes)

PICK_FRONT_EDGE 

picks only visible front edges (may not be implemented for all nodes)

PICK_FRONT_VERTEX 

picks only visible front verices (may not be implemented for all nodes)

PICK_SPLINE 

Pick spline curve or surface (picks u or u,v coords respectively)

Definition at line 89 of file BaseNode.hh.

Function Documentation

BaseNode* ACG::SceneGraph::find_node ( BaseNode _root,
unsigned int  _node_idx 
)

Find a node in the scene graph.

Traverse scenegraph starting at _root, looking for a node whose id is _node_idx . Returns 0 if node wasn't found.

Parameters
_rootThe root node where the traversal starts (not necessary the root node of the scenegraph)
_node_idxThe node index this function should look for
Returns
0 if the node was not found, otherwise a pointer to the node.

Definition at line 68 of file SceneGraph.cc.

template<class Action >
void ACG::SceneGraph::traverse ( BaseNode _node,
Action &  _action 
)

Traverse the scenegraph starting at the node _node and apply the action _action to each node. This traversal function will call the enter/leave functions of the action if they have been implemented.

Definition at line 137 of file SceneGraph.hh.

template<class Action >
void ACG::SceneGraph::traverse_multipass ( BaseNode _node,
Action &  _action,
const unsigned int &  _pass 
)

Traverse the scenegraph starting at the node _node and apply the action _action to each node. This traversal function will call the enter/leave functions of the action if they have been implemented. This function traverses the scene graph multiple times if multipass rendering is turned on. GLState holds attributes to control render passes. Attention: Render passes are 1-indexed.

!!! You should ot use this function directly. Use the traverse_multipass function which controls the glstate too. This function will also manage the passes for you!!!

Definition at line 207 of file SceneGraph.hh.

template<class Action >
void ACG::SceneGraph::traverse_multipass ( BaseNode _node,
Action &  _action,
GLState &  _state,
DrawModes::DrawMode  = DrawModes::DEFAULT 
)

Traverse the scenegraph starting at the node _node and apply the action action to each node. When arriving at a node, its BaseNode::enter() function is called, then _action is applied and the node's children are traversed. After that the BaseNode::leave() method is called. Do this in multiple passes.

You have to initialize glstate before doing this:
In the state you give here use GLState::set_max_render_passes to set the maximum number of renderpasses that should be performed. This is not computed here, as the number only changes if the scenegraph is changed and not for all render calls.

See Also
ACG::SceneGraph::BaseNode

Definition at line 280 of file SceneGraph.hh.

Variable Documentation

const Vec4f ACG::SceneGraph::colors[4][6]
Initial value:
{
{
Vec4f(0.2,0.2,0.2,1.0), Vec4f(0.5,0.5,0.5,1.0), Vec4f(0.8,0.8,0.8,1.0),
Vec4f(0.2,0.2,0.2,0.2), Vec4f(0.5,0.5,0.5,0.4), Vec4f(0.8,0.8,0.8,0.6)
},
{
Vec4f(0.2,0.0,0.0,1.0), Vec4f(0.5,0.0,0.0,1.0), Vec4f(0.8,0.0,0.0,1.0),
Vec4f(0.3,0.1,0.1,0.2), Vec4f(0.5,0.2,0.2,0.4), Vec4f(0.8,0.4,0.4,0.6)
},
{
Vec4f(0.0,0.2,0.0,1.0), Vec4f(0.0,0.5,0.0,1.0), Vec4f(0.0,0.8,0.0,1.0),
Vec4f(0.1,0.3,0.1,0.2), Vec4f(0.2,0.5,0.2,0.4), Vec4f(0.4,0.8,0.4,0.6)
},
{
Vec4f(0.0,0.0,0.2,1.0), Vec4f(0.0,0.0,0.5,1.0), Vec4f(0.0,0.0,0.8,1.0),
Vec4f(0.1,0.1,0.3,0.2), Vec4f(0.2,0.2,0.5,0.4), Vec4f(0.4,0.4,0.8,0.6)
}
}

Definition at line 82 of file TranslationManipulatorNode.cc.