Ignition Rendering

API Reference

6.3.1
HeightmapDescriptor.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2020 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 #ifndef IGNITION_RENDERING_HEIGHTMAPDESCRIPTOR_HH_
18 #define IGNITION_RENDERING_HEIGHTMAPDESCRIPTOR_HH_
19 
20 #include <memory>
21 #include <string>
24 
25 #include "ignition/rendering/config.hh"
26 #include "ignition/rendering/Export.hh"
27 
28 namespace ignition
29 {
30 namespace rendering
31 {
32 inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
33  class HeightmapDescriptorPrivate;
34  class HeightmapTexturePrivate;
35  class HeightmapBlendPrivate;
36 
38  class IGNITION_RENDERING_VISIBLE HeightmapTexture
39  {
41  public: HeightmapTexture();
42 
45  public: HeightmapTexture(const HeightmapTexture &_texture);
46 
49  public: HeightmapTexture(HeightmapTexture &&_texture) noexcept;
50 
52  public: virtual ~HeightmapTexture();
53 
57  public: HeightmapTexture &operator=(HeightmapTexture &&_texture);
58 
62  public: HeightmapTexture &operator=(const HeightmapTexture &_texture);
63 
66  public: double Size() const;
67 
70  public: void SetSize(double _size);
71 
74  public: std::string Diffuse() const;
75 
78  public: void SetDiffuse(const std::string &_diffuse);
79 
82  public: std::string Normal() const;
83 
86  public: void SetNormal(const std::string &_normal);
87 
92  };
93 
95  class IGNITION_RENDERING_VISIBLE HeightmapBlend
96  {
98  public: HeightmapBlend();
99 
102  public: HeightmapBlend(const HeightmapBlend &_blend);
103 
106  public: HeightmapBlend(HeightmapBlend &&_blend) noexcept;
107 
109  public: virtual ~HeightmapBlend();
110 
114  public: HeightmapBlend &operator=(HeightmapBlend &&_blend);
115 
119  public: HeightmapBlend &operator=(const HeightmapBlend &_blend);
120 
123  public: double MinHeight() const;
124 
127  public: void SetMinHeight(double _minHeight);
128 
131  public: double FadeDistance() const;
132 
135  public: void SetFadeDistance(double _fadeDistance);
136 
141  };
142 
146  class IGNITION_RENDERING_VISIBLE HeightmapDescriptor
147  {
149  public: HeightmapDescriptor();
150 
153  public: HeightmapDescriptor(const HeightmapDescriptor &_desc);
154 
157  public: HeightmapDescriptor(HeightmapDescriptor &&_desc) noexcept;
158 
160  public: virtual ~HeightmapDescriptor();
161 
165  public: HeightmapDescriptor &operator=(HeightmapDescriptor &&_desc);
166 
170  public: HeightmapDescriptor &operator=(const HeightmapDescriptor &_desc);
171 
175  public: const std::string &Name() const;
176 
179  public: void SetName(const std::string &_name);
180 
183  public: std::shared_ptr<common::HeightmapData> Data() const;
184 
187  public: void SetData(const std::shared_ptr<common::HeightmapData> &_data);
188 
191  public: ignition::math::Vector3d Size() const;
192 
195  public: void SetSize(const ignition::math::Vector3d &_size);
196 
199  public: ignition::math::Vector3d Position() const;
200 
203  public: void SetPosition(const ignition::math::Vector3d &_position);
204 
207  public: bool UseTerrainPaging() const;
208 
211  public: void SetUseTerrainPaging(bool _use);
212 
215  public: unsigned int Sampling() const;
216 
219  public: void SetSampling(unsigned int _sampling);
220 
223  public: uint64_t TextureCount() const;
224 
231  public: const HeightmapTexture *TextureByIndex(uint64_t _index) const;
232 
235  public: void AddTexture(const HeightmapTexture &_texture);
236 
239  public: uint64_t BlendCount() const;
240 
247  public: const HeightmapBlend *BlendByIndex(uint64_t _index) const;
248 
251  public: void AddBlend(const HeightmapBlend &_blend);
252 
258  };
259 }
260 }
261 }
262 #endif
#define IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
Texture to be used on heightmaps.
Definition: HeightmapDescriptor.hh:38
STL class.
Blend information to be used between textures on heightmaps.
Definition: HeightmapDescriptor.hh:95
Describes how a Heightmap should be loaded.
Definition: HeightmapDescriptor.hh:146
#define IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING