#include <WorldDesc.h>
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) | |
| WorldDesc & | operator= (const WorldDesc &rhs) |
| virtual | ~WorldDesc (void) |
| const ml7::Vector2 & | get_extent () const |
| const ml7::Vector2 & | get_center () const |
| void | set_extent (const ml7::Vector2 &extent) |
| void | set_center (const ml7::Vector2 ¢er) |
| const CameraDesc * | get_camera_desc () const |
| CameraDesc * | get_camera_desc () |
| const FixedBlocks * | get_fixed_blocks () const |
| const AmbientLights * | get_ambient_lights () const |
| const PointLights * | get_point_lights () const |
| const SpotLights * | get_spot_lights () const |
| const Materials * | get_materials () const |
| blocks::FixedBlockDesc * | add_fixed_block (unsigned id, const ml7::Vector2 &position, float orientation, const bl7::geometry2::Poly &poly) |
| lights::AmbientLightDesc * | add_ambient_light (unsigned id, unsigned long color, const bl7::geometry2::Poly &poly) |
| lights::PointLightDesc * | add_point_light (unsigned id, unsigned long color, const bl7::geometry2::Sphere &sphere, const ml7::Vector2 &position, float range) |
| lights::SpotLightDesc * | 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) |
| concepts::MaterialDesc * | add_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 |
The world object description class.
| typedef std::map<unsigned, lights::AmbientLightDesc*> cyber::world::WorldDesc::AmbientLights |
| typedef std::map<unsigned, blocks::FixedBlockDesc*> cyber::world::WorldDesc::FixedBlocks |
| typedef std::map<unsigned, concepts::MaterialDesc*> cyber::world::WorldDesc::Materials |
| typedef std::map<unsigned, lights::PointLightDesc*> cyber::world::WorldDesc::PointLights |
| typedef std::map<unsigned, lights::SpotLightDesc*> cyber::world::WorldDesc::SpotLights |
| cyber::world::WorldDesc::WorldDesc | ( | void | ) |
Default constructor.
| cyber::world::WorldDesc::WorldDesc | ( | const WorldDesc & | rhs | ) |
Copy constructor.
| cyber::world::WorldDesc::~WorldDesc | ( | void | ) | [virtual] |
Destructor.
| 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.
| 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.
1.7.1