Home
last modified time | relevance | path

Searched refs:Vector2d (Results 1 – 25 of 42) sorted by relevance

12

/external/libchrome/ui/gfx/geometry/
Dvector2d_unittest.cc18 Vector2d i(3, 4); in TEST()
24 Vector2d int_zero(0, 0); in TEST()
25 Vector2d int_nonzero(2, -2); in TEST()
36 Vector2d i1(3, 5); in TEST()
37 Vector2d i2(4, -1); in TEST()
40 Vector2d expected; in TEST()
41 Vector2d actual; in TEST()
43 { Vector2d(3, 5), i1 + Vector2d() }, in TEST()
44 { Vector2d(3 + 4, 5 - 1), i1 + i2 }, in TEST()
45 { Vector2d(3 - 4, 5 + 1), i1 - i2 } in TEST()
[all …]
Dvector2d.h23 class GFX_EXPORT Vector2d {
25 constexpr Vector2d() : x_(0), y_(0) {} in Vector2d() function
26 constexpr Vector2d(int x, int y) : x_(x), y_(y) {} in Vector2d() function
38 void Add(const Vector2d& other);
40 void Subtract(const Vector2d& other);
42 constexpr bool operator==(const Vector2d& other) const {
45 void operator+=(const Vector2d& other) { Add(other); }
46 void operator-=(const Vector2d& other) { Subtract(other); }
48 void SetToMin(const Vector2d& other) { in SetToMin()
53 void SetToMax(const Vector2d& other) { in SetToMax()
[all …]
Dvector2d.cc14 bool Vector2d::IsZero() const { in IsZero()
18 void Vector2d::Add(const Vector2d& other) { in Add()
23 void Vector2d::Subtract(const Vector2d& other) { in Subtract()
28 int64_t Vector2d::LengthSquared() const { in LengthSquared()
32 float Vector2d::Length() const { in Length()
36 std::string Vector2d::ToString() const { in ToString()
Dvector2d_conversions.cc11 Vector2d ToFlooredVector2d(const Vector2dF& vector2d) { in ToFlooredVector2d()
14 return Vector2d(x, y); in ToFlooredVector2d()
17 Vector2d ToCeiledVector2d(const Vector2dF& vector2d) { in ToCeiledVector2d()
20 return Vector2d(x, y); in ToCeiledVector2d()
23 Vector2d ToRoundedVector2d(const Vector2dF& vector2d) { in ToRoundedVector2d()
26 return Vector2d(x, y); in ToRoundedVector2d()
Dpoint.h63 void operator+=(const Vector2d& vector) {
68 void operator-=(const Vector2d& vector) {
78 Vector2d OffsetFromOrigin() const { return Vector2d(x_, y_); } in OffsetFromOrigin()
106 inline Point operator+(const Point& lhs, const Vector2d& rhs) {
112 inline Point operator-(const Point& lhs, const Vector2d& rhs) {
118 inline Vector2d operator-(const Point& lhs, const Point& rhs) {
119 return Vector2d(base::ClampSub(lhs.x(), rhs.x()),
123 inline Point PointAtOffsetFromOrigin(const Vector2d& offset_from_origin) { in PointAtOffsetFromOrigin()
Dpoint_unittest.cc44 Vector2d v1(3, -3); in TEST()
45 Vector2d v2(-8, 1); in TEST()
55 { a, a + Vector2d() }, in TEST()
67 EXPECT_EQ(Vector2d(-20 - 1, 8 - 5).ToString(), (b - a).ToString()); in TEST()
171 test += Vector2d(5, -8); in TEST()
175 test2 -= Vector2d(5, -8); in TEST()
204 test += Vector2d(int_max, int_max); in TEST()
208 test += Vector2d(int_min, int_min); in TEST()
212 test += Vector2d(int_max, int_max); in TEST()
216 test += Vector2d(int_min, int_min); in TEST()
[all …]
Dvector2d_conversions.h14 GFX_EXPORT Vector2d ToFlooredVector2d(const Vector2dF& vector2d);
17 GFX_EXPORT Vector2d ToCeiledVector2d(const Vector2dF& vector2d);
20 GFX_EXPORT Vector2d ToRoundedVector2d(const Vector2dF& vector2d);
Drect.h106 Vector2d OffsetFromOrigin() const { return Vector2d(x(), y()); } in OffsetFromOrigin()
133 void Offset(const Vector2d& distance) { Offset(distance.x(), distance.y()); } in Offset()
134 void operator+=(const Vector2d& offset);
135 void operator-=(const Vector2d& offset);
249 GFX_EXPORT Rect operator+(const Rect& lhs, const Vector2d& rhs);
250 GFX_EXPORT Rect operator-(const Rect& lhs, const Vector2d& rhs);
252 inline Rect operator+(const Vector2d& lhs, const Rect& rhs) {
Dscroll_offset.h26 explicit ScrollOffset(const Vector2d& v) : x_(v.x()), y_(v.y()) {} in ScrollOffset()
108 inline Vector2d ScrollOffsetToFlooredVector2d(const ScrollOffset& v) { in ScrollOffsetToFlooredVector2d()
109 return Vector2d(ToFlooredInt(v.x()), ToFlooredInt(v.y())); in ScrollOffsetToFlooredVector2d()
Drect.cc116 origin_ += Vector2d(left, top); in Inset()
124 origin_ += Vector2d(horizontal, vertical); in Offset()
130 void Rect::operator+=(const Vector2d& offset) { in operator +=()
137 void Rect::operator-=(const Vector2d& offset) { in operator -=()
307 Rect operator+(const Rect& lhs, const Vector2d& rhs) { in operator +()
313 Rect operator-(const Rect& lhs, const Vector2d& rhs) { in operator -()
Dinsets.h15 class Vector2d; variable
101 Insets Offset(const gfx::Vector2d& vector) const;
Dinsets.cc17 Insets Insets::Offset(const gfx::Vector2d& vector) const { in Offset()
/external/eigen/unsupported/doc/examples/
DBVH_Example.cpp9 …Box2d bounding_box(const Vector2d &v) { return Box2d(v, v); } //compute the bounding box of a sing… in bounding_box()
18 …double minimumOnVolumeObject(const Box2d &r, const Vector2d &v) { ++calls; return r.squaredExterio… in minimumOnVolumeObject()
19 …double minimumOnObjectVolume(const Vector2d &v, const Box2d &r) { ++calls; return r.squaredExterio… in minimumOnObjectVolume()
20 …double minimumOnObjectObject(const Vector2d &v1, const Vector2d &v2) { ++calls; return (v1 - v2).s… in minimumOnObjectObject()
27 typedef std::vector<Vector2d, aligned_allocator<Vector2d> > StdVectorOfVector2d; in main()
30 redPoints.push_back(Vector2d::Random()); in main()
31 bluePoints.push_back(Vector2d::Random()); in main()
45 …KdBVH<double, 2, Vector2d> redTree(redPoints.begin(), redPoints.end()), blueTree(bluePoints.begin(… in main()
/external/eigen/bench/
DBenchTimer.h160 Vector2d m_starts;
161 Vector2d m_times;
162 Vector2d m_bests;
163 Vector2d m_worsts;
164 Vector2d m_totals;
/external/eigen/doc/
DStructHavingEigenMembers.dox19 Eigen::Vector2d v;
38 Eigen::Vector2d v;
61 Eigen::Vector2d v;
70 A Eigen::Vector2d consists of 2 doubles, which is 128 bits. Which is exactly the size of a SSE pack…
72 For this reason, Eigen takes care by itself to require 128-bit alignment for Eigen::Vector2d, by do…
73 \li Eigen requires 128-bit alignment for the Eigen::Vector2d's array (of 2 doubles). With GCC, this…
74 \li Eigen overloads the "operator new" of Eigen::Vector2d so it will always return 128-bit aligned …
92 Eigen::Vector2d v;
151 Eigen::Vector2d av(v);
167 Vector2d v;
DPassingByValue.dox12 void my_function(Eigen::Vector2d v);
18 void my_function(const Eigen::Vector2d& v);
26 Eigen::Vector2d v;
/external/eigen/test/
Dunalignedassert.cpp58 Vector2d m;
78 Vector2d m;
119 construct_at_boundary<Vector2d>(16); in unalignedassert()
154 VERIFY_RAISES_ASSERT(construct_at_boundary<Vector2d>(8)); in unalignedassert()
Devaluators.cpp107 Vector2d v = Vector2d::Random(); in test_evaluators()
108 const Vector2d v_const(v); in test_evaluators()
109 Vector2d v2; in test_evaluators()
145 VERIFY_IS_APPROX_EVALUATOR(w, Vector2d::Zero().transpose()); in test_evaluators()
240 VERIFY_IS_APPROX_EVALUATOR(v2, v + Vector2d::Ones()); in test_evaluators()
241 …VERIFY_IS_APPROX_EVALUATOR(w, (v + Vector2d::Ones()).transpose().cwiseProduct(RowVector2d::Constan… in test_evaluators()
/external/libchrome/ui/gfx/geometry/mojo/
Dgeometry_struct_traits.h124 struct StructTraits<gfx::mojom::Vector2dDataView, gfx::Vector2d> {
125 static int x(const gfx::Vector2d& v) { return v.x(); }
126 static int y(const gfx::Vector2d& v) { return v.y(); }
127 static bool Read(gfx::mojom::Vector2dDataView data, gfx::Vector2d* out) {
Dgeometry_traits_test_service.mojom37 EchoVector2d(Vector2d v) => (Vector2d pass);
Dgeometry_struct_traits_unittest.cc63 void EchoVector2d(const Vector2d& v, EchoVector2dCallback callback) override { in EchoVector2d()
184 TEST_F(GeometryStructTraitsTest, Vector2d) { in TEST_F() argument
187 gfx::Vector2d input(x, y); in TEST_F()
189 gfx::Vector2d output; in TEST_F()
Dgeometry.typemap31 "gfx.mojom.Vector2d=gfx::Vector2d",
/external/eigen/unsupported/test/
Dopenglsupport.cpp183 Vector2d vd2; vd2.setRandom(); Vector3d vd23; vd23 << vd2, 0; in test_openglsupport()
202 Vector2d vd2; vd2.setRandom(); Vector3d vd23; vd23 << vd2, 1; in test_openglsupport()
321 typedef Vector2d Vector2d; in test_openglsupport() typedef
325 VERIFY_UNIFORM(dv,v2d, Vector2d); in test_openglsupport()
Dautodiff.cpp292 VERIFY_IS_APPROX(y.derivatives()(0).derivatives(), -std::sin(s1*s3+s2*s4)*Vector2d(s3*s3,s4*s3)); in test_autodiff_hessian()
293 VERIFY_IS_APPROX(y.derivatives()(1).derivatives(), -std::sin(s1*s3+s2*s4)*Vector2d(s3*s4,s4*s4)); in test_autodiff_hessian()
296 VERIFY_IS_APPROX(z.derivatives()(0).derivatives(), Vector2d(0,1)); in test_autodiff_hessian()
297 VERIFY_IS_APPROX(z.derivatives()(1).derivatives(), Vector2d(1,0)); in test_autodiff_hessian()
346 typedef AutoDiffScalar<Vector2d> AD; in bug_1264()
/external/eigen/doc/examples/
Dtut_arithmetic_matrix_mul.cpp10 Vector2d u(-1,1), v(2,0); in main()

12