Pioneer
Loading...
Searching...
No Matches
LOD.h
Go to the documentation of this file.
1// Copyright © 2008-2023 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:44
Definition Group.h:12
Definition LOD.h:13
virtual void Save(NodeDatabase &) override
Definition LOD.cpp:106
std::vector< unsigned int > m_pixelSizes
Definition LOD.h:28
virtual Node * Clone(NodeCopyCache *cache=0) override
Definition LOD.cpp:26
virtual ~LOD()
Definition LOD.h:27
virtual void Render(const matrix4x4f &trans, const RenderData *rd) override
Definition LOD.cpp:45
virtual void Accept(NodeVisitor &v) override
Definition LOD.cpp:31
void AddLevel(float pixelRadius, Node *child)
Definition LOD.cpp:36
virtual const char * GetTypeName() const override
Definition LOD.h:18
static LOD * Load(NodeDatabase &)
Definition LOD.cpp:115
Definition NodeCopyCache.h:14
Definition NodeVisitor.h:26
Definition Node.h:72
Definition CityOnPlanet.h:31
Definition Node.h:63
Definition Node.h:44