Ocean
Ocean::SceneDescription::SDLNode Class Referenceabstract

This class implements the base class for all scene description nodes. More...

Inheritance diagram for Ocean::SceneDescription::SDLNode:

Public Member Functions

DescriptionType descriptionType () const override
 Returns the scene description type of this node. More...
 
virtual Rendering::ObjectRef apply (const Rendering::EngineRef &engine, const SDLScene &scene, SDLNode &parentDescription, const Rendering::ObjectRef &parentRendering)=0
 Applies this node to the rendering engine. 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 Fieldfield (const std::string &fieldName) const
 Returns the field base of a specified (standard) field. More...
 
Fieldfield (const std::string &fieldName)
 Returns the field base of a specified (standard) field. More...
 
virtual const FieldanyField (const std::string &fieldName) const
 Returns the field base of a specified standard or dynamic field. More...
 
virtual FieldanyField (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...
 
virtual void setName (const std::string &name)
 Sets the name of this node. 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...
 

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...
 
- Protected Types inherited from Ocean::SceneDescription::Node
typedef std::map< std::string, Field * > FieldMap
 Definition of a map mapping field names to fields. 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...
 
Nodeoperator= (const Node &node)=delete
 Disabled copy operator. More...
 
- Static Protected Member Functions inherited from Ocean::SceneDescription::Node
static LocknodeIdCounterLock ()
 Returns the lock for the node id counter. More...
 
- Protected Attributes inherited from Ocean::SceneDescription::Node
NodeId nodeId_
 Unique node id. More...
 
std::string name_
 Node name. More...
 
NodeSpecificationspecification_ = nullptr
 Pointer to the node specification, guaranteed to exist as long as the node exist. More...
 
- Static Protected Attributes inherited from Ocean::SceneDescription::Node
static NodeId nodeIdCounter_
 Unique node id counter. More...
 

Detailed Description

This class implements the base class for all scene description nodes.

Member Function Documentation

◆ apply()

virtual Rendering::ObjectRef Ocean::SceneDescription::SDLNode::apply ( const Rendering::EngineRef engine,
const SDLScene scene,
SDLNode parentDescription,
const Rendering::ObjectRef parentRendering 
)
pure virtual

Applies this node to the rendering engine.

Parameters
engineRendering engine to apply to
sceneScene object holding all nodes
parentDescriptionParent scene description node
parentRenderingParent rendering node
Returns
Resulting rendering object

Implemented in Ocean::SceneDescription::SDLScene.

◆ descriptionType()

DescriptionType Ocean::SceneDescription::SDLNode::descriptionType ( ) const
overridevirtual

Returns the scene description type of this node.

See also
Node::descriptionType().

Implements Ocean::SceneDescription::Node.


The documentation for this class was generated from the following file: