Skip to content

Commit

Permalink
fix sanitizer build
Browse files Browse the repository at this point in the history
  • Loading branch information
igagis committed Nov 14, 2024
1 parent 980ad70 commit 4a8c78c
Showing 1 changed file with 26 additions and 30 deletions.
56 changes: 26 additions & 30 deletions src/ruis/render/scene/scene.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,36 +24,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.

namespace ruis::render {

class node;
class camera;
class light;

class scene
{
uint32_t time = 0;

public:
std::string name;

std::vector<utki::shared_ref<node>> nodes;
std::vector<utki::shared_ref<camera>> cameras;
std::vector<utki::shared_ref<light>> lights;

std::shared_ptr<camera> active_camera;

scene() = default;
scene(const scene&) = default;
scene(scene&&) = default;
scene& operator=(const scene&) = default;
scene& operator=(scene&&) = default;
virtual ~scene() = default;

std::shared_ptr<light> get_primary_light();
std::shared_ptr<light> get_secondary_light();

void update(uint32_t dt);
};

constexpr float default_camera_near = 0.1;
constexpr float default_camera_far = 100.0;

Expand Down Expand Up @@ -84,4 +54,30 @@ class light
light() = default;
};

class scene
{
uint32_t time = 0;

public:
std::string name;

std::vector<utki::shared_ref<node>> nodes;
std::vector<utki::shared_ref<camera>> cameras;
std::vector<utki::shared_ref<light>> lights;

std::shared_ptr<camera> active_camera;

scene() = default;
scene(const scene&) = default;
scene(scene&&) = default;
scene& operator=(const scene&) = default;
scene& operator=(scene&&) = default;
virtual ~scene() = default;

std::shared_ptr<light> get_primary_light();
std::shared_ptr<light> get_secondary_light();

void update(uint32_t dt);
};

} // namespace ruis::render

0 comments on commit 4a8c78c

Please sign in to comment.