Welcome to the NetCologne GmbH open source mirroring service!

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 !

Spring class Reference
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

Spring Class Reference

#include <spring.hxx>

List of all members.

Public Member Functions

 Spring (Particle *f, Particle *s, float l)
 Spring (Particle *f, Particle *s)
 Spring (World *world, lisp_object_t *cursor)
 ~Spring ()
void update (float delta)
void draw (ZoomGraphicContext *gc)
void draw_highlight (ZoomGraphicContext *gc)
void recalc_length ()
lisp_object_tserialize ()

Public Attributes

std::pair< Particle *, Particle * > particles
float length
bool destroyed
float stiffness
float damping
float max_stretch


Constructor & Destructor Documentation

Spring::Spring Particle   f,
Particle   s,
float    l
 

Definition at line 25 of file spring.cxx.

References damping, destroyed, length, max_stretch, particles, Particle::spring_links, and stiffness.

Spring::Spring Particle   f,
Particle   s
 

Definition at line 40 of file spring.cxx.

References damping, destroyed, length, max_stretch, particles, Particle::pos, Particle::spring_links, and stiffness.

Spring::Spring World   world,
lisp_object_t   cursor
 

Definition at line 57 of file spring.cxx.

References damping, World::get_particle_mgr(), length, lisp_cdr(), ParticleFactory::lookup_particle(), max_stretch, particles, LispReader::read_float(), LispReader::read_int(), and stiffness.

Spring::~Spring  
 

Definition at line 96 of file spring.cxx.

References particles.


Member Function Documentation

void Spring::draw ZoomGraphicContext   gc
 

Definition at line 135 of file spring.cxx.

References length, Vector2d::norm(), and particles.

void Spring::draw_highlight ZoomGraphicContext   gc
 

Definition at line 154 of file spring.cxx.

References particles.

Referenced by WorldViewInsertTool::draw_foreground().

void Spring::recalc_length  
 

Forces the recalculation of the springs length

Definition at line 176 of file spring.cxx.

References length, and particles.

lisp_object_t * Spring::serialize  
 

Definition at line 162 of file spring.cxx.

References LispWriter::create_lisp(), particles, LispWriter::write_float(), and LispWriter::write_int().

void Spring::update float    delta
 

Definition at line 103 of file spring.cxx.

References damping, destroyed, Vector2d::dot(), length, max_stretch, Vector2d::norm(), Vector2d::normalize(), particles, and stiffness.


Member Data Documentation

float Spring::damping
 

Definition at line 40 of file spring.hxx.

Referenced by Spring(), and update().

bool Spring::destroyed
 

Definition at line 37 of file spring.hxx.

Referenced by Spring(), and update().

float Spring::length
 

Definition at line 36 of file spring.hxx.

Referenced by draw(), recalc_length(), Spring(), and update().

float Spring::max_stretch
 

Definition at line 41 of file spring.hxx.

Referenced by Spring(), and update().

std::pair<Particle*, Particle*> Spring::particles
 

Definition at line 34 of file spring.hxx.

Referenced by draw(), draw_highlight(), recalc_length(), serialize(), Spring(), update(), and ~Spring().

float Spring::stiffness
 

Definition at line 39 of file spring.hxx.

Referenced by Spring(), and update().


The documentation for this class was generated from the following files:
Generated on Thu Jul 24 10:25:26 2003 for Construo by doxygen1.3-rc3