Untitled Game engine no.5  1.0
Public Member Functions | Public Attributes | List of all members
Engine::Joint Struct Reference

Physics Component that represents a joint between rigidbodies. Intended to be connected to a Entity and registered in a scene. More...

#include <Components.hpp>

Public Member Functions

 Joint (Ref< RigidBody > &otherRigidBody, float maxLength)
 Connect two rigid-bodies at their respective centers at a given distance apart. More...
 
 Joint (glm::vec3 selfPosition, glm::vec3 globalPosition)
 tether local entity position to a global coordinate position More...
 
 Joint (glm::vec3 globalPosition, float maxLength=0)
 tether entity to a global coordinate More...
 

Public Attributes

glm::vec3 positionA = {0,0,0}
 
glm::vec3 positionB {}
 
Ref< RigidBodyconnectedRigidBody = nullptr
 
float minLength = 0
 
float maxLength = 0
 
float springConstant = 0
 
Ref< RigidBodyrigidBody = nullptr
 

Detailed Description

Physics Component that represents a joint between rigidbodies. Intended to be connected to a Entity and registered in a scene.

Constructor & Destructor Documentation

◆ Joint() [1/3]

Engine::Joint::Joint ( Ref< RigidBody > &  otherRigidBody,
float  maxLength 
)
inlineexplicit

Connect two rigid-bodies at their respective centers at a given distance apart.

Parameters
otherRigidBody
maxLength

◆ Joint() [2/3]

Engine::Joint::Joint ( glm::vec3  selfPosition,
glm::vec3  globalPosition 
)
inline

tether local entity position to a global coordinate position

Parameters
selfPosition
globalPosition

◆ Joint() [3/3]

Engine::Joint::Joint ( glm::vec3  globalPosition,
float  maxLength = 0 
)
inlineexplicit

tether entity to a global coordinate

Parameters
globalPosition
maxLengthmaximum length of the joint (default 0)

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