Engine
Spring Struct Reference

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< PhysicsEntityentity1_ptr
 
std::shared_ptr< PhysicsEntityentity2_ptr
 

Detailed Description

data structure that represents a spring

Constructor & Destructor Documentation

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

Parameters
kstiffness coefficent of the spring
l0rest length of the spring
entity1_ptrpointer to entity on one end of the spring
entity2_ptrpointer to entity on other end of the spring

The documentation for this struct was generated from the following files: