Dali 3D User Interface Engine
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
Dali::Internal::CameraAttachment Class Reference

An attachment for managing the properties of a camera in the scene. More...

#include <camera-attachment-impl.h>

Inheritance diagram for Dali::Internal::CameraAttachment:
Inheritance graph
[legend]
Collaboration diagram for Dali::Internal::CameraAttachment:
Collaboration graph
[legend]

Public Member Functions

void SetType (Dali::Camera::Type type)
  More...
 
Dali::Camera::Type GetType () const
  More...
 
void SetInvertYAxis (bool invertYAxis)
 Set whether the Y Axis is inverted or not. More...
 
bool GetInvertYAxis () const
 Get the setting of InvertYAxis. More...
 
void SetProjectionMode (Dali::Camera::ProjectionMode projectionMode)
  More...
 
Dali::Camera::ProjectionMode GetProjectionMode () const
  More...
 
void SetFieldOfView (float fieldOfView)
  More...
 
float GetFieldOfView () const
  More...
 
void SetAspectRatio (float aspectRatio)
  More...
 
float GetAspectRatio () const
  More...
 
void SetStereoBias (const Vector2 &stereoBias)
  More...
 
Vector2 GetStereoBias () const
 Get stereo bias. More...
 
void SetLeftClippingPlane (float leftClippingPlane)
  More...
 
float GetLeftClippingPlane () const
  More...
 
void SetRightClippingPlane (float rightClippingPlane)
  More...
 
float GetRightClippingPlane () const
  More...
 
void SetTopClippingPlane (float topClippingPlane)
  More...
 
float GetTopClippingPlane () const
  More...
 
void SetBottomClippingPlane (float bottomClippingPlane)
  More...
 
float GetBottomClippingPlane () const
  More...
 
void SetNearClippingPlane (float nearClippingPlane)
  More...
 
float GetNearClippingPlane () const
  More...
 
void SetFarClippingPlane (float farClippingPlane)
  More...
 
float GetFarClippingPlane () const
  More...
 
void SetTargetPosition (Vector3 target)
 Set the (lookAt) target for the camera. More...
 
Vector3 GetTargetPosition ()
 Get the (lookAt) target for the camera. More...
 
const MatrixGetViewMatrix () const
 Retrieve the view-matrix. More...
 
const MatrixGetProjectionMatrix () const
 Retrieve the projection-matrix. More...
 
const MatrixGetInverseViewProjectionMatrix () const
 Returns the inverse view-projection matrix. More...
 
const PropertyInputImplGetViewMatrixProperty () const
 Retrieve the view-matrix property querying interface. More...
 
const PropertyInputImplGetProjectionMatrixProperty () const
 Retrieve the projection-matrix property querying interface. More...
 
const SceneGraph::PropertyBaseGetSceneObjectAnimatableProperty (Property::Index index) const
 Retrieve an animatable property owned by the scene-graph object. More...
 
const PropertyInputImplGetSceneObjectInputProperty (Property::Index index) const
 Retrieve a constraint input-property owned by the scene-graph object. More...
 
- Public Member Functions inherited from Dali::Internal::ActorAttachment
bool OnStage () const
 Query whether the attachment is connected to the stage. More...
 
void Connect ()
 Called by the attached actor, when connected to the Stage. More...
 
void Disconnect ()
 Called by the attached actor, when the actor is disconnected from the Stage. More...
 
- Public Member Functions inherited from Dali::RefObject
void Reference ()
 Increment the object's reference count. More...
 
void Unreference ()
 Decrement the object's reference count. More...
 
int ReferenceCount ()
 Retrieve the object's reference count. More...
 

Static Public Member Functions

static CameraAttachmentPtr New (EventThreadServices &eventThreadServices, const SceneGraph::Node &parentNode)
 Create an initialised CameraAttachment. More...
 

Protected Member Functions

virtual ~CameraAttachment ()
 A reference counted object may only be deleted by calling Unreference() More...
 
- Protected Member Functions inherited from Dali::Internal::ActorAttachment
 ActorAttachment (EventThreadServices &eventThreadServices)
 Construct a new attachment. More...
 
virtual ~ActorAttachment ()
 A reference counted object may only be deleted by calling Unreference() More...
 
EventThreadServicesGetEventThreadServices ()
 For use in message sending to and property reading from the scene graph Inlined for speed. More...
 
const EventThreadServicesGetEventThreadServices () const
 For use in message sending to and property reading from the scene graph Inlined for speed. More...
 
- Protected Member Functions inherited from Dali::RefObject
 RefObject ()
 Default constructor. More...
 
virtual ~RefObject ()
 RefObject is intended as a base class. More...
 
 RefObject (const RefObject &rhs)
 Copy constructor. More...
 
RefObjectoperator= (const RefObject &rhs)
 Assignment operator. More...
 

Private Member Functions

 CameraAttachment (EventThreadServices &eventThreadServices)
 First stage construction of a CameraAttachment. More...
 
virtual void OnStageConnection ()
 For use in derived classes, called after ConnectToStage() More...
 
virtual void OnStageDisconnection ()
 For use in derived classes, called after DisconnectFromStage() More...
 

Static Private Member Functions

static
SceneGraph::CameraAttachment
CreateSceneObject ()
 Creates the corresponding scene-graph CameraAttachment. More...
 

Private Attributes

const
SceneGraph::CameraAttachment
mSceneObject
 Not owned. More...
 
Dali::Camera::Type mType
 
Dali::Camera::ProjectionMode mProjectionMode
 
bool mInvertYAxis
 
float mFieldOfView
 
float mAspectRatio
 
float mLeftClippingPlane
 
float mRightClippingPlane
 
float mTopClippingPlane
 
float mBottomClippingPlane
 
float mNearClippingPlane
 
float mFarClippingPlane
 
Vector2 mStereoBias
 
Vector3 mTargetPosition
 

Additional Inherited Members

- Protected Attributes inherited from Dali::Internal::ActorAttachment
bool mIsOnStage: 1
 Flag to identify whether the attachment is on-stage. More...
 

Detailed Description

An attachment for managing the properties of a camera in the scene.

Definition at line 49 of file camera-attachment-impl.h.

Constructor & Destructor Documentation

Dali::Internal::CameraAttachment::CameraAttachment ( EventThreadServices eventThreadServices)
private

First stage construction of a CameraAttachment.

Parameters
[in]eventThreadServicesUsed for messaging to and reading from scene-graph.

Definition at line 47 of file camera-attachment-impl.cpp.

Referenced by New().

Here is the caller graph for this function:

Dali::Internal::CameraAttachment::~CameraAttachment ( )
protectedvirtual

A reference counted object may only be deleted by calling Unreference()

Definition at line 66 of file camera-attachment-impl.cpp.

Member Function Documentation

SceneGraph::CameraAttachment * Dali::Internal::CameraAttachment::CreateSceneObject ( )
staticprivate

Creates the corresponding scene-graph CameraAttachment.

Returns
A newly allocated scene object.

Definition at line 70 of file camera-attachment-impl.cpp.

References Dali::Internal::SceneGraph::CameraAttachment::New().

Referenced by New().

Here is the call graph for this function:

Here is the caller graph for this function:

float Dali::Internal::CameraAttachment::GetAspectRatio ( ) const

Definition at line 134 of file camera-attachment-impl.cpp.

References mAspectRatio.

float Dali::Internal::CameraAttachment::GetBottomClippingPlane ( ) const

Definition at line 214 of file camera-attachment-impl.cpp.

References mBottomClippingPlane.

float Dali::Internal::CameraAttachment::GetFarClippingPlane ( ) const

Definition at line 246 of file camera-attachment-impl.cpp.

References mFarClippingPlane.

float Dali::Internal::CameraAttachment::GetFieldOfView ( ) const

Definition at line 118 of file camera-attachment-impl.cpp.

References mFieldOfView.

const Matrix & Dali::Internal::CameraAttachment::GetInverseViewProjectionMatrix ( ) const

Returns the inverse view-projection matrix.

Precondition
The attachment is on-stage.
Returns
The inverse view-projection-matrix.

Definition at line 296 of file camera-attachment-impl.cpp.

References Dali::Internal::ActorAttachment::GetEventThreadServices(), Dali::Internal::SceneGraph::CameraAttachment::GetInverseViewProjectionMatrix(), and mSceneObject.

Here is the call graph for this function:

bool Dali::Internal::CameraAttachment::GetInvertYAxis ( ) const

Get the setting of InvertYAxis.

Returns
True if the Y Axis is inverted.

Definition at line 277 of file camera-attachment-impl.cpp.

References mInvertYAxis.

float Dali::Internal::CameraAttachment::GetLeftClippingPlane ( ) const

Definition at line 166 of file camera-attachment-impl.cpp.

References mLeftClippingPlane.

float Dali::Internal::CameraAttachment::GetNearClippingPlane ( ) const

Definition at line 230 of file camera-attachment-impl.cpp.

References mNearClippingPlane.

const Matrix & Dali::Internal::CameraAttachment::GetProjectionMatrix ( ) const

Retrieve the projection-matrix.

Precondition
The attachment is on-stage.
Returns
The projection-matrix.

Definition at line 289 of file camera-attachment-impl.cpp.

References Dali::Internal::ActorAttachment::GetEventThreadServices(), Dali::Internal::SceneGraph::CameraAttachment::GetProjectionMatrix(), and mSceneObject.

Here is the call graph for this function:

const PropertyInputImpl * Dali::Internal::CameraAttachment::GetProjectionMatrixProperty ( ) const

Retrieve the projection-matrix property querying interface.

Precondition
The attachment is on-stage.
Returns
The projection-matrix property querying interface.

Definition at line 312 of file camera-attachment-impl.cpp.

References DALI_ASSERT_DEBUG, Dali::Internal::SceneGraph::CameraAttachment::GetProjectionMatrix(), mSceneObject, and Dali::Internal::ActorAttachment::OnStage().

Here is the call graph for this function:

Dali::Camera::ProjectionMode Dali::Internal::CameraAttachment::GetProjectionMode ( ) const

Definition at line 102 of file camera-attachment-impl.cpp.

References mProjectionMode.

float Dali::Internal::CameraAttachment::GetRightClippingPlane ( ) const

Definition at line 182 of file camera-attachment-impl.cpp.

References mRightClippingPlane.

const SceneGraph::PropertyBase* Dali::Internal::CameraAttachment::GetSceneObjectAnimatableProperty ( Property::Index  index) const

Retrieve an animatable property owned by the scene-graph object.

Precondition
-1 < index < GetPropertyCount().
Parameters
[in]indexThe index of the property.
Returns
A dereferenceable pointer to a property, or NULL if a scene-object does not exist with this property.
const PropertyInputImpl* Dali::Internal::CameraAttachment::GetSceneObjectInputProperty ( Property::Index  index) const

Retrieve a constraint input-property owned by the scene-graph object.

Precondition
-1 < index < GetPropertyCount().
Parameters
[in]indexThe index of the property.
Returns
A dereferenceable pointer to an input property, or NULL if a scene-object does not exist with this property.
Vector2 Dali::Internal::CameraAttachment::GetStereoBias ( ) const

Get stereo bias.

The frustum offset for a 3D camera

Returns
The frustum offset for the 3D camera

Definition at line 150 of file camera-attachment-impl.cpp.

References mStereoBias.

Vector3 Dali::Internal::CameraAttachment::GetTargetPosition ( )

