Ocean
|
This class is the base class for all rendering vertex sets. More...
Public Member Functions | |
virtual Normals | normals () const |
Returns the normals of this set. More... | |
virtual TextureCoordinates | textureCoordinates (const unsigned int layerIndex) const |
Returns the texture coordinates of this set. More... | |
virtual std::string | phantomTextureCoordinateSystem () const |
Returns the explicit reference coordinate system of the phantom object, if any. More... | |
virtual Vertices | vertices () const |
Returns the vertices of this set. More... | |
virtual RGBAColors | colors () const |
Returns the colors of this set. More... | |
virtual unsigned int | numberNormals () const |
Returns the number of normals of this set. More... | |
virtual unsigned int | numberTextureCoordinates (const unsigned int layerIndex) const |
Returns the number of texture coordinates of this set. More... | |
virtual unsigned int | numberVertices () const |
Returns the number of vertices of this set. More... | |
virtual unsigned int | numberColors () const |
Returns the number of colors of this set. More... | |
virtual void | setNormals (const Normals &normals) |
Sets the normals for this set. More... | |
virtual void | setNormals (const Vector3 *normals, const size_t size) |
Sets the normals for this set. More... | |
virtual void | setTextureCoordinates (const TextureCoordinates &textureCoordinates, const unsigned int layerIndex) |
Sets the texels for this set. More... | |
virtual void | setPhantomTextureCoordinates (const Vertices &textureCoordinates, const unsigned int layerIndex) |
Sets 3D texels for this set used for phantom objects. More... | |
virtual void | setPhantomTextureCoordinateSystem (const std::string &reference) |
Sets the explicit reference coordinate system of the phantom objects. More... | |
virtual void | setVertices (const Vertices &vertices) |
Sets the vertices for this set. More... | |
virtual void | setVertices (const Vector3 *vertices, const size_t size) |
Sets the vertices for this set. More... | |
virtual void | setColors (const RGBAColors &colors) |
Sets the colors for this set. More... | |
virtual void | set (const Vertices &vertices, const Normals &normals, const TextureCoordinates &textureCoordinates, const RGBAColors &colors) |
Sets several attributes concurrently. More... | |
ObjectType | type () const override |
Returns the type of this object. More... | |
Public Member Functions inherited from Ocean::Rendering::Object | |
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... | |
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... | |
Protected Member Functions | |
VertexSet () | |
Creates a new vertex set object. More... | |
~VertexSet () override | |
Destructs a vertex set object. More... | |
Protected Member Functions inherited from Ocean::Rendering::Object | |
Object () | |
Creates a new object. More... | |
Object (const Object &object)=delete | |
Disabled copy constructor. More... | |
virtual | ~Object () |
Destructs an object. More... | |
Engine & | engine () 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... | |
Object & | operator= (const Object &object)=delete |
Disabled copy operator. More... | |
This class is the base class for all rendering vertex sets.
A vertex set holds vertices, normals, texture coordinates and color values.
A vertex set must define vertices to be valid, normals, texture coordinates and color values are optional.
All elements of a vertex set are one by one mapping elements.
Meaning that e.g. the first vertex corresponds to the first normal or the first color value, the second to the second and so on.
However, a vertex set does not define the topology of a mesh.
Therefore, a vertex set has to be used in combination with primitive objects like e.g. triangles or triangle strips objects.
A vertex set can be used in combination with different primitive objects.
Beware: Once e.g. normals are defined make sure that the number of defined normals is equal to or larger than the number of vertices.
|
protected |
Creates a new vertex set object.
|
overrideprotected |
Destructs a vertex set object.
|
virtual |
Returns the colors of this set.
NotSupportedException | Is thrown if this function is not supported |
Reimplemented in Ocean::Rendering::GlobalIllumination::GIVertexSet, and Ocean::Rendering::GLESceneGraph::GLESVertexSet.
|
virtual |
Returns the normals of this set.
NotSupportedException | Is thrown if this function is not supported |
Reimplemented in Ocean::Rendering::GlobalIllumination::GIVertexSet, and Ocean::Rendering::GLESceneGraph::GLESVertexSet.
|
virtual |
Returns the number of colors of this set.
NotSupportedException | Is thrown if this function is not supported |
Reimplemented in Ocean::Rendering::GlobalIllumination::GIVertexSet, and Ocean::Rendering::GLESceneGraph::GLESVertexSet.
|
virtual |
Returns the number of normals of this set.
NotSupportedException | Is thrown if this function is not supported |
Reimplemented in Ocean::Rendering::GlobalIllumination::GIVertexSet, and Ocean::Rendering::GLESceneGraph::GLESVertexSet.
|
virtual |
Returns the number of texture coordinates of this set.
layerIndex | Index of the texture layer to receive the coordinate number for |
NotSupportedException | Is thrown if this function is not supported |
Reimplemented in Ocean::Rendering::GlobalIllumination::GIVertexSet, and Ocean::Rendering::GLESceneGraph::GLESVertexSet.
|
virtual |
Returns the number of vertices of this set.
NotSupportedException | Is thrown if this function is not supported |
Reimplemented in Ocean::Rendering::GlobalIllumination::GIVertexSet, and Ocean::Rendering::GLESceneGraph::GLESVertexSet.
|
virtual |
Returns the explicit reference coordinate system of the phantom object, if any.
Reimplemented in Ocean::Rendering::GLESceneGraph::GLESVertexSet.
|
virtual |
Sets several attributes concurrently.
vertices | New vertices to set |
normals | New normals to set |
textureCoordinates | New texture coordinates for the first texture layer to set |
colors | New colors to set |
NotSupportedException | Is thrown if this function is not supported |
Reimplemented in Ocean::Rendering::GlobalIllumination::GIVertexSet, and Ocean::Rendering::GLESceneGraph::GLESVertexSet.
|
virtual |
Sets the colors for this set.
colors | New colors to set |
NotSupportedException | Is thrown if this function is not supported |
Reimplemented in Ocean::Rendering::GlobalIllumination::GIVertexSet, and Ocean::Rendering::GLESceneGraph::GLESVertexSet.
|
virtual |
Sets the normals for this set.
normals | New normals to set |
NotSupportedException | Is thrown if this function is not supported |
Reimplemented in Ocean::Rendering::GlobalIllumination::GIVertexSet, and Ocean::Rendering::GLESceneGraph::GLESVertexSet.
|
virtual |
Sets the normals for this set.
normals | New normals to set, nullptr to reset previously set normals |
size | The number of normals to set, with range [0, infinity) |
NotSupportedException | Is thrown if this function is not supported |
Reimplemented in Ocean::Rendering::GLESceneGraph::GLESVertexSet.
|
virtual |
Sets 3D texels for this set used for phantom objects.
textureCoordinates | New 3D texture coordinate to set |
layerIndex | Index of the 3D phantom texture layer to set the coordinates for |
NotSupportedException | Is thrown if this function is not supported |
Reimplemented in Ocean::Rendering::GLESceneGraph::GLESVertexSet.
|
virtual |
Sets the explicit reference coordinate system of the phantom objects.
reference | The reference coordinate system to be used for the phantom texture coordinates |
NotSupportedException | Is thrown if this function is not supported |
Reimplemented in Ocean::Rendering::GLESceneGraph::GLESVertexSet.
|
virtual |
Sets the texels for this set.
textureCoordinates | New texture coordinates to set |
layerIndex | Index of the texture layer to set the coordinates for |
NotSupportedException | Is thrown if this function is not supported |
Reimplemented in Ocean::Rendering::GlobalIllumination::GIVertexSet, and Ocean::Rendering::GLESceneGraph::GLESVertexSet.
|
virtual |
Sets the vertices for this set.
vertices | New vertices to set, nullptr to reset previously set vertices |
size | The number of vertices to set, with range [0, infinity) |
NotSupportedException | Is thrown if this function is not supported |
Reimplemented in Ocean::Rendering::GLESceneGraph::GLESVertexSet.
|
virtual |
Sets the vertices for this set.
vertices | New vertices to set |
NotSupportedException | Is thrown if this function is not supported |
Reimplemented in Ocean::Rendering::GlobalIllumination::GIVertexSet, and Ocean::Rendering::GLESceneGraph::GLESVertexSet.
|
virtual |
Returns the texture coordinates of this set.
layerIndex | Index of the texture layer to receive the coordinates for |
NotSupportedException | Is thrown if this function is not supported |
Reimplemented in Ocean::Rendering::GlobalIllumination::GIVertexSet, and Ocean::Rendering::GLESceneGraph::GLESVertexSet.
|
overridevirtual |
Returns the type of this object.
Reimplemented from Ocean::Rendering::Object.
|
virtual |
Returns the vertices of this set.
NotSupportedException | Is thrown if this function is not supported |
Reimplemented in Ocean::Rendering::GlobalIllumination::GIVertexSet, and Ocean::Rendering::GLESceneGraph::GLESVertexSet.