/external/angle/src/common/ |
D | vector_utils_unittest.cpp | 22 ASSERT_TRUE(Vector2(2.0, 3.0) == Vector2(2.0, 3.0)); in TEST() 23 ASSERT_TRUE(Vector2(2.0, 3.0) != Vector2(2.0, 4.0)); in TEST() 26 ASSERT_EQ(Vector2(2.0, 3.0), Vector2(2.0, 3.0)); in TEST() 27 ASSERT_NE(Vector2(2.0, 3.0), Vector2(2.0, 4.0)); in TEST() 40 Vector2 vec(1.0, 2.0); in TEST() 46 ASSERT_EQ(Vector2(3.0, 4.0), vec); in TEST() 54 Vector2 vec(3.0); in TEST() 61 Vector2 vec(Vector2(1.0, 2.0)); in TEST() 68 Vector4 vec(1.0, Vector2(2.0, 3.0), 4.0); in TEST() 79 Vector2 vec(1.0, 2.0); in TEST() [all …]
|
/external/python/pybind11/tests/ |
D | test_operator_overloading.cpp | 15 class Vector2 { class 17 Vector2(float x, float y) : x(x), y(y) { print_created(this, toString()); } in Vector2() function in Vector2 18 Vector2(const Vector2 &v) : x(v.x), y(v.y) { print_copy_created(this); } in Vector2() function in Vector2 19 Vector2(Vector2 &&v) : x(v.x), y(v.y) { print_move_created(this); v.x = v.y = 0; } in Vector2() function in Vector2 20 …Vector2 &operator=(const Vector2 &v) { x = v.x; y = v.y; print_copy_assigned(this); return *this; } in operator =() 21 …Vector2 &operator=(Vector2 &&v) { x = v.x; y = v.y; v.x = v.y = 0; print_move_assigned(this); retu… in operator =() 22 ~Vector2() { print_destroyed(this); } in ~Vector2() 26 Vector2 operator-() const { return Vector2(-x, -y); } in operator -() 27 Vector2 operator+(const Vector2 &v) const { return Vector2(x + v.x, y + v.y); } in operator +() 28 Vector2 operator-(const Vector2 &v) const { return Vector2(x - v.x, y - v.y); } in operator -() [all …]
|
/external/libchrome-gestures/include/ |
D | finger_metrics.h | 21 struct Vector2 { struct 22 Vector2() : x(0), y(0) {} in Vector2() argument 23 Vector2(float x, float y) : x(x), y(y) {} in Vector2() function 24 Vector2(const Vector2& other) : x(other.x), y(other.y) {} in Vector2() argument 25 explicit Vector2(const FingerState& state) : x(state.position_x), in Vector2() function 28 Vector2 Sub(const Vector2& other) { in Sub() argument 29 return Vector2(x - other.x, y - other.y); in Sub() 32 Vector2 Add(const Vector2& other) { in Add() argument 33 return Vector2(x + other.x, y + other.y); in Add() 42 bool operator==(const Vector2& that) const { argument [all …]
|
/external/replicaisland/src/com/replica/replicaisland/ |
D | BackgroundCollisionComponent.java | 27 private Vector2 mPreviousPosition; 34 private Vector2 mCurrentPosition; 35 private Vector2 mPreviousCenter; 36 private Vector2 mDelta; 37 private Vector2 mFilterDirection; 38 private Vector2 mHorizontalHitPoint; 39 private Vector2 mHorizontalHitNormal; 40 private Vector2 mVerticalHitPoint; 41 private Vector2 mVerticalHitNormal; 42 private Vector2 mRayStart; [all …]
|
D | SolidSurfaceComponent.java | 24 private FixedSizeArray<Vector2> mStartPoints; 25 private FixedSizeArray<Vector2> mEndPoints; 26 private FixedSizeArray<Vector2> mNormals; 27 private Vector2 mStart; 28 private Vector2 mEnd; 29 private Vector2 mNormal; 36 mStart = new Vector2(); in SolidSurfaceComponent() 37 mEnd = new Vector2(); in SolidSurfaceComponent() 38 mNormal = new Vector2(); in SolidSurfaceComponent() 54 mStart = new Vector2(); in SolidSurfaceComponent() [all …]
|
D | GameObject.java | 30 private Vector2 mPosition; 31 private Vector2 mVelocity; 32 private Vector2 mTargetVelocity; 33 private Vector2 mAcceleration; 34 private Vector2 mImpulse; 36 private Vector2 mBackgroundCollisionNormal; 52 public Vector2 facingDirection; 82 mPosition = new Vector2(); in GameObject() 83 mVelocity = new Vector2(); in GameObject() 84 mTargetVelocity = new Vector2(); in GameObject() [all …]
|
D | PhysicsComponent.java | 58 Vector2 impulseVector = parentObject.getImpulse(); in update() 60 final Vector2 currentVelocity = parentObject.getVelocity(); in update() 62 final Vector2 surfaceNormal = parentObject.getBackgroundCollisionNormal(); in update() 75 Vector2 newVelocity = vectorPool.allocate(currentVelocity); in update() 88 final Vector2 gravityVector = gravity.getGravity(); in update() 122 parentObject.setAcceleration(Vector2.ZERO); in update() 123 parentObject.setImpulse(Vector2.ZERO); in update() 129 protected void resolveCollision(Vector2 velocity, Vector2 impulse, Vector2 opposingNormal, in resolveCollision() 130 Vector2 outputImpulse) { in resolveCollision() 135 Vector2 collisionNormal = vectorPool.allocate(opposingNormal); in resolveCollision() [all …]
|
D | CollisionSystem.java | 109 public boolean castRay(Vector2 startPoint, Vector2 endPoint, Vector2 movementDirection, in castRay() 110 Vector2 hitPoint, Vector2 hitNormal, GameObject excludeObject) { in castRay() 123 Vector2 tempHitPoint = vectorPool.allocate(); in castRay() 124 Vector2 tempHitNormal = vectorPool.allocate(); in castRay() 152 Vector2 movementDirection, FixedSizeArray<HitPoint> hitPoints, in testBox() 184 Vector2 worldTileOffset = vectorPool.allocate(); in testBox() 223 movementDirection, excludeObject, Vector2.ZERO, hitPoints); in testBox() 235 public void addTemporarySurface(Vector2 startPoint, Vector2 endPoint, Vector2 normal, in addTemporarySurface() 277 protected int executeStraigtRay(final Vector2 startPoint, final Vector2 endPoint, in executeStraigtRay() 280 Vector2 hitPoint, Vector2 hitNormal, TileVisitor visitor) { in executeStraigtRay() [all …]
|
D | Vector2.java | 22 public final class Vector2 extends AllocationGuard { class 26 public static final Vector2 ZERO = new Vector2(0, 0); 28 public Vector2() { in Vector2() method in Vector2 32 public Vector2(float xValue, float yValue) { in Vector2() method in Vector2 36 public Vector2(Vector2 other) { in Vector2() method in Vector2 40 public final void add(Vector2 other) { in add() 50 public final void subtract(Vector2 other) { in subtract() 60 public final void multiply(Vector2 other) { in multiply() 72 public final void set(Vector2 other) { in set() 82 public final float dot(Vector2 other) { in dot() [all …]
|
D | SphereCollisionVolume.java | 23 private Vector2 mCenter; 24 private Vector2 mWorkspaceVector; 25 private Vector2 mWorkspaceVector2; 30 mCenter = new Vector2(centerX, centerY); in SphereCollisionVolume() 31 mWorkspaceVector = new Vector2(); in SphereCollisionVolume() 32 mWorkspaceVector2 = new Vector2(); in SphereCollisionVolume() 38 mCenter = new Vector2(centerX, centerY); in SphereCollisionVolume() 39 mWorkspaceVector = new Vector2(); in SphereCollisionVolume() 40 mWorkspaceVector2 = new Vector2(); in SphereCollisionVolume() 63 public Vector2 getCenter() { in getCenter() [all …]
|
D | SimpleCollisionComponent.java | 21 private Vector2 mPreviousPosition; 22 private Vector2 mCurrentPosition; 23 private Vector2 mMovementDirection; 24 private Vector2 mHitPoint; 25 private Vector2 mHitNormal; 30 mPreviousPosition = new Vector2(); in SimpleCollisionComponent() 31 mCurrentPosition = new Vector2(); in SimpleCollisionComponent() 32 mMovementDirection = new Vector2(); in SimpleCollisionComponent() 33 mHitPoint = new Vector2(); in SimpleCollisionComponent() 34 mHitNormal = new Vector2(); in SimpleCollisionComponent()
|
D | GravityComponent.java | 24 private Vector2 mGravity; 25 private Vector2 mScaledGravity; 26 private static final Vector2 sDefaultGravity = new Vector2(0.0f, -400.0f); 30 mGravity = new Vector2(sDefaultGravity); in GravityComponent() 31 mScaledGravity = new Vector2(); in GravityComponent() 47 public Vector2 getGravity() { in getGravity()
|
D | OrbitalMagnetComponent.java | 24 private Vector2 mCenter; 25 private Vector2 mDelta; 26 private Vector2 mRim; 27 private Vector2 mVelocity; 33 mCenter = new Vector2(); in OrbitalMagnetComponent() 34 mDelta = new Vector2(); in OrbitalMagnetComponent() 35 mRim = new Vector2(); in OrbitalMagnetComponent() 36 mVelocity = new Vector2(); in OrbitalMagnetComponent() 84 final Vector2 targetVelocity = target.getVelocity(); in applyMagnetism() 86 final Vector2 gravityVector = gravity.getGravity(); in applyMagnetism()
|
D | CameraSystem.java | 27 private Vector2 mCurrentCameraPosition; 28 private Vector2 mFocalPosition; 29 private Vector2 mPreInterpolateCameraPosition; 30 private Vector2 mTargetPosition; 31 private Vector2 mBias; 47 mCurrentCameraPosition = new Vector2(); in CameraSystem() 48 mFocalPosition = new Vector2(); in CameraSystem() 49 mPreInterpolateCameraPosition = new Vector2(); in CameraSystem() 50 mTargetPosition = new Vector2(); in CameraSystem() 51 mBias = new Vector2(); in CameraSystem() [all …]
|
D | VectorPool.java | 22 public class VectorPool extends TObjectPool<Vector2> { 31 getAvailable().add(new Vector2()); in fill() 37 ((Vector2)entry).zero(); in release() 42 public Vector2 allocate(Vector2 source) { in allocate() 43 Vector2 entry = super.allocate(); in allocate()
|
D | AABoxCollisionVolume.java | 28 private Vector2 mWidthHeight; 29 private Vector2 mBottomLeft; 33 mBottomLeft = new Vector2(offsetX, offsetY); in AABoxCollisionVolume() 34 mWidthHeight = new Vector2(width, height); in AABoxCollisionVolume() 40 mBottomLeft = new Vector2(offsetX, offsetY); in AABoxCollisionVolume() 41 mWidthHeight = new Vector2(width, height); in AABoxCollisionVolume() 73 public boolean intersects(Vector2 position, FlipInfo flip, CollisionVolume other, in intersects() 74 Vector2 otherPosition, FlipInfo otherFlip) { in intersects()
|
D | RenderComponent.java | 30 private Vector2 mPositionWorkspace; 31 private Vector2 mScreenLocation; 32 private Vector2 mDrawOffset; 38 mPositionWorkspace = new Vector2(); in RenderComponent() 39 mScreenLocation = new Vector2(); in RenderComponent() 40 mDrawOffset = new Vector2(); in RenderComponent()
|
D | HudSystem.java | 68 private Vector2 mFlyButtonLocation; 72 private Vector2 mStompButtonLocation; 75 private Vector2 mMovementSliderBaseLocation; 76 private Vector2 mMovementSliderButtonLocation; 85 private Vector2 mCoinLocation; 86 private Vector2 mRubyLocation; 93 private Vector2 mFPSLocation; 104 mFlyButtonLocation = new Vector2(); in HudSystem() 105 mStompButtonLocation = new Vector2(); in HudSystem() 106 mCoinLocation = new Vector2(); in HudSystem() [all …]
|
D | EventRecorder.java | 24 private Vector2 mLastDeathPosition = new Vector2(); 37 synchronized void setLastDeathPosition(Vector2 position) { in setLastDeathPosition() 41 synchronized Vector2 getLastDeathPosition() { in getLastDeathPosition()
|
D | NPCAnimationComponent.java | 125 final Vector2 velocity = parentObject.getVelocity(); in shouldFall() 137 final Vector2 velocity = parentObject.getVelocity(); in shouldJump() 148 final Vector2 velocity = parentObject.getVelocity(); in shouldRun() 158 final Vector2 velocity = parentObject.getVelocity(); in shouldMove() 193 final Vector2 velocity = parentObject.getVelocity(); in idle() 219 final Vector2 velocity = parentObject.getVelocity(); in walk() 256 final Vector2 velocity = parentObject.getVelocity(); in run() 292 final Vector2 velocity = parentObject.getVelocity(); in shoot() 303 final Vector2 velocity = parentObject.getVelocity(); in jumpStart() 321 final Vector2 velocity = parentObject.getVelocity(); in jumpAir()
|
D | HitPlayerComponent.java | 22 Vector2 mPlayerPosition; 23 Vector2 mMyPosition; 30 mPlayerPosition = new Vector2(); in HitPlayerComponent() 31 mMyPosition = new Vector2(); in HitPlayerComponent()
|
/external/angle/util/ |
D | geometry_utils.cpp | 121 result->texcoords[0] = Vector2(0.0f, 0.0f); in GenerateCubeGeometry() 122 result->texcoords[1] = Vector2(0.0f, 1.0f); in GenerateCubeGeometry() 123 result->texcoords[2] = Vector2(1.0f, 1.0f); in GenerateCubeGeometry() 124 result->texcoords[3] = Vector2(1.0f, 0.0f); in GenerateCubeGeometry() 125 result->texcoords[4] = Vector2(1.0f, 0.0f); in GenerateCubeGeometry() 126 result->texcoords[5] = Vector2(1.0f, 1.0f); in GenerateCubeGeometry() 127 result->texcoords[6] = Vector2(0.0f, 1.0f); in GenerateCubeGeometry() 128 result->texcoords[7] = Vector2(0.0f, 0.0f); in GenerateCubeGeometry() 129 result->texcoords[8] = Vector2(0.0f, 0.0f); in GenerateCubeGeometry() 130 result->texcoords[9] = Vector2(0.0f, 1.0f); in GenerateCubeGeometry() [all …]
|
/external/libchrome-gestures/src/ |
D | finger_metrics.cc | 9 Vector2 Add(const Vector2& left, const Vector2& right) { in Add() 10 return Vector2(left).Add(right); in Add() 13 Vector2 Sub(const Vector2& left, const Vector2& right) { in Sub() 14 return Vector2(left).Sub(right); in Sub() 17 float Dot(const Vector2& left, const Vector2& right) { in Dot() 46 Vector2 new_position = Vector2(state.position_x, state.position_y); in Update() 56 bool Metrics::CloseEnoughToGesture(const Vector2& pos_a, in CloseEnoughToGesture() 57 const Vector2& pos_b) const { in CloseEnoughToGesture() 64 Vector2 delta = Sub(pos_a, pos_b); in CloseEnoughToGesture()
|
D | finger_metrics_unittest.cc | 17 Vector2 v1 = {1.0, 1.0}; in TEST() 18 Vector2 v2 = {2.0, 2.0}; in TEST() 20 Vector2 v3 = Add(v1, v2); in TEST() 43 EXPECT_EQ(fm.position(), Vector2(123.0, 321.0)); in TEST() 46 EXPECT_EQ(Vector2(0.0, 0.0), fm.delta()); in TEST() 47 EXPECT_EQ(Vector2(123.0, 321.0), fm.origin_position()); in TEST() 49 EXPECT_EQ(Vector2(0.0, 0.0), fm.origin_delta()); in TEST() 50 EXPECT_EQ(Vector2(123.0, 321.0), fm.start_position()); in TEST() 52 EXPECT_EQ(Vector2(0.0, 0.0), fm.start_delta()); in TEST()
|
/external/angle/samples/simple_instancing/ |
D | SimpleInstancing.cpp | 99 mTexcoords.push_back(Vector2(0.0f, 0.0f)); in initialize() 100 mTexcoords.push_back(Vector2(0.0f, 1.0f)); in initialize() 101 mTexcoords.push_back(Vector2(1.0f, 1.0f)); in initialize() 102 mTexcoords.push_back(Vector2(1.0f, 0.0f)); in initialize() 194 std::vector<Vector2> mTexcoords;
|