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 | |
FCircle (float size) | |
float | getSize () |
void | setSize (float size) |
void | draw (PGraphics applet) |
void | drawDebug (PGraphics applet) |
Public Member Functions inherited from FBody | |
Body | getBox2dBody () |
int | getGroupIndex () |
void | addToWorld (FWorld world) |
void | setState (FBody b) |
void | setStateFromWorld () |
void | recreateInWorld () |
void | removeFromWorld () |
void | setGroupIndex (int index) |
void | setFilterBits (int mask) |
void | setCategoryBits (int mask) |
int | getCategoryBits () |
int | getFilterBits () |
void | setParent (FBody b) |
FBody | getParent () |
void | setGrabbable (boolean value) |
void | setForce (float fx, float fy) |
float | getForceX () |
float | getForceY () |
void | addTorque (float torque) |
void | addForce (float fx, float fy) |
void | addImpulse (float fx, float fy) |
void | addForce (float fx, float fy, float px, float py) |
void | addImpulse (float fx, float fy, float px, float py) |
void | resetForces () |
float | getVelocityX () |
float | getVelocityY () |
void | setVelocity (float vx, float vy) |
void | adjustVelocity (float dvx, float dvy) |
float | getX () |
float | getY () |
void | setPosition (float x, float y) |
void | adjustPosition (float dx, float dy) |
float | getRotation () |
float | getHapticStiffness () |
float | getHapticDamping () |
void | setRotation (float w) |
void | adjustRotation (float dw) |
boolean | isResting () |
boolean | isSleeping () |
void | wakeUp () |
float | getAngularVelocity () |
void | setAngularVelocity (float w) |
void | adjustAngularVelocity (float dw) |
void | setAngularDamping (float damping) |
void | setDamping (float damping) |
void | setName (String name) |
String | getName () |
void | setDensity (float density) |
float | getDensity () |
void | setSensor (boolean value) |
boolean | isSensor () |
void | setHaptic (boolean value) |
void | setHaptic (boolean value, float stiffness, float damping) |
boolean | isHaptic () |
void | setHapticStiffness (float stiffness) |
void | setHapticDamping (float damping) |
void | setStaticBody (boolean value) |
void | setStatic (boolean value) |
float | getMass () |
boolean | isStatic () |
void | setBullet (boolean value) |
void | setRestitution (float restitution) |
void | setFriction (float friction) |
void | setRotatable (boolean rotatable) |
void | setAllowSleeping (boolean allowSleep) |
ArrayList | getTouching () |
ArrayList | getContacts () |
ArrayList | getJoints () |
boolean | isConnected (FBody other) |
boolean | isTouchingBody (FBody b) |
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 | |
ShapeDef | getShapeDef () |
ShapeDef | getTransformedShapeDef () |
Protected Member Functions inherited from FBody | |
void | processBody (Body bd, ShapeDef sd) |
ShapeDef | getShapeDef () |
ShapeDef | getTransformedShapeDef () |
ShapeDef | getProcessedShapeDef () |
ArrayList | getShapeDefs () |
ArrayList | getBodies () |
ShapeDef | processShapeDef (ShapeDef sd) |
void | preDraw (PGraphics applet) |
void | postDraw (PGraphics applet) |
void | preDrawDebug (PGraphics applet) |
void | postDrawDebug (PGraphics applet) |
AABB | getAABB () |
AABB | getBB () |
void | applyMatrix (PGraphics applet) |
void | setPosition (Vec2 position) |
void | updateMass () |
Vec2 | getLocalWorldPoint (Vec2 p) |
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 | |
float | m_size |
Protected Attributes inherited from FBody | |
float | m_density = 1.0f |
float | m_restitution = 0.1f |
float | m_friction = 0.1f |
boolean | m_bullet = false |
boolean | m_sensor = false |
boolean | m_static = false |
float | m_linearDamping = 0.5f |
float | m_gravityScale = 1.0f |
float | m_angularDamping = 0.5f |
boolean | m_rotatable = true |
boolean | m_allowSleep = true |
boolean | m_isSleeping = false |
int | m_groupIndex = 0 |
int | m_filterBits = 0xffff |
int | m_categoryBits = 0x0001 |
Vec2 | m_linearVelocity = new Vec2(0.0f, 0.0f) |
float | m_angularVelocity = 0.0f |
Vec2 | m_force = new Vec2(0.0f, 0.0f) |
float | m_torque = 0.0f |
Vec2 | m_position = new Vec2(0.0f, 0.0f) |
float | m_angle = 0.0f |
String | m_name |
Body | m_body |
FWorld | m_world |
FBody | m_parent |
boolean | m_grabbable = true |
boolean | h_isHaptic = true |
float | h_damping = 0.0f |
float | h_stiffness =0.0f |
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 |
Represents a circular body that can be added to a world.
Bodies
FCircle.FCircle | ( | float | size | ) |
Constructs a circular body that can be added to a world.
size | the size of the circle |
float FCircle.getSize | ( | ) |
Returns the size of the circle.
Bodies
void FCircle.setSize | ( | float | size | ) |
Sets the size of the circle. Under the hood the body is removed and readded to the world.
Bodies
size | the size of the circle |