public class Polygon extends Variable
| Modifier and Type | Field and Description |
|---|---|
boolean |
incident |
static int |
MAX_POLY_VERTEX_COUNT |
Vec2[] |
normals |
boolean |
ref |
Mat2 |
u |
attributes, backupForSerialization, dependentVariables, id, logger, solver| Modifier | Constructor and Description |
|---|---|
protected |
Polygon(ConstraintSolver cs,
int id) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Variable arg0) |
Domain |
getDomain()
Get the domain of this Variable.
|
java.util.Vector<Vec2> |
getFullSpaceRepresentation() |
float |
getOrientation()
Get the orientation of this polygon (in radians).
|
Vec2 |
getPosition()
Get the reference position of this
Polygon. |
Vec2 |
getSupport(Vec2 dir) |
int |
getVertexCount()
Get number of vertices in this
Polygon. |
boolean |
hasDefaultDomain()
Returns whether or not the domain of this
Polygon has been refined. |
boolean |
isMovable()
Query whether this
Polygon is movable. |
void |
setDomain(Domain d)
Set the domain of this variable.
|
void |
setDomain(Vec2... verts)
Set the domain of this
Polygon, its vertices. |
void |
setMovable(boolean isMovable)
Set whether this
Polygon is movable. |
void |
setOrientation(float or)
Set the orientation of this polygon (in radians).
|
void |
setPosition(Vec2 position)
Set the reference position of this
Polygon. |
java.lang.String |
toString()
Get a
String representation of this Variable. |
addDependentVariables, dependsOn, equals, getAncestorVariable, getAttributes, getColor, getComponent, getConstraintSolver, getDependentVariables, getDescription, getID, getMarking, getOwner, getParentVariable, getRecursivelyDependentVariables, getRootVariable, hashCode, isDependentVariable, removeDependentVariables, setAttributes, setColor, setComponent, setDependentVariables, setMarking, setOwner, setParentVariablepublic static final int MAX_POLY_VERTEX_COUNT
public Vec2[] normals
public Mat2 u
public boolean ref
public boolean incident
protected Polygon(ConstraintSolver cs, int id)
public boolean hasDefaultDomain()
Polygon has been refined.true iff the domain of this Polygon has been refined.public void setMovable(boolean isMovable)
Polygon is movable.isMovable - Whether this Polygon is movable.public boolean isMovable()
Polygon is movable.true iff this Polygon is movable.public int getVertexCount()
Polygon.Polygon.public int compareTo(Variable arg0)
public Domain getDomain()
Variablepublic void setDomain(Domain d)
Variablepublic void setDomain(Vec2... verts)
Polygon, its vertices.verts - The vertices of this Polygon.public java.lang.String toString()
VariableString representation of this Variable.public float getOrientation()
public void setOrientation(float or)
or - The orientation of this polygon (in radians).public Vec2 getPosition()
Polygon.Polygon.public void setPosition(Vec2 position)
Polygon.position - The reference position of this Polygon.public java.util.Vector<Vec2> getFullSpaceRepresentation()