Ocean
Ocean::Rendering::SkyBackground Class Reference

This class is the base class for all sky backgrounds. More...

Inheritance diagram for Ocean::Rendering::SkyBackground:

Public Types

typedef std::pair< Scalar, RGBAColorColorPair
 Definition of a pair holding an angle and a color value. More...
 
typedef std::vector< ColorPairColorPairs
 Definition of a vector holding color values. More...
 
- 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...
 

Public Member Functions

ObjectType type () const override
 Returns the type of this object. More...
 
virtual ColorPairs skyColors () const
 Returns the sky angle and color pairs. More...
 
virtual ColorPairs groundColors () const
 Returns the ground angle and color pairs. More...
 
virtual TexturesRef frontTextures () const
 Returns the front textures. More...
 
virtual TexturesRef backTextures () const
 Returns the back textures. More...
 
virtual TexturesRef leftTextures () const
 Returns the left textures. More...
 
virtual TexturesRef rightTextures () const
 Returns the right textures. More...
 
virtual TexturesRef topTextures () const
 Returns the top textures. More...
 
virtual TexturesRef bottomTextures () const
 Returns the bottom textures. More...
 
virtual bool setSkyColors (const ColorPairs &colors)
 Sets the sky angle and color pairs for the sky background. More...
 
virtual bool setGroundColors (const ColorPairs &colors)
 Returns the ground angle and color pairs. More...
 
virtual bool setFrontTextures (const TexturesRef &textures)
 Sets the textures for the front plane. More...
 
virtual bool setBackTextures (const TexturesRef &textures)
 Sets the textures for the back plane. More...
 
virtual bool setLeftTextures (const TexturesRef &textures)
 Sets the textures for the left plane. More...
 
virtual bool setRightTextures (const TexturesRef &textures)
 Sets the textures for the right plane. More...
 
virtual bool setTopTextures (const TexturesRef &textures)
 Sets the textures for the top plane. More...
 
virtual bool setBottomTextures (const TexturesRef &textures)
 Sets the textures for the bottom plane. More...
 
- Public Member Functions inherited from Ocean::Rendering::Background
virtual Scalar distance () const
 Returns the distance between the world coordinate system and the background object. More...
 
virtual Vector3 position () const
 Returns the position used for this background. More...
 
virtual Quaternion orientation () const
 Returns the orientation used for this background. More...
 
virtual bool setDistance (const Scalar distance)
 Sets the distance between world coordinate system and the background object. More...
 
virtual void setPosition (const Vector3 &position)
 Sets the position used for this background. More...
 
virtual void setOrientation (const Quaternion &orientation)
 Sets the orientation used for this background. More...
 
- Public Member Functions inherited from Ocean::Rendering::Node
virtual bool visible () const
 Returns whether the node is visible. More...
 
virtual BoundingBox boundingBox (const bool involveLocalTransformation=true) const
 Returns the bounding box of this node. More...
 
virtual BoundingSphere boundingSphere (const bool involveLocalTransformation=true) const
 Returns the bounding sphere of this node. More...
 
virtual HomogenousMatrix4 worldTransformation () const
 Returns the first possible transformation transforming this node into world coordinates. More...
 
virtual HomogenousMatrices4 worldTransformations () const
 Returns all possible transformations transforming this node into world coordinates. More...
 
virtual void setVisible (const bool visible)
 Sets whether the node is visible. 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

 SkyBackground ()
 Creates a new sky background object. More...
 
 ~SkyBackground () override
 Destructs a Sky background object. More...
 
- Protected Member Functions inherited from Ocean::Rendering::Background
 Background ()
 Creates a new background object. More...
 
 ~Background () override
 Destructs a background object. More...
 
- Protected Member Functions inherited from Ocean::Rendering::Node
 Node ()
 Creates a new node. More...
 
 ~Node () override
 Destructs a node. 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

- 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::Background
Scalar backgroundDistance
 Background distance;. 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 sky backgrounds.

Member Typedef Documentation

◆ ColorPair

Definition of a pair holding an angle and a color value.

All angles must be defined as radian.

◆ ColorPairs

Definition of a vector holding color values.

Constructor & Destructor Documentation

◆ SkyBackground()

Ocean::Rendering::SkyBackground::SkyBackground ( )
protected

Creates a new sky background object.

◆ ~SkyBackground()

Ocean::Rendering::SkyBackground::~SkyBackground ( )
overrideprotected

Destructs a Sky background object.

Member Function Documentation

◆ backTextures()

