hAPI Fisica  0.1
The hAPI Fisica physics engine expands Richard Marxer's fisica for Processing. The engine wraps the jbox2d physics engine for use with the Haply Development kit and the Hapkit.
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
FJoint Class Referenceabstract
Inheritance diagram for FJoint:
FDrawable FConstantVolumeJoint FDistanceJoint FGearJoint FMouseJoint FPrismaticJoint FRevoluteJoint

Public Member Functions

Joint getBox2dJoint ()
 
void addToWorld (FWorld world)
 
void removeFromWorld ()
 
FBody getBody1 ()
 
FBody getBody2 ()
 
void setCollideConnected (boolean value)
 
float getReactionForceX ()
 
float getReactionForceY ()
 
float getReactionTorque ()
 
- Public Member Functions inherited from FDrawable
void draw (PGraphics graphics)
 
void draw (PApplet applet)
 
void drawDebug (PGraphics graphics)
 
void drawDebug (PApplet applet)
 
void attachImage (PImage img)
 
void dettachImage ()
 
float getImageAlpha ()
 
void setImageAlpha (float alpha)
 
void setDrawable (boolean drawable)
 
boolean isDrawable ()
 
int getFillColor ()
 
void setFillColor (int col)
 
void setNoFill ()
 
void setFill (float g)
 
void setFill (float g, float a)
 
void setFill (float r, float g, float b)
 
void setFill (float r, float g, float b, float a)
 
void setStrokeColor (int col)
 
void setNoStroke ()
 
void setStroke (float g)
 
void setStroke (float g, float a)
 
void setStroke (float r, float g, float b)
 
void setStroke (float r, float g, float b, float a)
 
void setStrokeWeight (float weight)
 

Protected Member Functions

void processJoint (World world, JointDef jd)
 
JointDef getJointDef (FWorld world)
 
void preDraw (PGraphics applet)
 
void postDraw (PGraphics applet)
 
void preDrawDebug (PGraphics applet)
 
void postDrawDebug (PGraphics applet)
 
- Protected Member Functions inherited from FDrawable
void updateStyle (FDrawable other)
 
void appletStroke (PGraphics applet, int argb)
 
void appletFill (PGraphics applet, int argb)
 
void appletFillStroke (PGraphics applet)
 
void drawImage (PGraphics applet)
 

Protected Attributes

Joint m_joint
 
FWorld m_world
 
boolean m_collideConnected = true
 
- Protected Attributes inherited from FDrawable
boolean m_drawable = true
 
boolean m_fill = true
 
int m_fillColor = 0xFFFFFFFF
 
boolean m_stroke = true
 
int m_strokeColor = 0xFF000000
 
float m_strokeWeight = 1.0f
 
PImage m_image = null
 
float m_imageAlpha = 255.0f
 
PImage m_mask = null
 

Detailed Description

Represents a joint between two or more bodies.

A joint establishes some kind of relation between two or more bodies. Depending on the specific joint the relation might be a distance relation, a rotation relation or even a volume conservation relation. This class cannot be be instantiated, instead use one of the derived classes.

Member Function Documentation

◆ getBody1()

FBody FJoint.getBody1 ( )

Returns the first body attached to this joint.

Returns
first of the bodies connected by this joint

◆ getBody2()

FBody FJoint.getBody2 ( )

Returns the second body attached to this joint.

Returns
second of the bodies connected by this joint

◆ getBox2dJoint()

Joint FJoint.getBox2dJoint ( )

WARNING: This method is internal only and may change someday. If you are using this method please contact the developer since there should be a better way or we may add something to the library.

Returns
the internal JBox2D joint

◆ getReactionForceX()

float FJoint.getReactionForceX ( )

Returns the horizontal component of the reaction force on the second body at the joint anchor.

Returns
horizontal component of the reaction force

◆ getReactionForceY()

float FJoint.getReactionForceY ( )

Returns the vertical component of the reaction force on the second body at the joint anchor.

Returns
vertical component of the reaction force

◆ getReactionTorque()

float FJoint.getReactionTorque ( )

Returns the reaction torque on the second body at the joint anchor.

Returns
reaction torque

◆ setCollideConnected()

void FJoint.setCollideConnected ( boolean  value)

Sets whether the bodies connected by the joint should collide with each other.

Parameters
valueif
true
the bodies connected by this joint will be allowed to collide with each other

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