Uses of Class
toxi.geom.Vec2D

Packages that use Vec2D
toxi.geom   
toxi.geom.mesh   
toxi.geom.mesh2d   
toxi.math   
 

Uses of Vec2D in toxi.geom
 

Subclasses of Vec2D in toxi.geom
 class Circle
          This class overrides Ellipse to define a 2D circle and provides several utility methods for it, including factory methods to construct circles from points.
 class Ellipse
          This class defines a 2D ellipse and provides several utility methods for it.
 class Ray2D
          A simple 2D ray datatype
 

Fields in toxi.geom declared as Vec2D
 Vec2D Triangle2D.a
           
 Vec2D Line2D.a
           
 Vec2D Triangle2D.b
           
 Vec2D Line2D.b
           
 Vec2D Triangle2D.c
           
 Vec2D Triangle2D.centroid
           
 Vec2D[] Spline2D.coeffA
           
 Vec2D[] Spline2D.delta
           
 

Fields in toxi.geom with type parameters of type Vec2D
 java.util.List<Vec2D> Spline2D.pointList
           
 java.util.List<Vec2D> Spline2D.vertices
           
 java.util.List<Vec2D> Polygon2D.vertices
           
 

Methods in toxi.geom that return Vec2D
 Vec2D Vec2D.abs()
           
 Vec2D Vec2D.add(float a, float b)
           
 Vec2D ReadonlyVec2D.add(float a, float b)
          Adds vector {a,b,c} and returns result as new vector.
 Vec2D Vec2D.add(ReadonlyVec2D v)
           
 Vec2D ReadonlyVec2D.add(ReadonlyVec2D v)
          Add vector v and returns result as new vector.
 Vec2D Vec2D.add(Vec2D v)
           
 Vec2D Vec2D.addSelf(float a, float b)
          Adds vector {a,b,c} and overrides coordinates with result.
 Vec2D Vec2D.addSelf(Vec2D v)
          Adds vector v and overrides coordinates with result.
 Vec2D Vec2D.clear()
          Sets all vector components to 0.
 Vec2D Line2D.closestPointTo(ReadonlyVec2D p)
          Computes the closest point on this line to the point given.
 Vec2D Triangle2D.computeCentroid()
           
 Vec2D Vec2D.constrain(Rect r)
          Forcefully fits the vector in the given rectangle.
 Vec2D Vec2D.constrain(Vec2D min, Vec2D max)
          Forcefully fits the vector in the given rectangle defined by the points.
 Vec2D Vec2D.copy()
           
 Vec2D ReadonlyVec2D.copy()
           
 Vec2D Vec2D.floor()
          Replaces the vector components with integer values of their current values
 Vec2D Vec2D.frac()
          Replaces the vector components with the fractional part of their current values
 Vec2D Triangle2D.fromBarycentric(ReadonlyVec3D p)
           
