Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
VegetationDescriptor.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2018 DIVIDE-Studio
3 Copyright (c) 2009 Ionut Cava
4
5 This file is part of DIVIDE Framework.
6
7 Permission is hereby granted, free of charge, to any person obtaining a copy
8 of this software
9 and associated documentation files (the "Software"), to deal in the Software
10 without restriction,
11 including without limitation the rights to use, copy, modify, merge, publish,
12 distribute, sublicense,
13 and/or sell copies of the Software, and to permit persons to whom the
14 Software is furnished to do so,
15 subject to the following conditions:
16
17 The above copyright notice and this permission notice shall be included in
18 all copies or substantial portions of the Software.
19
20 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21 IMPLIED,
22 INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
23 PARTICULAR PURPOSE AND NONINFRINGEMENT.
24 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
25 DAMAGES OR OTHER LIABILITY,
26 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
27 IN CONNECTION WITH THE SOFTWARE
28 OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29
30 */
31
32#ifndef DVD_VEGETATION_DESCRIPTOR_H_
33#define DVD_VEGETATION_DESCRIPTOR_H_
34
36
37namespace Divide
38{
39
40class Terrain;
41class Vegetation;
42
43template<>
44struct PropertyDescriptor<Vegetation>
45{
46 std::shared_ptr<ImageTools::ImageData> grassMap;
47 std::shared_ptr<ImageTools::ImageData> treeMap;
49 Str<256> name = "";
50 string billboardTextureArray = "";
51 std::array<vec3<F32>, 4> treeRotations;
52 vec4<F32> grassScales = VECTOR4_UNIT;
53 vec4<F32> treeScales = VECTOR4_UNIT;
54 Terrain* parentTerrain = nullptr;
55 U32 chunkSize = 0u;
56};
57
59
60template<>
61inline size_t GetHash( const VegetationDescriptor& descriptor ) noexcept;
62
63size_t GetHash( Terrain* terrain ) noexcept;
64
65} //namespace Divide
66
67#endif //DVD_VEGETATION_DESCRIPTOR_H_
68
Handle console commands that start with a forward slash.
Definition: AIProcessor.cpp:7
size_t GetHash(const PropertyDescriptor< T > &descriptor) noexcept
Definition: Resource.inl:40
eastl::vector< Type > vector
Definition: Vector.h:42
static const vec4< F32 > VECTOR4_UNIT
Definition: MathVectors.h:1438
uint32_t U32
std::shared_ptr< ImageTools::ImageData > grassMap
std::shared_ptr< ImageTools::ImageData > treeMap
std::array< vec3< F32 >, 4 > treeRotations