virtual TexturesRef Ocean::Rendering::SkyBackground::backTextures ( ) const
virtual

Returns the back textures.

Returns
Textures object used for the back plane
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

◆ bottomTextures()

virtual TexturesRef Ocean::Rendering::SkyBackground::bottomTextures ( ) const
virtual

Returns the bottom textures.

Returns
Textures object used for the bottom plane
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

◆ frontTextures()

virtual TexturesRef Ocean::Rendering::SkyBackground::frontTextures ( ) const
virtual

Returns the front textures.

Returns
Textures object used for the front plane
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

◆ groundColors()

virtual ColorPairs Ocean::Rendering::SkyBackground::groundColors ( ) const
virtual

Returns the ground angle and color pairs.

If any color values are defined the first pair must specified the color for the nadir (angle 0).
The angle values are defined as radian with range [0, PI/2], 0 for the nadir and PI/2 for the standard horizon

Returns
Color pairs
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

◆ leftTextures()

virtual TexturesRef Ocean::Rendering::SkyBackground::leftTextures ( ) const
virtual

Returns the left textures.

Returns
Textures object used for the left plane
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

◆ rightTextures()

virtual TexturesRef Ocean::Rendering::SkyBackground::rightTextures ( ) const
virtual

Returns the right textures.

Returns
Textures object used for the right plane
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

◆ setBackTextures()

virtual bool Ocean::Rendering::SkyBackground::setBackTextures ( const TexturesRef textures)
virtual

Sets the textures for the back plane.

Parameters
texturesTextures object to be used for the back plane
Returns
True, if succeeded
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

◆ setBottomTextures()

virtual bool Ocean::Rendering::SkyBackground::setBottomTextures ( const TexturesRef textures)
virtual

Sets the textures for the bottom plane.

Parameters
texturesTextures object to be used for the bottom plane
Returns
True, if succeeded
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

◆ setFrontTextures()

virtual bool Ocean::Rendering::SkyBackground::setFrontTextures ( const TexturesRef textures)
virtual

Sets the textures for the front plane.

Parameters
texturesTextures object to be used for the front plane
Returns
True, if succeeded
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

◆ setGroundColors()

virtual bool Ocean::Rendering::SkyBackground::setGroundColors ( const ColorPairs colors)
virtual

Returns the ground angle and color pairs.

If any color values are defined the first pair must specified the color for the nadir (angle 0).
The angle values are defined as radian with range [0, PI/2], 0 for the nadir and PI/2 for the standard horizon

Parameters
colorsGround color pairs to set
Returns
True, if succeeded
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

◆ setLeftTextures()

virtual bool Ocean::Rendering::SkyBackground::setLeftTextures ( const TexturesRef textures)
virtual

Sets the textures for the left plane.

Parameters
texturesTextures object to be used for the left plane
Returns
True, if succeeded
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

◆ setRightTextures()

virtual bool Ocean::Rendering::SkyBackground::setRightTextures ( const TexturesRef textures)
virtual

Sets the textures for the right plane.

Parameters
texturesTextures object to be uesed for the right plane
Returns
True, if succeeded
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

◆ setSkyColors()

virtual bool Ocean::Rendering::SkyBackground::setSkyColors ( const ColorPairs colors)
virtual

Sets the sky angle and color pairs for the sky background.

If any color values are defined the first pair must specified the color for the zenith (angle 0).
The angle values are defined as radian with range [0, PI], 0 for the zenith, PI/2 for the standard horizon and PI for the nadir

Parameters
colorsSky color pairs to set
Returns
True, if succeeded
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

◆ setTopTextures()

virtual bool Ocean::Rendering::SkyBackground::setTopTextures ( const TexturesRef textures)
virtual

Sets the textures for the top plane.

Parameters
texturesTextures object to be used for the top plane
Returns
True, if succeeded
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

◆ skyColors()

virtual ColorPairs Ocean::Rendering::SkyBackground::skyColors ( ) const
virtual

Returns the sky angle and color pairs.

If any color values are defined the first pair must specified the color for the zenith (angle 0).
The angle values are defined as radian with range [0, PI], 0 for the zenith, PI/2 for the standard horizon and PI for the nadir

Returns
Color pairs
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

◆ topTextures()

virtual TexturesRef Ocean::Rendering::SkyBackground::topTextures ( ) const
virtual

Returns the top textures.

Returns
Textures object used for the top plane
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

◆ type()

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

Returns the type of this object.

See also
Object::type().

Reimplemented from Ocean::Rendering::Background.


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