Public Types | Public Member Functions

cyber::world::WorldDesc Class Reference

#include <WorldDesc.h>

Inheritance diagram for cyber::world::WorldDesc:
cyber::world::ObjectDesc

List of all members.

Public Types

typedef std::map< unsigned,
blocks::FixedBlockDesc * > 
FixedBlocks
typedef std::map< unsigned,
lights::AmbientLightDesc * > 
AmbientLights
typedef std::map< unsigned,
lights::PointLightDesc * > 
PointLights
typedef std::map< unsigned,
lights::SpotLightDesc * > 
SpotLights
typedef std::map< unsigned,
concepts::MaterialDesc * > 
Materials

Public Member Functions

 WorldDesc (void)
 WorldDesc (const WorldDesc &rhs)
WorldDescoperator= (const WorldDesc &rhs)
virtual ~WorldDesc (void)
const ml7::Vector2get_extent () const
const ml7::Vector2get_center () const
void set_extent (const ml7::Vector2 &extent)
void set_center (const ml7::Vector2 &center)
const CameraDescget_camera_desc () const
CameraDescget_camera_desc ()
const FixedBlocksget_fixed_blocks () const
const AmbientLightsget_ambient_lights () const
const PointLightsget_point_lights () const
const SpotLightsget_spot_lights () const
const Materialsget_materials () const
blocks::FixedBlockDescadd_fixed_block (unsigned id, const ml7::Vector2 &position, float orientation, const bl7::geometry2::Poly &poly)
lights::AmbientLightDescadd_ambient_light (unsigned id, unsigned long color, const bl7::geometry2::Poly &poly)
lights::PointLightDescadd_point_light (unsigned id, unsigned long color, const bl7::geometry2::Sphere &sphere, const ml7::Vector2 &position, float range)
lights::SpotLightDescadd_spot_light (unsigned id, unsigned long color, const bl7::geometry2::Sphere &sphere, const ml7::Vector2 &position, float range, const ml7::Vector2 &direction, float angle)
concepts::MaterialDescadd_material (unsigned id, const cl7::string_type &name)
void remove_fixed_block (unsigned id)
void remove_ambient_light (unsigned id)
void remove_point_light (unsigned id)
void remove_spot_light (unsigned id)
void remove_material (unsigned id)
void remove (ObjectDesc *obj_desc)
unsigned generate_id () const
void adapt_extent ()
bool validate (std::vector< cl7::string_type > *messages=NULL) const

Detailed Description

The world object description class.


Member Typedef Documentation


Constructor & Destructor Documentation

cyber::world::WorldDesc::WorldDesc ( void   ) 

Default constructor.

cyber::world::WorldDesc::WorldDesc ( const WorldDesc rhs  ) 

Copy constructor.

cyber::world::WorldDesc::~WorldDesc ( void   )  [virtual]

Destructor.


Member Function Documentation

void cyber::world::WorldDesc::adapt_extent (  ) 

Adapts the extent (as well as the center position) of the world to the contained fixed blocks.

lights::AmbientLightDesc * cyber::world::WorldDesc::add_ambient_light ( unsigned  id,
unsigned long  color,
const bl7::geometry2::Poly poly 
)

Adds a new ambient light object description.

blocks::FixedBlockDesc * cyber::world::WorldDesc::add_fixed_block ( unsigned  id,
const ml7::Vector2 position,
float  orientation,
const bl7::geometry2::Poly poly 
)

Adds a new fixed block object description.

concepts::MaterialDesc * cyber::world::WorldDesc::add_material ( unsigned  id,
const cl7::string_type name 
)

Adds a new material object description.

lights::PointLightDesc * cyber::world::WorldDesc::add_point_light ( unsigned  id,
unsigned long  color,
const bl7::geometry2::Sphere sphere,
const ml7::Vector2 position,
float  range 
)

Adds a new point light object description.

lights::SpotLightDesc * cyber::world::WorldDesc::add_spot_light ( unsigned  id,
unsigned long  color,
const bl7::geometry2::Sphere sphere,
const ml7::Vector2 position,
float  range,
const ml7::Vector2 direction,
float  angle 
)

Adds a new spot light object description.

unsigned cyber::world::WorldDesc::generate_id (  )  const

Generates a new ID.

const AmbientLights* cyber::world::WorldDesc::get_ambient_lights (  )  const [inline]

Returns the ambient light object descriptions.

const CameraDesc* cyber::world::WorldDesc::get_camera_desc (  )  const [inline]

Returns the camera object description.

CameraDesc* cyber::world::WorldDesc::get_camera_desc (  )  [inline]

Returns the camera object description.

const ml7::Vector2& cyber::world::WorldDesc::get_center (  )  const [inline]

Returns the world's center.

const ml7::Vector2& cyber::world::WorldDesc::get_extent (  )  const [inline]

Returns the world's extent.

const FixedBlocks* cyber::world::WorldDesc::get_fixed_blocks (  )  const [inline]

Returns the fixed block object descriptions.

const Materials* cyber::world::WorldDesc::get_materials (  )  const [inline]

Returns the material object descriptions.

const PointLights* cyber::world::WorldDesc::get_point_lights (  )  const [inline]

Returns the point light object descriptions.

const SpotLights* cyber::world::WorldDesc::get_spot_lights (  )  const [inline]

Returns the spot light object descriptions.

WorldDesc & cyber::world::WorldDesc::operator= ( const WorldDesc rhs  ) 

Copy assignment operator.

void cyber::world::WorldDesc::remove ( ObjectDesc obj_desc  ) 

Removes the given object description (of any specific type).

void cyber::world::WorldDesc::remove_ambient_light ( unsigned  id  ) 

Removes the ambient light object description identified by the given id.

void cyber::world::WorldDesc::remove_fixed_block ( unsigned  id  ) 

Removes the fixed block object description identified by the given id.

void cyber::world::WorldDesc::remove_material ( unsigned  id  ) 

Removes the material object description identified by the given id.

void cyber::world::WorldDesc::remove_point_light ( unsigned  id  ) 

Removes the point light object description identified by the given id.

void cyber::world::WorldDesc::remove_spot_light ( unsigned  id  ) 

Removes the spot light object description identified by the given id.

void cyber::world::WorldDesc::set_center ( const ml7::Vector2 center  )  [inline]

Sets the world's center.

void cyber::world::WorldDesc::set_extent ( const ml7::Vector2 extent  )  [inline]

Sets the world's extent.

bool cyber::world::WorldDesc::validate ( std::vector< cl7::string_type > *  messages = NULL  )  const

Checks the validity of the world definition. In the case of invalidity, some messages are stored in the given vector (if specified) according to the invalid constellations.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines