namespace scene overview

Included by: zmodeler.h

Description

scene namespace is a logical group of interfaces that represent scene elements like nodes and their behaviour interfaces.

Scene

Scene in ZModeler is presented with interface scene::IScene and can be obtained with IModeler::getScene method call. Scene is just a set of objects which are in parent-child relations to each other.

Objects or nodes

Objects in scene are presented with interface scene::INode (atually, with one of derived interfaces) and called nodes. Also, there is one virtual non-visualizeable node called scene root and all other nodes in scene are direct or indirect children of this root node. Each node is presented with an extension of INode interface. Thus, for example, objects with geometry are presented with scene::IMeshNode interface; Light sources are presented with scene::ILightNode interface and so on. To determine node type, you have to query according interface on a node.

Node features

Beside methods provided with extneded scene::INode interfaces (which are specific for according node types), there are some "general features" that node might support. They are presented with interfaces named with *able on the end. For example, If node supports scene::ITransformable interface, it supports transformation with matrix, or more generally, it can be positioned and oriented in scene with methods of this interface. If node supports scene::IVisualizeable, this node can be rendered in viewports, so user can see it. And so on.

Types and definitions

VERTEX_HAS_* Definition of flexible vertex format bits.
NC_* Node changes bits definition.
enum eLightType Enumeration of light-types for scene::ILight interface.
enum eNodeOperation Enumeration of node operations for INode::queryNodeOperation
enum eControlPoint Enumeration of control point types.
enum eControlVector Enumeration of control vectors for control point. Each control point can have several control vectors for manipulation.
enum eSkeletonMode Enumeration of skeleton positioning modes. Current position mode could be a bitwise-or combination of values from this enumeration.
Z3D_SCENE_RESOLVATION Definition of resolvation string for serialization of IScene interface.

Scene and Nodes Interfaces

IScene Interfaces presents a scene and can be obtained with IModeler::getScene method call. Scene contains a virtual root node and other scene objects are linked in tree-structure with this node as a root.
INode Base interface for scene nodes. Actually nodes in scene are presented with extended versions of this interface. You can query according interfaces to get this extended functionality. Base INode interface provides only general functionality.
INodeFilter Interface allows filtering nodes. Several filters can be installed in services::INodesService to allow filtering nodes by some conditions. For example, it can filter all dummy nodes or spline nodes or use some other complex condition for filtering.
ICameraNode Extendes INode interface and represents Camera in scene. Currently unused.
ICamera Camera interface is held by ICameraNode and provides methods for manipulating camera. Currently unused.
IControlPoint Interface for single control point for curves, surfaces or animation frames. Control point can be of different type and can provides vectors for manipulaton.
IDummyNode Extendes INode interface and represents generic dummy object in scene. It could be of different shapes, solid or wire-frame, could have different color and, optionally, can store some values. Dummy nodes are generally used for organizing tree hierarchy of objects in scene, or used as a placeholders for external objects.
ILightNode Extendes INode interface and represents light source in scene.
ILight Light interface is held by ILightNode and provides methods for manipulating light. Light source could be of different types, color and range/attenutation settings.
IManipulator Intrface presents a manipulation point of some complex system. ILightNode can have several manipulators to allow suer drag these points and specify range, direction, cones of light source.
IMeshNode Extendes INode interface and represents geometry (mesh) object in scene. This node type used when creating objects in ZModeler.
IUVMeshNode Extendes IMeshNode interface and represents geometry object which manupulates UV-mapping of some other IMeshNode object. Nodes which supports this interface are displayed in UV-Mapper viewport only.
IMesh Base geometry (mesh) interface is held by IMeshNode interface and used for representing some geometry objects. This interface is not used as is, instead it's extended versions are used.
INURBSMesh Extendes IMesh interface to represent NURBS-generated mesh object. Currently not implemented.
IPatchMesh Extendes IMesh interface to represent parametric patch-generated mesh object. Currently not implemented.
IPolyMesh Extendes IMesh interface to represent polygonal mesh object. This is the only type of mesh objects used in current implementation.
IPrimitiveNode Extendes INode interface and represents geometry primitive.
IPrimitive Visual primitive is held by IPrimitiveNode interface and mostly used as a helper objects, since they do not allow to be edited on mesh level. However, primitive can be manipulated in size and some other parameters.
IBoneNode Extendes INode interface and represents bone of skeleton node.
ISkeletonNode Extendes INode interface and represents skeleton.
ISplineNode Extendes INode interface and represents spline curve.
ISpline Is derived from collection of IControlPoint interfaces and represents a curve.

Nodes abilities

IAnimateable Animation ability of the node. This interface can be queried on INode to determine whether it supports animation. Currently not available.
IBoundable Bounding information source. This interface can be queried on INode to get or update node bounds. Bounds can be used when exporting or when drawing nodes in viewport for clipping purpose.
IManipulateable Nodes that support manipulation can provide this interface too.
ITransformable General INode ability of transformation. This includes an internal matrix transformation, so node can be positioned, rotated or scaled in scene. All nodes in current implementation support this interface. Also, IControlPoint and IManipulator are also provide this interface.
IVisualizeable Visualization ability of the node. This interface can be queried on INode to allow node to be rendered in viewport.
See Also:
References overview
services::INodeService interface
core::IModeler::getScene method