Pioneer
Loading...
Searching...
No Matches
LOD.h
Go to the documentation of this file.
1// Copyright © 2008-2024 Pioneer Developers. See AUTHORS.txt for details
2// Licensed under the terms of the GPL v3. See licenses/GPL-3.txt
3
4#ifndef _LOD_H
5#define _LOD_H
6/*
7 * Level of detail switch node
8 */
9#include "Group.h"
10
11namespace SceneGraph {
12
13 class LOD : public Group {
14 public:
16 LOD(const LOD &, NodeCopyCache *cache = 0);
17 virtual Node *Clone(NodeCopyCache *cache = 0) override;
18 virtual const char *GetTypeName() const override { return "LOD"; }
19 virtual void Accept(NodeVisitor &v) override;
20 virtual void Render(const matrix4x4f &trans, const RenderData *rd) override;
21 virtual void Render(const std::vector<matrix4x4f> &trans, const RenderData *rd) override;
22 void AddLevel(float pixelRadius, Node *child);
23 virtual void Save(NodeDatabase &) override;
24 static LOD *Load(NodeDatabase &);
25
26 protected:
27 virtual ~LOD() {}
28 std::vector<unsigned int> m_pixelSizes; // same number as children
29 };
30
31} // namespace SceneGraph
32
33#endif
Definition: Renderer.h:45
Definition: Group.h:13
Definition: LOD.h:13
virtual void Save(NodeDatabase &) override
Definition: LOD.cpp:107
std::vector< unsigned int > m_pixelSizes
Definition: LOD.h:28
virtual Node * Clone(NodeCopyCache *cache=0) override
Definition: LOD.cpp:27
virtual ~LOD()
Definition: LOD.h:27
virtual void Render(const matrix4x4f &trans, const RenderData *rd) override
Definition: LOD.cpp:46
virtual void Accept(NodeVisitor &v) override
Definition: LOD.cpp:32
void AddLevel(float pixelRadius, Node *child)
Definition: LOD.cpp:37
virtual const char * GetTypeName() const override
Definition: LOD.h:18
static LOD * Load(NodeDatabase &)
Definition: LOD.cpp:116
Definition: NodeCopyCache.h:14
Definition: NodeVisitor.h:25
Definition: Node.h:75
Definition: CityOnPlanet.h:32
Definition: Node.h:66
Definition: Node.h:47