public class OBB
extends java.lang.Object
Constructor and Description |
---|
OBB() |
OBB(double angle,
Point2 origin,
double width,
double height)
Creates OBB using given attributes
|
OBB(MTComponent mtComponent)
Creates an OBB associated to MTComponent mtComponent
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Point2 p)
Returns if p is contained in OBB - TO REFINE: ALWAYS RETURNS FALSE !!! -
|
double |
getAngle() |
double |
getHeight() |
MTComponent |
getMTComponent() |
Point2 |
getOrigin() |
double |
getScale() |
double |
getWidth() |
void |
rotate(double angle) |
void |
scale(double k) |
void |
setAngle(double angle) |
void |
setDimension(double width,
double height) |
void |
setOrigin(double x,
double y) |
void |
setOrigin(Tuple2 origin) |
void |
setPosition(OBB box)
Sets the position of this OBB at the same location as the box parameter
|
void |
setScale(double scale) |
void |
translate(Vector2 u) |
public OBB()
public OBB(MTComponent mtComponent)
mtComponent
- public OBB(double angle, Point2 origin, double width, double height)
angle
- origin
- width
- height
- public void setPosition(OBB box)
box
- public void setScale(double scale)
public double getScale()
public void setOrigin(double x, double y)
public void setOrigin(Tuple2 origin)
public Point2 getOrigin()
public void setAngle(double angle)
public double getAngle()
public double getWidth()
public double getHeight()
public MTComponent getMTComponent()
public boolean contains(Point2 p)
p
- public void translate(Vector2 u)
public void rotate(double angle)
public void scale(double k)
public void setDimension(double width, double height)