Simulant  21.12-574
A portable game engine for Windows, OSX, Linux, Dreamcast, and PSP
octree_culler.h
1 #pragma once
2 
3 #include <memory>
4 #include "geom_culler.h"
5 #include "../../vertex_data.h"
6 
7 namespace smlt {
8 
9 class RenderableFactory;
10 
11 struct _OctreeCullerImpl;
12 
13 class OctreeCuller : public GeomCuller {
14 public:
15  OctreeCuller(Geom* geom, const MeshPtr mesh, uint8_t max_depth);
16 
17  AABB octree_bounds() const;
18 
19 private:
20  void _compile(const Vec3& pos, const Quaternion& rot, const Vec3& scale) override;
21  void _gather_renderables(const Frustum &frustum, batcher::RenderQueue* render_queue) override;
22  void _all_renderables(batcher::RenderQueue* queue) override;
23 
24  std::shared_ptr<_OctreeCullerImpl> pimpl_;
25 
26  IndexType index_type_ = INDEX_TYPE_16_BIT;
27  uint8_t max_depth_;
28 };
29 
30 }
smlt::Frustum
Definition: frustum.h:43
smlt::Geom
The Geom class.
Definition: geom.h:64
smlt::Vec3
Definition: vec3.h:23
smlt::Quaternion
Definition: quaternion.h:20
smlt
Definition: animation.cpp:25
smlt::batcher::RenderQueue
Definition: render_queue.h:156
smlt::GeomCuller
Definition: geom_culler.h:32
smlt::OctreeCuller
Definition: octree_culler.h:13
smlt::AABB
Definition: aabb.h:22