Get the (lookAt) target for the camera.

Returns
the last set target

Definition at line 261 of file camera-attachment-impl.cpp.

References mTargetPosition.

float Dali::Internal::CameraAttachment::GetTopClippingPlane ( ) const

Definition at line 198 of file camera-attachment-impl.cpp.

References mTopClippingPlane.

Dali::Camera::Type Dali::Internal::CameraAttachment::GetType ( ) const

Definition at line 86 of file camera-attachment-impl.cpp.

References mType.

const Matrix & Dali::Internal::CameraAttachment::GetViewMatrix ( ) const

Retrieve the view-matrix.

Precondition
The attachment is on-stage.
Returns
The view-matrix.

Definition at line 282 of file camera-attachment-impl.cpp.

References Dali::Internal::ActorAttachment::GetEventThreadServices(), Dali::Internal::SceneGraph::CameraAttachment::GetViewMatrix(), and mSceneObject.

Here is the call graph for this function:

const PropertyInputImpl * Dali::Internal::CameraAttachment::GetViewMatrixProperty ( ) const

Retrieve the view-matrix property querying interface.

Precondition
The attachment is on-stage.
Returns
The view-matrix property querying interface.

Definition at line 303 of file camera-attachment-impl.cpp.

References DALI_ASSERT_DEBUG, Dali::Internal::SceneGraph::CameraAttachment::GetViewMatrix(), mSceneObject, and Dali::Internal::ActorAttachment::OnStage().

Here is the call graph for this function:

CameraAttachmentPtr Dali::Internal::CameraAttachment::New ( EventThreadServices eventThreadServices,
const SceneGraph::Node parentNode 
)
static

Create an initialised CameraAttachment.

Parameters
[in]eventThreadServicesto use
[in]parentNodeThe node to attach a scene-object to.
Returns
A handle to a newly allocated Dali resource.

Definition at line 33 of file camera-attachment-impl.cpp.

References Dali::Internal::SceneGraph::AttachToNodeMessage(), CameraAttachment(), CreateSceneObject(), and Dali::Internal::EventThreadServices::GetUpdateManager().

Referenced by Dali::Internal::CameraActor::New().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::CameraAttachment::OnStageConnection ( )
privatevirtual

For use in derived classes, called after ConnectToStage()

Implements Dali::Internal::ActorAttachment.

Definition at line 321 of file camera-attachment-impl.cpp.

void Dali::Internal::CameraAttachment::OnStageDisconnection ( )
privatevirtual

For use in derived classes, called after DisconnectFromStage()

Implements Dali::Internal::ActorAttachment.

Definition at line 326 of file camera-attachment-impl.cpp.

void Dali::Internal::CameraAttachment::SetAspectRatio ( float  aspectRatio)
void Dali::Internal::CameraAttachment::SetBottomClippingPlane ( float  bottomClippingPlane)
void Dali::Internal::CameraAttachment::SetFarClippingPlane ( float  farClippingPlane)
void Dali::Internal::CameraAttachment::SetFieldOfView ( float  fieldOfView)
void Dali::Internal::CameraAttachment::SetInvertYAxis ( bool  invertYAxis)

Set whether the Y Axis is inverted or not.

Default camera inverts the Y axis to provide a +ve Y down LHS coordinate system Some cameras may require no inversion.

Parameters
[in]invertYAxisTrue if inverted, false otherwise

Definition at line 266 of file camera-attachment-impl.cpp.

References Dali::Internal::ActorAttachment::GetEventThreadServices(), mInvertYAxis, mSceneObject, and Dali::Internal::SceneGraph::SetInvertYAxisMessage().

Here is the call graph for this function:

void Dali::Internal::CameraAttachment::SetLeftClippingPlane ( float  leftClippingPlane)
void Dali::Internal::CameraAttachment::SetNearClippingPlane ( float  nearClippingPlane)
void Dali::Internal::CameraAttachment::SetProjectionMode ( Dali::Camera::ProjectionMode  projectionMode)
void Dali::Internal::CameraAttachment::SetRightClippingPlane ( float  rightClippingPlane)
void Dali::Internal::CameraAttachment::SetStereoBias ( const Vector2 stereoBias)
void Dali::Internal::CameraAttachment::SetTargetPosition ( Vector3  target)

Set the (lookAt) target for the camera.

Precondition
The Camera owned by this object must be of the type Camera::LookAtTarget
Parameters
targetPosition of object we want to look at

Definition at line 251 of file camera-attachment-impl.cpp.

References Dali::Internal::ActorAttachment::GetEventThreadServices(), mSceneObject, mTargetPosition, and Dali::Internal::SceneGraph::SetTargetPositionMessage().

Here is the call graph for this function:

void Dali::Internal::CameraAttachment::SetTopClippingPlane ( float  topClippingPlane)
void Dali::Internal::CameraAttachment::SetType ( Dali::Camera::Type  type)

Member Data Documentation

float Dali::Internal::CameraAttachment::mAspectRatio
private

Definition at line 284 of file camera-attachment-impl.h.

Referenced by GetAspectRatio(), and SetAspectRatio().

float Dali::Internal::CameraAttachment::mBottomClippingPlane
private

Definition at line 288 of file camera-attachment-impl.h.

Referenced by GetBottomClippingPlane(), and SetBottomClippingPlane().

float Dali::Internal::CameraAttachment::mFarClippingPlane
private

Definition at line 290 of file camera-attachment-impl.h.

Referenced by GetFarClippingPlane(), and SetFarClippingPlane().

float Dali::Internal::CameraAttachment::mFieldOfView
private

Definition at line 283 of file camera-attachment-impl.h.

Referenced by GetFieldOfView(), and SetFieldOfView().

bool Dali::Internal::CameraAttachment::mInvertYAxis
private

Definition at line 282 of file camera-attachment-impl.h.

Referenced by GetInvertYAxis(), and SetInvertYAxis().

float Dali::Internal::CameraAttachment::mLeftClippingPlane
private

Definition at line 285 of file camera-attachment-impl.h.

Referenced by GetLeftClippingPlane(), and SetLeftClippingPlane().

float Dali::Internal::CameraAttachment::mNearClippingPlane
private

Definition at line 289 of file camera-attachment-impl.h.

Referenced by GetNearClippingPlane(), and SetNearClippingPlane().

Dali::Camera::ProjectionMode Dali::Internal::CameraAttachment::mProjectionMode
private

Definition at line 281 of file camera-attachment-impl.h.

Referenced by GetProjectionMode(), and SetProjectionMode().

float Dali::Internal::CameraAttachment::mRightClippingPlane
private

Definition at line 286 of file camera-attachment-impl.h.

Referenced by GetRightClippingPlane(), and SetRightClippingPlane().

const SceneGraph::CameraAttachment* Dali::Internal::CameraAttachment::mSceneObject
private
Vector2 Dali::Internal::CameraAttachment::mStereoBias
private

Definition at line 291 of file camera-attachment-impl.h.

Referenced by GetStereoBias(), and SetStereoBias().

Vector3 Dali::Internal::CameraAttachment::mTargetPosition
private

Definition at line 292 of file camera-attachment-impl.h.

Referenced by GetTargetPosition(), and SetTargetPosition().

float Dali::Internal::CameraAttachment::mTopClippingPlane
private

Definition at line 287 of file camera-attachment-impl.h.

Referenced by GetTopClippingPlane(), and SetTopClippingPlane().

Dali::Camera::Type Dali::Internal::CameraAttachment::mType
private

Definition at line 280 of file camera-attachment-impl.h.

Referenced by GetType(), and SetType().


The documentation for this class was generated from the following files:
Dali Docs Home
Read more about Dali