Engine
|
data structure that represents a spring More...
#include <spring.h>
Public Member Functions | |
Spring () | |
Spring (GLfloat k, GLfloat l0, std::shared_ptr< PhysicsEntity > entity1_ptr, std::shared_ptr< PhysicsEntity > entity2_ptr) | |
Public Attributes | |
GLint | id |
GLfloat | k |
GLfloat | l0 |
std::shared_ptr< PhysicsEntity > | entity1_ptr |
std::shared_ptr< PhysicsEntity > | entity2_ptr |
data structure that represents a spring
Spring::Spring | ( | ) |
Constructs a spring with default stiffness and rest length, and no entites on its endpoints
Spring::Spring | ( | GLfloat | k, |
GLfloat | l0, | ||
std::shared_ptr< PhysicsEntity > | entity1_ptr, | ||
std::shared_ptr< PhysicsEntity > | entity2_ptr | ||
) |
Constucts a spring using the provided parameters
k | stiffness coefficent of the spring |
l0 | rest length of the spring |
entity1_ptr | pointer to entity on one end of the spring |
entity2_ptr | pointer to entity on other end of the spring |