AnimaL | 
     Tutorial | 
	 Documentation | 
   
#include <massSpringEngine.h>
Inheritance diagram for animal::MassSpringEngine< Inv_Masses, Velocities, SpringStiffness, IndexedSprings, Points, Real >:

It derives both form Engine and from MassSpringSolver.
Definition at line 22 of file massSpringEngine.h.
Virtual methods | |
| virtual void | reset () | 
| Initialize the engine.   | |
| virtual void | move (double dt) | 
| Move the engine.   | |
| void | draw () | 
| draw stuff   | |
| virtual void | getBoundingBox (float &minX, float &minY, float &minZ, float &maxX, float &maxY, float &maxZ) | 
| bounding box of the particles   | |
| void | mousePressEvent (MouseEvent *) | 
| React to mouse press event.   | |
| bool | get_compressed_ok () | 
| Get the value of the compressed_ok boolean.   | |
| void | set_compressed_ok (bool ok) | 
| set the value of the compressed_ok boolean   | |
| bool | get_elongated_ok () | 
| Get the value of the elongated_ok boolean.   | |
| void | set_elongated_ok (bool ok) | 
| set the value of the elongated_ok boolean   | |
| bool | get_displayMassSpring () | 
| Get the value of the displayMassSpring boolean.   | |
| void | set_displayMassSpring (bool display) | 
| set the value of the displayMassSpring boolean   | |
| void | set_pointSize (int) | 
| set the value of the particle screen size   | |
| int | get_pointSize () const | 
| Get the value of the particle screen size.   | |
| void | set_lineWidth (int) | 
| set the value of the spring screen width   | |
| int | get_lineWidth () const | 
| Get the value of the spring screen width.   | |
| virtual ConstrainedItem * | pickPoint (float origin[3], float direction[3], float threshold) | 
| Pick along a line.   | |
| class | ConstrainedPoint | 
Public Types | |
| typedef MassSpringSolver< Points, Velocities, Inv_Masses, SpringStiffness, IndexedSprings >  | _MassSpringSolver | 
| Mass-spring solver, one of the parent types.   | |
| typedef _MassSpringSolver::Index | Index | 
Public Member Functions | |
| MassSpringEngine () | |
| Constructor.   | |
| virtual | ~MassSpringEngine () | 
| Destructor.   | |
Public Attributes | |
| Velocities * | _velocities | 
| Points * | _points | 
| Points | _initialPoints | 
| store the initial coordinates for init()   | |
| Points | _initialVelocities | 
| store the initial velocities for init()   | |
| int | _pointSize | 
| particle size on screen   | |
| int | _lineWidth | 
| spring width on screen   | |
| vector< float > | elongation | 
| elongation[i] contains the elongation value of the spring i   | |
| vector< rgb > | colours | 
| colours[i] contains the colour of the spring i in the "rgb" mode   | |
| bool | compressed_ok | 
| true if the user wants to see the compressed springs   | |
| bool | elongated_ok | 
| true if the user wants to see the elongated springs   | |
| bool | displayMassSpring | 
| true if the user wants to see the mass-springs   | |
      
  | 
  |||||
| 
 Mass-spring solver, one of the parent types. 
 Definition at line 120 of file massSpringEngine.h.  | 
  
      
  | 
  |||||
| 
 
 Reimplemented from animal::MassSpringSolver< Points, Velocities, Inv_Masses, SpringStiffness, IndexedSprings >. Definition at line 121 of file massSpringEngine.h.  | 
  
      
  | 
  |||||||||
| 
 Constructor. 
 Definition at line 27 of file massSpringEngine.inl.  | 
  
      
  | 
  |||||||||
| 
 Destructor. 
 Definition at line 46 of file massSpringEngine.inl.  | 
  
      
  | 
  |||||||||
      
  | 
  |||||||||
| 
 Get the value of the compressed_ok boolean. 
 Definition at line 370 of file massSpringEngine.inl. Referenced by X3DTK::Qt::MassSpringEngineQt::MassSpringEngineQt().  | 
  
      
  | 
  |||||||||
| 
 Get the value of the displayMassSpring boolean. 
 Definition at line 422 of file massSpringEngine.inl. Referenced by animal::MassSpringEngine< Inv_Masses, Velocities, SpringStiffness, IndexedSprings, Points, Real >::draw(), X3DTK::Qt::MassSpringEngineQt::MassSpringEngineQt(), and animal::MassSpringEngine< Inv_Masses, Velocities, SpringStiffness, IndexedSprings, Points, Real >::move().  | 
  
      
  | 
  |||||||||
| 
 Get the value of the elongated_ok boolean. 
 Definition at line 396 of file massSpringEngine.inl. Referenced by X3DTK::Qt::MassSpringEngineQt::MassSpringEngineQt().  | 
  
      
  | 
  |||||||||
| 
 Get the value of the spring screen width. 
 Definition at line 475 of file massSpringEngine.inl. Referenced by X3DTK::Qt::MassSpringEngineQt::MassSpringEngineQt().  | 
  
      
  | 
  |||||||||
| 
 Get the value of the particle screen size. 
 Definition at line 449 of file massSpringEngine.inl. Referenced by X3DTK::Qt::MassSpringEngineQt::MassSpringEngineQt().  | 
  
      
  | 
  ||||||||||||||||||||||||||||||||
| 
 bounding box of the particles 
 Reimplemented from animal::Engine. Definition at line 194 of file massSpringEngine.inl. References animal::MassSpringEngine< Inv_Masses, Velocities, SpringStiffness, IndexedSprings, Points, Real >::_points.  | 
  
      
  | 
  ||||||||||
