ScEng::BoxObject Class Reference

This class describes a procedural BoxObject. More...

#include <primitives.h>

Inheritance diagram for ScEng::BoxObject:

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

Public Types

enum  DATAID {
  id_width, id_height, id_length, id_segs_w,
  id_segs_h, id_segs_l
}
 Enum DATAID. More...
enum  DEPENDENCIES { DATA_TABLE_DEPENDENCY = 0 }
 Enum DEPENDENCIES. More...

Public Member Functions

 BoxObject (bool create_dependencies)
 Constructor.
void SetWidth (float width, int t)
 Sets the width of the box.
void SetHeight (float height, int t)
 Sets the height of the box.
void SetLength (float length, int t)
 Sets the length of the box.
void SetWSegs (int wsegs, int t)
 Sets the number of width segments.
void SetHSegs (int hsegs, int t)
 Sets the number of height segments.
void SetLSegs (int lsegs, int t)
 Sets the number of length segments.
float GetLength (int t)
 Returns the length.
float GetWidth (int t)
 Returns the width.
float GetHeight (int t)
 Returns the height.
int GetLSegs (int t)
 Returns the number of length segments.
int GetWSegs (int t)
 Returns the number of width segments.
int GetHSegs (int t)
 Returns the number of height segments.
void MakeCube (int t)
 Makes the cube.
std::string GetClassName ()
 Returns the name for this class.
BlockType GetBlockType ()
 Virtual function.
int NumDependencies ()
 Returns the number of Dependencies for this class.
void SetDependency (int id, Block *dependency)
 Sets the dependency to the DataTable.
BlockGetDependency (int id)
 Returns the DataTable.
std::string GetDependencyName (int id)
 Gets the name for the specified dependency.
void UpdateDataTable (int id=0)
 Updates the indexes for the DataTable.
int GetNumDataTables ()
 Returns the number of DataTables used for this class.
DataTableGetDataTable (int id=0)
 Returns the specified DataTable.
void SetDataTable (DataTable *d, int i=0)
 Sets the i_th data table.
int Save (SceneSave *scene_save)
 Saves the info for this class.
int Load (SceneLoad *scene_load)
 Loads the info for this class.
void DeleteThis ()
 Deletes this class.
void ActionBegin (int time, int action)
void ActionEnd (int time, int action)
void Update (int time)
BlockClone ()
 Creates a copy of this object and return it.
GMT::Box3F GetObjectBoundingBox (int time)
 Returns the Object bounding box in local coordinates.
void DependancyChanged (Block *dependancy, unsigned int message=0, unsigned int parameters=0)

Public Attributes

DataTabledt
 The DataTable to hold the values.

Static Public Attributes

static BlockType block_type

Detailed Description

This class describes a procedural BoxObject.


Member Enumeration Documentation

enum ScEng::BoxObject::DATAID

Enum DATAID.

Enums the Ids for the differents Data used to make the BoxObject

Enumerator:
id_width  The id for the width
id_height  The id for the height
id_length  The id for the length
id_segs_w  The id for the segs_w
id_segs_h  The id for the segs_h
id_segs_l  The id for the segs_l

enum ScEng::BoxObject::DEPENDENCIES

Enum DEPENDENCIES.

Enums the chunks used for this class

Enumerator:
DATA_TABLE_DEPENDENCY  The dependency to the DataTable


Constructor & Destructor Documentation

ScEng::BoxObject::BoxObject ( bool  create_dependencies  ) 

Constructor.

Creates an empty class so it can be filled by the Loader.


Member Function Documentation

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

Returns the name for this class.

Returns:
Returns "BoxObject"

Implements ScEng::Block.

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

Returns the number of Dependencies for this class.

Returns:
Returns 1

Implements ScEng::Block.

void ScEng::BoxObject::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::BoxObject::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::BoxObject::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::BoxObject::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.

void ScEng::BoxObject::DependancyChanged ( Block dependancy,
unsigned int  message = 0,
unsigned int  parameters = 0 
) [virtual]

A block receives this message when one of its dependencies has changed.

Parameters:
dependency The dependancy that changed
message A message about the change

Reimplemented from ScEng::Object.


Member Data Documentation

BlockType ScEng::BoxObject::block_type [static]

The type of this block BlockType BoxObject::block_type( BlockType::OBJECT, 0x01100000, 0x00000000 );


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