3#include <drivers/jolt-cpp/jolt-imports.hpp>
22 m_value = { v.GetX(), v.GetY(), v.GetZ() };
25 operator glm::vec3()
const {
return m_value; }
27 glm::vec3 operator=(
const JPH::Vec3& v) {
28 m_value = { v.GetX(), v.GetY(), v.GetZ() };
32 bool operator==(
const glm::vec3& other)
const {
33 return m_value == other;
44 vector3(
const JPH::Float3& v) { m_value = { v.x, v.y, v.z }; }
46 operator glm::vec3()
const {
return m_value; }
48 glm::vec3 operator=(
const JPH::Float3& v) {
49 m_value = { v.x, v.y, v.z };
53 bool operator==(
const glm::vec3& other)
const {
54 return m_value == other;
66 m_value = { v.GetX(), v.GetY(), v.GetZ() };
69 operator glm::dvec3()
const {
return m_value; }
71 glm::dvec3 operator=(
const JPH::DVec3& v) {
72 m_value = { v.GetX(), v.GetY(), v.GetZ() };
76 bool operator==(
const glm::dvec3& other)
const {
77 return m_value == other;
88 vector3(
const JPH::Double3& v) { m_value = { v.x, v.y, v.z }; }
90 operator glm::dvec3()
const {
return m_value; }
92 glm::dvec3 operator=(
const JPH::Double3& v) {
93 m_value = { v.x, v.y, v.z };
97 bool operator==(
const glm::dvec3& other)
const {
98 return m_value == other;
114 m_value = { v.GetX(), v.GetY(), v.GetZ(), v.GetW() };
117 operator glm::vec4()
const {
return m_value; }
119 glm::vec4 operator=(
const JPH::Vec4& v) {
120 m_value = { v.GetX(), v.GetY(), v.GetZ(), v.GetW() };
124 bool operator==(
const glm::vec4& other)
const {
125 return m_value == other;
136 vector4(
const JPH::Float4& v) { m_value = { v.x, v.y, v.z, v.w }; }
138 operator glm::vec4()
const {
return m_value; }
140 glm::vec4 operator=(
const JPH::Float4& v) {
141 m_value = { v.x, v.y, v.z, v.w };
145 bool operator==(
const glm::vec4& other)
const {
146 return m_value == other;
166 for (
int i = 0; i < 4; ++i) {
167 const auto col = m.GetColumn4(i);
169 glm::vec4(col.GetX(), col.GetY(), col.GetZ(), col.GetW());
173 operator glm::mat4()
const {
return m_value; }
175 glm::mat4 operator=(
const JPH::Mat44& m) {
176 for (
int i = 0; i < 4; ++i) {
177 const auto col = m.GetColumn4(i);
179 glm::vec4(col.GetX(), col.GetY(), col.GetZ(), col.GetW());
184 bool operator==(
const glm::mat4& other)
const {
185 return m_value == other;
Types are still be filled out. When this is completed to_jph() can be removed.
Definition jolt_broad_phase.hpp:5
Definition math_types.hpp:159
Definition math_types.hpp:155
Definition math_types.hpp:15
Definition math_types.hpp:107