|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvooga.physicsEngine.geometry.GeometricParameters
public class GeometricParameters
Class encapsulating the parameters for a geometric object. This class holds the shape of the object, the position, and the angular position. This class is what the geometry.intersections package operates on.
Field Summary | |
---|---|
protected Shape |
shape
|
Constructor Summary | |
---|---|
GeometricParameters(Shape shape)
Creates a GeometricParameters object, represents a 2D geometric object with some shape, position, and location. |
|
GeometricParameters(Shape shape,
Vector2f position)
Creates a GeometricParameters object with given shape and position. |
|
GeometricParameters(Shape shape,
Vector2f position,
double angularPosition)
Creates a GeometricParameters object with given shape, position and angularPosition. |
Method Summary | |
---|---|
void |
drawShape(java.awt.Graphics g)
Code for internal debugging by the physics engine. |
Vector2f |
getAbsoluteCoordinate(Vector2f relativeCoordinate)
|
double |
getAngularPosition()
|
Vector2f |
getCentroidPosition()
|
JavaShape |
getJavaShape()
Return the JavaShape encapsulation of the GeometricParameter
's shape. |
Shape |
getShape()
|
java.awt.geom.Area |
getTransformedArea()
Code for internal rendering by the physics engine. |
void |
incrementAngularPosition(double difference)
|
void |
incrementPosition(Vector2f difference)
|
void |
setAngularPosition(double angularPosition)
|
void |
setCentroidPosition(Vector2f position)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final Shape shape
Constructor Detail |
---|
public GeometricParameters(Shape shape)
shape
- the Shape of the objectpublic GeometricParameters(Shape shape, Vector2f position)
shape
- the Shape of the objectposition
- the initial position of the objectpublic GeometricParameters(Shape shape, Vector2f position, double angularPosition)
shape
- position
- angularPosition
- Method Detail |
---|
public Shape getShape()
public void setCentroidPosition(Vector2f position)
position
- the centroid position to setpublic void incrementPosition(Vector2f difference)
difference
- the change in positionpublic Vector2f getCentroidPosition()
public void setAngularPosition(double angularPosition)
angularPosition
- the angularPosition to setpublic void incrementAngularPosition(double difference)
defference
- public double getAngularPosition()
public Vector2f getAbsoluteCoordinate(Vector2f relativeCoordinate)
vertex
-
public void drawShape(java.awt.Graphics g)
Graphics
- public JavaShape getJavaShape()
GeometricParameter
's shape.
public java.awt.geom.Area getTransformedArea()
java.awt.Area
object that factors in the current position
and rotation.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |