Ocean
Ocean::Rendering::VertexSet Class Reference

This class is the base class for all rendering vertex sets. More...

Inheritance diagram for Ocean::Rendering::VertexSet:

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...
 
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...
 

Additional Inherited Members

- Public Types inherited from Ocean::Rendering::Object
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...
 
- Static Public Member Functions inherited from Ocean::Rendering::Object
static std::string translateObjectType (const ObjectType objectType)
 Translates an object type to a readable string. More...
 
- Protected Attributes inherited from Ocean::Rendering::Object
Lock objectLock
 Lock for the object. More...
 

Detailed Description

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.

See also
Triangles, TriangleFans, TriangleStrips, Quads, QuadStrips, Vertices, Normals, TextureCoordinates, RGBAColors.

Constructor & Destructor Documentation

◆ VertexSet()

Ocean::Rendering::VertexSet::VertexSet ( )
protected

Creates a new vertex set object.

◆ ~VertexSet()

Ocean::Rendering::VertexSet::~VertexSet ( )
overrideprotected

Destructs a vertex set object.

Member Function Documentation

◆ colors()

virtual RGBAColors Ocean::Rendering::VertexSet::colors ( ) const
virtual

Returns the colors of this set.

Returns
Colors
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIVertexSet, and Ocean::Rendering::GLESceneGraph::GLESVertexSet.

◆ normals()

virtual Normals Ocean::Rendering::VertexSet::normals ( ) const
virtual

Returns the normals of this set.

Returns
Normals
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIVertexSet, and Ocean::Rendering::GLESceneGraph::GLESVertexSet.

◆ numberColors()

virtual unsigned int Ocean::Rendering::VertexSet::numberColors ( ) const
virtual

Returns the number of colors of this set.

Returns
Number of colors
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIVertexSet, and Ocean::Rendering::GLESceneGraph::GLESVertexSet.

◆ numberNormals()

virtual unsigned int Ocean::Rendering::VertexSet::numberNormals ( ) const
virtual

Returns the number of normals of this set.

Returns
Number of normals
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIVertexSet, and Ocean::Rendering::GLESceneGraph::GLESVertexSet.

◆ numberTextureCoordinates()

virtual unsigned int Ocean::Rendering::VertexSet::numberTextureCoordinates ( const unsigned int  layerIndex) const
virtual

Returns the number of texture coordinates of this set.

Parameters
layerIndexIndex of the texture layer to receive the coordinate number for
Returns
Number of texture coordinates
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIVertexSet, and Ocean::Rendering::GLESceneGraph::GLESVertexSet.

◆ numberVertices()

virtual unsigned int Ocean::Rendering::VertexSet::numberVertices ( ) const
virtual

Returns the number of vertices of this set.

Returns
Number of vertices
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIVertexSet, and Ocean::Rendering::GLESceneGraph::GLESVertexSet.

◆ phantomTextureCoordinateSystem()

virtual std::string Ocean::Rendering::VertexSet::phantomTextureCoordinateSystem ( ) const
virtual

Returns the explicit reference coordinate system of the phantom object, if any.

Returns
The name of the reference coordinate system

Reimplemented in Ocean::Rendering::GLESceneGraph::GLESVertexSet.

◆ set()

virtual void Ocean::Rendering::VertexSet::set ( const Vertices vertices,
const Normals normals,
const TextureCoordinates textureCoordinates,
const RGBAColors colors 
)
virtual

Sets several attributes concurrently.

Parameters
verticesNew vertices to set
normalsNew normals to set
textureCoordinatesNew texture coordinates for the first texture layer to set
colorsNew colors to set
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIVertexSet, and Ocean::Rendering::GLESceneGraph::GLESVertexSet.

◆ setColors()

virtual void Ocean::Rendering::VertexSet::setColors ( const RGBAColors colors)
virtual

Sets the colors for this set.

Parameters
colorsNew colors to set
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIVertexSet, and Ocean::Rendering::GLESceneGraph::GLESVertexSet.

◆ setNormals() [1/2]

virtual void Ocean::Rendering::VertexSet::setNormals ( const Normals normals)
virtual

Sets the normals for this set.

Parameters
normalsNew normals to set
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIVertexSet, and Ocean::Rendering::GLESceneGraph::GLESVertexSet.

◆ setNormals() [2/2]

virtual void Ocean::Rendering::VertexSet::setNormals ( const Vector3 normals,
const size_t  size 
)
virtual

Sets the normals for this set.

Parameters
normalsNew normals to set, nullptr to reset previously set normals
sizeThe number of normals to set, with range [0, infinity)
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GLESceneGraph::GLESVertexSet.

◆ setPhantomTextureCoordinates()

virtual void Ocean::Rendering::VertexSet::setPhantomTextureCoordinates ( const Vertices textureCoordinates,
const unsigned int  layerIndex 
)
virtual

Sets 3D texels for this set used for phantom objects.

Parameters
textureCoordinatesNew 3D texture coordinate to set
layerIndexIndex of the 3D phantom texture layer to set the coordinates for
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GLESceneGraph::GLESVertexSet.

◆ setPhantomTextureCoordinateSystem()

virtual void Ocean::Rendering::VertexSet::setPhantomTextureCoordinateSystem ( const std::string &  reference)
virtual

Sets the explicit reference coordinate system of the phantom objects.

Parameters
referenceThe reference coordinate system to be used for the phantom texture coordinates
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GLESceneGraph::GLESVertexSet.

◆ setTextureCoordinates()

virtual void Ocean::Rendering::VertexSet::setTextureCoordinates ( const TextureCoordinates textureCoordinates,
const unsigned int  layerIndex 
)
virtual

Sets the texels for this set.

Parameters
textureCoordinatesNew texture coordinates to set
layerIndexIndex of the texture layer to set the coordinates for
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIVertexSet, and Ocean::Rendering::GLESceneGraph::GLESVertexSet.

◆ setVertices() [1/2]

virtual void Ocean::Rendering::VertexSet::setVertices ( const Vector3 vertices,
const size_t  size 
)
virtual

Sets the vertices for this set.

Parameters
verticesNew vertices to set, nullptr to reset previously set vertices
sizeThe number of vertices to set, with range [0, infinity)
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GLESceneGraph::GLESVertexSet.

◆ setVertices() [2/2]

virtual void Ocean::Rendering::VertexSet::setVertices ( const Vertices vertices)
virtual

Sets the vertices for this set.

Parameters
verticesNew vertices to set
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIVertexSet, and Ocean::Rendering::GLESceneGraph::GLESVertexSet.

◆ textureCoordinates()

virtual TextureCoordinates Ocean::Rendering::VertexSet::textureCoordinates ( const unsigned int  layerIndex) const
virtual

Returns the texture coordinates of this set.

Parameters
layerIndexIndex of the texture layer to receive the coordinates for
Returns
Texture coordinates
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIVertexSet, and Ocean::Rendering::GLESceneGraph::GLESVertexSet.

◆ type()

ObjectType Ocean::Rendering::VertexSet::type ( ) const
overridevirtual

Returns the type of this object.

See also
Object::type().

Reimplemented from Ocean::Rendering::Object.

◆ vertices()

virtual Vertices Ocean::Rendering::VertexSet::vertices ( ) const
virtual

Returns the vertices of this set.

Returns
Vertices
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIVertexSet, and Ocean::Rendering::GLESceneGraph::GLESVertexSet.


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