|
Ocean
|
This class implements the base class for all SDX scene description nodes. More...
#include <SDXNode.h>
Data Structures | |
| class | SDXEnvironment |
| This class implements a node environment container. More... | |
Public Types | |
| using | NodeIdMap = std::unordered_map< NodeId, unsigned int > |
| Definition of a map mapping node ids to reference counters. | |
Public Types inherited from Ocean::SceneDescription::Node | |
| enum | FieldAccessType { ACCESS_NONE = 0 , ACCESS_GET = 1 , ACCESS_SET = 2 , ACCESS_GET_SET = ACCESS_GET | ACCESS_SET , ACCESS_EXPLICIT_NOTIFICATION = 4 } |
| Definition of different field access types. More... | |
Public Member Functions | |
| DescriptionType | descriptionType () const override |
| Returns the scene description type of this node. | |
| const Rendering::EngineRef & | engine () const |
| Returns the rendering engine used by this node. | |
| const std::string & | library () const |
| Returns the name of the scene description library defining this node. | |
| const std::string & | filename () const |
| Returns the name of the file defining this node. | |
| SceneId | sceneId () const |
| Returns the unique id of the scene defining this node originally. | |
| virtual const Rendering::ObjectRef & | renderingObject () const |
| Returns the associated rendering object. | |
| void | setName (const std::string &name) override |
| Sets the name of this node. | |
| virtual bool | setField (const std::string &fieldName, const Field &field) |
| Sets or changes a specified (standard) field of this node. | |
| virtual bool | setAnyField (const std::string &fieldName, const Field &field) |
| Sets or changes a specified standard or dynamic field of this node. | |
| NodeRefs | parentNodes () const |
| Returns all parent nodes of this node. | |
| SDXNodeSet | ancestorNodes () const |
| Returns all ancestor nodes of this node. | |
| virtual void | initialize (const Rendering::SceneRef &scene, const Timestamp timestamp, const bool reinitialize=false) |
| Event function to inform the node that it has been initialized and can apply all internal values to corresponding rendering objects. | |
Public Member Functions inherited from Ocean::SceneDescription::Node | |
| NodeId | id () const |
| Returns the unique node id of this node. | |
| const std::string & | name () const |
| Returns the name of this node. | |
| const std::string & | type () const |
| Returns the type of this node. | |
| const Field & | field (const std::string &fieldName) const |
| Returns the field base of a specified (standard) field. | |
| Field & | field (const std::string &fieldName) |
| Returns the field base of a specified (standard) field. | |
| virtual const Field & | anyField (const std::string &fieldName) const |
| Returns the field base of a specified standard or dynamic field. | |
| virtual Field & | anyField (const std::string &fieldName) |
| Returns the field base of a specified standard or dynamic field. | |
| template<typename T > | |
| const T & | field (const std::string &fieldName) const |
| Returns a specified (standard) field. | |
| template<typename T > | |
| T & | field (const std::string &fieldName) |
| Returns a specified (standard) field. | |
| template<typename T > | |
| const T & | anyField (const std::string &fieldName) const |
| Returns a specified standard or dynamic field. | |
| template<typename T > | |
| T & | anyField (const std::string &fieldName) |
| Returns a specified standard or dynamic field. | |
| FieldAccessType | fieldAccessType (const std::string &fieldName) const |
| Returns the access type of a specified field. | |
| bool | hasField (const std::string &fieldName) const |
| Returns whether this node has a special (standard) field. | |
| virtual bool | hasAnyField (const std::string &fieldName) const |
| Returns whether this node has a special standard or dynamic field. | |
| virtual std::string | originalFieldName (const std::string &fieldName) const |
| Tries to translate an alias field name to the original field name. | |
| Field::Type | fieldType (const std::string &fieldName) const |
| Returns the type of a special field. | |
| unsigned int | fieldDimension (const std::string &fieldName) const |
| Return the dimension of a special field. | |
| virtual bool | isDynamic () const |
| Returns whether this node can hold dynamic generated field. | |
Protected Member Functions | |
| SDXNode (const SDXEnvironment *environment) | |
| Creates a new node object. | |
| ~SDXNode () override | |
| Destructs a node object. | |
| virtual void | onInitialize (const Rendering::SceneRef &scene, const Timestamp timestamp) |
| Internal event function to inform the node that it has been initialized and can apply all internal values to corresponding rendering objects. | |
| virtual void | onFieldChanged (const std::string &fieldName) |
| Event function to inform the node about a changed field. | |
| void | registerParentNode (const NodeId parentId) |
| Registers a new parent node for this (child) node. | |
| void | unregisterParentNode (const NodeId parentId) |
| Unregisters a parent node for this (child) node. | |
| void | registerThisNodeAsParent (const SDXNodeRef &child) |
| Registers this node at a child as parent node. | |
| void | unregisterThisNodeAsParent (const SDXNodeRef &child) |
| Unregisters this node from a child as parent. | |
Protected Member Functions inherited from Ocean::SceneDescription::Node | |
| Node () | |
| Creates a new node. | |
| Node (const Node &node)=delete | |
| Disabled copy constructor. | |
| virtual | ~Node () |
| Destructs a node. | |
| virtual size_t | objectAddress () const |
| Returns the address of the most derived object. | |
| void | registerField (NodeSpecification &specification, const std::string &fieldName, const Field &field, const FieldAccessType accessType=ACCESS_GET_SET) |
| Registers a new field to a specified node type. | |
| Node & | operator= (const Node &node)=delete |
| Disabled copy operator. | |
Protected Attributes | |
| const SDXEnvironment * | environment_ = nullptr |
| Object specifying the environment of this node. | |
| NodeIdMap | parents_ |
| Map holding all parent nodes. | |
| Rendering::ObjectRef | renderingObject_ |
| Corresponding rendering object. | |
| bool | initialized_ = false |
| State determining whether the node has been initialized already. | |
| Lock | lock_ |
| Node lock. | |
Protected Attributes inherited from Ocean::SceneDescription::Node | |
| NodeId | nodeId_ |
| Unique node id. | |
| std::string | name_ |
| Node name. | |
| NodeSpecification * | specification_ = nullptr |
| Pointer to the node specification, guaranteed to exist as long as the node exist. | |
Additional Inherited Members | |
Protected Types inherited from Ocean::SceneDescription::Node | |
| using | FieldMap = std::map< std::string, Field * > |
| Definition of a map mapping field names to fields. | |
Static Protected Member Functions inherited from Ocean::SceneDescription::Node | |
| static Lock & | nodeIdCounterLock () |
| Returns the lock for the node id counter. | |
Static Protected Attributes inherited from Ocean::SceneDescription::Node | |
| static NodeId | nodeIdCounter_ |
| Unique node id counter. | |
This class implements the base class for all SDX scene description nodes.
| using Ocean::SceneDescription::SDXNode::NodeIdMap = std::unordered_map<NodeId, unsigned int> |
Definition of a map mapping node ids to reference counters.
|
explicitprotected |
Creates a new node object.
| environment | Node environment |
|
overrideprotected |
Destructs a node object.
| SDXNodeSet Ocean::SceneDescription::SDXNode::ancestorNodes | ( | ) | const |
Returns all ancestor nodes of this node.
|
overridevirtual |
Returns the scene description type of this node.
Implements Ocean::SceneDescription::Node.
|
inline |
Returns the rendering engine used by this node.
|
inline |
Returns the name of the file defining this node.
Beware: A node can be defined outside a file context and thus does not have a file!
|
virtual |
Event function to inform the node that it has been initialized and can apply all internal values to corresponding rendering objects.
| scene | Rendering scene node |
| timestamp | Initialization timestamp |
| reinitialize | True, if a reinitialization has to be done |
Reimplemented in Ocean::SceneDescription::SDXScene.
|
inline |
Returns the name of the scene description library defining this node.
|
protectedvirtual |
Event function to inform the node about a changed field.
| fieldName | Name of the changed field |
Reimplemented in Ocean::SceneDescription::SDX::X3D::AudioClip, Ocean::SceneDescription::SDX::X3D::Background, Ocean::SceneDescription::SDX::X3D::Billboard, Ocean::SceneDescription::SDX::X3D::Color, Ocean::SceneDescription::SDX::X3D::ColorInterpolator, Ocean::SceneDescription::SDX::X3D::ComposedShader, Ocean::SceneDescription::SDX::X3D::Coordinate, Ocean::SceneDescription::SDX::X3D::CoordinateInterpolator, Ocean::SceneDescription::SDX::X3D::DirectionalLight, Ocean::SceneDescription::SDX::X3D::HeadUpTransform, Ocean::SceneDescription::SDX::X3D::ImageTexture, Ocean::SceneDescription::SDX::X3D::IndexedFaceSet, Ocean::SceneDescription::SDX::X3D::IndexedLineSet, Ocean::SceneDescription::SDX::X3D::Inline, Ocean::SceneDescription::SDX::X3D::LiveVideoTexture, Ocean::SceneDescription::SDX::X3D::LOD, Ocean::SceneDescription::SDX::X3D::Material, Ocean::SceneDescription::SDX::X3D::MovieTexture, Ocean::SceneDescription::SDX::X3D::MultiTexture, Ocean::SceneDescription::SDX::X3D::NavigationInfo, Ocean::SceneDescription::SDX::X3D::Normal, Ocean::SceneDescription::SDX::X3D::NormalInterpolator, Ocean::SceneDescription::SDX::X3D::OrientationInterpolator, Ocean::SceneDescription::SDX::X3D::PackagedShader, Ocean::SceneDescription::SDX::X3D::PhantomTextureCoordinate, Ocean::SceneDescription::SDX::X3D::PointLight, Ocean::SceneDescription::SDX::X3D::PointSet, Ocean::SceneDescription::SDX::X3D::SpotLight, Ocean::SceneDescription::SDX::X3D::Switch, Ocean::SceneDescription::SDX::X3D::Text, Ocean::SceneDescription::SDX::X3D::TextureCoordinate, Ocean::SceneDescription::SDX::X3D::TextureProperties, Ocean::SceneDescription::SDX::X3D::TextureTransform, Ocean::SceneDescription::SDX::X3D::TimeSensor, Ocean::SceneDescription::SDX::X3D::TrackerTransform, Ocean::SceneDescription::SDX::X3D::Transform, Ocean::SceneDescription::SDX::X3D::X3DBackgroundNode, Ocean::SceneDescription::SDX::X3D::X3DLightNode, and Ocean::SceneDescription::SDX::X3D::X3DTimeDependentNode.
|
protectedvirtual |
Internal event function to inform the node that it has been initialized and can apply all internal values to corresponding rendering objects.
| scene | Rendering scene node |
| timestamp | Initialization timestamp |
Reimplemented in Ocean::SceneDescription::SDX::X3D::Appearance, Ocean::SceneDescription::SDX::X3D::AudioClip, Ocean::SceneDescription::SDX::X3D::Background, Ocean::SceneDescription::SDX::X3D::Billboard, Ocean::SceneDescription::SDX::X3D::Box, Ocean::SceneDescription::SDX::X3D::ColorInterpolator, Ocean::SceneDescription::SDX::X3D::ComposedShader, Ocean::SceneDescription::SDX::X3D::Cone, Ocean::SceneDescription::SDX::X3D::CoordinateInterpolator, Ocean::SceneDescription::SDX::X3D::Cylinder, Ocean::SceneDescription::SDX::X3D::DirectionalLight, Ocean::SceneDescription::SDX::X3D::FontStyle, Ocean::SceneDescription::SDX::X3D::HeadUpTransform, Ocean::SceneDescription::SDX::X3D::ImageTexture, Ocean::SceneDescription::SDX::X3D::IndexedFaceSet, Ocean::SceneDescription::SDX::X3D::IndexedLineSet, Ocean::SceneDescription::SDX::X3D::Inline, Ocean::SceneDescription::SDX::X3D::LiveVideoTexture, Ocean::SceneDescription::SDX::X3D::LOD, Ocean::SceneDescription::SDX::X3D::Material, Ocean::SceneDescription::SDX::X3D::MovieTexture, Ocean::SceneDescription::SDX::X3D::MultiTexture, Ocean::SceneDescription::SDX::X3D::MultiTextureTransform, Ocean::SceneDescription::SDX::X3D::NavigationInfo, Ocean::SceneDescription::SDX::X3D::NormalInterpolator, Ocean::SceneDescription::SDX::X3D::OrientationInterpolator, Ocean::SceneDescription::SDX::X3D::PackagedShader, Ocean::SceneDescription::SDX::X3D::PointLight, Ocean::SceneDescription::SDX::X3D::PointSet, Ocean::SceneDescription::SDX::X3D::ShaderPart, Ocean::SceneDescription::SDX::X3D::Sphere, Ocean::SceneDescription::SDX::X3D::SpotLight, Ocean::SceneDescription::SDX::X3D::StaticGroup, Ocean::SceneDescription::SDX::X3D::Switch, Ocean::SceneDescription::SDX::X3D::Text, Ocean::SceneDescription::SDX::X3D::TextureProperties, Ocean::SceneDescription::SDX::X3D::TextureTransform, Ocean::SceneDescription::SDX::X3D::TimeSensor, Ocean::SceneDescription::SDX::X3D::TrackerTransform, Ocean::SceneDescription::SDX::X3D::Transform, Ocean::SceneDescription::SDX::X3D::X3DBackgroundNode, Ocean::SceneDescription::SDX::X3D::X3DComposedGeometryNode, Ocean::SceneDescription::SDX::X3D::X3DGroupingNode, Ocean::SceneDescription::SDX::X3D::X3DInterpolatorNode, Ocean::SceneDescription::SDX::X3D::X3DLightNode, Ocean::SceneDescription::SDX::X3D::X3DScene, Ocean::SceneDescription::SDX::X3D::X3DShapeNode, Ocean::SceneDescription::SDX::X3D::X3DTexture2DNode, Ocean::SceneDescription::SDX::X3D::X3DTimeDependentNode, and Ocean::SceneDescription::SDXScene.
| NodeRefs Ocean::SceneDescription::SDXNode::parentNodes | ( | ) | const |
Returns all parent nodes of this node.
|
inlineprotected |
Registers a new parent node for this (child) node.
| parentId | Id of the parent node to register |
|
protected |
Registers this node at a child as parent node.
| child | New child node for this node |
|
virtual |
Returns the associated rendering object.
Reimplemented in Ocean::SceneDescription::SDX::X3D::X3DScene.
|
inline |
Returns the unique id of the scene defining this node originally.
|
virtual |
Sets or changes a specified standard or dynamic field of this node.
| fieldName | Name of the field to set |
| field | Field to replace the current field |
Reimplemented in Ocean::SceneDescription::SDXDynamicNode.
|
virtual |
Sets or changes a specified (standard) field of this node.
| fieldName | Name of the field to set |
| field | Field to replace the current field |
Reimplemented in Ocean::SceneDescription::SDX::X3D::X3DNode.
|
overridevirtual |
Sets the name of this node.
Reimplemented from Ocean::SceneDescription::Node.
|
inlineprotected |
Unregisters a parent node for this (child) node.
| parentId | Id of the parent node to unregister |
|
protected |
Unregisters this node from a child as parent.
| child | Child node to unregister |
|
protected |
Object specifying the environment of this node.
|
protected |
State determining whether the node has been initialized already.
|
protected |
Map holding all parent nodes.
|
protected |
Corresponding rendering object.