mirror of
https://github.com/Linloir/SceneEditor.git
synced 2025-12-17 07:28:12 +08:00
- Add critical debug logs - Change transforming ray to local space to transforming vex to world space (because of scaling) - Fix not updating bounding box causing hit test failure
17 lines
407 B
C++
17 lines
407 B
C++
#pragma once
|
|
|
|
#include <GLM/glm.hpp>
|
|
|
|
class Ray {
|
|
private:
|
|
glm::vec3 _origin = glm::vec3(0.0f);
|
|
glm::vec3 _direction = glm::vec3(0.0f, 0.0f, -1.0f);
|
|
|
|
public:
|
|
Ray() {}
|
|
Ray(glm::vec3 origin, glm::vec3 direction) : _origin(origin), _direction(direction) {}
|
|
|
|
public:
|
|
inline glm::vec3 origin() const { return _origin; }
|
|
inline glm::vec3 direction() const { return _direction; }
|
|
}; |