ScEng::Camera Class Reference

#include <camera.h>

Inheritance diagram for ScEng::Camera:

ScEng::CameraObject ScEng::Object ScEng::Block List of all members.

Public Member Functions

 Camera (bool create_dependencies)
 ~Camera ()
 Destructor.
std::string GetClassName ()
BlockType GetBlockType ()
NodeGetTarget ()
float GetFov (int t)
 Returns the field of view value.
int GetOrtho (int t)
 Returns the ortho value.
int GetUseClip (int t)
 Returns the use_clip value.
float GetNearClip (int t)
 Returns the near_clip_value.
float GetFarClip (int t)
 Returns the far_clip_value.
void SetTarget (Node *node)
void SetFov (float fov_val, int t)
 Sets the value for the field of view variable.
void SetOrtho (int ortho_val, int t)
 Sets the value for the ortho variable.
void SetUseClip (int useclip_val, int t)
 Sets the value for the use_clip variable.
void SetNearClip (float nearclip_val, int t)
 Sets the value for the near_clip variable.
void SetFarClip (float farclip_val, int t)
 Sets the value for the far_clip variable.
int NumDependencies ()
void SetDependency (int id, Block *se_block)
BlockGetDependency (int id)
std::string GetDependencyName (int id)
 Gets the name for the specified dependency.
int GetNumDataTables ()
DataTableGetDataTable (int id=0)
 Returns the DataTable for this class.
void SetDataTable (DataTable *d, int i=0)
 Sets the i_th data table.
void UpdateDataTable (int id=0)
 Updates the indexes for the DataTable.
int Save (SceneSave *scene_save)
 Saves the info of this class.
int Load (SceneLoad *scene_load)
 Loads the info of this class.
void DeleteThis ()
 Delete this class.
void ActionBegin (int time, int action)
void ActionEnd (int time, int action)
void Update (int time)
BlockClone ()

Static Public Attributes

static BlockType block_type

Detailed Description

A Camera Describes a camera in the 3D space. It may or not have a target.


Constructor & Destructor Documentation

ScEng::Camera::Camera ( bool  create_dependencies  ) 

Constructor Sets the target to NULL


Member Function Documentation

std::string ScEng::Camera::GetClassName (  )  [virtual]

Returns the class name

Returns:
Returns "Camera"

Implements ScEng::Block.

BlockType ScEng::Camera::GetBlockType (  )  [virtual]

Returns the BlockType for this class

Returns:
Returns SE_CAMERA_BLOCK_TYPE

Implements ScEng::Block.

Node * ScEng::Camera::GetTarget (  )  [virtual]

Returns the target of the camera

Returns:
If the camera has a target returns a pointer to it, if not returns NULL

Implements ScEng::CameraObject.

void ScEng::Camera::SetTarget ( Node node  )  [virtual]

Sets the target for the camera the target using MakeDependencyByID

Parameters:
node the node to be used as target
See also:
SCBlock::MakeDependencyByID

Implements ScEng::CameraObject.

int ScEng::Camera::NumDependencies (  )  [virtual]

Returns the number of dependencies for this block

Returns:
Returns 2

Implements ScEng::Block.

void ScEng::Camera::SetDependency ( int  id,
Block se_block 
) [virtual]

Sets a dependency the id is CAMERA_TARGET_DEPENDENCY, the given block is assigned to the camera target. If is DATA_TABLE_DEPENDENCY sets the DataTable

Parameters:
id the id for the dependency
se_block the Block to be dependency

Implements ScEng::Block.

Block * ScEng::Camera::GetDependency ( int  id  )  [virtual]

Returns a dependency

Parameters:
id the id for the dependency
Returns:
It the id is CAMERA_TARGET_DEPENDENCY returns the target node, if it is DATA_TABLE_DEPENDENCY returns the DataTable

Implements ScEng::Block.

int ScEng::Camera::GetNumDataTables (  )  [virtual]

Returns the number of DataTables used for this class

Returns:
Returns 1

Reimplemented from ScEng::Block.

void ScEng::Camera::ActionBegin ( int  time,
int  action 
) [inline, virtual]

Informs the block that an action will begin

Parameters:
time the time at which the action begins. more details about the action, for example, it can be a RENDER_ACTION, or a SAVE_ACTION.

Reimplemented from ScEng::Block.

void ScEng::Camera::ActionEnd ( int  time,
int  action 
) [inline, virtual]

Informs the block that an action will end.

Parameters:
time the time at which the action ends. more details about the action, for example, it can be a RENDER_ACTION, or a SAVE_ACTION.

Reimplemented from ScEng::Block.

void ScEng::Camera::Update ( int  time  )  [inline, virtual]

Informs the block that it needs to update its data. For example, texture and material blocks usually move all their animated parameters from the data_table to int or float variables. This is specially useful when rendering, so there is no need to interpolate a data_value every time.

Parameters:
time the time at which the block needs to update its data.

Reimplemented from ScEng::Block.

Block * ScEng::Camera::Clone (  )  [virtual]

Creates a copy of this object and return it. The caller of this function is responsible to add this block to the DAG or to delete it.

Implements ScEng::Block.


Member Data Documentation

BlockType ScEng::Camera::block_type [static]

The type of this block BlockType Camera::block_type( BlockType::CAMERA, 0x00700000,0x00000000 );


The documentation for this class was generated from the following files:
Generated on Thu Sep 6 10:49:21 2007 for SceneEngine by  doxygen 1.5.1-p1