Saga3D API Documentation
1.0-RC4
|
Go to the documentation of this file.
2 #ifndef __I_SCENE_MANAGER_H_INCLUDED__
3 #define __I_SCENE_MANAGER_H_INCLUDED__
14 #include <unordered_map>
28 class IAnimatedMeshSceneNode;
29 class ICameraSceneNode;
49 virtual void onEvent(
const SDL_Event& event)
override {}
55 virtual const std::shared_ptr<IMesh>&
getMesh(
const std::string& fileName) = 0;
57 virtual const std::shared_ptr<IMesh>&
getMesh(
void* data,
const std::size_t size,
58 const std::string& extension) = 0;
60 virtual const std::shared_ptr<IMesh>&
getMesh(
const ID id)
const = 0;
62 virtual void removeMesh(
const std::shared_ptr<IMesh>& mesh) = 0;
78 const std::shared_ptr<IMesh>& mesh,
const std::shared_ptr<ISceneNode>& parent =
nullptr,
79 const glm::vec3& position = glm::vec3(0,0,0),
80 const glm::vec3& rotation = glm::vec3(0,0,0),
81 const glm::vec3& scale = glm::vec3(1.0f, 1.0f, 1.0f)) = 0;
85 virtual void removeNode(
const std::shared_ptr<ISceneNode>& node) = 0;
95 virtual const std::shared_ptr<video::IVideoDriver>&
getVideoDriver()
const = 0;
99 virtual const std::shared_ptr<ISceneNode>&
getNode(
const ID id)
const = 0;
239 const std::shared_ptr<ISceneNode>& parent =
nullptr,
240 const glm::vec3& position = glm::vec3(0,0,0),
241 const glm::vec3& lookAt = glm::vec3(0,0,-1),
242 bool makeActive =
true) = 0;
303 const std::shared_ptr<ISceneNode>& parent =
nullptr,
304 float moveSpeed = 0.5f,
float rotateSpeed = 1.f,
305 bool makeActive =
true) = 0;
699 virtual const std::shared_ptr<ICameraSceneNode>&
getActiveCamera()
const = 0;
704 virtual void setActiveCamera(
const std::shared_ptr<ICameraSceneNode>& camera) = 0;
1035 virtual void clear() = 0;
constexpr SGPUResource::HandleType NULL_GPU_RESOURCE_HANDLE
virtual PassSceneNodeList & getNodeList()=0
virtual const std::shared_ptr< ICameraSceneNode > & addCameraSceneNode(const std::shared_ptr< ISceneNode > &parent=nullptr, const glm::vec3 &position=glm::vec3(0, 0, 0), const glm::vec3 &lookAt=glm::vec3(0, 0,-1), bool makeActive=true)=0
Adds a cube scene node.
virtual const std::shared_ptr< video::IVideoDriver > & getVideoDriver() const =0
Get interface to the mesh cache which is shared between all existing scene managers.
virtual const std::shared_ptr< ISceneNode > & getRootSceneNode() const =0
Adds a dynamic light scene node to the scene graph.
virtual const std::shared_ptr< ICameraSceneNode > & addCameraSceneNodeFPS(const std::shared_ptr< ISceneNode > &parent=nullptr, float moveSpeed=0.5f, float rotateSpeed=1.f, bool makeActive=true)=0
Adds a maya style user controlled camera scene node to the scene graph.
virtual void onEvent(const SDL_Event &event) override
Called when an SDL event is fired.
virtual const std::shared_ptr< ICameraSceneNode > & getActiveCamera() const =0
Get the first scene node with the specified id.
virtual void clear()=0
Creates a rotation animator, which rotates the attached scene node around itself.
virtual ID getTextureID()=0
virtual const std::shared_ptr< ISceneNode > & getNode(const ID id) const =0
Interface of an object which can receive events (SDL_Event*)
virtual void removeNode(const ID id)=0
std::uint32_t ID
Type for node ID.
std::unordered_map< video::RenderPassHandle, SceneNodeList > PassSceneNodeList
virtual std::shared_ptr< ISceneNode > createSceneNode(const std::shared_ptr< IMesh > &mesh, const std::shared_ptr< ISceneNode > &parent=nullptr, const glm::vec3 &position=glm::vec3(0, 0, 0), const glm::vec3 &rotation=glm::vec3(0, 0, 0), const glm::vec3 &scale=glm::vec3(1.0f, 1.0f, 1.0f))=0
Adds a scene node for rendering a static mesh.
virtual bool isEmptyPass(video::RenderPassHandle pass) const =0
virtual void removeMesh(const std::shared_ptr< IMesh > &mesh)=0
virtual void unregisterNode(const std::shared_ptr< ISceneNode > &node, video::RenderPassHandle pass)=0
virtual void registerNode(const std::shared_ptr< ISceneNode > &node, video::RenderPassHandle pass)=0
virtual const std::shared_ptr< IMesh > & getMesh(const std::string &fileName)=0
Loads a mesh from given file.
std::vector< std::shared_ptr< ISceneNode > > SceneNodeList
SGPUResource::HandleType RenderPassHandle
virtual void animate(const video::RenderPassHandle pass=video::NULL_GPU_RESOURCE_HANDLE)=0
Registers a node for rendering it at a specific time.
virtual void setActiveCamera(const std::shared_ptr< ICameraSceneNode > &camera)=0
Sets the currently active camera.
virtual void clearRegisteredNodes()=0