-
Notifications
You must be signed in to change notification settings - Fork 21
Spring
Jacob Austin edited this page May 23, 2019
·
5 revisions
Springs connect masses together and exert forces on them according to Hooke's Law:
F = -k * delta_x
double _k; // Spring constant [N/m]
double _rest; // Rest length [m]
setLeft (Mass * left) // Sets left mass
setRight(Mass * right) // sets right mass
setMasses(Mass * left, Mass * right) // sets left and right masses
These methods set the left and right masses, respectively, and are required to handle reference counting.
- Home
- Quickstart
-
About the Titan Library
- Basic Concepts
- Functions
- Data Structures
- CPU - GPU Architecture
- Tutorials