Uses of Interface
toxi.geom.ReadonlyVec2D
Packages that use ReadonlyVec2D
-
Uses of ReadonlyVec2D in toxi.geom
Classes in toxi.geom that implement ReadonlyVec2DModifier and TypeClassDescriptionclassThis class overridesEllipseto define a 2D circle and provides several utility methods for it, including factory methods to construct circles from points.classThis class defines a 2D ellipse and provides several utility methods for it.classA simple 2D ray datatypeclassComprehensive 2D vector class with additional basic intersection and collision detection features.Fields in toxi.geom declared as ReadonlyVec2DModifier and TypeFieldDescriptionIsectData2D.dirstatic final ReadonlyVec2DVec2D.MAX_VALUEDefines vector with both coords set to Float.MAX_VALUE.static final ReadonlyVec2DVec2D.MIN_VALUEDefines vector with both coords set to Float.MIN_VALUE.static final ReadonlyVec2DVec2D.NEG_MAX_VALUEIsectData2D.normalIsectData2D.posstatic final ReadonlyVec2DVec2D.X_AXISDefines positive X axisstatic final ReadonlyVec2DVec2D.Y_AXISDefines positive Y axisstatic final ReadonlyVec2DVec2D.ZERODefines the zero vector.Methods in toxi.geom that return ReadonlyVec2DModifier 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.Methods in toxi.geom with parameters of type ReadonlyVec2DModifier 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) floatReadonlyVec2D.angleBetween(ReadonlyVec2D v) Computes the angle between this vector and vector V.floatReadonlyVec2D.angleBetween(ReadonlyVec2D v, boolean forceNormalize) Computes the angle between this vector and vector Vfinal floatVec2D.angleBetween(ReadonlyVec2D v) final floatVec2D.angleBetween(ReadonlyVec2D v, boolean forceNormalize) Polygon2D.center(ReadonlyVec2D origin) Centers the polygon so that its new centroid is at the given point.floatLine2D.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.intReadonlyVec2D.compareTo(ReadonlyVec2D v) Compares the length of the vector with another one.intVec2D.compareTo(ReadonlyVec2D v) booleanCircle.containsPoint(ReadonlyVec2D p) booleanEllipse.containsPoint(ReadonlyVec2D p) booleanPolygon2D.containsPoint(ReadonlyVec2D p) booleanRect.containsPoint(ReadonlyVec2D p) Checks if the given point is within the rectangle's bounds.booleanShape2D.containsPoint(ReadonlyVec2D p) Checks if the point is within the given shape.booleanTriangle2D.containsPoint(ReadonlyVec2D p) Checks if the given point is inside the triangle created by the points a, b and c.static Triangle2DTriangle2D.createEquilateralFrom(ReadonlyVec2D a, ReadonlyVec2D b) floatReadonlyVec2D.cross(ReadonlyVec2D v) Calculates the cross-product with the given vector.floatVec2D.cross(ReadonlyVec2D v) floatReadonlyVec2D.distanceTo(ReadonlyVec2D v) Calculates distance to another vectorfinal floatVec2D.distanceTo(ReadonlyVec2D v) floatLine2D.distanceToPoint(ReadonlyVec2D p) floatLine2D.distanceToPointSquared(ReadonlyVec2D p) floatReadonlyVec2D.distanceToSquared(ReadonlyVec2D v) Calculates the squared distance to another vectorfinal floatVec2D.distanceToSquared(ReadonlyVec2D v) floatReadonlyVec2D.dot(ReadonlyVec2D v) Computes the scalar product (dot product) with the given vector.final floatVec2D.dot(ReadonlyVec2D v) booleanVec2D.equals(ReadonlyVec2D v) Returns true if all of the data members of ReadonlyVec2D v are equal to the corresponding data members in this vector.booleanReadonlyVec2D.equalsWithTolerance(ReadonlyVec2D v, float tolerance) Compares this vector with the one given.booleanVec2D.equalsWithTolerance(ReadonlyVec2D v, float tolerance) static final RectRect.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 Vec2DVec2D.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 givenInterpolateStrategyVec2D.interpolateTo(ReadonlyVec2D v, float f) Vec2D.interpolateTo(ReadonlyVec2D v, float f, InterpolateStrategy s) final Vec2DVec2D.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 givenInterpolateStrategybooleanReadonlyVec2D.isInCircle(ReadonlyVec2D sO, float sR) Checks if the point is inside the given sphere.booleanVec2D.isInCircle(ReadonlyVec2D sO, float sR) ReadonlyVec2D.max(ReadonlyVec2D v) Constructs a new vector consisting of the largest components of both vectors.final Vec2DVec2D.max(ReadonlyVec2D v) static final Vec2DVec2D.max(ReadonlyVec2D a, ReadonlyVec2D b) Constructs a new vector consisting of the largest components of both vectors.final Vec2DVec2D.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 Vec2DVec2D.min(ReadonlyVec2D v) static final Vec2DVec2D.min(ReadonlyVec2D a, ReadonlyVec2D b) Constructs a new vector consisting of the smallest components of both vectors.final Vec2DVec2D.minSelf(ReadonlyVec2D v) Adjusts the vector components to the minimum values of both vectorsfinal Vec2DVec2D.reflect(ReadonlyVec2D normal) LineStrip2D.scale(ReadonlyVec2D scale) Polygon2D.scale(ReadonlyVec2D scale) ReadonlyVec2D.scale(ReadonlyVec2D s) final Vec2DVec2D.scale(ReadonlyVec2D s) LineStrip2D.scaleSize(ReadonlyVec2D scale) Polygon2D.scaleSize(ReadonlyVec2D scale) final GVectorGVector.set(ReadonlyVec2D tuple) Sets the value of this vector to the values in tuplefinal Vec2DVec2D.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 Vec2DVec2D.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) Constructors in toxi.geom with parameters of type ReadonlyVec2DModifierConstructorDescriptionCircle(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
Classes in toxi.physics2d that implement ReadonlyVec2DModifier and TypeClassDescriptionclassAn individual 3D particle for use by the VerletPhysics and VerletSpring classes.Constructors in toxi.physics2d with parameters of type ReadonlyVec2DModifierConstructorDescriptionCreates 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
Methods in toxi.processing with parameters of type ReadonlyVec2DModifier and TypeMethodDescriptionvoidArrowModifier.apply(ToxiclibsSupport gfx, ReadonlyVec2D a, ReadonlyVec2D b) voidDashedLineModifier.apply(ToxiclibsSupport gfx, ReadonlyVec2D a, ReadonlyVec2D b) voidLine2DRenderModifier.apply(ToxiclibsSupport gfx, ReadonlyVec2D a, ReadonlyVec2D b) final voidToxiclibsSupport.line(ReadonlyVec2D a, ReadonlyVec2D b) final voidToxiclibsSupport.line(ReadonlyVec2D a, ReadonlyVec2D b, Line2DRenderModifier modifier) final voidToxiclibsSupport.point(ReadonlyVec2D v) final voidToxiclibsSupport.scale(ReadonlyVec2D v) final voidToxiclibsSupport.translate(ReadonlyVec2D v) final voidToxiclibsSupport.vertex(ReadonlyVec2D v)