Click or drag to resize

Fusee.Xene Namespace

Types in this module implement various helper functionality to deal with FUSEE scene graphs (made out of the building blocks found in Fusee.Serialization.

The core of this module is the SceneVisitor class implementing a visitor pattern to traverse scene graphs for various use cases such as

  • Rendering
  • Searching
  • Picking

The actual use cases are implemented in Fusee.Engine.Core as most of them require knowledge about 3D rendering.

Classes
  ClassDescription
Public classCollapsingStateStackT
An IStateStack implementation behaving better in situations where many subsequent Push (and Pop) operations occur without actually altering the Tos contents.
Public classContainerExtensions
Static quick-hack helpers to access components within nodes.
Public classEmptyState
Dummy implementation of the IStateStack interface. Nothing can be stored within instance of this type. There's no Top of Stack object. Only the stack Depth is correctly tracked according to the number of Push() and Pop() operations already performed on the EmptyStack.
Public classSceneComponentFinderTComponent
Allows various searches over scene graphs. This class can be used directly but will be more commonly used by calling one of the Find extension methods declared in SceneFinderExtensions.
Public classSceneFinderBaseTSceneElementType
Base class serving for various searches over scene graphs. See the list of derived classes.
Public classSceneFinderExtensions
Various extensions methods to find nodes or components within trees of scene nodes.
Public classSceneNodeFinderTNode
Allows various searches over scene graphs. This class can be used directly but will be more commonly used by calling one of the Find extension methods declared in SceneFinderExtensions.
Public classSceneNodeWhereComponentFinderTNode, TComponent
Allows various searches over scene graphs. This class can be used directly but will be more commonly used by calling one of the Find extension methods declared in SceneFinderExtensions.
Public classSceneVisitor
This class tries to serve three goals
  1. As a base class for visitor patterns. Users can add visitor methods and provide code for different types of visited items.
  2. As building block for enumerators. Visitor methods can yield an enumeration.
  3. As a toolset to implement transformations on scenes. Transformations operate on scenes and alter their structure.
Visitors derived from this class may implement their own Visit methods for all kinds of scene graph elements. Visitor methods can be defined for scene nodes (although many implementations will most likely NOT have a very big inheritance tree for nodes) as well as for scene components. A Visitor method can be any instance method (not static) taking one parameter either derived from SceneNodeContainer or derived from SceneComponentContainer. To mark such a method as a Visitor method it needs to be decorated with the VisitMethodAttribute attribute. Visitor methods can have arbitrary names and don't necessarily need to be virtual.
Public classSceneVisitorHelpers
Static class containing helper methods around the SceneVisitor
Public classStandardState
A standard state for typical traversals mimicking rendering activities. Keeps track of the main matrices as well as selected render states.
Public classStateStackT
A simple implementation of the IStateStack interface. Defines the Tos property granting read and write access to the current Top of stack.
Public classViseratorTItem, TState
A Viserator is a scene visitor which returns an enumerator of a user defined type. Serves as a base class for use-cases where traversing a node-component-graph should yield a list (enumerator) of results.
Public classViseratorBaseTItem
Extract of the final Viserator without everything State related. This class is necessary to be able to define extension methods on node lists. Do not use this class directly.
Public classViseratorBaseTItemViseratorInstanceEnumerable
Public classViseratorExtensions
Public classVisitMethodAttribute
Use this attribute to identify visitor methods. Visitor methods are called during traversal on nodes or components with the specified type. WARNING: Currently no component or node type inheritance matching is done: A Visitor method is only called if it exaclty matches the type - TODO: fix this...
Public classCode exampleVisitorState
Use this as a base class for defining your own state for arbitrary SceneVisitors.
Interfaces
  InterfaceDescription
Public interfaceIStateStack
Defines the minimum set of operations on any data structure to be used as a stack during traversal. The main difference between StateStacks and "normal" stacks (StackT) is that the Push operation here doesn't take an argument but simply replicates the current state (or rather - memorizes the current state for restoring it later with Push).