Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

OpenCAL::MassSpringSystem Class Reference

#include <MassSpringSystem.h>

Inheritance diagram for OpenCAL::MassSpringSystem:

Inheritance graph
[legend]
Collaboration diagram for OpenCAL::MassSpringSystem:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MassSpringSystem (System *parent)
PointMassgetPoint (unsigned int i)
const PointMassgetPoint (unsigned int i) const
SpringgetSpring (unsigned int i)
const SpringgetSpring (unsigned int i) const
const TriangleMeshgetSurface () const
TriangleMeshgetSurfaceP ()
void setMass (float mass)
void setMassEach (float mass)
void setStiffness (float stiffness)
void setDamping (float damping)
virtual void step (float deltaSeconds)
virtual void initialize ()
virtual void render ()
virtual void renderPicking ()

Protected Member Functions

void integrate (float deltaSeconds)

Protected Attributes

TriangleMesh m_surface

Detailed Description

This class is a physics system, consisting of pointmasses, connected by springs. It can be used to model a number of physical phenomena, like ropes, cloth, and jelly objects. It contains a Triangle Mesh to define its surface.

Definition at line 32 of file MassSpringSystem.h.


Member Function Documentation

void MassSpringSystem::integrate float  deltaSeconds  )  [protected]
 

This function uses a modified Euler integration, which cannot be used using the general state vector method. The integration method is not very physically correct, but ik looks good, and is super stable.

Todo:
Any way to make this integration method general?
Definition at line 172 of file MassSpringSystem.cpp.

References OpenCAL::Physical::getAccelleration(), OpenCAL::Object::getPositionP(), OpenCAL::Physical::getVelocityP(), OpenCAL::PhysicalObject::isFixed(), and OpenCAL::Physical::resetForce().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Sun Aug 15 19:19:33 2004 for OpenCAL: Open Computer Animation Library by doxygen 1.3.8