Ocean
Ocean::Rendering::Object Class Referenceabstract

This class is the base class for all rendering objects. More...

Inheritance diagram for Ocean::Rendering::Object:

Public Types

enum  ObjectType {
  TYPE_UNKNOWN , TYPE_ABSOLUTE_TRANSFORM , TYPE_ATTRIBUTE , TYPE_ATTRIBUTE_SET ,
  TYPE_BACKGROUND , TYPE_BILLBOARD , TYPE_BITMAP_FRAMEBUFFER , TYPE_BLEND_ATTRIBUTE ,
  TYPE_BOX , TYPE_CONE , TYPE_CYLINDER , TYPE_DEPTH_ATTRIBUTE ,
  TYPE_DIRECTIONAL_LIGHT , TYPE_FRAMEBUFFER , TYPE_FRAME_TEXTURE_2D , TYPE_GEOMETRY ,
  TYPE_GROUP , TYPE_INDEPENDENT_PRIMITIVE , TYPE_LIGHT_SOURCE , TYPE_LINES ,
  TYPE_LINE_STRIPS , TYPE_LOD , TYPE_MATERIAL , TYPE_NODE ,
  TYPE_OBJECT , TYPE_PARALLEL_VIEW , TYPE_PERSPECTIVE_VIEW , TYPE_PHANTOM_ATTRIBUTE ,
  TYPE_POINT_LIGHT , TYPE_POINTS , TYPE_PRIMITIVE , TYPE_PRIMITIVE_ATTRIBUTE ,
  TYPE_QUAD_STRIPS , TYPE_QUADS , TYPE_RENDERABLE , TYPE_SCENE ,
  TYPE_SHADER_PROGRAM , TYPE_SHAPE , TYPE_SKY_BACKGROUND , TYPE_SPHERE ,
  TYPE_SPOT_LIGHT , TYPE_STEREO_ATTRIBUTE , TYPE_STEREO_VIEW , TYPE_STRIP_PRIMITIVE ,
  TYPE_SWITCH , TYPE_TEXT , TYPE_TEXTURE , TYPE_TEXTURE_2D ,
  TYPE_MEDIA_TEXTURE_2D , TYPE_TEXTURE_FRAMEBUFFER , TYPE_TEXTURES , TYPE_TRANSFORM ,
  TYPE_TRIANGLE_FANS , TYPE_TRIANGLES , TYPE_TRIANGLE_STRIPS , TYPE_UNDISTORTED_BACKGROUND ,
  TYPE_VERTEX_SET , TYPE_VIEW , TYPE_WINDOW_FRAMEBUFFER
}
 Definition of different object type. More...
 
typedef std::unordered_map< ObjectId, unsigned int > ObjectIdMap
 Definition of a map holding object ids to reference counters. More...
 

Public Member Functions

ObjectId id () const
 Returns the unique object id of this object. More...
 
const std::string & name () const
 Returns the name of this object. More...
 
virtual void setName (const std::string &name)
 Sets or changes the name of this object. More...
 
virtual const std::string & engineName () const =0
 Returns the name of the owner engine. More...
 
virtual ObjectType type () const
 Returns the type of this object. More...
 
ObjectRefs parentObjects () const
 Returns all parent objects. More...
 
ObjectRefSet parentNodes () const
 Returns all parent nodes. More...
 
virtual std::string descriptiveInformation () const
 Returns descriptive information about the object as string. More...
 

Static Public Member Functions

static std::string translateObjectType (const ObjectType objectType)
 Translates an object type to a readable string. More...
 

Protected Member Functions

 Object ()
 Creates a new object. More...
 
 Object (const Object &object)=delete
 Disabled copy constructor. More...
 
virtual ~Object ()
 Destructs an object. More...
 
Engineengine () const
 Returns the render engine which is owner of this object. More...
 
void registerParent (const ObjectId parentId)
 Registers a parent node for this (child) node. More...
 
