8 #ifndef META_OCEAN_RENDERING_OBJECT_H
9 #define META_OCEAN_RENDERING_OBJECT_H
181 TYPE_WINDOW_FRAMEBUFFER
201 inline const std::string& name()
const;
207 virtual void setName(
const std::string& name);
275 inline void registerParent(
const ObjectId parentId);
281 inline void unregisterParent(
const ObjectId parentId);
333 ++
objectParents.insert(std::make_pair(parentId, 0)).first->second;
343 ocean_assert(i->second != 0);
345 if (--i->second == 0)
359 stream <<
object.descriptiveInformation();
371 template <
bool tActive>
374 return messageObject <<
object.descriptiveInformation();
384 template <
bool tActive>
387 return messageObject <<
object.descriptiveInformation();
This class implements a recursive lock object.
Definition: Lock.h:31
Messenger object, one object for each message.
Definition: Messenger.h:427
This class is the base class for all rendering engines like.
Definition: Engine.h:46
This class is the base class for all rendering objects.
Definition: Object.h:54
std::string objectName
Object name.
Definition: Object.h:313
ObjectIdMap objectParents
Object ids of parent objects.
Definition: Object.h:316
ObjectRefSet parentNodes() const
Returns all parent nodes.
virtual const std::string & engineName() const =0
Returns the name of the owner engine.
virtual std::string descriptiveInformation() const
Returns descriptive information about the object as string.
std::unordered_map< ObjectId, unsigned int > ObjectIdMap
Definition of a map holding object ids to reference counters.
Definition: Object.h:187
virtual ~Object()
Destructs an object.
static std::string translateObjectType(const ObjectType objectType)
Translates an object type to a readable string.
Object()
Creates a new object.
virtual void setName(const std::string &name)
Sets or changes the name of this object.
Lock objectLock
Lock for the object.
Definition: Object.h:305
void unregisterThisObjectAsParent(const ObjectRef &child)
Unregisters this object from a child as parent.
const std::string & name() const
Returns the name of this object.
Definition: Object.h:324
void unregisterParent(const ObjectId parentId)
Unregisters a parent node for this (child) node.
Definition: Object.h:336
ObjectType
Definition of different object type.
Definition: Object.h:63
@ TYPE_PRIMITIVE_ATTRIBUTE
PrimitiveAttribute type.
Definition: Object.h:127
@ TYPE_DIRECTIONAL_LIGHT
DirectionalLight type.
Definition: Object.h:89
@ TYPE_ATTRIBUTE
Attribute type.
Definition: Object.h:69
@ TYPE_ABSOLUTE_TRANSFORM
Absolute transform type.
Definition: Object.h:67
@ TYPE_MATERIAL
Material type.
Definition: Object.h:109
@ TYPE_FRAMEBUFFER
Framebuffer type.
Definition: Object.h:91
@ TYPE_OBJECT
Object type.
Definition: Object.h:113
@ TYPE_BLEND_ATTRIBUTE
BlendAttribute type.
Definition: Object.h:79
@ TYPE_BITMAP_FRAMEBUFFER
BitmapFramebuffer type.
Definition: Object.h:77
@ TYPE_FRAME_TEXTURE_2D
FrameTexture2D type.
Definition: Object.h:93
@ TYPE_SHADER_PROGRAM
ShaderProgram type.
Definition: Object.h:137
@ TYPE_UNDISTORTED_BACKGROUND
UndistortedBackground type.
Definition: Object.h:175
@ TYPE_SCENE
Scene type.
Definition: Object.h:135
@ TYPE_POINTS
Points type.
Definition: Object.h:123
@ TYPE_TEXTURES
Textures type.
Definition: Object.h:165
@ TYPE_UNKNOWN
Unknown type.
Definition: Object.h:65
@ TYPE_LINE_STRIPS
Line strips type.
Definition: Object.h:105
@ TYPE_TEXTURE_2D
Texture2D type.
Definition: Object.h:159
@ TYPE_LIGHT_SOURCE
LightSource type.
Definition: Object.h:101
@ TYPE_SKY_BACKGROUND
SkyBackground type.
Definition: Object.h:141
@ TYPE_QUAD_STRIPS
QuadStrips type.
Definition: Object.h:129
@ TYPE_POINT_LIGHT
PointLight type.
Definition: Object.h:121
@ TYPE_STEREO_ATTRIBUTE
StereoAttribute type.
Definition: Object.h:147
@ TYPE_RENDERABLE
Renderable type.
Definition: Object.h:133
@ TYPE_PRIMITIVE
Primitive type.
Definition: Object.h:125
@ TYPE_DEPTH_ATTRIBUTE
DepthAttribute type.
Definition: Object.h:87
@ TYPE_SPHERE
Sphere type.
Definition: Object.h:143
@ TYPE_LOD
LOD type.
Definition: Object.h:107
@ TYPE_LINES
Lines type.
Definition: Object.h:103
@ TYPE_MEDIA_TEXTURE_2D
MediaTexture2D type.
Definition: Object.h:161
@ TYPE_PARALLEL_VIEW
ParallelView type.
Definition: Object.h:115
@ TYPE_TRIANGLE_FANS
TriangleFans type.
Definition: Object.h:169
@ TYPE_STRIP_PRIMITIVE
StripPrimitive type.
Definition: Object.h:151
@ TYPE_CYLINDER
Cylinder type.
Definition: Object.h:85
@ TYPE_TEXTURE
Texture type.
Definition: Object.h:157
@ TYPE_PHANTOM_ATTRIBUTE
PhantomAttribute type.
Definition: Object.h:119
@ TYPE_SHAPE
Shape type.
Definition: Object.h:139
@ TYPE_GEOMETRY
Geometry type.
Definition: Object.h:95
@ TYPE_VIEW
View type.
Definition: Object.h:179
@ TYPE_TRIANGLES
Triangles type.
Definition: Object.h:171
@ TYPE_SWITCH
Switch type.
Definition: Object.h:153
@ TYPE_INDEPENDENT_PRIMITIVE
IndependentPrimitive type.
Definition: Object.h:99
@ TYPE_NODE
Node type.
Definition: Object.h:111
@ TYPE_BOX
Box type.
Definition: Object.h:81
@ TYPE_CONE
Cone type.
Definition: Object.h:83
@ TYPE_GROUP
Group type.
Definition: Object.h:97
@ TYPE_PERSPECTIVE_VIEW
PerspectiveView type.
Definition: Object.h:117
@ TYPE_STEREO_VIEW
StereoView type.
Definition: Object.h:149
@ TYPE_TRIANGLE_STRIPS
TriangleStrips type.
Definition: Object.h:173
@ TYPE_ATTRIBUTE_SET
AttributeSet type.
Definition: Object.h:71
@ TYPE_BACKGROUND
Background type.
Definition: Object.h:73
@ TYPE_BILLBOARD
Billboard type.
Definition: Object.h:75
@ TYPE_TEXT
Text type.
Definition: Object.h:155
@ TYPE_TEXTURE_FRAMEBUFFER
TextureFramebuffer type.
Definition: Object.h:163
@ TYPE_SPOT_LIGHT
SpotLight type.
Definition: Object.h:145
@ TYPE_QUADS
Quads type.
Definition: Object.h:131
@ TYPE_TRANSFORM
Transform type.
Definition: Object.h:167
@ TYPE_VERTEX_SET
VertexSet type.
Definition: Object.h:177
ObjectRefs parentObjects() const
Returns all parent objects.
ObjectId id() const
Returns the unique object id of this object.
Definition: Object.h:319
Object & operator=(const Object &object)=delete
Disabled copy operator.
Object(const Object &object)=delete
Disabled copy constructor.
Engine & engine() const
Returns the render engine which is owner of this object.
ObjectId objectId
Unique object id.
Definition: Object.h:310
void registerParent(const ObjectId parentId)
Registers a parent node for this (child) node.
Definition: Object.h:329
virtual ObjectType type() const
Returns the type of this object.
void registerThisObjectAsParent(const ObjectRef &child)
Registers this object at a child as parent object.
This class implements a scoped lock object for recursive lock objects.
Definition: Lock.h:135
std::ostream & operator<<(std::ostream &stream, const Object &object)
Write the descriptive information of an object to a stream.
Definition: Object.h:357
size_t ObjectId
Definition of a object id.
Definition: rendering/Rendering.h:59
std::set< ObjectRef > ObjectRefSet
Definition of a vector holding rendering object references.
Definition: Object.h:47
Ocean::ObjectRef< Object > ObjectRef
Definition of a rendering object reference with an internal reference counter.
Definition: Object.h:28
std::vector< ObjectRef > ObjectRefs
Definition of a vector holding rendering object references.
Definition: Object.h:41
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15