Titan  v1.0
A high-performance CUDA-based physics simulation sandbox for robotics, physics, and reinforcement learning.
titan::Spring Class Reference

#include <spring.h>

Public Member Functions

 Spring ()
 
 Spring (Mass *left, Mass *right)
 
 Spring (Mass *left, Mass *right, double k, double rest_length)
 
 Spring (Mass *left, Mass *right, double k, double rest_length, SpringType type, double omega)
 
void update (const CUDA_SPRING &spr)
 
void setRestLength (double rest_length)
 
void defaultLength ()
 
void changeType (SpringType type, double omega)
 
void addDamping (double constant)
 
void setLeft (Mass *left)
 
void setRight (Mass *right)
 
void setMasses (Mass *left, Mass *right)
 

Public Attributes

Mass_left
 
Mass_right
 
double _k
 
double _rest
 
SpringType _type
 
double _omega
 
double _damping
 

Friends

class Simulation
 
struct CUDA_SPRING
 
class Container
 
class Lattice
 
class Cube
 
class Beam
 

Constructor & Destructor Documentation

◆ Spring() [1/4]

titan::Spring::Spring ( )
inline

◆ Spring() [2/4]

titan::Spring::Spring ( Mass left,
Mass right 
)
inline

◆ Spring() [3/4]

titan::Spring::Spring ( Mass left,
Mass right,
double  k,
double  rest_length 
)
inline

◆ Spring() [4/4]

titan::Spring::Spring ( Mass left,
Mass right,
double  k,
double  rest_length,
SpringType  type,
double  omega 
)
inline

Member Function Documentation

◆ addDamping()

void titan::Spring::addDamping ( double  constant)
inline

◆ changeType()

void titan::Spring::changeType ( SpringType  type,
double  omega 
)
inline

◆ defaultLength()

void titan::Spring::defaultLength ( )

◆ setLeft()

void titan::Spring::setLeft ( Mass left)

◆ setMasses()

void titan::Spring::setMasses ( Mass left,
Mass right 
)
inline

◆ setRestLength()

void titan::Spring::setRestLength ( double  rest_length)
inline

◆ setRight()

void titan::Spring::setRight ( Mass right)

◆ update()

void titan::Spring::update ( const CUDA_SPRING spr)

Friends And Related Function Documentation

◆ Beam

friend class Beam
friend

◆ Container

friend class Container
friend

◆ Cube

friend class Cube
friend

◆ CUDA_SPRING

friend struct CUDA_SPRING
friend

◆ Lattice

friend class Lattice
friend

◆ Simulation

friend class Simulation
friend

Member Data Documentation

◆ _damping

double titan::Spring::_damping

◆ _k

double titan::Spring::_k

◆ _left

Mass* titan::Spring::_left

◆ _omega

double titan::Spring::_omega

◆ _rest

double titan::Spring::_rest

◆ _right

Mass* titan::Spring::_right

◆ _type

SpringType titan::Spring::_type

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