Fx2D
A C++20 2D rigid-body physics engine
Loading...
Searching...
No Matches
FxMouseJoint Class Reference

#include <Joints.h>

Public Member Functions

bool attach (const std::shared_ptr< FxEntity > &entity, const FxVec2f &world_point)
 
void set_target (const FxVec2f &world_point)
 
void release ()
 
bool attached () const
 
const std::shared_ptr< FxEntity > & entity () const
 
const FxVec2f & target () const
 
const FxVec2f & local_anchor () const
 
FxVec2f anchor_world () const
 
void resolve (double dt)
 

Public Attributes

float frequency_hz = 5.0f
 
float damping_ratio = 0.7f
 
float max_force_per_kg = 1000.0f
 

Detailed Description

Definition at line 165 of file Joints.h.

Member Function Documentation

◆ anchor_world()

FxVec2f FxMouseJoint::anchor_world ( ) const

◆ attach()

bool FxMouseJoint::attach ( const std::shared_ptr< FxEntity > &  entity,
const FxVec2f &  world_point 
)

◆ attached()

bool FxMouseJoint::attached ( ) const
inline

Definition at line 190 of file Joints.h.

◆ entity()

const std::shared_ptr< FxEntity > & FxMouseJoint::entity ( ) const
inline

Definition at line 191 of file Joints.h.

◆ local_anchor()

const FxVec2f & FxMouseJoint::local_anchor ( ) const
inline

Definition at line 193 of file Joints.h.

◆ release()

void FxMouseJoint::release ( )

◆ resolve()

void FxMouseJoint::resolve ( double  dt)

◆ set_target()

void FxMouseJoint::set_target ( const FxVec2f &  world_point)
inline

Definition at line 187 of file Joints.h.

◆ target()

const FxVec2f & FxMouseJoint::target ( ) const
inline

Definition at line 192 of file Joints.h.

Member Data Documentation

◆ damping_ratio

float FxMouseJoint::damping_ratio = 0.7f

Definition at line 178 of file Joints.h.

◆ frequency_hz

float FxMouseJoint::frequency_hz = 5.0f

Definition at line 176 of file Joints.h.

◆ max_force_per_kg

float FxMouseJoint::max_force_per_kg = 1000.0f

Definition at line 181 of file Joints.h.


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