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 <particle.hxx>
Collaboration diagram for Particle:
Public Member Functions | |
int | get_id () |
void | add_force (const Vector2d &force) |
void | clear_force () |
void | set_fixed (bool f) |
bool | get_fixed () |
float | get_mass () const |
void | update (float delta) |
void | draw (ZoomGraphicContext *gc) |
void | draw_highlight (ZoomGraphicContext *gc) |
void | draw_infos (ZoomGraphicContext *gc) |
void | draw_velocity_vector (ZoomGraphicContext *gc) |
lisp_object_t * | serialize () |
Public Attributes | |
Vector2d | pos |
Vector2d | velocity |
bool | fixed |
Vector2d | totale_force |
int | spring_links |
Friends | |
class | ParticleFactory |
|
Definition at line 61 of file particle.hxx. |
|
Definition at line 67 of file particle.hxx. Referenced by update(). |
|
Definition at line 86 of file particle.cxx. References GraphicContext::draw_fill_circle(), get_mass(), ZoomGraphicContext::get_parent_gc(), pos, Math::round(), ZoomGraphicContext::world_to_screen(), and Vector2d::y. |
|
draws the particle in highlight mode (aka if mouse is over it) Definition at line 63 of file particle.cxx. References GraphicContext::draw_fill_circle(), get_mass(), ZoomGraphicContext::get_parent_gc(), Math::round(), and ZoomGraphicContext::world_to_screen(). Referenced by WorldViewInsertTool::draw_background(). |
|
draws additional infos to this stop Definition at line 71 of file particle.cxx. References GraphicContext::draw_string(), draw_velocity_vector(), get_mass(), ZoomGraphicContext::get_parent_gc(), and ZoomGraphicContext::world_to_screen(). Referenced by WorldViewInsertTool::draw_foreground(). |
|
Definition at line 106 of file particle.cxx. References ZoomGraphicContext::draw_line(), pos, velocity, Vector2d::x, and Vector2d::y. Referenced by draw_infos(). |
|
Definition at line 76 of file particle.hxx. Referenced by WorldViewInsertTool::on_fix_press(). |
|
The id of the particle, used for de/serialisation and copying of the World. The id is uniq only for a single world. Definition at line 57 of file particle.hxx. |
|
Definition at line 80 of file particle.hxx. Referenced by draw(), draw_highlight(), and draw_infos(). |
|
Definition at line 51 of file particle.cxx. References LispWriter::create_lisp(), LispWriter::write_boolean(), LispWriter::write_float(), LispWriter::write_int(), and LispWriter::write_vector(). |
|
Definition at line 72 of file particle.hxx. Referenced by WorldViewInsertTool::on_fix_press(). |
|
Definition at line 114 of file particle.cxx. References clear_force(), Vector2d::norm(), Vector2d::normalize(), pos, totale_force, velocity, Vector2d::x, and Vector2d::y. |
|
Definition at line 95 of file particle.hxx. |
|
Definition at line 46 of file particle.hxx. |
|
position of the particle Definition at line 37 of file particle.hxx. Referenced by draw(), WorldViewSelectTool::draw_foreground(), WorldViewInsertTool::draw_foreground(), draw_velocity_vector(), Selection::duplicate(), Selection::scale(), Spring::Spring(), and update(). |
|
Number of connection this particle has to other springs Definition at line 53 of file particle.hxx. Referenced by particle_obsolete::operator()(), and Spring::Spring(). |
|
totale force acting on particle (used as temp-var in update() to collect the forces) Definition at line 50 of file particle.hxx. Referenced by update(). |
|
velocity of the particle Definition at line 40 of file particle.hxx. Referenced by draw_velocity_vector(), particle_obsolete::operator()(), and update(). |