physics
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
SphericalJoint Class Reference

Ball-in-socket Joint, specifying an anchor on each body will constrain the two bodies at those points. More...

#include "spherical_joint.hpp"

Public Member Functions

 SphericalJoint (unsigned int indexA, vec3 anchorA, unsigned int indexB, vec3 anchorB)
 
int applyImpulse ()
 
int preStep (float dt)
 

Public Attributes

vec3 bias = vec3(0,0,0)
 
mat3 effective_mass = mat3(0.0f)
 
vec3 P = vec3(0,0,0)
 
RigidBodybody_a
 
RigidBodybody_b
 
vec3 anchor_a
 
vec3 anchor_b
 
vec3 anchor_a_ws
 
vec3 anchor_b_ws
 
float dt = 0.02f
 
unsigned int body_a_index
 
unsigned int body_b_index
 
bool unset = true
 

Static Public Attributes

static vector< SphericalJoint * > allJoints
 

Detailed Description

Ball-in-socket Joint, specifying an anchor on each body will constrain the two bodies at those points.

Constructor & Destructor Documentation

◆ SphericalJoint()

SphericalJoint::SphericalJoint ( unsigned int  indexA,
vec3  anchorA,
unsigned int  indexB,
vec3  anchorB 
)

Member Function Documentation

◆ applyImpulse()

int SphericalJoint::applyImpulse ( )

◆ preStep()

int SphericalJoint::preStep ( float  dt)

Member Data Documentation

◆ allJoints

vector<SphericalJoint*> SphericalJoint::allJoints
static

◆ anchor_a

vec3 SphericalJoint::anchor_a

◆ anchor_a_ws

vec3 SphericalJoint::anchor_a_ws

◆ anchor_b

vec3 SphericalJoint::anchor_b

◆ anchor_b_ws

vec3 SphericalJoint::anchor_b_ws

◆ bias

vec3 SphericalJoint::bias = vec3(0,0,0)

◆ body_a

RigidBody* SphericalJoint::body_a

◆ body_a_index

unsigned int SphericalJoint::body_a_index

◆ body_b

RigidBody* SphericalJoint::body_b

◆ body_b_index

unsigned int SphericalJoint::body_b_index

◆ dt

float SphericalJoint::dt = 0.02f

◆ effective_mass

mat3 SphericalJoint::effective_mass = mat3(0.0f)

◆ P

vec3 SphericalJoint::P = vec3(0,0,0)

◆ unset

bool SphericalJoint::unset = true

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