Uses of Interface
toxi.geom.ReadonlyVec2D
-
Uses of ReadonlyVec2D in toxi.geom
Modifier and TypeClassDescriptionclass
This class overridesEllipse
to define a 2D circle and provides several utility methods for it, including factory methods to construct circles from points.class
This class defines a 2D ellipse and provides several utility methods for it.class
A simple 2D ray datatypeclass
Comprehensive 2D vector class with additional basic intersection and collision detection features.Modifier and TypeFieldDescriptionIsectData2D.dir
static final ReadonlyVec2D
Vec2D.MAX_VALUE
Defines vector with both coords set to Float.MAX_VALUE.static final ReadonlyVec2D
Vec2D.MIN_VALUE
Defines vector with both coords set to Float.MIN_VALUE.static final ReadonlyVec2D
Vec2D.NEG_MAX_VALUE
IsectData2D.normal
IsectData2D.pos
static final ReadonlyVec2D
Vec2D.X_AXIS
Defines positive X axisstatic final ReadonlyVec2D
Vec2D.Y_AXIS
Defines positive Y axisstatic final ReadonlyVec2D
Vec2D.ZERO
Defines the zero vector.Modifier and TypeMethodDescriptionVec2D.Axis.getVector()
Rect.intersectsRay
(Ray2D ray, float minDist, float maxDist) Checks if the rectangle intersects with the given ray and if so computes the first intersection point.Modifier and TypeMethodDescriptionLineStrip2D.add
(ReadonlyVec2D p) ReadonlyVec2D.add
(ReadonlyVec2D v) Add vector v and returns result as new vector.Spline2D.add
(ReadonlyVec2D p) Adds a copy of the given point to the list of control points.Vec2D.add
(ReadonlyVec2D v) float
ReadonlyVec2D.angleBetween
(ReadonlyVec2D v) Computes the angle between this vector and vector V.float
ReadonlyVec2D.angleBetween
(ReadonlyVec2D v, boolean forceNormalize) Computes the angle between this vector and vector Vfinal float
Vec2D.angleBetween
(ReadonlyVec2D v) final float
Vec2D.angleBetween
(ReadonlyVec2D v, boolean forceNormalize) Polygon2D.center
(ReadonlyVec2D origin) Centers the polygon so that its new centroid is at the given point.float
Line2D.classifyPoint
(ReadonlyVec2D p) Computes the dot product of these 2 vectors: line start -> point and the perpendicular line direction.Line2D.closestPointTo
(ReadonlyVec2D p) Computes the closest point on this line to the point given.int
ReadonlyVec2D.compareTo
(ReadonlyVec2D v) Compares the length of the vector with another one.int
Vec2D.compareTo
(ReadonlyVec2D v) boolean
Circle.containsPoint
(ReadonlyVec2D p) boolean
Ellipse.containsPoint
(ReadonlyVec2D p) boolean
Polygon2D.containsPoint
(ReadonlyVec2D p) boolean
Rect.containsPoint
(ReadonlyVec2D p) Checks if the given point is within the rectangle's bounds.boolean
Shape2D.containsPoint
(ReadonlyVec2D p) Checks if the point is within the given shape.boolean
Triangle2D.containsPoint
(ReadonlyVec2D p) Checks if the given point is inside the triangle created by the points a, b and c.static Triangle2D
Triangle2D.createEquilateralFrom
(ReadonlyVec2D a, ReadonlyVec2D b) float
ReadonlyVec2D.cross
(ReadonlyVec2D v) Calculates the cross-product with the given vector.float
Vec2D.cross
(ReadonlyVec2D v) float
ReadonlyVec2D.distanceTo
(ReadonlyVec2D v) Calculates distance to another vectorfinal float
Vec2D.distanceTo
(ReadonlyVec2D v) float
Line2D.distanceToPoint
(ReadonlyVec2D p) float
Line2D.distanceToPointSquared
(ReadonlyVec2D p) float
ReadonlyVec2D.distanceToSquared
(ReadonlyVec2D v) Calculates the squared distance to another vectorfinal float
Vec2D.distanceToSquared
(ReadonlyVec2D v) float
ReadonlyVec2D.dot
(ReadonlyVec2D v) Computes the scalar product (dot product) with the given vector.final float
Vec2D.dot
(ReadonlyVec2D v) boolean
Vec2D.equals
(ReadonlyVec2D v) Returns true if all of the data members of ReadonlyVec2D v are equal to the corresponding data members in this vector.boolean
ReadonlyVec2D.equalsWithTolerance
(ReadonlyVec2D v, float tolerance) Compares this vector with the one given.boolean
Vec2D.equalsWithTolerance
(ReadonlyVec2D v, float tolerance) static final Rect
Rect.fromCenterExtent
(ReadonlyVec2D center, Vec2D extent) Factory method, constructs a new rectangle from a center point and extent vector.Polygon2D.getClosestPointTo
(ReadonlyVec2D p) Triangle2D.getClosestPointTo
(ReadonlyVec2D p) Finds and returns the closest point on any of the triangle edges to the point given.Polygon2D.getClosestVertexTo
(ReadonlyVec2D p) ReadonlyVec2D.getReflected
(ReadonlyVec2D normal) final Vec2D
Vec2D.getReflected
(ReadonlyVec2D normal) Vec2D[]
Circle.getTangentPoints
(ReadonlyVec2D p) Rect.growToContainPoint
(ReadonlyVec2D p) ReadonlyVec2D.interpolateTo
(ReadonlyVec2D v, float f) Interpolates the vector towards the given target vector, using linear interpolationReadonlyVec2D.interpolateTo
(ReadonlyVec2D v, float f, InterpolateStrategy s) Interpolates the vector towards the given target vector, using the givenInterpolateStrategy
Vec2D.interpolateTo
(ReadonlyVec2D v, float f) Vec2D.interpolateTo
(ReadonlyVec2D v, float f, InterpolateStrategy s) final Vec2D
Vec2D.interpolateToSelf
(ReadonlyVec2D v, float f) Interpolates the vector towards the given target vector, using linear interpolationVec2D.interpolateToSelf
(ReadonlyVec2D v, float f, InterpolateStrategy s) Interpolates the vector towards the given target vector, using the givenInterpolateStrategy
boolean
ReadonlyVec2D.isInCircle
(ReadonlyVec2D sO, float sR) Checks if the point is inside the given sphere.boolean
Vec2D.isInCircle
(ReadonlyVec2D sO, float sR) ReadonlyVec2D.max
(ReadonlyVec2D v) Constructs a new vector consisting of the largest components of both vectors.final Vec2D
Vec2D.max
(ReadonlyVec2D v) static final Vec2D
Vec2D.max
(ReadonlyVec2D a, ReadonlyVec2D b) Constructs a new vector consisting of the largest components of both vectors.final Vec2D
Vec2D.maxSelf
(ReadonlyVec2D v) Adjusts the vector components to the maximum values of both vectorsReadonlyVec2D.min
(ReadonlyVec2D v) Constructs a new vector consisting of the smallest components of both vectors.final Vec2D
Vec2D.min
(ReadonlyVec2D v) static final Vec2D
Vec2D.min
(ReadonlyVec2D a, ReadonlyVec2D b) Constructs a new vector consisting of the smallest components of both vectors.final Vec2D
Vec2D.minSelf
(ReadonlyVec2D v) Adjusts the vector components to the minimum values of both vectorsfinal Vec2D
Vec2D.reflect
(ReadonlyVec2D normal) LineStrip2D.scale
(ReadonlyVec2D scale) Polygon2D.scale
(ReadonlyVec2D scale) ReadonlyVec2D.scale
(ReadonlyVec2D s) final Vec2D
Vec2D.scale
(ReadonlyVec2D s) LineStrip2D.scaleSize
(ReadonlyVec2D scale) Polygon2D.scaleSize
(ReadonlyVec2D scale) final GVector
GVector.set
(ReadonlyVec2D tuple) Sets the value of this vector to the values in tuplefinal Vec2D
Vec2D.set
(ReadonlyVec2D v) Ray2D.setDirection
(ReadonlyVec2D d) Uses a normalized copy of the given vector as the ray direction.Ray2D.setNormalizedDirection
(ReadonlyVec2D d) ReadonlyVec2D.sub
(ReadonlyVec2D v) final Vec2D
Vec2D.sub
(ReadonlyVec2D v) Triangle2D.toBarycentric
(ReadonlyVec2D p) Produces the barycentric coordinates of the given point within this triangle.LineStrip2D.translate
(ReadonlyVec2D offset) Polygon2D.translate
(ReadonlyVec2D offset) Rect.translate
(ReadonlyVec2D offset) ModifierConstructorDescriptionCircle
(ReadonlyVec2D origin, float radius) Ellipse
(ReadonlyVec2D v, float r) Constructs a new GVector and copies the initial values from the specified tuple.Line2D
(ReadonlyVec2D a, ReadonlyVec2D b) LineIntersection
(Line2D.LineIntersection.Type type, ReadonlyVec2D pos, float ua, float ub) Ray2D
(float x, float y, ReadonlyVec2D d) Ray2D
(ReadonlyVec2D o, ReadonlyVec2D d) Rect
(ReadonlyVec2D p1, ReadonlyVec2D p2) Constructs a new rectangle defined by the two points given.Creates a new vector with the coordinates of the given vector -
Uses of ReadonlyVec2D in toxi.physics2d
Modifier and TypeClassDescriptionclass
An individual 3D particle for use by the VerletPhysics and VerletSpring classes.ModifierConstructorDescriptionCreates particle at the position of the passed in vectorVerletParticle2D
(ReadonlyVec2D v, float w) Creates particle with weight w at the position of the passed in vector -
Uses of ReadonlyVec2D in toxi.processing
Modifier and TypeMethodDescriptionvoid
ArrowModifier.apply
(ToxiclibsSupport gfx, ReadonlyVec2D a, ReadonlyVec2D b) void
DashedLineModifier.apply
(ToxiclibsSupport gfx, ReadonlyVec2D a, ReadonlyVec2D b) void
Line2DRenderModifier.apply
(ToxiclibsSupport gfx, ReadonlyVec2D a, ReadonlyVec2D b) final void
ToxiclibsSupport.line
(ReadonlyVec2D a, ReadonlyVec2D b) final void
ToxiclibsSupport.line
(ReadonlyVec2D a, ReadonlyVec2D b, Line2DRenderModifier modifier) final void
ToxiclibsSupport.point
(ReadonlyVec2D v) final void
ToxiclibsSupport.scale
(ReadonlyVec2D v) final void
ToxiclibsSupport.translate
(ReadonlyVec2D v) final void
ToxiclibsSupport.vertex
(ReadonlyVec2D v)