Ocean
Ocean::Rendering::Factory Class Reference

This class implements a node and object factory. More...

Inheritance diagram for Ocean::Rendering::Factory:

Public Member Functions

virtual ~Factory ()
 Destructor. More...
 
virtual ObjectRef createAbsoluteTransform () const
 Creates a new absolute transform. More...
 
virtual ObjectRef createAttributeSet () const
 Creates a new attribute set object. More...
 
virtual NodeRef createBillboard () const
 Creates a new billboard object. More...
 
virtual ObjectRef createBlendAttribute () const
 Creates a new blend attribute object. More...
 
virtual ObjectRef createBox () const
 Creates a new box object. More...
 
virtual ObjectRef createCone () const
 Creates a new cone object. More...
 
virtual ObjectRef createCylinder () const
 Creates a new cylinder object. More...
 
virtual ObjectRef createDepthAttribute () const
 Creates a new depth attribute object. More...
 
virtual ObjectRef createDirectionalLight () const
 Creates a new directional light object. More...
 
virtual ObjectRef createFrameTexture2D () const
 Creates a new frame texture object. More...
 
virtual NodeRef createGeometry () const
 Creates a new geometry object. More...
 
virtual NodeRef createGroup () const
 Creates a new group object. More...
 
virtual ObjectRef createLines () const
 Creates a new lines object. More...
 
virtual ObjectRef createLineStrips () const
 Creates a new line strips object. More...
 
virtual NodeRef createLOD () const
 Creates a new LOD object. More...
 
virtual ObjectRef createMaterial () const
 Creates a new material object. More...
 
virtual ObjectRef createMediaTexture2D () const
 Creates a new media texture object. More...
 
virtual ObjectRef createParallelView () const
 Creates a new parallel view object. More...
 
virtual ObjectRef createPerspectiveView () const
 Creates a new perspective view object. More...
 
virtual ObjectRef createPhantomAttribute () const
 Creates a new phantom attribute object. More...
 
virtual ObjectRef createPointLight () const
 Creates a new point light object. More...
 
virtual ObjectRef createPoints () const
 Creates a new points object. More...
 
virtual ObjectRef createPrimitiveAttribute () const
 Creates a new primitive attribute object. More...
 
virtual ObjectRef createQuads () const
 Creates a new quads object. More...
 
virtual ObjectRef createQuadStrips () const
 Creates a new quad strips object. More...
 
virtual NodeRef createScene () const
 Creates a new scene object. More...
 
virtual ObjectRef createShaderProgram () const
 Creates a new shader program object. More...
 
virtual NodeRef createSkyBackground () const
 Creates a new sky background object. More...
 
virtual ObjectRef createSphere () const
 Creates a new sphere object. More...
 
virtual ObjectRef createSpotLight () const
 Creates a new spot light object. More...
 
virtual ObjectRef createStereoAttribute () const
 Creates a new stereo attribute object. More...
 
virtual ObjectRef createStereoView () const
 Creates a new stereo view object. More...
 
virtual NodeRef createSwitch () const
 Creates a new switch object. More...
 
virtual ObjectRef createText () const
 Creates a new text object. More...
 
virtual ObjectRef createTextureFramebuffer () const
 Creates a new texture framebuffer object. More...
 
virtual ObjectRef createTextures () const
 Creates a new texture attribute object. More...
 
virtual NodeRef createTransform () const
 Creates a new transform object. More...
 
virtual ObjectRef createTriangles () const
 Creates a new triangles object. More...
 
virtual ObjectRef createTriangleFans () const
 Creates a new triangle fans object. More...
 
virtual ObjectRef createTriangleStrips () const
 Creates a new triangle strips object. More...
 
virtual NodeRef createUndistortedBackground () const
 Creates a new undistorted background node. More...
 
virtual ObjectRef createVertexSet () const
 Creates a new vertex set object. More...
 
virtual ObjectRef createObject (const std::string &type) const
 Creates a new object specified by the object type name. More...
 

Protected Member Functions

 Factory ()
 Protected default constructor creating a new Factory. More...
 
 Factory (const Factory &factory)=delete
 Disabled copy constructor. More...
 
ObjectRef createReference (Object *object) const
 Creates a new object reference by a given object. More...
 
Factoryoperator= (const Factory &factory)=delete
 Disabled copy operator. More...
 

Detailed Description

This class implements a node and object factory.


A factory instance can be received from the associated engine instance.
However, there is no guarantee that all objects are supported for a specific render engine.
Therefore, all factory functions will throw an exception if the selected object is not supported.

See also
Engine, NotSupportedException

Constructor & Destructor Documentation

◆ ~Factory()

Ocean::Rendering::Factory::~Factory ( )
inlinevirtual

Destructor.

◆ Factory() [1/2]

Ocean::Rendering::Factory::Factory ( )
protected

Protected default constructor creating a new Factory.

◆ Factory() [2/2]

Ocean::Rendering::Factory::Factory ( const Factory factory)
protecteddelete

Disabled copy constructor.

Parameters
factoryObject which would be copied

Member Function Documentation

◆ createAbsoluteTransform()

virtual ObjectRef Ocean::Rendering::Factory::createAbsoluteTransform ( ) const
virtual

Creates a new absolute transform.

Returns
New absolute transform
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFactory, and Ocean::Rendering::GLESceneGraph::GLESFactory.

◆ createAttributeSet()

virtual ObjectRef Ocean::Rendering::Factory::createAttributeSet ( ) const
virtual

Creates a new attribute set object.

Returns
New attribute set
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFactory, and Ocean::Rendering::GLESceneGraph::GLESFactory.

◆ createBillboard()

virtual NodeRef Ocean::Rendering::Factory::createBillboard ( ) const
virtual

Creates a new billboard object.

Returns
New billboard
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFactory, and Ocean::Rendering::GLESceneGraph::GLESFactory.

◆ createBlendAttribute()

virtual ObjectRef Ocean::Rendering::Factory::createBlendAttribute ( ) const
virtual

Creates a new blend attribute object.

Returns
New blend attribute
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFactory, and Ocean::Rendering::GLESceneGraph::GLESFactory.

◆ createBox()

virtual ObjectRef Ocean::Rendering::Factory::createBox ( ) const
virtual

Creates a new box object.

Returns
New box
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFactory, and Ocean::Rendering::GLESceneGraph::GLESFactory.

◆ createCone()

virtual ObjectRef Ocean::Rendering::Factory::createCone ( ) const
virtual

Creates a new cone object.

Returns
New cone
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFactory, and Ocean::Rendering::GLESceneGraph::GLESFactory.

◆ createCylinder()

virtual ObjectRef Ocean::Rendering::Factory::createCylinder ( ) const
virtual

Creates a new cylinder object.

Returns
New cylinder
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFactory, and Ocean::Rendering::GLESceneGraph::GLESFactory.

◆ createDepthAttribute()

virtual ObjectRef Ocean::Rendering::Factory::createDepthAttribute ( ) const
virtual

Creates a new depth attribute object.

Returns
New depth attribute
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFactory, and Ocean::Rendering::GLESceneGraph::GLESFactory.

◆ createDirectionalLight()

virtual ObjectRef Ocean::Rendering::Factory::createDirectionalLight ( ) const
virtual

Creates a new directional light object.

Returns
New directional light
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFactory, and Ocean::Rendering::GLESceneGraph::GLESFactory.

◆ createFrameTexture2D()

virtual ObjectRef Ocean::Rendering::Factory::createFrameTexture2D ( ) const
virtual

Creates a new frame texture object.

Returns
New texture
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GLESceneGraph::GLESFactory.

◆ createGeometry()

virtual NodeRef Ocean::Rendering::Factory::createGeometry ( ) const
virtual

Creates a new geometry object.

Returns
New geometry
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFactory, and Ocean::Rendering::GLESceneGraph::GLESFactory.

◆ createGroup()

virtual NodeRef Ocean::Rendering::Factory::createGroup ( ) const
virtual

Creates a new group object.

Returns
New group
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFactory, and Ocean::Rendering::GLESceneGraph::GLESFactory.

◆ createLines()

virtual ObjectRef Ocean::Rendering::Factory::createLines ( ) const
virtual

Creates a new lines object.

Returns
New lines
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GLESceneGraph::GLESFactory.

◆ createLineStrips()

virtual ObjectRef Ocean::Rendering::Factory::createLineStrips ( ) const
virtual

Creates a new line strips object.

Returns
New line strips
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GLESceneGraph::GLESFactory.

◆ createLOD()

virtual NodeRef Ocean::Rendering::Factory::createLOD ( ) const
virtual

Creates a new LOD object.

Returns
new LOD
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFactory, and Ocean::Rendering::GLESceneGraph::GLESFactory.

◆ createMaterial()

virtual ObjectRef Ocean::Rendering::Factory::createMaterial ( ) const
virtual

Creates a new material object.

Returns
New material
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFactory, and Ocean::Rendering::GLESceneGraph::GLESFactory.

◆ createMediaTexture2D()

virtual ObjectRef Ocean::Rendering::Factory::createMediaTexture2D ( ) const
virtual

Creates a new media texture object.

Returns
New texture
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFactory, and Ocean::Rendering::GLESceneGraph::GLESFactory.

◆ createObject()

virtual ObjectRef Ocean::Rendering::Factory::createObject ( const std::string &  type) const
virtual

Creates a new object specified by the object type name.

This function may be overloaded if a rendering plugin supports more than the standard objects.

Parameters
typeThe type of the object to be created, must be valid
Returns
New rendering object if available, otherwise an empty object reference
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

◆ createParallelView()

virtual ObjectRef Ocean::Rendering::Factory::createParallelView ( ) const
virtual

Creates a new parallel view object.

Returns
New parallel view
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFactory.

◆ createPerspectiveView()

virtual ObjectRef Ocean::Rendering::Factory::createPerspectiveView ( ) const
virtual

Creates a new perspective view object.

Returns
New perspective view
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFactory, and Ocean::Rendering::GLESceneGraph::GLESFactory.

◆ createPhantomAttribute()

virtual ObjectRef Ocean::Rendering::Factory::createPhantomAttribute ( ) const
virtual

Creates a new phantom attribute object.

Returns
New phantom attribute
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFactory, and Ocean::Rendering::GLESceneGraph::GLESFactory.

◆ createPointLight()

virtual ObjectRef Ocean::Rendering::Factory::createPointLight ( ) const
virtual

Creates a new point light object.

Returns
New light
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFactory, and Ocean::Rendering::GLESceneGraph::GLESFactory.

◆ createPoints()

virtual ObjectRef Ocean::Rendering::Factory::createPoints ( ) const
virtual

Creates a new points object.

Returns
New points
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFactory, and Ocean::Rendering::GLESceneGraph::GLESFactory.

◆ createPrimitiveAttribute()

virtual ObjectRef Ocean::Rendering::Factory::createPrimitiveAttribute ( ) const
virtual

Creates a new primitive attribute object.

Returns
New attribute
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFactory, and Ocean::Rendering::GLESceneGraph::GLESFactory.

◆ createQuads()

virtual ObjectRef Ocean::Rendering::Factory::createQuads ( ) const
virtual

Creates a new quads object.

Returns
New quads
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFactory.

◆ createQuadStrips()

virtual ObjectRef Ocean::Rendering::Factory::createQuadStrips ( ) const
virtual

Creates a new quad strips object.

Returns
New quad strips
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFactory.

◆ createReference()

ObjectRef Ocean::Rendering::Factory::createReference ( Object object) const
inlineprotected

Creates a new object reference by a given object.

Parameters
objectThe object to create a object reference from, must be valid
Returns
Created object reference

◆ createScene()

virtual NodeRef Ocean::Rendering::Factory::createScene ( ) const
virtual

Creates a new scene object.

Returns
New scene
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFactory, and Ocean::Rendering::GLESceneGraph::GLESFactory.

◆ createShaderProgram()

virtual ObjectRef Ocean::Rendering::Factory::createShaderProgram ( ) const
virtual

Creates a new shader program object.

