Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- glm::vec3 AABBCollider::get_farthest_point(const glm::vec3& dir)
- {
- F32 x, y, z;
- x = dir.x >= 0 ? size.x : -size.x;
- y = dir.y >= 0 ? size.y : -size.y;
- z = dir.z >= 0 ? size.z : -size.z;
- return center + glm::vec3(x, y, z);
- }
- glm::vec3 SphereCollider::get_farthest_point(const glm::vec3& dir)
- {
- return center + normalize(dir) *radius;
- }
Advertisement
Add Comment
Please, Sign In to add comment