| 
 React to mouse press event. 
 Reimplemented from animal::Engine. Reimplemented in X3DTK::X3D::AnimalEngineNode< AMassSpringEngine >. Definition at line 230 of file massSpringEngine.inl.  | 
  
      
  | 
  ||||||||||
      
  | 
  ||||||||||||||||||||
| 
 Pick along a line. If an element is picked, it is returned as a new Item*. Else the pointer is null. It is the programmer's responsibility to delete the Item after use. Definition at line 346 of file massSpringEngine.inl. References animal::MassSpringEngine< Inv_Masses, Velocities, SpringStiffness, IndexedSprings, Points, Real >::_points, animal::MassSpringEngine< Inv_Masses, Velocities, SpringStiffness, IndexedSprings, Points, Real >::ConstrainedPoint, and animal::findClosestPointToLine().  | 
  
      
  | 
  |||||||||
      
  | 
  ||||||||||
| 
 set the value of the compressed_ok boolean 
 Definition at line 383 of file massSpringEngine.inl. Referenced by X3DTK::Qt::MassSpringEngineQt::setCompressed_ok().  | 
  
      
  | 
  ||||||||||
| 
 set the value of the displayMassSpring boolean 
 Definition at line 435 of file massSpringEngine.inl. Referenced by X3DTK::Qt::MassSpringEngineQt::setDisplayMassSpring().  | 
  
      
  | 
  ||||||||||
| 
 set the value of the elongated_ok boolean 
 Definition at line 409 of file massSpringEngine.inl. Referenced by X3DTK::Qt::MassSpringEngineQt::setElongated_ok().  | 
  
      
  | 
  ||||||||||
| 
 set the value of the spring screen width 
 Definition at line 488 of file massSpringEngine.inl. Referenced by X3DTK::Qt::MassSpringEngineQt::setLineWidth().  | 
  
      
  | 
  ||||||||||
| 
 set the value of the particle screen size 
 Definition at line 462 of file massSpringEngine.inl. Referenced by X3DTK::Qt::MassSpringEngineQt::setPointWidth().  | 
  
      
  | 
  |||||
| 
 
 Definition at line 109 of file massSpringEngine.h. Referenced by animal::MassSpringEngine< Inv_Masses, Velocities, SpringStiffness, IndexedSprings, Points, Real >::pickPoint().  | 
  
      
  | 
  |||||
| 
 store the initial coordinates for init() 
 Definition at line 126 of file massSpringEngine.h. Referenced by animal::MassSpringEngine< Inv_Masses, Velocities, SpringStiffness, IndexedSprings, Points, Real >::reset().  | 
  
      
  | 
  |||||
| 
 store the initial velocities for init() 
 Definition at line 127 of file massSpringEngine.h. Referenced by animal::MassSpringEngine< Inv_Masses, Velocities, SpringStiffness, IndexedSprings, Points, Real >::reset().  | 
  
      
  | 
  |||||
      
  | 
  |||||
      
  | 
  |||||
      
  | 
  |||||
      
  | 
  |||||
| 
 colours[i] contains the colour of the spring i in the "rgb" mode 
 Definition at line 139 of file massSpringEngine.h. Referenced by animal::MassSpringEngine< Inv_Masses, Velocities, SpringStiffness, IndexedSprings, Points, Real >::draw(), and animal::MassSpringEngine< Inv_Masses, Velocities, SpringStiffness, IndexedSprings, Points, Real >::reset().  | 
  
      
  | 
  |||||
| 
 true if the user wants to see the compressed springs 
 Definition at line 141 of file massSpringEngine.h. Referenced by animal::MassSpringEngine< Inv_Masses, Velocities, SpringStiffness, IndexedSprings, Points, Real >::draw(), animal::MassSpringEngine< Inv_Masses, Velocities, SpringStiffness, IndexedSprings, Points, Real >::get_compressed_ok(), and animal::MassSpringEngine< Inv_Masses, Velocities, SpringStiffness, IndexedSprings, Points, Real >::set_compressed_ok().  | 
  
      
  | 
  |||||
| 
 true if the user wants to see the mass-springs 
 Definition at line 143 of file massSpringEngine.h. Referenced by animal::MassSpringEngine< Inv_Masses, Velocities, SpringStiffness, IndexedSprings, Points, Real >::get_displayMassSpring(), and animal::MassSpringEngine< Inv_Masses, Velocities, SpringStiffness, IndexedSprings, Points, Real >::set_displayMassSpring().  | 
  
      
  | 
  |||||
| 
 true if the user wants to see the elongated springs 
 Definition at line 142 of file massSpringEngine.h. Referenced by animal::MassSpringEngine< Inv_Masses, Velocities, SpringStiffness, IndexedSprings, Points, Real >::draw(), animal::MassSpringEngine< Inv_Masses, Velocities, SpringStiffness, IndexedSprings, Points, Real >::get_elongated_ok(), and animal::MassSpringEngine< Inv_Masses, Velocities, SpringStiffness, IndexedSprings, Points, Real >::set_elongated_ok().  | 
  
      
  | 
  |||||
| 
 elongation[i] contains the elongation value of the spring i 
 Definition at line 132 of file massSpringEngine.h. Referenced by animal::MassSpringEngine< Inv_Masses, Velocities, SpringStiffness, IndexedSprings, Points, Real >::draw(), and animal::MassSpringEngine< Inv_Masses, Velocities, SpringStiffness, IndexedSprings, Points, Real >::reset().  | 
  
 
1.3.6