simulator
Class BoxState

java.lang.Object
  |
  +--simulator.BoxState

class BoxState
extends java.lang.Object

Contains information about the position of a box


Field Summary
 boolean attachedBar
          True if the box has the same angle of the bar
 boolean collisionBar
          True if the box is collided to the bar
 double contactPoint
          Contain the relative position from bar massCenter of the point that box corner is in contact with the bar.
 int ID
          Identification number for box
 boolean lock
          If true means that the box is stopped, so there's static attrition
 Position massCenter
          The x,y position of the center of mass of box
 double xAngle
          The orientation angle from x axle
 
Constructor Summary
BoxState(BoxState box)
          Initialize box position using another box
BoxState(Position p, double a, int i)
          Initialize position of box
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

massCenter

public Position massCenter
The x,y position of the center of mass of box

xAngle

public double xAngle
The orientation angle from x axle

collisionBar

public boolean collisionBar
True if the box is collided to the bar

attachedBar

public boolean attachedBar
True if the box has the same angle of the bar

contactPoint

public double contactPoint
Contain the relative position from bar massCenter of the point that box corner is in contact with the bar. It also can contain relative position of the mass center perpendicular to the bar when attachedBar is true. NaN means that there's no contact

lock

public boolean lock
If true means that the box is stopped, so there's static attrition

ID

public int ID
Identification number for box
Constructor Detail

BoxState

public BoxState(Position p,
                double a,
                int i)
Initialize position of box
Parameters:
p - the x,y position of mass center
a - the rotation angle from x axle
i - an identifier for the box

BoxState

public BoxState(BoxState box)
Initialize box position using another box
Parameters:
box - the box to copy