libgdx API

Uses of Class
com.badlogic.gdx.math.Vector2

Packages that use Vector2
com.badlogic.gdx.graphics.g3d.decals   
com.badlogic.gdx.math   
com.badlogic.gdx.physics.box2d   
com.badlogic.gdx.physics.box2d.joints   
com.badlogic.gdx.scenes.scene2d   
com.badlogic.gdx.scenes.scene2d.ui   
com.badlogic.gdx.scenes.scene2d.ui.utils   
 

Uses of Vector2 in com.badlogic.gdx.graphics.g3d.decals
 

Fields in com.badlogic.gdx.graphics.g3d.decals declared as Vector2
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.
 

Uses of Vector2 in com.badlogic.gdx.math
 

Methods in com.badlogic.gdx.math that return Vector2
 Vector2 Vector2.add(float x, float y)
          Adds the given components to this vector
 Vector2 Vector2.add(Vector2 v)
          Adds the given vector to this vector
 Vector2 Vector2.cpy()
           
 Vector2 Vector2.lerp(Vector2 target, float alpha)
          Linearly interpolates between this vector and the target vector by alpha which is in the range [0,1].
 Vector2 Vector2.mul(float scalar)
          Multiplies this vector by a scalar
 Vector2 Vector2.mul(Matrix3 mat)
          Multiplies this vector by the given matrix
 Vector2 Vector2.nor()
          Normalizes this vector
 Vector2 Vector2.rotate(float angle)
          Rotates the Vector2 by the given angle, counter-clockwise.
 Vector2 Vector2.set(float x, float y)
          Sets the components of this vector
 Vector2 Vector2.set(Vector2 v)
          Sets this vector from the given vector
 Vector2 Vector2.sub(float x, float y)
          Substracts the other vector from this vector.
 Vector2 Vector2.sub(Vector2 v)
          Substracts the given vector from this vector.
 Vector2 Vector2.tmp()
           
 

Methods in com.badlogic.gdx.math that return types with arguments of type Vector2
 java.util.List<Vector2> EarClippingTriangulator.computeTriangles(java.util.List<Vector2> polygon)
          Triangulates the given (concave) polygon to a list of triangles.
 

Methods in com.badlogic.gdx.math with parameters of type Vector2
 Vector2 Vector2.add(Vector2 v)
          Adds the given vector to this vector
 boolean Circle.contains(Vector2 point)
           
 float Vector2.crs(Vector2 v)
          Calculates the 2D cross product between this and the given vector.
static float Intersector.distanceLinePoint(Vector2 start, Vector2 end, Vector2 point)
          Returns the distance between the given line segment and point.
 float Vector2.dot(Vector2 v)
           
 float Vector2.dst(Vector2 v)
           
 float Vector2.dst2(Vector2 v)
           
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 boolean Intersector.intersectSegmentCircle(Vector2 start, Vector2 end, Vector2 center, float squareRadius)
          Returns wheter the given line segment intersects the given circle.
static float Intersector.intersectSegmentCircleDisplace(Vector2 start, Vector2 end, Vector2 point, float radius, Vector2 displacement)
          Checks wheter the line segment and the circle intersect and returns by how much and in what direction the line has to move away from the circle to not intersect.
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.
static boolean Intersector.isPointInPolygon(java.util.List<Vector2> polygon, Vector2 point)
          Checks wheter the given point is in the polygon.
 Vector2 Vector2.lerp(Vector2 target, float alpha)
          Linearly interpolates between this vector and the target vector by alpha which is in the range [0,1].
 Vector2 Vector2.set(Vector2 v)
          Sets this vector from the given vector
 Vector2 Vector2.sub(Vector2 v)
          Substracts the given vector from this vector.
 

Method parameters in com.badlogic.gdx.math with type arguments of type Vector2
 java.util.List<Vector2> EarClippingTriangulator.computeTriangles(java.util.List<Vector2> polygon)
          Triangulates the given (concave) polygon to a list of triangles.
