Saga3D API Documentation
1.0-RC4
|
Go to the documentation of this file. 1 #ifndef __I_MESH_SCENE_NODE_H_INCLUDED__
2 #define __I_MESH_SCENE_NODE_H_INCLUDED__
26 const std::shared_ptr<IMesh>& mesh,
27 const std::shared_ptr<ISceneNode>& parent,
28 const std::shared_ptr<ISceneManager>& mgr,
29 const glm::vec3& position = glm::vec3(0,0,0),
30 const glm::vec3& rotation = glm::vec3(0,0,0),
31 const glm::vec3& scale = glm::vec3(1,1,1))
32 :
ISceneNode(parent, mgr, position, rotation, scale),
37 SceneManager->getVideoDriver()->destroyPipelineBuffer(*
this,
true);
45 if (driver->hasPipelineBuffer(*
this, pipeline))
return;
48 auto& meshBuffer = mesh->getMeshBuffer();
49 meshBuffer.buildBuffer(*driver, pipeline);
50 driver->createPipelineBuffer(*
this, pipeline);
57 SceneManager->getNodeList()[pass].push_back(shared_from_this());
65 for (
auto nodeIt = nodeList.begin(); nodeIt != nodeList.end(); ++nodeIt) {
66 if ((*nodeIt)->getID() ==
getID()) {
67 nodeList.erase(nodeIt);
89 virtual void setMesh(
const std::shared_ptr<IMesh>& mesh) {
Mesh = mesh; }
92 virtual const std::shared_ptr<IMesh>&
getMesh()
const {
return Mesh; }
95 std::shared_ptr<IMesh>
Mesh =
nullptr;
virtual const core::aabbox3d< float > & getBoundingBox() const override
returns the axis aligned bounding box of this node
Type for list of scene node animators.
A scene node displaying a static mesh.
SGPUResource::HandleType PipelineHandle
E_SCENE_NODE_TYPE
An enumeration for all types of built-in scene nodes.
IMeshSceneNode(const std::shared_ptr< IMesh > &mesh, const std::shared_ptr< ISceneNode > &parent, const std::shared_ptr< ISceneManager > &mgr, 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, 1, 1))
Constructor.
virtual const std::shared_ptr< IMesh > & getMesh() const
Returns the current mesh.
bool IsVisible
Is the node visible?
virtual void setMesh(const std::shared_ptr< IMesh > &mesh)
Sets a new mesh.
virtual void onRegisterSceneNode(video::RenderPassHandle pass) override
This method is called just before the rendering process of the whole scene.
virtual E_SCENE_NODE_TYPE getType() const override
Returns type of the scene node.
core::aabbox3d< float > Box
virtual void onRegisterSceneNode(video::RenderPassHandle pass)
This method is called just before the rendering process of the whole scene.
virtual void onUnregisterSceneNode(video::RenderPassHandle pass)
virtual void setPipeline(video::PipelineHandle pipeline)
std::shared_ptr< ISceneManager > SceneManager
Pointer to the scene manager.
virtual void onUnregisterSceneNode(video::RenderPassHandle pass) override
SGPUResource::HandleType RenderPassHandle
virtual void setPipeline(video::PipelineHandle pipeline) override
std::shared_ptr< IMesh > Mesh