File: ge_vulkan_mesh_scene_node.cpp

package info (click to toggle)
supertuxkart 1.4%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 768,424 kB
  • sloc: cpp: 412,077; xml: 106,334; ansic: 83,792; asm: 1,558; python: 1,403; sh: 1,366; objc: 452; makefile: 333; javascript: 23; awk: 20
file content (43 lines) | stat: -rw-r--r-- 1,330 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include "ge_vulkan_mesh_scene_node.hpp"

#include "ge_spm.hpp"

#include "IMeshCache.h"
#include "ISceneManager.h"

namespace GE
{
GEVulkanMeshSceneNode::GEVulkanMeshSceneNode(irr::scene::IMesh* mesh,
    irr::scene::ISceneNode* parent, irr::scene::ISceneManager* mgr, irr::s32 id,
    const irr::core::vector3df& position,
    const irr::core::vector3df& rotation,
    const irr::core::vector3df& scale)
    : irr::scene::CMeshSceneNode(mesh, parent, mgr, id, position, rotation,
                                 scale)
{
    m_remove_from_mesh_cache = false;
}   // GEVulkanMeshSceneNode

// ----------------------------------------------------------------------------
GEVulkanMeshSceneNode::~GEVulkanMeshSceneNode()
{
    if (m_remove_from_mesh_cache)
        SceneManager->getMeshCache()->removeMesh(Mesh);
}   // ~GEVulkanMeshSceneNode

// ----------------------------------------------------------------------------
GESPM* GEVulkanMeshSceneNode::getSPM() const
{
    return static_cast<GESPM*>(Mesh);
}   // getSPM

// ----------------------------------------------------------------------------
void GEVulkanMeshSceneNode::OnRegisterSceneNode()
{
    if (!IsVisible)
        return;
    SceneManager->registerNodeForRendering(this, scene::ESNRP_SOLID);
    ISceneNode::OnRegisterSceneNode();
}   // OnRegisterSceneNode

}