This machine mirrors various open-source projects.
20 Gbit/s uplink.
If there are any issues or you want another project mirrored, please contact
mirror-service -=AT=- netcologne DOT de !
#include <world.hxx>
Collaboration diagram for World:
Public Types | |
typedef std::vector< Collider * > | Colliders |
typedef std::vector< Spring * >::iterator | SpringIter |
typedef std::vector< Spring * >::const_iterator | CSpringIter |
Public Member Functions | |
World () | |
World (const World &w) | |
World (const std::string &filename) | |
~World () | |
void | draw (ZoomGraphicContext *gc) |
void | draw_springs (ZoomGraphicContext *gc) |
void | draw_colliders (ZoomGraphicContext *gc) |
void | draw_particles (ZoomGraphicContext *gc) |
void | update (float delta) |
World * | duplicate () |
Particle * | get_particle (float x, float y) |
std::vector< Particle * > | get_particles (float x1, float y1, float x2, float y2) |
Spring * | get_spring (float x, float y) |
void | add_rect_collider (const Vector2d &, const Vector2d &) |
void | add_spring (Particle *, Particle *) |
void | remove_particle (Particle *) |
void | remove_spring (Spring *) |
void | remove_collider (Collider *) |
ParticleFactory * | get_particle_mgr () |
std::vector< Spring * > & | get_spring_mgr () |
Colliders & | get_colliders () |
void | clear () |
bool | get_has_been_run () |
void | zero_out_velocity () |
void | write_lisp (const std::string &filename) |
int | get_num_particles () |
int | get_num_springs () |
WorldBoundingBox | calc_bounding_box () |
Static Public Member Functions | |
World * | current () |
Friends | |
class | ParticleFactory |
Definition at line 41 of file world.hxx.
|
|
|
Definition at line 46 of file world.hxx. Referenced by World(), and write_lisp(). |
|
Definition at line 45 of file world.hxx. Referenced by clear(), draw_springs(), get_spring(), remove_particle(), and update(). |
|
Create an empty world Definition at line 40 of file world.cxx. Referenced by duplicate(). |
|
Copy an existing world Definition at line 230 of file world.cxx. References colliders, CSpringIter, ParticleFactory::lookup_particle(), particle_mgr, ParticleFactory, and springs. |
|
load a world from file Definition at line 47 of file world.cxx. References ConstruoAssert, StringUtils::has_suffix(), lisp_car(), lisp_cdr(), lisp_free(), lisp_read(), lisp_stream_init_file(), lisp_stream_init_string(), lisp_symbol(), lisp_symbol_p, LISP_TYPE_EOF, LISP_TYPE_PARSE_ERROR, SystemContext::open_input_file(), system_context, SystemContext::translate_filename(), and _lisp_object_t::type. |
|
Definition at line 261 of file world.cxx. References clear(). |
|
Definition at line 667 of file world.cxx. References Vector2d::x, Rect< T >::x1, Rect< T >::x2, Vector2d::y, Rect< T >::y1, and Rect< T >::y2. Referenced by WorldViewColliderTool::on_primary_button_release(). |
|
Definition at line 482 of file world.cxx. Referenced by Selection::duplicate(), and WorldViewInsertTool::on_primary_button_press(). |
|
Definition at line 624 of file world.cxx. References ParticleFactory::begin(), ParticleFactory::end(), Math::max(), Math::min(), ParticleFactory::ParticleIter, ParticleFactory::size(), WorldBoundingBox::x1, WorldBoundingBox::x2, WorldBoundingBox::y1, and WorldBoundingBox::y2. Referenced by WorldViewComponent::draw(), and WorldButton::draw(). |
|
removes everything from the world Definition at line 530 of file world.cxx. References ParticleFactory::clear(), and SpringIter. Referenced by ~World(). |
|
|
|
Definition at line 267 of file world.cxx. References draw_colliders(), draw_particles(), and draw_springs(). |
|
Definition at line 310 of file world.cxx. Referenced by WorldViewComponent::draw(), WorldButton::draw(), and draw(). |
|
Definition at line 304 of file world.cxx. References ParticleFactory::draw(). Referenced by WorldViewComponent::draw(), and draw(). |
|
Definition at line 277 of file world.cxx. References ZoomGraphicContext::draw_lines(), Vector2d::norm(), SpringIter, Vector2d::x, and Vector2d::y. Referenced by WorldViewComponent::draw(), WorldButton::draw(), and draw(). |
|
Definition at line 82 of file world.hxx. References World(). Referenced by Controller::push_undo(), and Controller::start_simulation(). |
|
|
|
Definition at line 108 of file world.hxx. Referenced by Controller::has_been_run(). |
|
Definition at line 655 of file world.cxx. References ParticleFactory::size(). Referenced by WorldGUIManager::draw_overlay(). |
|
Definition at line 661 of file world.cxx. Referenced by WorldGUIManager::draw_overlay(). |
|
Definition at line 433 of file world.cxx. References ParticleFactory::begin(), ParticleFactory::end(), Vector2d::norm(), and ParticleFactory::ParticleIter. Referenced by WorldViewInsertTool::draw_background(), WorldViewInsertTool::draw_foreground(), WorldViewInsertTool::on_delete_press(), WorldViewInsertTool::on_fix_press(), WorldViewSelectTool::on_primary_button_press(), and WorldViewInsertTool::on_primary_button_press(). |
|
Definition at line 101 of file world.hxx. Referenced by RectCollider::bounce(), Selection::duplicate(), WorldViewInsertTool::on_primary_button_press(), Spring::Spring(), and zero_out_velocity(). |
|
All particles inside the given rectangle Definition at line 453 of file world.cxx. References ParticleFactory::begin(), ParticleFactory::end(), Math::max(), Math::min(), and ParticleFactory::ParticleIter. Referenced by Selection::select_particles(). |
|
Definition at line 397 of file world.cxx. References SpringIter. Referenced by WorldViewInsertTool::draw_foreground(), and WorldViewInsertTool::on_delete_press(). |
|
Definition at line 102 of file world.hxx. Referenced by Selection::duplicate(), and WorldViewSelectTool::on_mouse_move(). |
|
Definition at line 522 of file world.cxx. Referenced by WorldViewColliderTool::on_secondary_button_release(). |
|
removes the given particle and all objects which reference it Definition at line 489 of file world.cxx. References ParticleFactory::remove_particle(), and SpringIter. Referenced by WorldViewSelectTool::on_delete_press(), and WorldViewInsertTool::on_delete_press(). |
|
remove the given spring Definition at line 511 of file world.cxx. References ParticleFactory::size(). Referenced by WorldViewInsertTool::on_delete_press(). |
|
Definition at line 319 of file world.cxx. References ParticleFactory::add_particle(), ParticleFactory::begin(), ParticleFactory::end(), ParticleFactory::ParticleIter, SpringIter, and ParticleFactory::update(). Referenced by Controller::update(). |
|
Definition at line 541 of file world.cxx. References CSpringIter, SystemContext::get_user_email(), SystemContext::get_user_realname(), StringUtils::has_suffix(), lisp_dump(), lisp_free(), SystemContext::open_input_file(), SystemContext::open_output_file(), system_context, SystemContext::translate_filename(), and ParticleFactory::write_lisp(). Referenced by Controller::save_world(). |
|
Sets the velocity of all particles to zero, usefull if the particles are getting out of order (aka. explode). Also usefull to fix broken model files Definition at line 471 of file world.cxx. References ParticleFactory::begin(), ParticleFactory::end(), get_particle_mgr(), and ParticleFactory::ParticleIter. |
|
Definition at line 51 of file world.hxx. Referenced by World(). |