Modifier and Type | Method and Description |
---|---|
void |
OrthographicCamera.translate(Vector2 vec)
Moves the camera by the given vector.
|
Modifier and Type | Field and Description |
---|---|
protected Vector2 |
Decal.dimensions |
protected Vector2 |
Decal.scale |
Vector2 |
Decal.transformationOffset
The transformation offset can be used to change the pivot point for rotation and scaling.
|
Modifier and Type | Method and Description |
---|---|
protected Vector2 |
G3dModelLoader.readVector2(JsonValue vectorArray,
float x,
float y) |
Modifier and Type | Field and Description |
---|---|
Vector2 |
ModelTexture.uvScaling |
Vector2 |
ModelTexture.uvTranslation |
Modifier and Type | Method and Description |
---|---|
boolean |
BaseShader.set(int uniform,
Vector2 value) |
Modifier and Type | Field and Description |
---|---|
Vector2 |
MeshPartBuilder.VertexInfo.uv |
Modifier and Type | Method and Description |
---|---|
boolean |
CameraInputController.CameraGestureListener.pinch(Vector2 initialPointer1,
Vector2 initialPointer2,
Vector2 pointer1,
Vector2 pointer2) |
MeshPartBuilder.VertexInfo |
MeshPartBuilder.VertexInfo.set(Vector3 pos,
Vector3 nor,
Color col,
Vector2 uv) |
MeshPartBuilder.VertexInfo |
MeshPartBuilder.VertexInfo.setUV(Vector2 uv) |
short |
MeshBuilder.vertex(Vector3 pos,
Vector3 nor,
Color col,
Vector2 uv) |
short |
MeshPartBuilder.vertex(Vector3 pos,
Vector3 nor,
Color col,
Vector2 uv)
Add a vertex, returns the index.
|
Modifier and Type | Method and Description |
---|---|
void |
ShapeRenderer.line(Vector2 v0,
Vector2 v1) |
void |
ShapeRenderer.rectLine(Vector2 p1,
Vector2 p2,
float width) |
void |
ShaderProgram.setUniformf(int location,
Vector2 values) |
void |
ShaderProgram.setUniformf(java.lang.String name,
Vector2 values)
Sets the uniform with the given name.
|
void |
ShapeRenderer.x(Vector2 p,
float size) |
Modifier and Type | Method and Description |
---|---|
boolean |
GestureDetector.GestureListener.pinch(Vector2 initialPointer1,
Vector2 initialPointer2,
Vector2 pointer1,
Vector2 pointer2)
Called when a user performs a pinch zoom gesture.
|
boolean |
GestureDetector.GestureAdapter.pinch(Vector2 initialPointer1,
Vector2 initialPointer2,
Vector2 pointer1,
Vector2 pointer2) |
Modifier and Type | Field and Description |
---|---|
Vector2 |
Intersector.MinimumTranslationVector.normal
Unit length vector that indicates the direction for the separation
|
static Vector2 |
Vector2.X |
static Vector2 |
Vector2.Y |
static Vector2 |
Vector2.Zero |
Modifier and Type | Method and Description |
---|---|
Vector2 |
Vector2.add(float x,
float y)
Adds the given components to this vector
|
Vector2 |
Vector2.add(Vector2 v) |
Vector2 |
Vector2.clamp(float min,
float max) |
Vector2 |
Vector2.cpy() |
static Vector2 |
GeometryUtils.fromBarycoord(Vector2 barycentric,
Vector2 a,
Vector2 b,
Vector2 c,
Vector2 interpolatedOut)
Returns interpolated values given the barycentric coordinates of a point in a triangle and the values at each vertex.
|
Vector2 |
Vector2.fromString(java.lang.String v)
Sets this
Vector2 to the value represented by the specified string according to the format of toString() . |
Vector2 |
Rectangle.getCenter(Vector2 vector)
Calculates the center of the rectangle.
|
Vector2 |
Rectangle.getPosition(Vector2 position)
return the Vector2 with coordinates of this rectangle
|
Vector2 |
Matrix3.getScale(Vector2 scale) |
Vector2 |
Rectangle.getSize(Vector2 size) |
Vector2 |
Affine2.getTranslation(Vector2 position)
Get the x-y translation component of the matrix.
|
Vector2 |
Matrix3.getTranslation(Vector2 position) |
Vector2 |
Vector2.interpolate(Vector2 target,
float alpha,
Interpolation interpolation) |
Vector2 |
Vector2.lerp(Vector2 target,
float alpha) |
Vector2 |
Vector2.limit(float limit) |
Vector2 |
Vector2.limit2(float limit2) |
Vector2 |
Vector2.mul(Matrix3 mat)
Left-multiplies this vector by the given matrix
|
Vector2 |
Vector2.mulAdd(Vector2 vec,
float scalar) |
Vector2 |
Vector2.mulAdd(Vector2 vec,
Vector2 mulVec) |
static Vector2 |
Intersector.nearestSegmentPoint(float startX,
float startY,
float endX,
float endY,
float pointX,
float pointY,
Vector2 nearest)
Returns a point on the segment nearest to the specified point.
|
static Vector2 |
Intersector.nearestSegmentPoint(Vector2 start,
Vector2 end,
Vector2 point,
Vector2 nearest)
Returns a point on the segment nearest to the specified point.
|
Vector2 |
Vector2.nor() |
static Vector2 |
GeometryUtils.polygonCentroid(float[] polygon,
int offset,
int count,
Vector2 centroid)
Returns the centroid for the specified non-self-intersecting polygon.
|
static Vector2 |
GeometryUtils.quadrilateralCentroid(float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
float x4,
float y4,
Vector2 centroid) |
Vector2 |
Vector2.rotate(float degrees)
Rotates the Vector2 by the given angle, counter-clockwise assuming the y-axis points up.
|
Vector2 |
Vector2.rotate90(int dir)
Rotates the Vector2 by 90 degrees in the specified direction, where >= 0 is counter-clockwise and < 0 is clockwise.
|
Vector2 |
Vector2.rotateAround(Vector2 reference,
float degrees)
Rotates the Vector2 by the given angle around reference vector, counter-clockwise assuming the y-axis points up.
|
Vector2 |
Vector2.rotateAroundRad(Vector2 reference,
float radians)
Rotates the Vector2 by the given angle around reference vector, counter-clockwise assuming the y-axis points up.
|
Vector2 |
Vector2.rotateRad(float radians)
Rotates the Vector2 by the given angle, counter-clockwise assuming the y-axis points up.
|
Vector2 |
Vector2.scl(float scalar) |
Vector2 |
Vector2.scl(float x,
float y)
Multiplies this vector by a scalar
|
Vector2 |
Vector2.scl(Vector2 v) |
Vector2 |
Vector2.set(float x,
float y)
Sets the components of this vector
|
Vector2 |
Vector2.set(Vector2 v) |
Vector2 |
Vector2.setAngle(float degrees)
Sets the angle of the vector in degrees relative to the x-axis, towards the positive y-axis (typically counter-clockwise).
|
Vector2 |
Vector2.setAngleRad(float radians)
Sets the angle of the vector in radians relative to the x-axis, towards the positive y-axis (typically counter-clockwise).
|
Vector2 |
Vector2.setLength(float len) |
Vector2 |
Vector2.setLength2(float len2) |
Vector2 |
Vector2.setToRandomDirection() |
Vector2 |
Vector2.setZero() |
Vector2 |
Vector2.sub(float x,
float y)
Substracts the other vector from this vector.
|
Vector2 |
Vector2.sub(Vector2 v) |
static Vector2 |
GeometryUtils.toBarycoord(Vector2 p,
Vector2 a,
Vector2 b,
Vector2 c,
Vector2 barycentricOut)
Computes the barycentric coordinates v,w for the specified point in the triangle.
|
static Vector2 |
GeometryUtils.triangleCentroid(float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
Vector2 centroid) |
static Vector2 |
GeometryUtils.triangleCircumcenter(float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
Vector2 circumcenter)
Returns the circumcenter of the triangle.
|
Modifier and Type | Method and Description |
---|---|
Vector2 |
Vector2.add(Vector2 v) |
float |
Vector2.angle(Vector2 reference) |
float |
Vector2.angleRad(Vector2 reference) |
void |
Affine2.applyTo(Vector2 point)
Applies the affine transformation on a vector.
|
static boolean |
GeometryUtils.barycoordInsideTriangle(Vector2 barycentric)
Returns true if the barycentric coordinates are inside the triangle.
|
boolean |
Circle.contains(Vector2 point)
Checks whether or not this circle contains a given point.
|
boolean |
Ellipse.contains(Vector2 point)
Checks whether or not this ellipse contains the given point.
|
boolean |
Polygon.contains(Vector2 point) |
boolean |
Polyline.contains(Vector2 point) |
boolean |
Rectangle.contains(Vector2 point) |
boolean |
Shape2D.contains(Vector2 point)
Returns whether the given point is contained within the shape.
|
float |
Vector2.crs(Vector2 v)
Calculates the 2D cross product between this and the given vector.
|
static float |
Intersector.distanceSegmentPoint(Vector2 start,
Vector2 end,
Vector2 point)
Returns the distance between the given segment and point.
|
float |
Vector2.dot(Vector2 v) |
float |
Vector2.dst(Vector2 v) |
float |
Vector2.dst2(Vector2 v) |
boolean |
Vector2.epsilonEquals(Vector2 other)
Compares this vector with the other vector using MathUtils.FLOAT_ROUNDING_ERROR for fuzzy equality testing
|
boolean |
Vector2.epsilonEquals(Vector2 other,
float epsilon) |
static float |
GeometryUtils.fromBarycoord(Vector2 barycentric,
float a,
float b,
float c)
Returns an interpolated value given the barycentric coordinates of a point in a triangle and the values at each vertex.
|
static Vector2 |
GeometryUtils.fromBarycoord(Vector2 barycentric,
Vector2 a,
Vector2 b,
Vector2 c,
Vector2 interpolatedOut)
Returns interpolated values given the barycentric coordinates of a point in a triangle and the values at each vertex.
|
Vector2 |
Rectangle.getCenter(Vector2 vector)
Calculates the center of the rectangle.
|
Vector2 |
Rectangle.getPosition(Vector2 position)
return the Vector2 with coordinates of this rectangle
|
Vector2 |
Matrix3.getScale(Vector2 scale) |
Vector2 |
Rectangle.getSize(Vector2 size) |
Vector2 |
Affine2.getTranslation(Vector2 position)
Get the x-y translation component of the matrix.
|
Vector2 |
Matrix3.getTranslation(Vector2 position) |
boolean |
Vector2.hasOppositeDirection(Vector2 vector) |
boolean |
Vector2.hasSameDirection(Vector2 vector) |
Vector2 |
Vector2.interpolate(Vector2 target,
float alpha,
Interpolation interpolation) |
static boolean |
Intersector.intersectLinePolygon(Vector2 p1,
Vector2 p2,
Polygon polygon)
Check whether the given line and
Polygon intersect. |
static boolean |
Intersector.intersectLines(float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
float x4,
float y4,
Vector2 intersection)
Intersects the two lines and returns the intersection point in intersection.
|
static boolean |
Intersector.intersectLines(Vector2 p1,
Vector2 p2,
Vector2 p3,
Vector2 p4,
Vector2 intersection)
Intersects the two lines and returns the intersection point in intersection.
|
static float |
Intersector.intersectRayRay(Vector2 start1,
Vector2 direction1,
Vector2 start2,
Vector2 direction2)
Intersect two 2D Rays and return the scalar parameter of the first ray at the intersection point.
|
static boolean |
Intersector.intersectSegmentCircle(Vector2 start,
Vector2 end,
Circle circle,
Intersector.MinimumTranslationVector mtv)
Returns whether the given line segment intersects the given circle.
|
static boolean |
Intersector.intersectSegmentCircle(Vector2 start,
Vector2 end,
Vector2 center,
float squareRadius)
Returns whether the given line segment intersects the given circle.
|
static boolean |
Intersector.intersectSegmentPolygon(Vector2 p1,
Vector2 p2,
Polygon polygon)
Check whether the given line segment and
Polygon intersect. |
static boolean |
Intersector.intersectSegmentRectangle(Vector2 start,
Vector2 end,
Rectangle rectangle)
|
static boolean |
Intersector.intersectSegments(float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
float x4,
float y4,
Vector2 intersection) |
static boolean |
Intersector.intersectSegments(Vector2 p1,
Vector2 p2,
Vector2 p3,
Vector2 p4,
Vector2 intersection)
Intersects the two line segments and returns the intersection point in intersection.
|
boolean |
Vector2.isCollinear(Vector2 other) |
boolean |
Vector2.isCollinear(Vector2 other,
float epsilon) |
boolean |
Vector2.isCollinearOpposite(Vector2 other) |
boolean |
Vector2.isCollinearOpposite(Vector2 other,
float epsilon) |
boolean |
Vector2.isOnLine(Vector2 other) |
boolean |
Vector2.isOnLine(Vector2 other,
float epsilon) |
boolean |
Vector2.isPerpendicular(Vector2 vector) |
boolean |
Vector2.isPerpendicular(Vector2 vector,
float epsilon) |
static boolean |
Intersector.isPointInPolygon(Array<Vector2> polygon,
Vector2 point)
Checks whether the given point is in the polygon.
|
static boolean |
Intersector.isPointInTriangle(Vector2 p,
Vector2 a,
Vector2 b,
Vector2 c)
Returns true if the given point is inside the triangle.
|
Vector2 |
Vector2.lerp(Vector2 target,
float alpha) |
Rectangle |
Rectangle.merge(Vector2 vec)
Merges this rectangle with a point.
|
Rectangle |
Rectangle.merge(Vector2[] vecs)
Merges this rectangle with a list of points.
|
Vector2 |
Vector2.mulAdd(Vector2 vec,
float scalar) |
Vector2 |
Vector2.mulAdd(Vector2 vec,
Vector2 mulVec) |
static Vector2 |
Intersector.nearestSegmentPoint(float startX,
float startY,
float endX,
float endY,
float pointX,
float pointY,
Vector2 nearest)
Returns a point on the segment nearest to the specified point.
|
static Vector2 |
Intersector.nearestSegmentPoint(Vector2 start,
Vector2 end,
Vector2 point,
Vector2 nearest)
Returns a point on the segment nearest to the specified point.
|
static int |
Intersector.pointLineSide(Vector2 linePoint1,
Vector2 linePoint2,
Vector2 point)
Determines on which side of the given line the point is.
|
static Vector2 |
GeometryUtils.polygonCentroid(float[] polygon,
int offset,
int count,
Vector2 centroid)
Returns the centroid for the specified non-self-intersecting polygon.
|
Affine2 |
Affine2.preScale(Vector2 scale)
Premultiplies this matrix with a scale matrix.
|
Affine2 |
Affine2.preShear(Vector2 shear)
Premultiplies this matrix by a shear matrix.
|
Affine2 |
Affine2.preTranslate(Vector2 trn)
Premultiplies this matrix by a translation matrix.
|
static Vector2 |
GeometryUtils.quadrilateralCentroid(float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
float x4,
float y4,
Vector2 centroid) |
Vector2 |
Vector2.rotateAround(Vector2 reference,
float degrees)
Rotates the Vector2 by the given angle around reference vector, counter-clockwise assuming the y-axis points up.
|
Vector2 |
Vector2.rotateAroundRad(Vector2 reference,
float radians)
Rotates the Vector2 by the given angle around reference vector, counter-clockwise assuming the y-axis points up.
|
Affine2 |
Affine2.scale(Vector2 scale)
Postmultiplies this matrix with a scale matrix.
|
Matrix3 |
Matrix3.scale(Vector2 scale)
Postmultiplies this matrix with a scale matrix.
|
Matrix3 |
Matrix3.scl(Vector2 scale)
Scale this matrix using the x and y components of the vector but leave the rest of the matrix alone.
|
Vector2 |
Vector2.scl(Vector2 v) |
Vector2 |
Vector2.set(Vector2 v) |
void |
Circle.set(Vector2 position,
float radius)
Sets a new location and radius for this circle.
|
Vector3 |
Vector3.set(Vector2 vector,
float z)
Sets the components of the given vector and z-component
|
void |
Circle.set(Vector2 center,
Vector2 edge)
Sets this
Circle 's values in terms of its center and a point on its edge. |
void |
Ellipse.set(Vector2 position,
Vector2 size) |
Rectangle |
Rectangle.setCenter(Vector2 position)
Moves this rectangle so that its center point is located at a given position
|
void |
Circle.setPosition(Vector2 position)
Sets the x and y-coordinates of circle center from vector
|
Ellipse |
Ellipse.setPosition(Vector2 position)
Sets the x and y-coordinates of ellipse center from a
Vector2 . |
Rectangle |
Rectangle.setPosition(Vector2 position)
Sets the x and y-coordinates of the bottom left corner from vector
|
Affine2 |
Affine2.setToScaling(Vector2 scale)
Sets this matrix to a scaling matrix.
|
Matrix3 |
Matrix3.setToScaling(Vector2 scale)
Sets this matrix to a scaling matrix.
|
Affine2 |
Affine2.setToShearing(Vector2 shear)
Sets this matrix to a shearing matrix.
|
Affine2 |
Affine2.setToTranslation(Vector2 trn)
Sets this matrix to a translation matrix.
|
Matrix3 |
Matrix3.setToTranslation(Vector2 translation)
Sets this matrix to a translation matrix.
|
Affine2 |
Affine2.setToTrnRotRadScl(Vector2 trn,
float radians,
Vector2 scale)
Sets this matrix to a concatenation of translation, rotation and scale.
|
Affine2 |
Affine2.setToTrnRotScl(Vector2 trn,
float degrees,
Vector2 scale)
Sets this matrix to a concatenation of translation, rotation and scale.
|
Affine2 |
Affine2.setToTrnScl(Vector2 trn,
Vector2 scale)
Sets this matrix to a concatenation of translation and scale.
|
Affine2 |
Affine2.shear(Vector2 shear)
Postmultiplies this matrix by a shear matrix.
|
Vector2 |
Vector2.sub(Vector2 v) |
static Vector2 |
GeometryUtils.toBarycoord(Vector2 p,
Vector2 a,
Vector2 b,
Vector2 c,
Vector2 barycentricOut)
Computes the barycentric coordinates v,w for the specified point in the triangle.
|
Affine2 |
Affine2.translate(Vector2 trn)
Postmultiplies this matrix by a translation matrix.
|
Matrix3 |
Matrix3.translate(Vector2 translation)
Postmultiplies this matrix by a translation matrix.
|
static Vector2 |
GeometryUtils.triangleCentroid(float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
Vector2 centroid) |
static Vector2 |
GeometryUtils.triangleCircumcenter(float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
Vector2 circumcenter)
Returns the circumcenter of the triangle.
|
Matrix3 |
Matrix3.trn(Vector2 vector)
Adds a translational component to the matrix in the 3rd column.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
Intersector.isPointInPolygon(Array<Vector2> polygon,
Vector2 point)
Checks whether the given point is in the polygon.
|
Constructor and Description |
---|
Circle(Vector2 position,
float radius)
Constructs a new circle using a given
Vector2 that contains the desired X and Y coordinates, and a given radius. |
Circle(Vector2 center,
Vector2 edge)
Creates a new
Circle in terms of its center and a point on its edge. |
Ellipse(Vector2 position,
float width,
float height)
Costructs a new ellipse
|
Ellipse(Vector2 position,
Vector2 size) |
Vector2(Vector2 v)
Constructs a vector from the given vector
|
Vector3(Vector2 vector,
float z)
Creates a vector from the given vector and z-component
|
Modifier and Type | Field and Description |
---|---|
Vector2 |
MassData.center
The position of the shape's centroid relative to the shape's origin.
|
Vector2 |
BodyDef.linearVelocity
The linear velocity of the body's origin in world co-ordinates.
|
Vector2 |
Body.linVelLoc |
Vector2 |
Body.linVelWorld |
Vector2 |
Manifold.ManifoldPoint.localPoint |
Vector2 |
Body.localPoint2 |
Vector2 |
Body.localVector |
protected Vector2 |
WorldManifold.normal |
protected Vector2[] |
WorldManifold.points |
Vector2 |
BodyDef.position
The world position of the body.
|
Modifier and Type | Method and Description |
---|---|
Vector2 |
Joint.getAnchorA() |
Vector2 |
Joint.getAnchorB() |
static Vector2 |
Box2DDebugRenderer.getAxis() |
Vector2 |
World.getGravity() |
Vector2 |
Body.getLinearVelocity()
Get the linear velocity of the center of mass.
|
Vector2 |
Body.getLinearVelocityFromLocalPoint(Vector2 localPoint)
Get the world velocity of a local point.
|
Vector2 |
Body.getLinearVelocityFromWorldPoint(Vector2 worldPoint)
Get the world linear velocity of a world point attached to this body.
|
Vector2 |
Body.getLocalCenter()
Get the local position of the center of mass.
|
Vector2 |
Manifold.getLocalNormal() |
Vector2 |
Manifold.getLocalPoint() |
Vector2 |
Body.getLocalPoint(Vector2 worldPoint)
Gets a local point relative to the body's origin given a world point.
|
Vector2 |
Body.getLocalVector(Vector2 worldVector)
Gets a local vector given a world vector.
|
Vector2 |
WorldManifold.getNormal()
Returns the normal of this manifold
|
Vector2 |
Transform.getOrientation() |
Vector2[] |
WorldManifold.getPoints()
Returns the contact points of this manifold.
|
Vector2 |
Body.getPosition()
Get the world body origin position.
|
Vector2 |
CircleShape.getPosition() |
Vector2 |
Transform.getPosition() |
Vector2 |
Joint.getReactionForce(float inv_dt) |
Vector2 |
Body.getWorldCenter()
Get the world position of the center of mass.
|
Vector2 |
Body.getWorldPoint(Vector2 localPoint)
Get the world coordinates of a point given the local coordinates.
|
Vector2 |
Body.getWorldVector(Vector2 localVector)
Get the world coordinates of a vector given the local coordinates.
|
Vector2 |
Transform.mul(Vector2 v)
Transforms the given vector by this transform
|
Modifier and Type | Method and Description |
---|---|
void |
Body.applyForce(Vector2 force,
Vector2 point,
boolean wake)
Apply a force at a world point.
|
void |
Body.applyForceToCenter(Vector2 force,
boolean wake)
Apply a force to the center of mass.
|
void |
Body.applyLinearImpulse(Vector2 impulse,
Vector2 point,
boolean wake)
Apply an impulse at a point.
|
void |
ChainShape.createChain(Vector2[] vertices)
Create a chain with isolated end vertices.
|
void |
ChainShape.createLoop(Vector2[] vertices)
Create a loop.
|
Vector2 |
Body.getLinearVelocityFromLocalPoint(Vector2 localPoint)
Get the world velocity of a local point.
|
Vector2 |
Body.getLinearVelocityFromWorldPoint(Vector2 worldPoint)
Get the world linear velocity of a world point attached to this body.
|
Vector2 |
Body.getLocalPoint(Vector2 worldPoint)
Gets a local point relative to the body's origin given a world point.
|
Vector2 |
Body.getLocalVector(Vector2 worldVector)
Gets a local vector given a world vector.
|
void |
ChainShape.getVertex(int index,
Vector2 vertex)
Returns the vertex at the given position.
|
void |
PolygonShape.getVertex(int index,
Vector2 vertex)
Returns the vertex at the given position.
|
void |
EdgeShape.getVertex0(Vector2 vec) |
void |
EdgeShape.getVertex1(Vector2 vec) |
void |
EdgeShape.getVertex2(Vector2 vec) |
void |
EdgeShape.getVertex3(Vector2 vec) |
Vector2 |
Body.getWorldPoint(Vector2 localPoint)
Get the world coordinates of a point given the local coordinates.
|
Vector2 |
Body.getWorldVector(Vector2 localVector)
Get the world coordinates of a vector given the local coordinates.
|
Vector2 |
Transform.mul(Vector2 v)
Transforms the given vector by this transform
|
void |
World.rayCast(RayCastCallback callback,
Vector2 point1,
Vector2 point2)
Ray-cast the world for all fixtures in the path of the ray.
|
float |
RayCastCallback.reportRayFixture(Fixture fixture,
Vector2 point,
Vector2 normal,
float fraction)
Called for each fixture found in the query.
|
void |
PolygonShape.set(Vector2[] vertices)
Copy vertices.
|
void |
EdgeShape.set(Vector2 v1,
Vector2 v2)
Set this as an isolated edge.
|
void |
PolygonShape.setAsBox(float hx,
float hy,
Vector2 center,
float angle)
Build vertices to represent an oriented box.
|
static void |
Box2DDebugRenderer.setAxis(Vector2 axis) |
void |
World.setGravity(Vector2 gravity)
Change the global gravity vector.
|
void |
Body.setLinearVelocity(Vector2 v)
Set the linear velocity of the center of mass.
|
void |
ChainShape.setNextVertex(Vector2 nextVertex)
Establish connectivity to a vertex that follows the last vertex.
|
void |
Transform.setOrientation(Vector2 orientation)
Set where the body should "look at"
|
void |
CircleShape.setPosition(Vector2 position)
Sets the position of the shape
|
void |
Transform.setPosition(Vector2 pos)
Sets the position of this transform
|
void |
ChainShape.setPrevVertex(Vector2 prevVertex)
Establish connectivity to a vertex that precedes the first vertex.
|
void |
Body.setTransform(Vector2 position,
float angle)
Set the position of the body's origin and rotation.
|
void |
EdgeShape.setVertex0(Vector2 vec) |
void |
EdgeShape.setVertex3(Vector2 vec) |
boolean |
Fixture.testPoint(Vector2 p)
Test a point for containment in this fixture.
|
Constructor and Description |
---|
Transform(Vector2 position,
float angle)
Constructs a new Transform instance with the given position and angle
|
Transform(Vector2 position,
Vector2 orientation)
Constructs a new Transform instance with the given position and orientation
|
World(Vector2 gravity,
boolean doSleep)
Construct a world object.
|
Modifier and Type | Field and Description |
---|---|
Vector2 |
PulleyJointDef.groundAnchorA
The first ground anchor in world coordinates.
|
Vector2 |
PulleyJointDef.groundAnchorB
The second ground anchor in world coordinates.
|
Vector2 |
MotorJointDef.linearOffset
Position of bodyB minus the position of bodyA, in bodyA's frame, in meters.
|
Vector2 |
DistanceJointDef.localAnchorA
The local anchor point relative to body1's origin.
|
Vector2 |
FrictionJointDef.localAnchorA
The local anchor point relative to bodyA's origin.
|
Vector2 |
PrismaticJointDef.localAnchorA
The local anchor point relative to body1's origin.
|
Vector2 |
PulleyJointDef.localAnchorA
The local anchor point relative to bodyA's origin.
|
Vector2 |
RevoluteJointDef.localAnchorA
The local anchor point relative to body1's origin.
|
Vector2 |
RopeJointDef.localAnchorA
The local anchor point relative to bodyA's origin.
|
Vector2 |
WeldJointDef.localAnchorA
The local anchor point relative to body1's origin.
|
Vector2 |
WheelJointDef.localAnchorA
The local anchor point relative to body1's origin.
|
Vector2 |
DistanceJointDef.localAnchorB
The local anchor point relative to body2's origin.
|
Vector2 |
FrictionJointDef.localAnchorB
The local anchor point relative to bodyB's origin.
|
Vector2 |
PrismaticJointDef.localAnchorB
The local anchor point relative to body2's origin.
|
Vector2 |
PulleyJointDef.localAnchorB
The local anchor point relative to bodyB's origin.
|
Vector2 |
RevoluteJointDef.localAnchorB
The local anchor point relative to body2's origin.
|
Vector2 |
RopeJointDef.localAnchorB
The local anchor point relative to bodyB's origin.
|
Vector2 |
WeldJointDef.localAnchorB
The local anchor point relative to body2's origin.
|
Vector2 |
WheelJointDef.localAnchorB
The local anchor point relative to body2's origin.
|
Vector2 |
PrismaticJointDef.localAxisA
The local translation axis in body1.
|
Vector2 |
WheelJointDef.localAxisA
The local translation axis in body1.
|
Vector2 |
MouseJointDef.target
The initial world target point.
|
Modifier and Type | Method and Description |
---|---|
Vector2 |
PulleyJoint.getGroundAnchorA() |
Vector2 |
PulleyJoint.getGroundAnchorB() |
Vector2 |
MotorJoint.getLinearOffset() |
Vector2 |
DistanceJoint.getLocalAnchorA() |
Vector2 |
FrictionJoint.getLocalAnchorA() |
Vector2 |
PrismaticJoint.getLocalAnchorA() |
Vector2 |
RevoluteJoint.getLocalAnchorA() |
Vector2 |
RopeJoint.getLocalAnchorA() |
Vector2 |
WeldJoint.getLocalAnchorA() |
Vector2 |
WheelJoint.getLocalAnchorA() |
Vector2 |
DistanceJoint.getLocalAnchorB() |
Vector2 |
FrictionJoint.getLocalAnchorB() |
Vector2 |
PrismaticJoint.getLocalAnchorB() |
Vector2 |
RevoluteJoint.getLocalAnchorB() |
Vector2 |
RopeJoint.getLocalAnchorB() |
Vector2 |
WeldJoint.getLocalAnchorB() |
Vector2 |
WheelJoint.getLocalAnchorB() |
Vector2 |
PrismaticJoint.getLocalAxisA() |
Vector2 |
WheelJoint.getLocalAxisA() |
Vector2 |
MouseJoint.getTarget() |
Modifier and Type | Method and Description |
---|---|
void |
FrictionJointDef.initialize(Body bodyA,
Body bodyB,
Vector2 anchor)
Initialize the bodies, anchors, axis, and reference angle using the world anchor and world axis.
|
void |
RevoluteJointDef.initialize(Body bodyA,
Body bodyB,
Vector2 anchor)
Initialize the bodies, anchors, and reference angle using a world anchor point.
|
void |
WeldJointDef.initialize(Body body1,
Body body2,
Vector2 anchor)
Initialize the bodies, anchors, and reference angle using a world anchor point.
|
void |
DistanceJointDef.initialize(Body bodyA,
Body bodyB,
Vector2 anchorA,
Vector2 anchorB)
Initialize the bodies, anchors, and length using the world anchors.
|
void |
PrismaticJointDef.initialize(Body bodyA,
Body bodyB,
Vector2 anchor,
Vector2 axis)
Initialize the bodies, anchors, axis, and reference angle using the world anchor and world axis.
|
void |
WheelJointDef.initialize(Body bodyA,
Body bodyB,
Vector2 anchor,
Vector2 axis) |
void |
PulleyJointDef.initialize(Body bodyA,
Body bodyB,
Vector2 groundAnchorA,
Vector2 groundAnchorB,
Vector2 anchorA,
Vector2 anchorB,
float ratio)
Initialize the bodies, anchors, lengths, max lengths, and ratio using the world anchors.
|
void |
MotorJoint.setLinearOffset(Vector2 linearOffset) |
void |
MouseJoint.setTarget(Vector2 target)
Use this to update the target point.
|
Modifier and Type | Method and Description |
---|---|
Vector2 |
Actor.localToActorCoordinates(Actor actor,
Vector2 localCoords)
Converts coordinates for this actor to those of another actor, which can be anywhere in the stage.
|
Vector2 |
Actor.localToAscendantCoordinates(Actor ascendant,
Vector2 localCoords)
Converts coordinates for this actor to those of an ascendant.
|
Vector2 |
Group.localToDescendantCoordinates(Actor descendant,
Vector2 localCoords)
Converts coordinates for this group to those of a descendant actor.
|
Vector2 |
Actor.localToParentCoordinates(Vector2 localCoords)
Transforms the specified point in the actor's coordinates to be in the parent's coordinates.
|
Vector2 |
Actor.localToScreenCoordinates(Vector2 localCoords)
Transforms the specified point in the actor's coordinates to be in screen coordinates.
|
Vector2 |
Actor.localToStageCoordinates(Vector2 localCoords)
Transforms the specified point in the actor's coordinates to be in the stage's coordinates.
|
Vector2 |
Actor.parentToLocalCoordinates(Vector2 parentCoords)
Converts the coordinates given in the parent's coordinate system to this actor's coordinate system.
|
Vector2 |
Actor.screenToLocalCoordinates(Vector2 screenCoords)
Transforms the specified point in screen coordinates to the actor's local coordinate system.
|
Vector2 |
Stage.screenToStageCoordinates(Vector2 screenCoords)
Transforms the screen coordinates to stage coordinates.
|
Vector2 |
Actor.stageToLocalCoordinates(Vector2 stageCoords)
Transforms the specified point in the stage's coordinates to the actor's local coordinate system.
|
Vector2 |
Stage.stageToScreenCoordinates(Vector2 stageCoords)
Transforms the stage coordinates to screen coordinates.
|
Vector2 |
InputEvent.toCoordinates(Actor actor,
Vector2 actorCoords)
Sets actorCoords to this event's coordinates relative to the specified actor.
|
Vector2 |
Stage.toScreenCoordinates(Vector2 coords,
Matrix4 transformMatrix)
Transforms the coordinates to screen coordinates.
|
Modifier and Type | Method and Description |
---|---|
Vector2 |
Actor.localToActorCoordinates(Actor actor,
Vector2 localCoords)
Converts coordinates for this actor to those of another actor, which can be anywhere in the stage.
|
Vector2 |
Actor.localToAscendantCoordinates(Actor ascendant,
Vector2 localCoords)
Converts coordinates for this actor to those of an ascendant.
|
Vector2 |
Group.localToDescendantCoordinates(Actor descendant,
Vector2 localCoords)
Converts coordinates for this group to those of a descendant actor.
|
Vector2 |
Actor.localToParentCoordinates(Vector2 localCoords)
Transforms the specified point in the actor's coordinates to be in the parent's coordinates.
|
Vector2 |
Actor.localToScreenCoordinates(Vector2 localCoords)
Transforms the specified point in the actor's coordinates to be in screen coordinates.
|
Vector2 |
Actor.localToStageCoordinates(Vector2 localCoords)
Transforms the specified point in the actor's coordinates to be in the stage's coordinates.
|
Vector2 |
Actor.parentToLocalCoordinates(Vector2 parentCoords)
Converts the coordinates given in the parent's coordinate system to this actor's coordinate system.
|
Vector2 |
Actor.screenToLocalCoordinates(Vector2 screenCoords)
Transforms the specified point in screen coordinates to the actor's local coordinate system.
|
Vector2 |
Stage.screenToStageCoordinates(Vector2 screenCoords)
Transforms the screen coordinates to stage coordinates.
|
Vector2 |
Actor.stageToLocalCoordinates(Vector2 stageCoords)
Transforms the specified point in the stage's coordinates to the actor's local coordinate system.
|
Vector2 |
Stage.stageToScreenCoordinates(Vector2 stageCoords)
Transforms the stage coordinates to screen coordinates.
|
Vector2 |
InputEvent.toCoordinates(Actor actor,
Vector2 actorCoords)
Sets actorCoords to this event's coordinates relative to the specified actor.
|
Vector2 |
Stage.toScreenCoordinates(Vector2 coords,
Matrix4 transformMatrix)
Transforms the coordinates to screen coordinates.
|
Modifier and Type | Method and Description |
---|---|
void |
ActorGestureListener.pinch(InputEvent event,
Vector2 initialPointer1,
Vector2 initialPointer2,
Vector2 pointer1,
Vector2 pointer2) |
Modifier and Type | Method and Description |
---|---|
Vector2 |
Scaling.apply(float sourceWidth,
float sourceHeight,
float targetWidth,
float targetHeight)
Returns the size of the source scaled to the target.
|
Modifier and Type | Method and Description |
---|---|
Vector2 |
Viewport.project(Vector2 worldCoords)
Transforms the specified world coordinate to screen coordinates.
|
Vector2 |
Viewport.toScreenCoordinates(Vector2 worldCoords,
Matrix4 transformMatrix)
Transforms a point to real screen coordinates (as opposed to OpenGL ES window coordinates), where the origin is in the top
left and the the y-axis is pointing downwards.
|
Vector2 |
Viewport.unproject(Vector2 screenCoords)
Transforms the specified screen coordinate to world coordinates.
|
Modifier and Type | Method and Description |
---|---|
Vector2 |
Viewport.project(Vector2 worldCoords)
Transforms the specified world coordinate to screen coordinates.
|
Vector2 |
Viewport.toScreenCoordinates(Vector2 worldCoords,
Matrix4 transformMatrix)
Transforms a point to real screen coordinates (as opposed to OpenGL ES window coordinates), where the origin is in the top
left and the the y-axis is pointing downwards.
|
Vector2 |
Viewport.unproject(Vector2 screenCoords)
Transforms the specified screen coordinate to world coordinates.
|