32#ifndef DVD_VEGETATION_H_
33#define DVD_VEGETATION_H_
46struct hash<
Divide::vec2<Divide::F32>>
74class GenericVertexData;
89class VegetationInstance;
97 ~Vegetation()
override;
111 bool refreshData)
override;
113 void sceneUpdate(
U64 deltaTimeUS,
124 void unregisterInstance(
U32 chunkID);
134 F32 _windX = 0.0f, _windZ = 0.0f, _windS = 0.0f;
136 U64 _stateRefreshIntervalBufferUS = 0ULL;
142 F32 _grassDistance = -1.0f;
143 F32 _treeDistance = -1.0f;
144 U32 _maxGrassInstances = 0u;
145 U32 _maxTreeInstances = 0u;
147 Pipeline* _cullPipelineGrass =
nullptr;
148 Pipeline* _cullPipelineTrees =
nullptr;
151 std::array<U16, 3> _lodPartitions;
152 VertexBuffer_ptr _buffer;
153 ShaderBuffer_uptr _treeData;
154 ShaderBuffer_uptr _grassData;
157 eastl::unordered_set<vec2<F32>> _grassPositions;
158 eastl::unordered_set<vec2<F32>> _treePositions;
#define DEFINE_NODE_TYPE(Name, Enum)
PlatformContext & context() noexcept
const Handle< Vegetation > _parent
const TerrainChunk * _chunk
constexpr T SecondsToMicroseconds(U a) noexcept
void Hash_combine(size_t &seed, const T &v, const Rest &... rest) noexcept
a la Boost
Handle console commands that start with a forward slash.
std::shared_mutex SharedMutex
eastl::vector< Type > vector
static const vec4< F32 > VECTOR4_UNIT
eastl::fixed_vector< GenericDrawCommand, 1, true > GenericDrawCommandContainer
vec4< F32 > _orientationQuat
vec4< F32 > _positionAndScale
size_t operator()(const Divide::vec2< Divide::F32 > &a) const