Package org.seamcat.model.functions
Class VectorSpace
- java.lang.Object
-
- org.seamcat.model.functions.VectorSpace
-
public class VectorSpace extends java.lang.Object
A vector range is a description of a vector space used to define the boundaries of positioned elements of a simulation. The vector space is not a generalized vector space but can only take the shape of a convex space. Furthermore it is composed of two types of shapes: a rectangular vector space and a circle.
-
-
Field Summary
Fields Modifier and Type Field Description static VectorSpace
ZERO
-
Constructor Summary
Constructors Constructor Description VectorSpace(Bounds xBounds, Bounds yBounds)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VectorSpace
add(VectorSpace range)
VectorSpace
addCircle(Bounds bounds)
Grow the vector space by adding a circles radius bounds.Bounds
getCoverage()
Finds the bounds for this rectangle, i.e.Point2D
getPoint()
Bounds
getxBounds()
Bounds
getyBounds()
VectorSpace
negate()
java.lang.String
toString()
-
-
-
Field Detail
-
ZERO
public static final VectorSpace ZERO
-
-
Method Detail
-
getxBounds
public Bounds getxBounds()
-
getyBounds
public Bounds getyBounds()
-
add
public VectorSpace add(VectorSpace range)
-
negate
public VectorSpace negate()
-
addCircle
public VectorSpace addCircle(Bounds bounds)
Grow the vector space by adding a circles radius bounds. This means to increase the area of the rectangle by the max radius.- Parameters:
bounds
- the min max of the circle to extend this space with- Returns:
- new instance of vector space as defined by adding the given circle this the current instance
-
getCoverage
public Bounds getCoverage()
Finds the bounds for this rectangle, i.e. minimum and maximum length of any vector inside this space. Returned as a Bounds- Returns:
- Bounds representing the min and max length of any vector inside this space
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getPoint
public Point2D getPoint()
-
-