Returns
New shader program
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFactory, and Ocean::Rendering::GLESceneGraph::GLESFactory.

◆ createSkyBackground()

virtual NodeRef Ocean::Rendering::Factory::createSkyBackground ( ) const
virtual

Creates a new sky background object.

Returns
New sky background
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFactory.

◆ createSphere()

virtual ObjectRef Ocean::Rendering::Factory::createSphere ( ) const
virtual

Creates a new sphere object.

Returns
New sphere
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFactory, and Ocean::Rendering::GLESceneGraph::GLESFactory.

◆ createSpotLight()

virtual ObjectRef Ocean::Rendering::Factory::createSpotLight ( ) const
virtual

Creates a new spot light object.

Returns
New spot light
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFactory, and Ocean::Rendering::GLESceneGraph::GLESFactory.

◆ createStereoAttribute()

virtual ObjectRef Ocean::Rendering::Factory::createStereoAttribute ( ) const
virtual

Creates a new stereo attribute object.

Returns
New stereo attribute
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GLESceneGraph::GLESFactory.

◆ createStereoView()

virtual ObjectRef Ocean::Rendering::Factory::createStereoView ( ) const
virtual

Creates a new stereo view object.

Returns
New stereo view
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFactory, and Ocean::Rendering::GLESceneGraph::GLESFactory.

◆ createSwitch()

virtual NodeRef Ocean::Rendering::Factory::createSwitch ( ) const
virtual

Creates a new switch object.

Returns
New switch
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFactory, and Ocean::Rendering::GLESceneGraph::GLESFactory.

◆ createText()

virtual ObjectRef Ocean::Rendering::Factory::createText ( ) const
virtual

Creates a new text object.

Returns
The new text framebuffer object
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GLESceneGraph::GLESFactory.

◆ createTextureFramebuffer()

virtual ObjectRef Ocean::Rendering::Factory::createTextureFramebuffer ( ) const
virtual

Creates a new texture framebuffer object.

Returns
The new texture framebuffer object
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GLESceneGraph::GLESFactory.

◆ createTextures()

virtual ObjectRef Ocean::Rendering::Factory::createTextures ( ) const
virtual

Creates a new texture attribute object.

Returns
New texture attribute
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFactory, and Ocean::Rendering::GLESceneGraph::GLESFactory.

◆ createTransform()

virtual NodeRef Ocean::Rendering::Factory::createTransform ( ) const
virtual

Creates a new transform object.

Returns
New transform
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFactory, and Ocean::Rendering::GLESceneGraph::GLESFactory.

◆ createTriangleFans()

virtual ObjectRef Ocean::Rendering::Factory::createTriangleFans ( ) const
virtual

Creates a new triangle fans object.

Returns
New triangle fans
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFactory, and Ocean::Rendering::GLESceneGraph::GLESFactory.

◆ createTriangles()

virtual ObjectRef Ocean::Rendering::Factory::createTriangles ( ) const
virtual

Creates a new triangles object.

Returns
New triangles
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFactory, and Ocean::Rendering::GLESceneGraph::GLESFactory.

◆ createTriangleStrips()

virtual ObjectRef Ocean::Rendering::Factory::createTriangleStrips ( ) const
virtual

Creates a new triangle strips object.

Returns
New triangle strips
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFactory, and Ocean::Rendering::GLESceneGraph::GLESFactory.

◆ createUndistortedBackground()

virtual NodeRef Ocean::Rendering::Factory::createUndistortedBackground ( ) const
virtual

Creates a new undistorted background node.

Returns
New undistorted background
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFactory, and Ocean::Rendering::GLESceneGraph::GLESFactory.

◆ createVertexSet()

virtual ObjectRef Ocean::Rendering::Factory::createVertexSet ( ) const
virtual

Creates a new vertex set object.

Returns
New vertex set
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFactory, and Ocean::Rendering::GLESceneGraph::GLESFactory.

◆ operator=()

Factory& Ocean::Rendering::Factory::operator= ( const Factory factory)
protecteddelete

Disabled copy operator.

Parameters
factoryObject which would be copied
Returns
Reference to this object

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