Public Member Functions | Protected Member Functions | Protected Attributes | Friends
b2MouseJoint Class Reference

#include <b2MouseJoint.h>

Inheritance diagram for b2MouseJoint:
Inheritance graph
[legend]

List of all members.

Public Member Functions

void Dump ()
 The mouse joint does not support dumping.
b2Vec2 GetAnchorA () const
 Implements b2Joint.
b2Vec2 GetAnchorB () const
 Implements b2Joint.
float32 GetDampingRatio () const
float32 GetFrequency () const
float32 GetMaxForce () const
b2Vec2 GetReactionForce (float32 inv_dt) const
 Implements b2Joint.
float32 GetReactionTorque (float32 inv_dt) const
 Implements b2Joint.
const b2Vec2GetTarget () const
void SetDampingRatio (float32 ratio)
 Set/get the damping ratio (dimensionless).
void SetFrequency (float32 hz)
 Set/get the frequency in Hertz.
void SetMaxForce (float32 force)
 Set/get the maximum force in Newtons.
void SetTarget (const b2Vec2 &target)
 Use this to update the target point.
void ShiftOrigin (const b2Vec2 &newOrigin)
 Implement b2Joint::ShiftOrigin.

Protected Member Functions

 b2MouseJoint (const b2MouseJointDef *def)
void InitVelocityConstraints (const b2SolverData &data)
bool SolvePositionConstraints (const b2SolverData &data)
void SolveVelocityConstraints (const b2SolverData &data)

Protected Attributes

float32 m_beta
b2Vec2 m_C
float32 m_dampingRatio
float32 m_frequencyHz
float32 m_gamma
b2Vec2 m_impulse
int32 m_indexA
int32 m_indexB
float32 m_invIB
float32 m_invMassB
b2Vec2 m_localAnchorB
b2Vec2 m_localCenterB
b2Mat22 m_mass
float32 m_maxForce
b2Vec2 m_rB
b2Vec2 m_targetA

Friends

class b2Joint

Detailed Description

A mouse joint is used to make a point on a body track a specified world point. This a soft constraint with a maximum force. This allows the constraint to stretch and without applying huge forces. NOTE: this joint is not documented in the manual because it was developed to be used in the testbed. If you want to learn how to use the mouse joint, look at the testbed.

Definition at line 60 of file b2MouseJoint.h.


Constructor & Destructor Documentation

b2MouseJoint::b2MouseJoint ( const b2MouseJointDef def) [protected]

Definition at line 31 of file b2MouseJoint.cpp.


Member Function Documentation

void b2MouseJoint::Dump ( ) [inline, virtual]

The mouse joint does not support dumping.

Reimplemented from b2Joint.

Definition at line 93 of file b2MouseJoint.h.

b2Vec2 b2MouseJoint::GetAnchorA ( ) const [virtual]

Implements b2Joint.

Implements b2Joint.

Definition at line 199 of file b2MouseJoint.cpp.

b2Vec2 b2MouseJoint::GetAnchorB ( ) const [virtual]

Implements b2Joint.

Implements b2Joint.

Definition at line 204 of file b2MouseJoint.cpp.

Definition at line 91 of file b2MouseJoint.cpp.

Definition at line 81 of file b2MouseJoint.cpp.

Definition at line 71 of file b2MouseJoint.cpp.

b2Vec2 b2MouseJoint::GetReactionForce ( float32  inv_dt) const [virtual]

Implements b2Joint.

Implements b2Joint.

Definition at line 209 of file b2MouseJoint.cpp.

float32 b2MouseJoint::GetReactionTorque ( float32  inv_dt) const [virtual]

Implements b2Joint.

Implements b2Joint.

Definition at line 214 of file b2MouseJoint.cpp.

const b2Vec2 & b2MouseJoint::GetTarget ( ) const

Definition at line 61 of file b2MouseJoint.cpp.

void b2MouseJoint::InitVelocityConstraints ( const b2SolverData data) [protected, virtual]

Implements b2Joint.

Definition at line 96 of file b2MouseJoint.cpp.

Set/get the damping ratio (dimensionless).

Definition at line 86 of file b2MouseJoint.cpp.

Set/get the frequency in Hertz.

Definition at line 76 of file b2MouseJoint.cpp.

Set/get the maximum force in Newtons.

Definition at line 66 of file b2MouseJoint.cpp.

void b2MouseJoint::SetTarget ( const b2Vec2 target)

Use this to update the target point.

Definition at line 52 of file b2MouseJoint.cpp.

void b2MouseJoint::ShiftOrigin ( const b2Vec2 newOrigin) [virtual]

Implement b2Joint::ShiftOrigin.

Reimplemented from b2Joint.

Definition at line 219 of file b2MouseJoint.cpp.

bool b2MouseJoint::SolvePositionConstraints ( const b2SolverData data) [protected, virtual]

Implements b2Joint.

Definition at line 193 of file b2MouseJoint.cpp.

void b2MouseJoint::SolveVelocityConstraints ( const b2SolverData data) [protected, virtual]

Implements b2Joint.

Definition at line 168 of file b2MouseJoint.cpp.


Friends And Related Function Documentation

friend class b2Joint [friend]

Definition at line 99 of file b2MouseJoint.h.


Member Data Documentation

Definition at line 111 of file b2MouseJoint.h.

Definition at line 126 of file b2MouseJoint.h.

Definition at line 110 of file b2MouseJoint.h.

Definition at line 109 of file b2MouseJoint.h.

Definition at line 116 of file b2MouseJoint.h.

Definition at line 114 of file b2MouseJoint.h.

Definition at line 119 of file b2MouseJoint.h.

Definition at line 120 of file b2MouseJoint.h.

Definition at line 124 of file b2MouseJoint.h.

Definition at line 123 of file b2MouseJoint.h.

Definition at line 107 of file b2MouseJoint.h.

Definition at line 122 of file b2MouseJoint.h.

Definition at line 125 of file b2MouseJoint.h.

Definition at line 115 of file b2MouseJoint.h.

Definition at line 121 of file b2MouseJoint.h.

Definition at line 108 of file b2MouseJoint.h.


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


mvsim
Author(s):
autogenerated on Thu Sep 7 2017 09:27:49