static boolean Intersector.isPointInPolygon(java.util.List<Vector2> polygon, Vector2 point)
          Checks wheter the given point is in the polygon.
 

Constructors in com.badlogic.gdx.math with parameters of type Vector2
Circle(Vector2 position, float radius)
           
Vector2(Vector2 v)
          Constructs a vector from the given vector
 

Uses of Vector2 in com.badlogic.gdx.physics.box2d
 

Fields in com.badlogic.gdx.physics.box2d declared as Vector2
 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.
 

Methods in com.badlogic.gdx.physics.box2d that return Vector2
 Vector2 Joint.getAnchorA()
           
 Vector2 Joint.getAnchorB()
           
 Vector2 World.getGravity()
           
 Vector2 Body.getLinearVelocity()
           
 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()
           
 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[] 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()
           
 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
 

Methods in com.badlogic.gdx.physics.box2d with parameters of type Vector2
 void Body.applyForce(Vector2 force, Vector2 point)
          Apply a force at a world point.
 void Body.applyForceToCenter(Vector2 force)
          Apply a force to the center of mass.
 void Body.applyLinearImpulse(Vector2 impulse, Vector2 point)
          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.getVertex1(Vector2 vec)
           
 void EdgeShape.getVertex2(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.
 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 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.
 boolean Fixture.testPoint(Vector2 p)
          Test a point for containment in this fixture.
 

Constructors in com.badlogic.gdx.physics.box2d with parameters of type Vector2
Transform(Vector2 position, float angle)
          Constructs a new Transform instance with the given position and angle
World(Vector2 gravity, boolean doSleep)
          Construct a world object.
 

Uses of Vector2 in com.badlogic.gdx.physics.box2d.joints
 

Fields in com.badlogic.gdx.physics.box2d.joints declared as Vector2
 Vector2 PulleyJointDef.groundAnchorA
          The first ground anchor in world coordinates.
 Vector2 PulleyJointDef.groundAnchorB
          The second ground anchor in world coordinates.
 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
           
 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
           
 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.
 

Methods in com.badlogic.gdx.physics.box2d.joints that return Vector2
 Vector2 PulleyJoint.getGroundAnchorA()
           
 Vector2 PulleyJoint.getGroundAnchorB()
           
 Vector2 MouseJoint.getTarget()
           
 

Methods in com.badlogic.gdx.physics.box2d.joints with parameters of type Vector2
 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)
           
 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 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 MouseJoint.setTarget(Vector2 target)
          Use this to update the target point.
 

Uses of Vector2 in com.badlogic.gdx.scenes.scene2d
 

Fields in com.badlogic.gdx.scenes.scene2d declared as Vector2
protected  Vector2 Group.point
           
 

Methods in com.badlogic.gdx.scenes.scene2d with parameters of type Vector2
static void Group.toChildCoordinates(Actor child, float x, float y, Vector2 out)
          Transforms the coordinates given in the child's parent coordinate system to the child Actor's coordinate system.
 void Actor.toLocalCoordinates(Vector2 point)
          Transforms the given point in stage coordinates to the Actor's local coordinate system.
 void Stage.toStageCoordinates(int x, int y, Vector2 out)
          Transforms the given screen coordinates to stage coordinates
 

Uses of Vector2 in com.badlogic.gdx.scenes.scene2d.ui
 

Methods in com.badlogic.gdx.scenes.scene2d.ui with parameters of type Vector2
 void FlickScrollPane.toLocalCoordinates(Actor actor, Vector2 point)
           
 

Uses of Vector2 in com.badlogic.gdx.scenes.scene2d.ui.utils
 

Methods in com.badlogic.gdx.scenes.scene2d.ui.utils with parameters of type Vector2
static void ScissorStack.toWindowCoordinates(Camera camera, Matrix4 transformMatrix, Vector2 point)
          Transforms a point to real window coordinates (as oposed to OpenGL ES window coordinates), where the origin is in the top left and the the y-axis is pointing downwards
 


libgdx API

Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)