Home
last modified time | relevance | path

Searched refs:glm (Results 1 – 25 of 253) sorted by relevance

1234567891011

/external/oboe/samples/RhythmGame/third_party/glm/gtx/
Dhash.inl2 /// @file glm/gtx/hash.inl
9 /// @brief Add std::hash support for glm types
11 /// <glm/gtx/hash.inl> need to be included to use these functionalities.
13 namespace glm { namespace
25 template <typename T, glm::precision P>
26 GLM_FUNC_QUALIFIER size_t hash<glm::tvec1<T, P>>::operator()(glm::tvec1<T, P> const & v) const
32 template <typename T, glm::precision P>
33 GLM_FUNC_QUALIFIER size_t hash<glm::tvec2<T, P>>::operator()(glm::tvec2<T, P> const & v) const
37 glm::detail::hash_combine(seed, hasher(v.x));
38 glm::detail::hash_combine(seed, hasher(v.y));
[all …]
Dhash.hpp43 template <typename T, glm::precision P>
44 struct hash<glm::tvec1<T,P> >
46 GLM_FUNC_DECL size_t operator()(glm::tvec1<T, P> const & v) const;
49 template <typename T, glm::precision P>
50 struct hash<glm::tvec2<T,P> >
52 GLM_FUNC_DECL size_t operator()(glm::tvec2<T, P> const & v) const;
55 template <typename T, glm::precision P>
56 struct hash<glm::tvec3<T,P> >
58 GLM_FUNC_DECL size_t operator()(glm::tvec3<T, P> const & v) const;
61 template <typename T, glm::precision P>
[all …]
Dextended_min_max.inl2 /// @file glm/gtx/extended_min_max.inl
4 namespace glm namespace
12 return glm::min(glm::min(x, y), z);
23 return glm::min(glm::min(x, y), z);
34 return glm::min(glm::min(x, y), z);
46 return glm::min(glm::min(x, y), glm::min(z, w));
58 return glm::min(glm::min(x, y), glm::min(z, w));
70 return glm::min(glm::min(x, y), glm::min(z, w));
79 return glm::max(glm::max(x, y), z);
90 return glm::max(glm::max(x, y), z);
[all …]
Deuler_angles.inl2 /// @file glm/gtx/euler_angles.inl
4 #include "compatibility.hpp" // glm::atan2
6 namespace glm namespace
14 T cosX = glm::cos(angleX);
15 T sinX = glm::sin(angleX);
30 T cosY = glm::cos(angleY);
31 T sinY = glm::sin(angleY);
46 T cosZ = glm::cos(angleZ);
47 T sinZ = glm::sin(angleZ);
63 T cosX = glm::cos(angleX);
[all …]
Dnormalize_dot.inl2 /// @file glm/gtx/normalize_dot.inl
4 namespace glm namespace
9 return glm::dot(x, y) * glm::inversesqrt(glm::dot(x, x) * glm::dot(y, y));
15 return glm::dot(x, y) * glm::fastInverseSqrt(glm::dot(x, x) * glm::dot(y, y));
17 }//namespace glm
Dwrap.inl2 /// @file glm/gtx/wrap.inl
4 namespace glm namespace
9 return glm::clamp(Texcoord, vecType<T, P>(0), vecType<T, P>(1));
21 return glm::fract(Texcoord);
33 return glm::fract(glm::abs(Texcoord));
45 vecType<T, P> const Abs = glm::abs(Texcoord);
46 vecType<T, P> const Clamp = glm::mod(glm::floor(Abs), vecType<T, P>(2));
47 vecType<T, P> const Floor = glm::floor(Abs);
50 return mix(Rest, vecType<T, P>(1) - Rest, glm::greaterThanEqual(Mirror, vecType<T, P>(1)));
58 }//namespace glm
Dlog_base.inl2 /// @file glm/gtx/log_base.inl
4 namespace glm namespace
10 return glm::log(x) / glm::log(base);
16 return glm::log(x) / glm::log(base);
18 }//namespace glm
Dprojection.inl2 /// @file glm/gtx/projection.inl
4 namespace glm namespace
9 return glm::dot(x, Normal) / glm::dot(Normal, Normal) * Normal;
11 }//namespace glm
Dintersect.inl2 /// @file glm/gtx/intersect.inl
4 namespace glm namespace
14 typename genType::value_type d = glm::dot(dir, planeNormal);
19 intersectionDistance = glm::dot(planeOrig - orig, planeNormal) / d;
37 genType p = glm::cross(dir, e2);
39 typename genType::value_type a = glm::dot(e1, p);
48 baryPosition.x = f * glm::dot(s, p);
54 genType q = glm::cross(s, e1);
55 baryPosition.y = f * glm::dot(dir, q);
61 baryPosition.z = f * glm::dot(e2, q);
[all …]
Dsimd_quat.inl2 /// @file glm/gtx/simd_quat.inl
4 namespace glm{ namespace
59 vec3 c = glm::cos(eulerAngles * 0.5f);
60 vec3 s = glm::sin(eulerAngles * 0.5f);
194 return glm::inverse(q) * v;
391 return glm::sqrt(dot(q, q));
423 if (cosTheta > 1.0f - glm::epsilon<float>())
429 float angle = glm::acos(cosTheta);
432 float s0 = glm::sin((1.0f - a) * angle);
433 float s1 = glm::sin(a * angle);
[all …]
Dperpendicular.inl2 /// @file glm/gtx/perpendicular.inl
4 namespace glm namespace
15 }//namespace glm
/external/oboe/samples/RhythmGame/third_party/glm/gtc/
Dbitfield.inl2 /// @file glm/gtc/bitfield.inl
6 namespace glm{ namespace
19 GLM_FUNC_QUALIFIER glm::uint16 bitfieldInterleave(glm::uint8 x, glm::uint8 y)
21 glm::uint16 REG1(x);
22 glm::uint16 REG2(y);
24 REG1 = ((REG1 << 4) | REG1) & glm::uint16(0x0F0F);
25 REG2 = ((REG2 << 4) | REG2) & glm::uint16(0x0F0F);
27 REG1 = ((REG1 << 2) | REG1) & glm::uint16(0x3333);
28 REG2 = ((REG2 << 2) | REG2) & glm::uint16(0x3333);
30 REG1 = ((REG1 << 1) | REG1) & glm::uint16(0x5555);
[all …]
/external/skqp/platform_tools/android/apps/arcore/src/main/cpp/
Dhello_ar_application.cc49 const glm::vec3 kWhite = {255, 255, 255};
56 inline glm::vec3 GetRandomPlaneColor() { in GetRandomPlaneColor()
58 return glm::vec3(((colorRgba >> 24) & 0xff) / 255.0f, in GetRandomPlaneColor()
189 void DrawVector(SkCanvas *canvas, SkMatrix44 m, glm::vec3 begin, glm::vec3 end, SkColor c) { in DrawVector()
245 glm::mat4 view_mat; in OnDrawFrame()
246 glm::mat4 projection_mat; in OnDrawFrame()
247 ArCamera_getViewMatrix(ar_session_, ar_camera, glm::value_ptr(view_mat)); in OnDrawFrame()
250 glm::value_ptr(projection_mat)); in OnDrawFrame()
388 glm::vec3 color; in OnDrawFrame()
541 glm::vec4 pendingAnchorPos(out_hit_raw[4], out_hit_raw[5], out_hit_raw[6], 1); in OnTouchedFirst()
[all …]
Dhello_ar_application.h54 SkMatrix SkiaRenderer(const glm::mat4 &proj, const glm::mat4 &view, const glm::mat4 &model);
93 … void UpdateMatrixMaps(ArAnchor* anchorKey, glm::mat4 aaMat, glm::mat4 caMat, glm::mat4 snapMat);
95 …void SetModelMatrices(glm::mat4& aaMat, glm::mat4& caMat, glm::mat4& snapMat, const glm::mat4& pla…
97 …void SetCameraAlignedMatrix(glm::mat4& caMat, glm::vec3 hitPos, glm::mat4& planeModel, const glm::…
103 glm::mat4
104 ComputeCameraAlignedMatrix(ArPlane *arPlane, glm::mat4 planeModel, glm::mat4 initRotation,
105 glm::vec4 anchorPos,
106 glm::vec3 cameraPos, glm::vec3 hitPos,
128 std::vector<glm::vec3> begins;
129 std::vector<glm::vec3> ends;
[all …]
Dutil.cc167 glm::mat4 *out_model_mat) { in GetTransformMatrixFromPose()
173 glm::value_ptr(*out_model_mat)); in GetTransformMatrixFromPose()
176 glm::vec3 GetPlaneNormal(const ArSession *ar_session, in GetPlaneNormal()
180 glm::quat plane_quaternion(plane_pose_raw[3], plane_pose_raw[0], in GetPlaneNormal()
184 return glm::rotate(plane_quaternion, glm::vec3(0., 1.f, 0.)); in GetPlaneNormal()
192 glm::vec3 plane_position(plane_pose_raw[4], plane_pose_raw[5], in CalculateDistanceToPlane()
194 glm::vec3 normal = GetPlaneNormal(ar_session, plane_pose); in CalculateDistanceToPlane()
198 glm::vec3 camera_P_plane(camera_pose_raw[4] - plane_position.x, in CalculateDistanceToPlane()
201 return glm::dot(normal, camera_P_plane); in CalculateDistanceToPlane()
204 glm::mat4 GetCameraRotationMatrix(float cameraOutRaw[]) { in GetCameraRotationMatrix()
[all …]
Dutil.h101 …void GetTransformMatrixFromPose(ArSession *ar_session, const ArPose *ar_pose, glm::mat4 *out_model…
104 glm::vec3 GetPlaneNormal(const ArSession *ar_session, const ArPose &plane_pose);
112 glm::mat4 GetCameraRotationMatrix(float cameraOutRaw[]);
115 …void GetCameraInfo(ArSession* arSession, ArFrame* arFrame, glm::vec3& cameraPos, glm::mat4& camera…
118 SkMatrix44 GlmMatToSkMat(const glm::mat4 m);
119 glm::mat4 SkMatToGlmMat(const SkMatrix44 m);
126 void LogGlmMat(glm::mat4 m, char *type);
132 float Dot(glm::vec3 u, glm::vec3 v);
133 float Magnitude(glm::vec3 u);
134 float AngleRad(glm::vec3 u, glm::vec3 v);
[all …]
Dplane_renderer.h46 void Draw(const glm::mat4 &projection_mat, const glm::mat4 &view_mat,
48 const glm::vec3 &color);
53 std::vector<glm::vec3> vertices_;
55 glm::mat4 model_mat_ = glm::mat4(1.0f);
56 glm::vec3 normal_vec_ = glm::vec3(0.0f);
Dplane_renderer.cc99 void PlaneRenderer::Draw(const glm::mat4 &projection_mat, in Draw()
100 const glm::mat4 &view_mat, const ArSession *ar_session, in Draw()
101 const ArPlane *ar_plane, const glm::vec3 &color) { in Draw()
118 glm::value_ptr(projection_mat * view_mat * model_mat_)); in Draw()
121 glm::value_ptr(model_mat_)); in Draw()
163 std::vector<glm::vec2> raw_vertices(vertices_size); in UpdateForPlane()
165 glm::value_ptr(raw_vertices.front())); in UpdateForPlane()
171 vertices_.push_back(glm::vec3(raw_vertices[i].x, raw_vertices[i].y, 0.0f)); in UpdateForPlane()
177 glm::value_ptr(model_mat_)); in UpdateForPlane()
188 glm::vec2 v = raw_vertices[i]; in UpdateForPlane()
[all …]
/external/oboe/samples/RhythmGame/third_party/glm/detail/
Dtype_int.hpp15 namespace glm{ namespace
295 GLM_STATIC_ASSERT(sizeof(glm::int8) == 1, "int8 size isn't 1 byte on this platform");
296 GLM_STATIC_ASSERT(sizeof(glm::int16) == 2, "int16 size isn't 2 bytes on this platform");
297 GLM_STATIC_ASSERT(sizeof(glm::int32) == 4, "int32 size isn't 4 bytes on this platform");
298 GLM_STATIC_ASSERT(sizeof(glm::int64) == 8, "int64 size isn't 8 bytes on this platform");
300 GLM_STATIC_ASSERT(sizeof(glm::uint8) == 1, "uint8 size isn't 1 byte on this platform");
301 GLM_STATIC_ASSERT(sizeof(glm::uint16) == 2, "uint16 size isn't 2 bytes on this platform");
302 GLM_STATIC_ASSERT(sizeof(glm::uint32) == 4, "uint32 size isn't 4 bytes on this platform");
303 GLM_STATIC_ASSERT(sizeof(glm::uint64) == 8, "uint64 size isn't 8 bytes on this platform");
Dprecision.hpp8 namespace glm namespace
37 template <glm::precision P>
45 struct is_aligned<glm::aligned_lowp>
51 struct is_aligned<glm::aligned_mediump>
57 struct is_aligned<glm::aligned_highp>
Dfunc_integer.inl2 /// @file glm/detail/func_integer.inl
24 namespace glm{ namespace
33 …template <typename T, glm::precision P, template <typename, glm::precision> class vecType, bool Al…
42 …template <typename T, glm::precision P, template <typename, glm::precision> class vecType, bool Al…
51 …template <typename T, glm::precision P, template <typename, glm::precision> class vecType, bool Al…
60 …template <typename T, glm::precision P, template <typename, glm::precision> class vecType, bool Al…
77 return glm::bitCount(~Value & (Value - static_cast<genIUType>(1)));
107 …template <typename T, glm::precision P, template <class, glm::precision> class vecType, bool EXEC …
116 template <typename T, glm::precision P, template <typename, glm::precision> class vecType>
125 template <typename T, glm::precision P, template <typename, glm::precision> class vecType, int>
[all …]
Dtype_mat4x4_simd.inl2 /// @file glm/detail/type_mat4x4_sse2.inl
4 namespace glm namespace
7 }//namespace glm
Dfunc_packing_simd.inl2 /// @file glm/detail/func_packing_simd.inl
4 namespace glm{ namespace
9 }//namespace glm
Dfunc_vector_relational_simd.inl2 /// @file glm/detail/func_vector_relational_simd.inl
4 namespace glm{ namespace
9 }//namespace glm
Dfunc_integer_simd.inl2 /// @file glm/detail/func_integer_simd.inl
8 namespace glm{ namespace
11 template <glm::precision P>
32 template <glm::precision P>
66 }//namespace glm

1234567891011