ACG::SceneGraph Namespace Reference

Namespaces

namespace  DrawModes

Classes

class  QtManipulatorNode
class  QtTranslationManipulatorNode
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  Material2Node
class  MaterialNode
class  MeshNodeT
class  OBJNode
class  PlaneNode
class  PointNode
class  QuadNode
struct  enable_if
struct  enable_if< false, T >
class  MetaAction
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  Texture3DNode
class  TextureNode
class  TrackballNode
class  TransformNode
class  TranslationManipulatorNode
class  TriangleNode
class  TriStripNodeT

Enumerations

enum  PickTarget {
  PICK_CELL, PICK_FACE, PICK_EDGE, PICK_VERTEX,
  PICK_ANYTHING, PICK_FRONT_EDGE, PICK_FRONT_VERTEX
}
 

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)
template<typename Action >
enable_if<!has_enter< Action,
void(Action::*)(BaseNode *) >
::value, void >::type 
if_has_enter (Action &, BaseNode *)
template<typename Action >
enable_if<!has_enter< Action,
void(Action::*)(BaseNode *) >
::value, void >::type 
if_has_leave (Action &, BaseNode *)
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 (BaseNode *_node, Action &_action, GLState &_state, DrawModes::DrawMode _drawmode=DrawModes::DEFAULT)
template<class Action >
void traverse_multipass (BaseNode *_node, Action &_action, GLState &_state, DrawModes::DrawMode _drawmode=DrawModes::DEFAULT)
bool stripTextureCompare (const Strip &i, const Strip &j)
 Compare function for sorting Strips depending on their texture index.

Variables

const float SCALE_CONST = 5.0
enable_if< has_enter< Action,
void(Action::*)(BaseNode *) >
::value, void >::typ 
if_has_enter )(Action &_action, BaseNode *_node)
enable_if< has_leave< Action,
void(Action::*)(BaseNode *) >
::value, void >::typ 
if_has_leave )(Action &_action, BaseNode *_node)
const Vec4f colors [4][6]

Detailed Description

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


Enumeration Type Documentation

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)

Definition at line 86 of file BaseNode.hh.


Function Documentation

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

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

Referenced by CoreWidget::updatePopupMenu().

template<class Action >
void ACG::SceneGraph::traverse ( BaseNode _node,
Action &  _action,
GLState &  _state,
DrawModes::DrawMode  _drawmode = DrawModes::DEFAULT 
) [inline]

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.

See also:
ACG::SceneGraph::BaseNode

Definition at line 309 of file SceneGraph.hh.

References traverse().

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

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 337 of file SceneGraph.hh.

References ACG::GLState::max_render_passes(), ACG::GLState::next_render_pass(), ACG::GLState::reset_render_pass(), and traverse_multipass().

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

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.

Definition at line 199 of file SceneGraph.hh.

References ACG::SceneGraph::BaseNode::childrenBegin(), ACG::SceneGraph::BaseNode::childrenEnd(), ACG::SceneGraph::BaseNode::ChildrenFirst, ACG::SceneGraph::BaseNode::HideChildren, ACG::SceneGraph::BaseNode::HideNode, ACG::SceneGraph::BaseNode::HideSubtree, ACG::SceneGraph::BaseNode::multipassNodeActive(), ACG::SceneGraph::BaseNode::multipassStatusActive(), ACG::SceneGraph::BaseNode::NodeFirst, ACG::SceneGraph::BaseNode::SecondPass, ACG::SceneGraph::BaseNode::status(), and ACG::SceneGraph::BaseNode::traverseMode().

Referenced by glViewer::pick_region(), glViewer::pickColor(), glViewer::pickGL(), and traverse_multipass().


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.


acg pic Project OpenFlipper, ©  Computer Graphics Group, RWTH Aachen. Documentation generated using doxygen .