void unregisterParent (const ObjectId parentId)
 Unregisters a parent node for this (child) node. More...
 
void registerThisObjectAsParent (const ObjectRef &child)
 Registers this object at a child as parent object. More...
 
void unregisterThisObjectAsParent (const ObjectRef &child)
 Unregisters this object from a child as parent. More...
 
Objectoperator= (const Object &object)=delete
 Disabled copy operator. More...
 

Protected Attributes

Lock objectLock
 Lock for the object. More...
 

Private Attributes

ObjectId objectId
 Unique object id. More...
 
std::string objectName
 Object name. More...
 
ObjectIdMap objectParents
 Object ids of parent objects. More...
 

Friends

class Ocean::ObjectRef< Object >
 

Detailed Description

This class is the base class for all rendering objects.

Member Typedef Documentation

◆ ObjectIdMap

typedef std::unordered_map<ObjectId, unsigned int> Ocean::Rendering::Object::ObjectIdMap

Definition of a map holding object ids to reference counters.

Member Enumeration Documentation

◆ ObjectType

Definition of different object type.

Enumerator
TYPE_UNKNOWN 

Unknown type.

TYPE_ABSOLUTE_TRANSFORM 

Absolute transform type.

TYPE_ATTRIBUTE 

Attribute type.

TYPE_ATTRIBUTE_SET 

AttributeSet type.

TYPE_BACKGROUND 

Background type.

TYPE_BILLBOARD 

Billboard type.

TYPE_BITMAP_FRAMEBUFFER 

BitmapFramebuffer type.

TYPE_BLEND_ATTRIBUTE 

BlendAttribute type.

TYPE_BOX 

Box type.

TYPE_CONE 

Cone type.

TYPE_CYLINDER 

Cylinder type.

TYPE_DEPTH_ATTRIBUTE 

DepthAttribute type.

TYPE_DIRECTIONAL_LIGHT 

DirectionalLight type.

TYPE_FRAMEBUFFER 

Framebuffer type.

TYPE_FRAME_TEXTURE_2D 

FrameTexture2D type.

TYPE_GEOMETRY 

Geometry type.

TYPE_GROUP 

Group type.

TYPE_INDEPENDENT_PRIMITIVE 

IndependentPrimitive type.

TYPE_LIGHT_SOURCE 

LightSource type.

TYPE_LINES 

Lines type.

TYPE_LINE_STRIPS 

Line strips type.

TYPE_LOD 

LOD type.

TYPE_MATERIAL 

Material type.

TYPE_NODE 

Node type.

TYPE_OBJECT 

Object type.

TYPE_PARALLEL_VIEW 

ParallelView type.

TYPE_PERSPECTIVE_VIEW 

PerspectiveView type.

TYPE_PHANTOM_ATTRIBUTE 

PhantomAttribute type.

TYPE_POINT_LIGHT 

PointLight type.

TYPE_POINTS 

Points type.

TYPE_PRIMITIVE 

Primitive type.

TYPE_PRIMITIVE_ATTRIBUTE 

PrimitiveAttribute type.

TYPE_QUAD_STRIPS 

QuadStrips type.

TYPE_QUADS 

Quads type.

TYPE_RENDERABLE 

Renderable type.

TYPE_SCENE 

Scene type.

TYPE_SHADER_PROGRAM 

ShaderProgram type.

TYPE_SHAPE 

Shape type.

TYPE_SKY_BACKGROUND 

SkyBackground type.

TYPE_SPHERE 

Sphere type.

TYPE_SPOT_LIGHT 

SpotLight type.

TYPE_STEREO_ATTRIBUTE 

StereoAttribute type.

TYPE_STEREO_VIEW 

StereoView type.

TYPE_STRIP_PRIMITIVE 

StripPrimitive type.

TYPE_SWITCH 

Switch type.

TYPE_TEXT 

Text type.

TYPE_TEXTURE 

Texture type.

TYPE_TEXTURE_2D 

Texture2D type.

TYPE_MEDIA_TEXTURE_2D 

MediaTexture2D type.

TYPE_TEXTURE_FRAMEBUFFER 

TextureFramebuffer type.

TYPE_TEXTURES 

Textures type.

TYPE_TRANSFORM 

Transform type.

TYPE_TRIANGLE_FANS 

TriangleFans type.

TYPE_TRIANGLES 

Triangles type.

TYPE_TRIANGLE_STRIPS 

TriangleStrips type.

TYPE_UNDISTORTED_BACKGROUND 

UndistortedBackground type.

TYPE_VERTEX_SET 

VertexSet type.

TYPE_VIEW 

View type.

TYPE_WINDOW_FRAMEBUFFER 

WindowFramebuffer type.

Constructor & Destructor Documentation

◆ Object() [1/2]

Ocean::Rendering::Object::Object ( )
protected

Creates a new object.

◆ Object() [2/2]

Ocean::Rendering::Object::Object ( const Object object)
protecteddelete

Disabled copy constructor.

Parameters
objectObject which would be copied

◆ ~Object()

virtual Ocean::Rendering::Object::~Object ( )
protectedvirtual

Destructs an object.

Member Function Documentation

◆ descriptiveInformation()

virtual std::string Ocean::Rendering::Object::descriptiveInformation ( ) const
virtual

Returns descriptive information about the object as string.

The descriptive information can be used during debugging.

Returns
The object's descriptive information, if any

Reimplemented in Ocean::Rendering::GLESceneGraph::GLESText, and Ocean::Rendering::GLESceneGraph::GLESMediaTexture2D.

◆ engine()

Engine& Ocean::Rendering::Object::engine ( ) const
protected

Returns the render engine which is owner of this object.

Returns
Rendering engine

◆ engineName()

virtual const std::string& Ocean::Rendering::Object::engineName ( ) const
pure virtual

Returns the name of the owner engine.

Returns
Owner engine

Implemented in Ocean::Rendering::GlobalIllumination::GIObject, and Ocean::Rendering::GLESceneGraph::GLESObject.

◆ id()

ObjectId Ocean::Rendering::Object::id ( ) const
inline

Returns the unique object id of this object.

Returns
Unique object id

◆ name()

const std::string & Ocean::Rendering::Object::name ( ) const
inline

Returns the name of this object.

Returns
Object name

◆ operator=()

Object& Ocean::Rendering::Object::operator= ( const Object object)
protecteddelete

Disabled copy operator.

Parameters
objectObject which would be copied
Returns
Reference to this object

◆ parentNodes()

ObjectRefSet Ocean::Rendering::Object::parentNodes ( ) const

Returns all parent nodes.

Returns
Set holding all parent nodes

◆ parentObjects()

ObjectRefs Ocean::Rendering::Object::parentObjects ( ) const

Returns all parent objects.

Returns
Vector holding all parent objects

◆ registerParent()

void Ocean::Rendering::Object::registerParent ( const ObjectId  parentId)
inlineprotected

Registers a parent node for this (child) node.

Parameters
parentIdId of the parent node to register

◆ registerThisObjectAsParent()

void Ocean::Rendering::Object::registerThisObjectAsParent ( const ObjectRef child)
protected

Registers this object at a child as parent object.

Parameters
childNew child object for this object

◆ setName()

virtual void Ocean::Rendering::Object::setName ( const std::string &  name)
virtual

Sets or changes the name of this object.

Parameters
nameNew object name

◆ translateObjectType()

static std::string Ocean::Rendering::Object::translateObjectType ( const ObjectType  objectType)
static

Translates an object type to a readable string.

Parameters
objectTypeThe object type to translate
Returns
The resulting readable string of the object type

◆ type()

virtual ObjectType Ocean::Rendering::Object::type ( ) const
virtual

Returns the type of this object.

Returns
Object type

Reimplemented in Ocean::Rendering::WindowFramebuffer, Ocean::Rendering::View, Ocean::Rendering::VertexSet, Ocean::Rendering::UndistortedBackground, Ocean::Rendering::TriangleStrips, Ocean::Rendering::Triangles, Ocean::Rendering::TriangleFans, Ocean::Rendering::Transform, Ocean::Rendering::Textures, Ocean::Rendering::TextureFramebuffer, Ocean::Rendering::Texture2D, Ocean::Rendering::Texture, Ocean::Rendering::Text, Ocean::Rendering::Switch, Ocean::Rendering::StripPrimitive, Ocean::Rendering::StereoView, Ocean::Rendering::StereoAttribute, Ocean::Rendering::SpotLight, Ocean::Rendering::Sphere, Ocean::Rendering::SkyBackground, Ocean::Rendering::Shape, Ocean::Rendering::ShaderProgram, Ocean::Rendering::Scene, Ocean::Rendering::Renderable, Ocean::Rendering::QuadStrips, Ocean::Rendering::Quads, Ocean::Rendering::PrimitiveAttribute, Ocean::Rendering::Primitive, Ocean::Rendering::Points, Ocean::Rendering::PointLight, Ocean::Rendering::PhantomAttribute, Ocean::Rendering::PerspectiveView, Ocean::Rendering::ParallelView, Ocean::Rendering::Node, Ocean::Rendering::MediaTexture2D, Ocean::Rendering::Material, Ocean::Rendering::LOD, Ocean::Rendering::LineStrips, Ocean::Rendering::Lines, Ocean::Rendering::LightSource, Ocean::Rendering::IndependentPrimitive, Ocean::Rendering::Group, Ocean::Rendering::GlobalIllumination::GISphere, Ocean::Rendering::GlobalIllumination::GICylinder, Ocean::Rendering::GlobalIllumination::GICone, Ocean::Rendering::GlobalIllumination::GIBox, Ocean::Rendering::GLESceneGraph::GLESText, Ocean::Rendering::GLESceneGraph::GLESSphere, Ocean::Rendering::GLESceneGraph::GLESCylinder, Ocean::Rendering::GLESceneGraph::GLESCone, Ocean::Rendering::GLESceneGraph::GLESBox, Ocean::Rendering::Geometry, Ocean::Rendering::FrameTexture2D, Ocean::Rendering::Framebuffer, Ocean::Rendering::DirectionalLight, Ocean::Rendering::DepthAttribute, Ocean::Rendering::Cylinder, Ocean::Rendering::Cone, Ocean::Rendering::Box, Ocean::Rendering::BlendAttribute, Ocean::Rendering::BitmapFramebuffer, Ocean::Rendering::Billboard, Ocean::Rendering::Background, Ocean::Rendering::AttributeSet, Ocean::Rendering::Attribute, and Ocean::Rendering::AbsoluteTransform.

◆ unregisterParent()

void Ocean::Rendering::Object::unregisterParent ( const ObjectId  parentId)
inlineprotected

Unregisters a parent node for this (child) node.

Parameters
parentIdId of the parent node to unregister

◆ unregisterThisObjectAsParent()

void Ocean::Rendering::Object::unregisterThisObjectAsParent ( const ObjectRef child)
protected

Unregisters this object from a child as parent.

Parameters
childChild object to unregister

Friends And Related Function Documentation

◆ Ocean::ObjectRef< Object >

friend class Ocean::ObjectRef< Object >
friend

Field Documentation

◆ objectId

ObjectId Ocean::Rendering::Object::objectId
private

Unique object id.

◆ objectLock

Lock Ocean::Rendering::Object::objectLock
mutableprotected

Lock for the object.

◆ objectName

std::string Ocean::Rendering::Object::objectName
private

Object name.

◆ objectParents

ObjectIdMap Ocean::Rendering::Object::objectParents
private

Object ids of parent objects.


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