static Vec2D Vec2D.fromTheta(float theta)
          Creates a new vector from the given angle in the XY plane.
 Vec2D Vec2D.getAbs()
           
 Vec2D ReadonlyVec2D.getAbs()
           
 Vec2D Rect.getBottomRight()
           
 Vec2D Rect.getCentroid()
          Returns the centroid of the rectangle.
 Vec2D Polygon2D.getCentroid()
          Computes the polygon's centre of mass.
 Vec2D Triangle2D.getClosestPointTo(ReadonlyVec2D p)
          Finds and returns the closest point on any of the triangle edges to the point given.
 Vec2D Vec2D.getConstrained(Rect r)
           
 Vec2D ReadonlyVec2D.getConstrained(Rect r)
          Creates a copy of the vector which forcefully fits in the given rectangle.
 Vec2D Rect.getDimensions()
          Returns a vector containing the width and height of the rectangle.
 Vec2D Ray2D.getDirection()
          Returns a copy of the ray's direction vector.
 Vec2D Line2D.getDirection()
           
 Vec2D Vec2D.getFloored()
           
 Vec2D ReadonlyVec2D.getFloored()
          Creates a new vector whose components are the integer value of their current values
 Vec2D[] Ellipse.getFoci()
           
 Vec2D Vec2D.getFrac()
           
 Vec2D ReadonlyVec2D.getFrac()
          Creates a new vector whose components are the fractional part of their current values
 Vec2D Vec2D.getInverted()
           
 Vec2D ReadonlyVec2D.getInverted()
          Scales vector uniformly by factor -1 ( v = -v )
 Vec2D Vec2D.getLimited(float lim)
           
 Vec2D ReadonlyVec2D.getLimited(float lim)
          Creates a copy of the vector with its magnitude limited to the length given
 Vec2D Line2D.getMidPoint()
           
 Vec2D Line2D.getNormal()
           
 Vec2D Vec2D.getNormalized()
           
 Vec2D ReadonlyVec2D.getNormalized()
          Produces the normalized version as a new vector
 Vec2D Vec2D.getNormalizedTo(float len)
           
 Vec2D ReadonlyVec2D.getNormalizedTo(float len)
          Produces a new vector normalized to the given length.
 Vec2D Vec2D.getPerpendicular()
           
 Vec2D ReadonlyVec2D.getPerpendicular()
           
 Vec2D Ray2D.getPointAtDistance(float dist)
           
 Vec2D Line2D.LineIntersection.getPos()
           
 Vec2D Ellipse.getRadii()
           
 Vec2D Vec2D.getReciprocal()
           
 Vec2D ReadonlyVec2D.getReciprocal()
           
 Vec2D Vec2D.getReflected(ReadonlyVec2D normal)
           
 Vec2D ReadonlyVec2D.getReflected(ReadonlyVec2D normal)
           
 Vec2D Vec2D.getRotated(float theta)
           
 Vec2D ReadonlyVec2D.getRotated(float theta)
          Creates a new vector rotated by the given angle around the Z axis.
 Vec2D Vec2D.getSignum()
           
 Vec2D ReadonlyVec2D.getSignum()
          Creates a new vector in which all components are replaced with the signum of their original values.
 Vec2D[] Circle.getTangentPoints(ReadonlyVec2D p)
           
 Vec2D Rect.getTopLeft()
           
 Vec2D Vec2D.interpolateTo(ReadonlyVec2D v, float f)
           
 Vec2D ReadonlyVec2D.interpolateTo(ReadonlyVec2D v, float f)
          Interpolates the vector towards the given target vector, using linear interpolation
 Vec2D Vec2D.interpolateTo(ReadonlyVec2D v, float f, InterpolateStrategy s)
           
 Vec2D ReadonlyVec2D.interpolateTo(ReadonlyVec2D v, float f, InterpolateStrategy s)
          Interpolates the vector towards the given target vector, using the given InterpolateStrategy
 Vec2D Vec2D.interpolateTo(Vec2D v, float f)
           
 Vec2D Vec2D.interpolateTo(Vec2D v, float f, InterpolateStrategy s)
           
 Vec2D Vec2D.interpolateToSelf(ReadonlyVec2D v, float f)
          Interpolates the vector towards the given target vector, using linear interpolation
 Vec2D Vec2D.interpolateToSelf(ReadonlyVec2D v, float f, InterpolateStrategy s)
          Interpolates the vector towards the given target vector, using the given InterpolateStrategy
 Vec2D[] Circle.intersectsCircle(Circle c)
           
 Vec2D Vec2D.invert()
          Scales vector uniformly by factor -1 ( v = -v ), overrides coordinates with result
 Vec2D Vec2D.jitter(float j)
           
 Vec2D Vec2D.jitter(float jx, float jy)
          Adds random jitter to the vector in the range -j ...
 Vec2D Vec2D.jitter(java.util.Random rnd, float j)
           
 Vec2D Vec2D.jitter(java.util.Random rnd, float jx, float jy)
           
 Vec2D Vec2D.jitter(java.util.Random rnd, Vec2D jv)
           
 Vec2D Vec2D.jitter(Vec2D jv)
           
 Vec2D Vec2D.limit(float lim)
          Limits the vector's magnitude to the length given
 Vec2D Vec2D.max(Vec2D v)
           
 Vec2D ReadonlyVec2D.max(Vec2D v)
          Constructs a new vector consisting of the largest components of both vectors.
static Vec2D Vec2D.max(Vec2D a, Vec2D b)
          Constructs a new vector consisting of the largest components of both vectors.
 Vec2D Vec2D.maxSelf(Vec2D v)
          Adjusts the vector components to the maximum values of both vectors
 Vec2D Vec2D.min(Vec2D v)
           
 Vec2D ReadonlyVec2D.min(Vec2D v)
          Constructs a new vector consisting of the smallest components of both vectors.
static Vec2D Vec2D.min(Vec2D a, Vec2D b)
          Constructs a new vector consisting of the smallest components of both vectors.
 Vec2D Vec2D.minSelf(Vec2D v)
          Adjusts the vector components to the minimum values of both vectors
 Vec2D Vec2D.normalize()
          Normalizes the vector so that its magnitude = 1
 Vec2D Vec2D.normalizeTo(float len)
          Normalizes the vector to the given length.
 Vec2D Vec2D.perpendicular()
           
static Vec2D Vec2D.randomVector()
          Static factory method.
static Vec2D Vec2D.randomVector(java.util.Random rnd)
          Static factory method.
 Vec2D Vec2D.reciprocal()
           
 Vec2D Vec2D.reflect(ReadonlyVec2D normal)
           
 Vec2D Vec2D.rotate(float theta)
          Rotates the vector by the given angle around the Z axis.
 Vec2D Vec2D.roundToAxis()
          Rounds the vector to the closest major axis.
 Vec2D Vec2D.scale(float s)
           
 Vec2D ReadonlyVec2D.scale(float s)
          Scales vector uniformly and returns result as new vector.
 Vec2D Vec2D.scale(float a, float b)
           
 Vec2D ReadonlyVec2D.scale(float a, float b)
          Scales vector non-uniformly and returns result as new vector.
 Vec2D Vec2D.scale(ReadonlyVec2D s)
           
 Vec2D ReadonlyVec2D.scale(ReadonlyVec2D s)
           
 Vec2D Vec2D.scale(Vec2D s)
           
 Vec2D ReadonlyVec2D.scale(Vec2D s)
          Scales vector non-uniformly by vector v and returns result as new vector
 Vec2D Vec2D.scaleSelf(float s)
          Scales vector uniformly and overrides coordinates with result
 Vec2D Vec2D.scaleSelf(float a, float b)
          Scales vector non-uniformly by vector {a,b,c} and overrides coordinates with result
 Vec2D Vec2D.scaleSelf(Vec2D s)
          Scales vector non-uniformly by vector v and overrides coordinates with result
 Vec2D Vec2D.set(float x, float y)
          Overrides coordinates with the given values
 Vec2D Vec2D.set(ReadonlyVec2D v)
           
 Vec2D Vec2D.set(Vec2D v)
          Overrides coordinates with the ones of the given vector
 Vec2D Vec2D.setComponent(int id, float val)
           
 Vec2D Vec2D.setComponent(Vec2D.Axis id, float val)
           
 Vec2D Vec2D.signum()
          Replaces all vector components with the signum of their original values.
 Vec2D Vec2D.sub(float a, float b)
           
 Vec2D ReadonlyVec2D.sub(float a, float b)
          Subtracts vector {a,b,c} and returns result as new vector.
 Vec2D Vec2D.sub(ReadonlyVec2D v)
           
 Vec2D ReadonlyVec2D.sub(ReadonlyVec2D v)
           
 Vec2D Vec2D.sub(Vec2D v)
           
 Vec2D ReadonlyVec2D.sub(Vec2D v)
          Subtracts vector v and returns result as new vector.
 Vec2D Vec2D.subSelf(float a, float b)
          Subtracts vector {a,b,c} and overrides coordinates with result.
 Vec2D Vec2D.subSelf(Vec2D v)
          Subtracts vector v and overrides coordinates with result.
 Vec2D Vec2D.tangentNormalOfEllipse(Vec2D eO, Vec2D eR)
           
 Vec2D ReadonlyVec2D.tangentNormalOfEllipse(Vec2D eO, Vec2D eR)
          Calculates the normal vector on the given ellipse in the direction of the current point.
 Vec2D Vec3D.to2DXY()
           
 Vec2D ReadonlyVec3D.to2DXY()
          Creates a new 2D vector of the XY components.
 Vec2D Vec3D.to2DXZ()
           
 Vec2D ReadonlyVec3D.to2DXZ()
          Creates a new 2D vector of the XZ components.
 Vec2D Vec3D.to2DYZ()
           
 Vec2D ReadonlyVec3D.to2DYZ()
          Creates a new 2D vector of the YZ components.
 Vec2D Vec2D.toCartesian()
           
 Vec2D ReadonlyVec2D.toCartesian()
          Converts the vector from polar to Cartesian space.
 Vec2D Vec2D.toPolar()
           
 Vec2D ReadonlyVec2D.toPolar()
          Converts the current vector into polar coordinates.
 

Methods in toxi.geom that return types with arguments of type Vec2D
 java.util.List<Vec2D> Spline2D.computeVertices(int res)
           Computes all curve vertices based on the resolution/number of subdivisions requested.
 java.util.List<Vec2D> Spline2D.getDecimatedVertices(float step)
          Computes a list of points along the spline which are uniformly separated by the given step distance.
 java.util.List<Vec2D> Spline2D.getDecimatedVertices(float step, boolean doAddFinalVertex)
          Computes a list of points along the spline which are uniformly separated by the given step distance.
 java.util.List<Vec2D> Spline2D.getPointList()
           
 java.util.List<Vec2D> PointQuadtree.getPoints()
           
 java.util.ArrayList<Vec2D> PointQuadtree.getPointsWithinRect(Rect r)
          Selects all stored points within the given axis-aligned bounding box.
 java.util.List<Vec2D> Line2D.splitIntoSegments(java.util.List<Vec2D> segments, float stepLength, boolean addFirst)
           
static java.util.List<Vec2D> Line2D.splitIntoSegments(Vec2D a, Vec2D b, float stepLength, java.util.List<Vec2D> segments, boolean addFirst)
          Splits the line between A and B into segments of the given length, starting at point A.
 

Methods in toxi.geom with parameters of type Vec2D
 Vec2D Vec2D.add(Vec2D v)
           
 Polygon2D Polygon2D.add(Vec2D p)
          Adds a new vertex to the polygon (builder pattern).
 boolean PointQuadtree.addPoint(Vec2D p)
          Adds a new point/particle to the tree structure.
 Vec2D Vec2D.addSelf(Vec2D v)
          Adds vector v and overrides coordinates with result.
 Vec3D Vec2D.bisect(Vec2D b)
           
 Vec3D ReadonlyVec2D.bisect(Vec2D p)
          Computes the perpendicular bisector of two points.
 Vec2D Vec2D.constrain(Vec2D min, Vec2D max)
          Forcefully fits the vector in the given rectangle defined by the points.
static Circle Circle.from2Points(Vec2D p1, Vec2D p2)
          Factory method to construct a circle which has the two given points lying on its perimeter.
static Circle Circle.from3Points(Vec2D p1, Vec2D p2, Vec2D p3)
          Factory method to construct a circle which has the three given points lying on its perimeter.
static Rect Rect.fromCenterExtent(ReadonlyVec2D center, Vec2D extent)
          Factory method, constructs a new rectangle from a center point and extent vector.
 float Ray2D.getDistanceToPoint(Vec2D p)
          Calculates the distance between the given point and the infinite line coinciding with this ray.
 boolean Line2D.hasEndPoint(Vec2D p)
           
 Vec2D Vec2D.interpolateTo(Vec2D v, float f)
           
 Vec2D Vec2D.interpolateTo(Vec2D v, float f, InterpolateStrategy s)
           
static boolean Triangle2D.isClockwise(Vec2D a, Vec2D b, Vec2D c)
           
 boolean Vec2D.isInTriangle(Vec2D a, Vec2D b, Vec2D c)
           
 boolean ReadonlyVec2D.isInTriangle(Vec2D a, Vec2D b, Vec2D c)
          Checks if point vector is inside the triangle created by the points a, b and c.
 Vec2D Vec2D.jitter(java.util.Random rnd, Vec2D jv)
           
 Vec2D Vec2D.jitter(Vec2D jv)
           
 Vec2D Vec2D.max(Vec2D v)
           
 Vec2D ReadonlyVec2D.max(Vec2D v)
          Constructs a new vector consisting of the largest components of both vectors.
static Vec2D Vec2D.max(Vec2D a, Vec2D b)
          Constructs a new vector consisting of the largest components of both vectors.
 Vec2D Vec2D.maxSelf(Vec2D v)
          Adjusts the vector components to the maximum values of both vectors
 Vec2D Vec2D.min(Vec2D v)
           
 Vec2D ReadonlyVec2D.min(Vec2D v)
          Constructs a new vector consisting of the smallest components of both vectors.
static Vec2D Vec2D.min(Vec2D a, Vec2D b)
          Constructs a new vector consisting of the smallest components of both vectors.
 Vec2D Vec2D.minSelf(Vec2D v)
          Adjusts the vector components to the minimum values of both vectors
 Line2D Line2D.offsetAndGrowBy(float offset, float scale, Vec2D ref)
           
 Vec2D Vec2D.scale(Vec2D s)
           
 Vec2D ReadonlyVec2D.scale(Vec2D s)
          Scales vector non-uniformly by vector v and returns result as new vector
 Vec2D Vec2D.scaleSelf(Vec2D s)
          Scales vector non-uniformly by vector v and overrides coordinates with result
 Vec2D Vec2D.set(Vec2D v)
          Overrides coordinates with the ones of the given vector
 Line2D Line2D.set(Vec2D a, Vec2D b)
           
 void Triangle2D.set(Vec2D a2, Vec2D b2, Vec2D c2)
           
 Rect Rect.setDimension(Vec2D dim)
           
 Rect Rect.setPosition(Vec2D pos)
           
 Vec3D Vec3D.setXY(Vec2D v)
          Overrides XY coordinates with the ones of the given 2D vector.
static java.util.List<Vec2D> Line2D.splitIntoSegments(Vec2D a, Vec2D b, float stepLength, java.util.List<Vec2D> segments, boolean addFirst)
          Splits the line between A and B into segments of the given length, starting at point A.
 Vec2D Vec2D.sub(Vec2D v)
           
 Vec2D ReadonlyVec2D.sub(Vec2D v)
          Subtracts vector v and returns result as new vector.
 Vec2D Vec2D.subSelf(Vec2D v)
          Subtracts vector v and overrides coordinates with result.
 Vec2D Vec2D.tangentNormalOfEllipse(Vec2D eO, Vec2D eR)
           
 Vec2D ReadonlyVec2D.tangentNormalOfEllipse(Vec2D eO, Vec2D eR)
          Calculates the normal vector on the given ellipse in the direction of the current point.
 

Method parameters in toxi.geom with type arguments of type Vec2D
 boolean PointQuadtree.addAll(java.util.Collection<Vec2D> points)
          Adds all points of the collection to the quadtree.
 void PointQuadtree.removeAll(java.util.Collection<Vec2D> points)
           
 Spline2D Spline2D.setPointList(java.util.List<Vec2D> plist)
          Overrides the current control points with the given list.
 java.util.List<Vec2D> Line2D.splitIntoSegments(java.util.List<Vec2D> segments, float stepLength, boolean addFirst)
           
static java.util.List<Vec2D> Line2D.splitIntoSegments(Vec2D a, Vec2D b, float stepLength, java.util.List<Vec2D> segments, boolean addFirst)
          Splits the line between A and B into segments of the given length, starting at point A.
 

Constructors in toxi.geom with parameters of type Vec2D
Line2D(Vec2D a, Vec2D b)
           
PointQuadtree(Vec2D o, float size)
          Constructs a new PointQuadtree node within the Rect: {o.x, o.y} ...
Polygon2D(Vec2D... points)
           
Spline2D(Vec2D[] pointArray)
           
Spline2D(Vec2D[] pointArray, BernsteinPolynomial b, float tightness)
           
 

Constructor parameters in toxi.geom with type arguments of type Vec2D
Polygon2D(java.util.List<Vec2D> points)
           
Spline2D(java.util.List<Vec2D> rawPoints)
           
Spline2D(java.util.List<Vec2D> rawPoints, BernsteinPolynomial b, float tightness)
           
 

Uses of Vec2D in toxi.geom.mesh
 

Fields in toxi.geom.mesh declared as Vec2D
 Vec2D Face.uvA
           
 Vec2D Face.uvB
           
 Vec2D Face.uvC
           
 

Methods in toxi.geom.mesh with parameters of type Vec2D
 WETriangleMesh WETriangleMesh.addFace(Vec3D a, Vec3D b, Vec3D c, Vec2D uvA, Vec2D uvB, Vec2D uvC)
           
 TriangleMesh TriangleMesh.addFace(Vec3D a, Vec3D b, Vec3D c, Vec2D uvA, Vec2D uvB, Vec2D uvC)
           
 Mesh3D Mesh3D.addFace(Vec3D a, Vec3D b, Vec3D c, Vec2D uvA, Vec2D uvB, Vec2D uvC)
          Adds the given 3 points as triangle face to the mesh and assigns the given texture coordinates to each vertex.
 WETriangleMesh WETriangleMesh.addFace(Vec3D a, Vec3D b, Vec3D c, Vec3D n, Vec2D uvA, Vec2D uvB, Vec2D uvC)
           
 TriangleMesh TriangleMesh.addFace(Vec3D a, Vec3D b, Vec3D c, Vec3D n, Vec2D uvA, Vec2D uvB, Vec2D uvC)
           
 Mesh3D Mesh3D.addFace(Vec3D a, Vec3D b, Vec3D c, Vec3D n, Vec2D uvA, Vec2D uvB, Vec2D uvC)
           
 

Constructors in toxi.geom.mesh with parameters of type Vec2D
Face(Vertex a, Vertex b, Vertex c, Vec2D uvA, Vec2D uvB, Vec2D uvC)
           
WEFace(WEVertex a, WEVertex b, WEVertex c, Vec2D uvA, Vec2D uvB, Vec2D uvC)
           
 

Uses of Vec2D in toxi.geom.mesh2d
 

Methods in toxi.geom.mesh2d that return Vec2D
 Vec2D DelaunayVertex.toVec2D()
           
 

Methods in toxi.geom.mesh2d that return types with arguments of type Vec2D
 java.util.List<Vec2D> Voronoi.getSites()
           
 

Methods in toxi.geom.mesh2d with parameters of type Vec2D
 void Voronoi.addPoint(Vec2D p)
           
 

Method parameters in toxi.geom.mesh2d with type arguments of type Vec2D
 void Voronoi.addPoints(java.util.List<Vec2D> points)
           
 

Uses of Vec2D in toxi.math
 

Methods in toxi.math with parameters of type Vec2D
static float Interpolation2D.bilinear(Vec2D p, Vec2D p1, Vec2D p2, float tl, float tr, float bl, float br)