Ocean
|
This class implements the base class for all sdx scene object providing access to all elements of a scene. More...
Public Member Functions | |
const std::string & | filename () const |
Returns the name of the file defining this node. More... | |
Rendering::SceneRef | renderingScene () const |
Returns the associated scene rendering object. More... | |
const SDXEnvironment * | environment () const |
Returns the environment object of this scene. More... | |
virtual void | registerGlobalLight (const Rendering::LightSourceRef &lightSource) |
Registers a global light source to this scene. More... | |
virtual void | unregisterGlobalLight (const Rendering::LightSourceRef &lightSource) |
Unregisters a global light source from this scene. More... | |
virtual void | initialize (const Timestamp timestamp) |
Event function to inform the scene that it has been initialized and can apply all internal values to corresponding rendering objects. More... | |
Public Member Functions inherited from Ocean::SceneDescription::Scene | |
Scene (const std::string &filename) | |
Creates a new scene object. More... | |
const std::string & | filename () const |
Returns the filename of this scene. More... | |
Public Member Functions inherited from Ocean::SceneDescription::Node | |
NodeId | id () const |
Returns the unique node id of this node. More... | |
const std::string & | name () const |
Returns the name of this node. More... | |
const std::string & | type () const |
Returns the type of this node. More... | |
const Field & | field (const std::string &fieldName) const |
Returns the field base of a specified (standard) field. More... | |
Field & | field (const std::string &fieldName) |
Returns the field base of a specified (standard) field. More... | |
virtual const Field & | anyField (const std::string &fieldName) const |
Returns the field base of a specified standard or dynamic field. More... | |
virtual Field & | anyField (const std::string &fieldName) |
Returns the field base of a specified standard or dynamic field. More... | |
template<typename T > | |
const T & | field (const std::string &fieldName) const |
Returns a specified (standard) field. More... | |
template<typename T > | |
T & | field (const std::string &fieldName) |
Returns a specified (standard) field. More... | |
template<typename T > | |
const T & | anyField (const std::string &fieldName) const |
Returns a specified standard or dynamic field. More... | |
template<typename T > | |
T & | anyField (const std::string &fieldName) |
Returns a specified standard or dynamic field. More... | |
FieldAccessType | fieldAccessType (const std::string &fieldName) const |
Returns the access type of a specified field. More... | |
bool | hasField (const std::string &fieldName) const |
Returns whether this node has a special (standard) field. More... | |
virtual bool | hasAnyField (const std::string &fieldName) const |
Returns whether this node has a special standard or dynamic field. More... | |
virtual std::string | originalFieldName (const std::string &fieldName) const |
Tries to translate an alias field name to the original field name. More... | |
Field::Type | fieldType (const std::string &fieldName) const |
Returns the type of a special field. More... | |
unsigned int | fieldDimension (const std::string &fieldName) const |
Return the dimension of a special field. More... | |
virtual bool | isDynamic () const |
Returns whether this node can hold dynamic generated field. More... | |
Public Member Functions inherited from Ocean::SceneDescription::SDXNode | |
DescriptionType | descriptionType () const override |
Returns the scene description type of this node. More... | |
const Rendering::EngineRef & | engine () const |
Returns the rendering engine used by this node. More... | |
const std::string & | library () const |
Returns the name of the scene description library defining this node. More... | |
const std::string & | filename () const |
Returns the name of the file defining this node. More... | |
SceneId | sceneId () const |
Returns the unique id of the scene defining this node originally. More... | |
virtual const Rendering::ObjectRef & | renderingObject () const |
Returns the associated rendering object. More... | |
void | setName (const std::string &name) override |
Sets the name of this node. More... | |
virtual bool | setField (const std::string &fieldName, const Field &field) |
Sets or changes a specified (standard) field of this node. More... | |
virtual bool | setAnyField (const std::string &fieldName, const Field &field) |
Sets or changes a specified standard or dynamic field of this node. More... | |
NodeRefs | parentNodes () const |
Returns all parent nodes of this node. More... | |
SDXNodeSet | ancestorNodes () const |
Returns all ancestor nodes of this node. More... | |
Protected Member Functions | |
SDXScene (const std::string &filename, const Library &library, const Rendering::EngineRef &engine) | |
Creates a new scene object. More... | |
void | initialize (const Rendering::SceneRef &scene, const Timestamp timestamp, const bool reinitialize=false) override |
Event function to inform the node that it has been initialized and can apply all internal values to corresponding rendering objects. More... | |
virtual void | onInitialize (const Timestamp timestamp) |
Internal event function to inform the scene that it has been initialized and can apply all internal values to corresponding rendering objects. More... | |
void | onInitialize (const Rendering::SceneRef &scene, const Timestamp timestamp) override |
Internal event function to inform the node that it has been initialized and can apply all internal values to corresponding rendering objects. More... | |
Protected Member Functions inherited from Ocean::SceneDescription::Node | |
Node () | |
Creates a new node. More... | |
Node (const Node &node)=delete | |
Disabled copy constructor. More... | |
virtual | ~Node () |
Destructs a node. More... | |
virtual size_t | objectAddress () const |
Returns the address of the most derived object. More... | |
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. More... | |
Node & | operator= (const Node &node)=delete |
Disabled copy operator. More... | |
Protected Member Functions inherited from Ocean::SceneDescription::SDXNode | |
SDXNode (const SDXEnvironment *environment) | |
Creates a new node object. More... | |
~SDXNode () override | |
Destructs a node object. More... | |
virtual void | onFieldChanged (const std::string &fieldName) |
Event function to inform the node about a changed field. More... | |
void | registerParentNode (const NodeId parentId) |
Registers a new parent node for this (child) node. More... | |
void | unregisterParentNode (const NodeId parentId) |
Unregisters a parent node for this (child) node. More... | |
void | registerThisNodeAsParent (const SDXNodeRef &child) |
Registers this node at a child as parent node. More... | |
void | unregisterThisNodeAsParent (const SDXNodeRef &child) |
Unregisters this node from a child as parent. More... | |
Protected Attributes | |
SDXEnvironment | sceneEnvironment_ |
Scene environment object. More... | |
Protected Attributes inherited from Ocean::SceneDescription::Scene | |
std::string | filename_ |
Filename of this scene. More... | |
Protected Attributes inherited from Ocean::SceneDescription::Node | |
NodeId | nodeId_ |
Unique node id. More... | |
std::string | name_ |
Node name. More... | |
NodeSpecification * | specification_ = nullptr |
Pointer to the node specification, guaranteed to exist as long as the node exist. More... | |
Protected Attributes inherited from Ocean::SceneDescription::SDXNode | |
const SDXEnvironment * | environment_ = nullptr |
Object specifying the environment of this node. More... | |
NodeIdMap | parents_ |
Map holding all parent nodes. More... | |
Rendering::ObjectRef | renderingObject_ |
Corresponding rendering object. More... | |
bool | initialized_ = false |
State determining whether the node has been initialized already. More... | |
Lock | lock_ |
Node lock. More... | |
Additional Inherited Members | |
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 Types inherited from Ocean::SceneDescription::SDXNode | |
typedef std::unordered_map< NodeId, unsigned int > | NodeIdMap |
Definition of a map mapping node ids to reference counters. More... | |
Protected Types inherited from Ocean::SceneDescription::Node | |
typedef std::map< std::string, Field * > | FieldMap |
Definition of a map mapping field names to fields. More... | |
Static Protected Member Functions inherited from Ocean::SceneDescription::Node | |
static Lock & | nodeIdCounterLock () |
Returns the lock for the node id counter. More... | |
Static Protected Attributes inherited from Ocean::SceneDescription::Node | |
static NodeId | nodeIdCounter_ |
Unique node id counter. More... | |
This class implements the base class for all sdx scene object providing access to all elements of a scene.
A new scene object can be created by the scene description Manager object.
|
protected |
|
inline |
Returns the environment object of this scene.
|
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!
|
overrideprotectedvirtual |
Event function to inform the node that it has been initialized and can apply all internal values to corresponding rendering objects.
The scene node has an own initialize() function, use this instead
Reimplemented from Ocean::SceneDescription::SDXNode.
|
virtual |
Event function to inform the scene that it has been initialized and can apply all internal values to corresponding rendering objects.
timestamp | Initialization timestamp |
|
overrideprotectedvirtual |
Internal event function to inform the node that it has been initialized and can apply all internal values to corresponding rendering objects.
The scene node has an own onInitialize() function, use this instead
Reimplemented from Ocean::SceneDescription::SDXNode.
|
protectedvirtual |
Internal event function to inform the scene that it has been initialized and can apply all internal values to corresponding rendering objects.
timestamp | Initialization timestamp |
Reimplemented in Ocean::SceneDescription::SDX::X3D::X3DScene.
|
virtual |
Registers a global light source to this scene.
Licht sources in local transformations with global state should be registered only.
The transformation, position or orientation of the light source is unchanged.
lightSource | Rendering light source object to be registered |
|
inline |
Returns the associated scene rendering object.
|
virtual |
Unregisters a global light source from this scene.
lightSource | Renring light source object to be unregistered |
|
protected |
Scene environment object.