Package georegression.struct.shapes
Class Quadrilateral_F32
java.lang.Object
georegression.struct.shapes.Quadrilateral_F32
- All Implemented Interfaces:
Serializable,MapFormattable
@Generated("georegression.struct.shapes.Quadrilateral_F64")
public class Quadrilateral_F32
extends Object
implements Serializable, MapFormattable
A polygon with 4 vertices, a,b,c, and d. The vertices are in order sequential order of a,b,c,d.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionQuadrilateral_F32(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3) Quadrilateral_F32(Point2D_F32 a, Point2D_F32 b, Point2D_F32 c, Point2D_F32 d) Quadrilateral_F32(Point2D_F32 a, Point2D_F32 b, Point2D_F32 c, Point2D_F32 d, boolean copy) -
Method Summary
Modifier and TypeMethodDescriptionfloatarea()Returns the area of this quadrilateralconvert(@Nullable List<Point2D_F32> storage, boolean copy) Converts the polygon into a list.copy()formatMap(MapPrintFormat format) get(int index) getLine(int which, LineSegment2D_F32 storage) floatgetSideLength(int which) floatgetSideLength2(int which) booleanisEquals(Quadrilateral_F32 quad, float tol) Returns true if the two quadrilaterals are equal to each other to within tolerance.voidsetTo(Quadrilateral_F32 quad) voidsetTo(List<Point2D_F32> list) Sets the polygon to be the same as the list.toString()voidzero()Sets the value of all vertexes to be zeroMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.ejml.MapFormattable
formatMap
-
Field Details
-
a
-
b
-
c
-
d
-
-
Constructor Details
-
Quadrilateral_F32
public Quadrilateral_F32() -
Quadrilateral_F32
-
Quadrilateral_F32
public Quadrilateral_F32(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3) -
Quadrilateral_F32
-
Quadrilateral_F32
-
-
Method Details
-
zero
public void zero()Sets the value of all vertexes to be zero -
area
public float area()Returns the area of this quadrilateral- Returns:
- area
-
get
-
getLine
-
getSideLength
public float getSideLength(int which) -
getSideLength2
public float getSideLength2(int which) -
setTo
-
convert
Converts the polygon into a list.- Parameters:
storage- (Optional) storage to put the vertexes intocopy- If points will be copied otherwise a reference of points will be returned- Returns:
- List of vertexes
-
setTo
Sets the polygon to be the same as the list. A true copy is created and no references to points in the list are saved.- Parameters:
list- List which the polygon will be set to
-
copy
-
isEquals
Returns true if the two quadrilaterals are equal to each other to within tolerance. Equality is defined by seeing if the distance between two equivalent vertexes is within tolerance.- Parameters:
quad- The second quadrilateraltol- Maximum allowed distance between vertexes.- Returns:
- true if equals or false if not
-
formatMap
- Specified by:
formatMapin interfaceMapFormattable
-
toString
-