#include <_src_graph_graph.hh>

Public Member Functions | |
| Graph (RefPtr< Node > node, const string &name=string()) | |
| ~Graph () | |
| void | SetName (const string &name) |
| void | Enable (const bool enable=true) |
| bool | IfEnabled (void) |
| CLASS_METHOD shptr< Graph > | MakeMinimalGraph (void) |
| void | AttachNode (RefPtr< Node > node) |
| RefPtr< Node > | GetRootNode (void) |
| RefPtr< TransformNode > | GetTransformNode (void) |
| RefPtr< osg::Group > | GetGroupNode (void) |
Private Attributes | |
| RefPtr< osg::Switch > | mSwitchNode |
| RefPtr< TransformNode > | mTransformNode |
| outer-level transform node | |
| RefPtr< osg::StateSet > | mStateSet |
This can be thought of as ObjectGraph. Graph defines the set of nodes of one individual Object.
Graph arrangement (OSG): osg::Switch --> osg::Transform --> node
Graph and Object have their own separate Transform nodes. Graph's Transform is used for orienting 3D models transparently to an Object (Objects are attached to a Graph).
SUBTLE: Another transform node can be passed to the ctor as the root node. Having two transform nodes is useful, since it allows setting the correct orientation of a 3D model, which then is transformed by the usual transform node.
Use AttachNode() [instead of addChild() with GetRootNode()/GetTransformNode()]. GetRootNode() must return the actual root node (this cannot be faked, if World::Attach() were to attach its child then the root node would be outside the scene graph). There is no separate Group node (it is really the Transform node), but accomodates clients that only need a Group node.
| graph::Graph::Graph | ( | RefPtr< Node > | node, | |
| const string & | name = string() | |||
| ) |
| graph::Graph::~Graph | ( | ) |
| void graph::Graph::SetName | ( | const string & | name | ) |
Set name of graph.
| void graph::Graph::Enable | ( | const bool | enable = true |
) |
Enable/disable rendering a Graph.
NOTE: This isn't effective for enabling models per-view in OSG. The reason is that OSG generates a render list from the scene graph, then renders every camera. So trying to alter nodes is too late in the pipeline. Rather, use an "cull mask" for the osg::Camera with a "node mask" for the model. See View::ExcludeFromMainView().
| bool graph::Graph::IfEnabled | ( | void | ) |
Make a minimal-but-usable Graph for use with an Object.
| void graph::Graph::AttachNode | ( | RefPtr< Node > | node | ) |
| RefPtr<Node> graph::Graph::GetRootNode | ( | void | ) | [inline] |
| RefPtr<TransformNode> graph::Graph::GetTransformNode | ( | void | ) | [inline] |
| RefPtr<osg::Group> graph::Graph::GetGroupNode | ( | void | ) | [inline] |
RefPtr<osg::Switch> graph::Graph::mSwitchNode [private] |
RefPtr<TransformNode> graph::Graph::mTransformNode [private] |
outer-level transform node
RefPtr<osg::StateSet> graph::Graph::mStateSet [private] |
Palomino Flight Simulator documents generated by doxygen 1.5.6 on Tue Sep 28 11:37:49 2010