Ocean
|
This class is the base class for all rendering views. More...
Public Member Functions | |
virtual Scalar | aspectRatio () const |
Returns the aspect ratio of this view. More... | |
virtual Scalar | nearDistance () const |
Returns the distance to the near clipping plane. More... | |
virtual Scalar | farDistance () const |
Returns the distance to the far clipping plane. More... | |
virtual HomogenousMatrix4 | transformation () const |
Returns the transformation between view and world (the extrinsic camera data, the inverse of the known View Matrix). More... | |
virtual SquareMatrix4 | projectionMatrix () const |
Returns the projection matrix of this view. More... | |
virtual RGBAColor | backgroundColor () const |
Returns the background color of the view. More... | |
virtual BackgroundRef | background () const |
Returns the currently used background of the view. More... | |
virtual Backgrounds | backgrounds () const |
Returns all defined background objects. More... | |
virtual bool | useHeadlight () const |
Returns whether the head light is enabled. More... | |
virtual PhantomAttribute::PhantomMode | phantomMode () const |
Returns the phantom mode of this view. More... | |
virtual Line3 | viewingRay (const Scalar x, const Scalar y, const unsigned int width, const unsigned int height) const |
Returns a viewing ray into the scene. More... | |
virtual bool | setAspectRatio (const Scalar aspectRatio) |
Sets the aspect ratio of this view. More... | |
virtual bool | setNearDistance (const Scalar distance) |
Sets the distance to the near clipping plane. More... | |
virtual bool | setFarDistance (const Scalar distance) |
Sets the distance to the far clipping plane. More... | |
virtual bool | setNearFarDistance (const Scalar nearDistance, const Scalar farDistance) |
Sets the distance to the near and far clipping plane. More... | |
virtual void | setTransformation (const HomogenousMatrix4 &world_T_view) |
Sets the position and orientation of the view in world coordinates (the extrinsic camera data, the inverse of the known View Matrix). More... | |
virtual bool | setBackgroundColor (const RGBAColor &color) |
Sets the background color of the view. More... | |
virtual void | addBackground (const BackgroundRef &background) |
Adds a new background object to the background stack of the view. More... | |
virtual void | removeBackground (const BackgroundRef &background) |
Removes a background object from the background stack of this view. More... | |
virtual void | setUseHeadlight (const bool state) |
Sets whether the headlight should be activated. More... | |
virtual bool | setPhantomMode (const PhantomAttribute::PhantomMode mode) |
Sets the phantom mode of this view. More... | |
virtual void | fitCamera (const NodeRef &node=NodeRef()) |
Fits the camera to a given node. 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 | |
View () | |
Creates a new view object. More... | |
~View () override | |
Destructs a view 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... | |
Protected Attributes | |
Backgrounds | backgrounds_ |
The view's background objects. More... | |
Protected Attributes inherited from Ocean::Rendering::Object | |
Lock | objectLock |
Lock for the object. 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... | |
This class is the base class for all rendering views.
typedef std::vector<BackgroundRef> Ocean::Rendering::View::Backgrounds |
Definition of a vector holding background objects.
|
protected |
Creates a new view object.
|
overrideprotected |
Destructs a view object.
|
virtual |
Adds a new background object to the background stack of the view.
A view can hold more than one background object, however the first background object is used for rendering only.
background | Background to add |
NotSupportedException | Is thrown if this function is not supported |
|
virtual |
Returns the aspect ratio of this view.
NotSupportedException | Is thrown if this function is not supported |
Reimplemented in Ocean::Rendering::GlobalIllumination::GIView, and Ocean::Rendering::GLESceneGraph::GLESView.
|
virtual |
Returns the currently used background of the view.
|
virtual |
Returns the background color of the view.
NotSupportedException | Is thrown if this function is not supported |
Reimplemented in Ocean::Rendering::GlobalIllumination::GIView, and Ocean::Rendering::GLESceneGraph::GLESView.
|
virtual |
Returns all defined background objects.
A view can hold more than one background object, however only the first background object is used for rendering
|
virtual |
Returns the distance to the far clipping plane.
NotSupportedException | Is thrown if this function is not supported |
Reimplemented in Ocean::Rendering::GlobalIllumination::GIView, and Ocean::Rendering::GLESceneGraph::GLESView.
Fits the camera to a given node.
If no node is specified the entire scene world is fitted.
node | Node to fit the camera to |
NotSupportedException | Is thrown if this function is not supported |
Reimplemented in Ocean::Rendering::PerspectiveView.
|
virtual |
Returns the distance to the near clipping plane.
NotSupportedException | Is thrown if this function is not supported |
Reimplemented in Ocean::Rendering::GlobalIllumination::GIView, and Ocean::Rendering::GLESceneGraph::GLESView.
|
virtual |
Returns the phantom mode of this view.
NotSupportedException | Is thrown if this function is not supported |
Reimplemented in Ocean::Rendering::GLESceneGraph::GLESView.
|
virtual |
Returns the projection matrix of this view.
NotSupportedException | Is thrown if this function is not supported |
Reimplemented in Ocean::Rendering::StereoView, Ocean::Rendering::GlobalIllumination::GIView, Ocean::Rendering::GLESceneGraph::GLESView, and Ocean::Rendering::GLESceneGraph::GLESStereoView.
|
virtual |
Removes a background object from the background stack of this view.
If the background to remove is the currently first object in the background stack, the next background object in the queue will be used for rendering.
background | Background to remove |
NotSupportedException | Is thrown if this function is not supported |
|
virtual |
Sets the aspect ratio of this view.
aspectRatio | The ratio between width and height, with range (0, infinity) |
NotSupportedException | Is thrown if this function is not supported |
Reimplemented in Ocean::Rendering::GlobalIllumination::GIView, and Ocean::Rendering::GLESceneGraph::GLESView.
|
virtual |
Sets the background color of the view.
color | Background color to set |
NotSupportedException | Is thrown if this function is not supported |
Reimplemented in Ocean::Rendering::GlobalIllumination::GIView, and Ocean::Rendering::GLESceneGraph::GLESView.
|
virtual |
Sets the distance to the far clipping plane.
distance | The distance to the far clipping plane to set, with range (nearDistance(), infinity) |
NotSupportedException | Is thrown if this function is not supported |
Reimplemented in Ocean::Rendering::GlobalIllumination::GIView, and Ocean::Rendering::GLESceneGraph::GLESView.
|
virtual |
Sets the distance to the near clipping plane.
distance | The distance to the near clipping plane to set, with range (0, farDistance()) |
NotSupportedException | Is thrown if this function is not supported |
Reimplemented in Ocean::Rendering::GlobalIllumination::GIView, and Ocean::Rendering::GLESceneGraph::GLESView.
|
virtual |
Sets the distance to the near and far clipping plane.
nearDistance | The distance to the near clipping plane, with range (0, farDistance) |
farDistance | The distance to the far clipping plane to set, with range (nearDistance, infinity) |
NotSupportedException | Is thrown if this function is not supported |
Reimplemented in Ocean::Rendering::GlobalIllumination::GIView, and Ocean::Rendering::GLESceneGraph::GLESView.
|
virtual |
Sets the phantom mode of this view.
mode | Phantom mode to be set |
NotSupportedException | Is thrown if this function is not supported |
Reimplemented in Ocean::Rendering::GLESceneGraph::GLESView.
|
virtual |
Sets the position and orientation of the view in world coordinates (the extrinsic camera data, the inverse of the known View Matrix).
world_T_view | The transformation converting the view to world, must be valid |
NotSupportedException | Is thrown if this function is not supported |
Reimplemented in Ocean::Rendering::StereoView, Ocean::Rendering::GLESceneGraph::GLESStereoView, Ocean::Rendering::GlobalIllumination::GIView, and Ocean::Rendering::GLESceneGraph::GLESView.
|
virtual |
Sets whether the headlight should be activated.
state | True, to activate the headlight |
NotSupportedException | Is thrown if this function is not supported |
Reimplemented in Ocean::Rendering::GlobalIllumination::GIView, and Ocean::Rendering::GLESceneGraph::GLESView.
|
virtual |
Returns the transformation between view and world (the extrinsic camera data, the inverse of the known View Matrix).
NotSupportedException | Is thrown if this function is not supported |
Reimplemented in Ocean::Rendering::StereoView, Ocean::Rendering::GlobalIllumination::GIView, Ocean::Rendering::GLESceneGraph::GLESView, and Ocean::Rendering::GLESceneGraph::GLESStereoView.
|
overridevirtual |
Returns the type of this object.
Reimplemented from Ocean::Rendering::Object.
|
virtual |
Returns whether the head light is enabled.
NotSupportedException | Is thrown if this function is not supported |
Reimplemented in Ocean::Rendering::GlobalIllumination::GIView, and Ocean::Rendering::GLESceneGraph::GLESView.
|
virtual |
Returns a viewing ray into the scene.
The start position is located at the center of projection.
x | Horizontal position on the projection plane defining the intersection between plane and ray, in pixel |
y | Vertical position on the projection plane defining the intersection between plane and ray, in pixel |
width | Horizontal width of the projection plane in pixel |
height | Vertical height of the projection plane in pixel |
Reimplemented in Ocean::Rendering::GlobalIllumination::GIPerspectiveView, and Ocean::Rendering::GLESceneGraph::GLESPerspectiveView.
|
protected |
The view's background objects.