Ult3D
Implementation of "Ultimate 3D Game Engine Design & Architecture" by Allan Sherrod
Loading...
Searching...
No Matches
Ult::Spring Class Reference

#include <Spring.h>

Public Member Functions

 Spring ()
 
 ~Spring ()
 
void SetSpring (float t, float c, float l, SpringMass *m1, SpringMass *m2)
 
void Update ()
 

Detailed Description

Represents a spring between two SpringMasses with tension, a spring constant, and length.

Constructor & Destructor Documentation

◆ Spring()

Ult::Spring::Spring ( )
inline

Spring constructor.

◆ ~Spring()

Ult::Spring::~Spring ( )
inline

Spring destructor.

Member Function Documentation

◆ SetSpring()

void Ult::Spring::SetSpring ( float t,
float c,
float l,
SpringMass * m1,
SpringMass * m2 )
inline

Set this spring's properties.

Parameters
tSpring tension
cSpring constant
lSpring length
m1Pointer to the first connected object
m2Pointer to the second connected object

◆ Update()

void Ult::Spring::Update ( )
inline

Calculate tension and apply forces to the two masses accordingly.


The documentation for this class was generated from the following file: