Inheritance diagram for ege::Camera:
ememory::EnableSharedFromThis< Camera > ememory::EnableSharedFromThisBase ege::camera::View

Public Member Functions

 Camera ()
 
virtual ~Camera ()
 
virtual void periodicCall (float _step)
 
virtual void configureOpenGL ()
 
const mat4getMatrixCamera () const
 
const mat4getMatrixProjection () const
 
virtual vec3 getViewVector () const
 
virtual vec3 getEye () const
 
virtual void setAspectRatio (float _ratio)
 
virtual void setSceenSize (const vec2 &_screenSize)
 
float getAspectRatio () const
 
virtual void setXAngleView (float _angleRad)
 
virtual void setYAngleView (float _angleRad)
 
float getXAngleView () const
 
virtual void setZFar (float _distance)
 
float getZFar ()
 
virtual void setZNear (float _distance)
 
float getZNear ()
 
virtual ege::Ray getRayFromScreen (const vec2 &_offset)
 
ege::Ray getRayFromScreenPosition (const vec2 &_position, const vec2 &_size)
 
virtual void drawDebug (ememory::SharedPtr< ewol::resource::Colored3DObject > _draw, ememory::SharedPtr< ege::Camera > _camera)
 
- Public Member Functions inherited from ememory::EnableSharedFromThis< Camera >
ememory::SharedPtr< EMEMORY_TYPE > sharedFromThis ()
 
const ememory::SharedPtr< EMEMORY_TYPE > sharedFromThis () const
 
ememory::WeakPtr< EMEMORY_TYPE > weakFromThis ()
 
const ememory::WeakPtr< EMEMORY_TYPE > weakFromThis () const
 

Protected Member Functions

virtual void updateProjectionMatrix ()
 
vec2 tansformPositionToAngle (vec3 _vect)
 

Protected Attributes

mat4 m_matrix
 
mat4 m_matrixProjection
 
float m_aspectRatio
 
float m_angleView
 
float m_zFar
 
float m_zNear
 

Constructor & Destructor Documentation

§ Camera()

ege::Camera::Camera ( )

Constructor.

§ ~Camera()

virtual ege::Camera::~Camera ( )
inlinevirtual

Destructor.

Member Function Documentation

§ configureOpenGL()

virtual void ege::Camera::configureOpenGL ( )
virtual

Configure projection matrix and camera matrix.

§ drawDebug()

virtual void ege::Camera::drawDebug ( ememory::SharedPtr< ewol::resource::Colored3DObject >  _draw,
ememory::SharedPtr< ege::Camera _camera 
)
inlinevirtual

Debug display of the current element.

Parameters
[in,out]drawBasic system to draw the debug shape and informations

Reimplemented in ege::camera::View.

§ getAspectRatio()

float ege::Camera::getAspectRatio ( ) const
inline

get the current aspect Ratio.

Returns
The current aspect ratio.

§ getMatrixCamera()

const mat4& ege::Camera::getMatrixCamera ( ) const
inline

get the transformation matix for the camera.

Returns
the current transformation matrix

§ getMatrixProjection()

const mat4& ege::Camera::getMatrixProjection ( ) const
inline

get the transformation matix for the camera.

Returns
the current transformation matrix

§ getRayFromScreen()

virtual ege::Ray ege::Camera::getRayFromScreen ( const vec2 _offset)
virtual

Get ray from the camera with the screen offset.

Parameters
[in]_offsetOffset in the screen [-1..1]
Returns
the ray requested.

Reimplemented in ege::camera::View.

§ getRayFromScreenPosition()

ege::Ray ege::Camera::getRayFromScreenPosition ( const vec2 _position,
const vec2 _size 
)

Get ray from the camera with the screen offset.

Parameters
[in]_positionpositin the screen
[in]_sizesize of the screen
Returns
the ray requested.

§ getXAngleView()

float ege::Camera::getXAngleView ( ) const
inline

get the current X angle view.

Returns
the current X angle view.

§ getZFar()

float ege::Camera::getZFar ( )
inline

Get the Z far distane of the camera:

Returns
the current end distance view.

§ getZNear()

float ege::Camera::getZNear ( )
inline

Get the Z Near distane of the camera:

Returns
the current start distance view.

§ periodicCall()

virtual void ege::Camera::periodicCall ( float  _step)
inlinevirtual

It is really needed to call the camera periodicly for performing automatic movement.

Parameters
[in]_stepstep time of moving

§ setAspectRatio()

virtual void ege::Camera::setAspectRatio ( float  _ratio)
virtual

Set the aspectRatio of the camera:

Parameters
[in]_ratioNew aspect ratio.

§ setSceenSize()

virtual void ege::Camera::setSceenSize ( const vec2 _screenSize)
inlinevirtual

Set the screen size to display OpenGl interface.

Parameters
[in]_screenSizeNew screen size.

§ setXAngleView()

virtual void ege::Camera::setXAngleView ( float  _angleRad)
virtual

Set the the X angle view of the camera:

Parameters
[in]_angleRadNew angle view in X of the camera.

§ setYAngleView()

virtual void ege::Camera::setYAngleView ( float  _angleRad)
inlinevirtual

Set the the Y angle view of the camera:

Parameters
[in]_angleRadNew angle view in Y of the camera.
Note
Pay attention that the AspectRatio parameter is set before

§ setZFar()

virtual void ege::Camera::setZFar ( float  _distance)
virtual

Set the Z far distane of the camera:

Parameters
[in]_distanceNew end distance view.

§ setZNear()

virtual void ege::Camera::setZNear ( float  _distance)
virtual

Set the Z near distane of the camera:

Parameters
[in]_distanceNew start distance view.

§ tansformPositionToAngle()

vec2 ege::Camera::tansformPositionToAngle ( vec3  _vect)
protected

get Tetha and psy angle from a position:

Parameters
[in]_vectVector to transform in the euler angle
Returns
x: tetha; y: psy

§ updateProjectionMatrix()

virtual void ege::Camera::updateProjectionMatrix ( )
protectedvirtual

Update the current projection matrix.

Member Data Documentation

§ m_angleView

float ege::Camera::m_angleView
protected

X angle view of the camera.

§ m_aspectRatio

float ege::Camera::m_aspectRatio
protected

depending to the display the aspect ratio is simply calculated x/y

§ m_matrix

mat4 ege::Camera::m_matrix
protected

transformation matrix.

§ m_matrixProjection

mat4 ege::Camera::m_matrixProjection
protected

projection matrix.

§ m_zFar

float ege::Camera::m_zFar
protected

Z camera far view.

§ m_zNear

float ege::Camera::m_zNear
protected

Z camera near view.


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