Nebula
Loading...
Searching...
No Matches
Vegetation::VegetationContext Class Reference

#include <vegetationcontext.h>

Inherits Graphics::GraphicsContext.

Public Member Functions

 VegetationContext ()
 constructor
 
 ~VegetationContext ()
 destructor
 
- Public Member Functions inherited from Graphics::GraphicsContext
 GraphicsContext ()
 constructor
 
virtual ~GraphicsContext ()
 destructor
 

Static Public Member Functions

static void Create (const VegetationSetupSettings &settings)
 create vegetation context
 
static void Discard ()
 discard vegetation context
 
static void Setup (Resources::ResourceName heightMap, SizeT numGrassPlanesPerTuft, float grassPatchRadius)
 Setup vegetation context.
 
static void SetupGrass (const Graphics::GraphicsEntityId id, const VegetationGrassSetup &setup)
 setup as grass
 
static void SetupMesh (const Graphics::GraphicsEntityId id, const VegetationMeshSetup &setup)
 setup as mesh
 
static void UpdateViewResources (const Ptr< Graphics::View > &view, const Graphics::FrameContext &ctx)
 update resources
 

Private Types

enum class  VegetationType : uint8 { GrassType , MeshType }
 
enum  {
  Vegetation_Mask , Vegetation_Albedos , Vegetation_Normals , Vegetation_Materials ,
  Vegetation_Meshes , Vegetation_GPUInfo , Vegetation_TextureIndex , Vegetation_SlopeThreshold ,
  Vegetation_HeightThreshold , Vegetation_Type
}
 
typedef Ids::IdAllocator< CoreGraphics::TextureId, CoreGraphics::TextureId, CoreGraphics::TextureId, CoreGraphics::TextureId, CoreGraphics::MeshId, uint, IndexT, float, float, VegetationTypeVegetationAllocator
 

Private Member Functions

 __DeclareContext ()
 

Static Private Member Functions

static Graphics::ContextEntityId Alloc ()
 allocate a new slice for this context
 
static void Dealloc (Graphics::ContextEntityId id)
 deallocate a slice
 

Static Private Attributes

static VegetationAllocator vegetationAllocator
 

Additional Inherited Members

- Static Protected Member Functions inherited from Graphics::GraphicsContext
static void InternalRegisterEntity (const Graphics::GraphicsEntityId id, Graphics::GraphicsContextState &&state)
 
static void InternalDeregisterEntity (const Graphics::GraphicsEntityId id, Graphics::GraphicsContextState &&state)
 
template<class ID_ALLOCATOR >
static void InternalDefragment (ID_ALLOCATOR &allocator, Graphics::GraphicsContextState &&state)
 

Member Typedef Documentation

◆ VegetationAllocator

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
Vegetation_Mask 
Vegetation_Albedos 
Vegetation_Normals 
Vegetation_Materials 
Vegetation_Meshes 
Vegetation_GPUInfo 
Vegetation_TextureIndex 
Vegetation_SlopeThreshold 
Vegetation_HeightThreshold 
Vegetation_Type 

◆ VegetationType

Enumerator
GrassType 
MeshType 

Constructor & Destructor Documentation

◆ VegetationContext()

Vegetation::VegetationContext::VegetationContext ( )

constructor

◆ ~VegetationContext()

Vegetation::VegetationContext::~VegetationContext ( )

destructor

Member Function Documentation

◆ __DeclareContext()

Vegetation::VegetationContext::__DeclareContext ( )
private

◆ Alloc()

Graphics::ContextEntityId Vegetation::VegetationContext::Alloc ( )
staticprivate

allocate a new slice for this context

◆ Create()

void Vegetation::VegetationContext::Create ( const VegetationSetupSettings & settings)
static

create vegetation context

◆ Dealloc()

void Vegetation::VegetationContext::Dealloc ( Graphics::ContextEntityId id)
staticprivate

deallocate a slice

◆ Discard()

void Vegetation::VegetationContext::Discard ( )
static

discard vegetation context

◆ Setup()

void Vegetation::VegetationContext::Setup ( Resources::ResourceName heightMap,
SizeT numGrassPlanesPerTuft,
float grassPatchRadius )
static

Setup vegetation context.

◆ SetupGrass()

void Vegetation::VegetationContext::SetupGrass ( const Graphics::GraphicsEntityId id,
const VegetationGrassSetup & setup )
static

setup as grass

◆ SetupMesh()

void Vegetation::VegetationContext::SetupMesh ( const Graphics::GraphicsEntityId id,
const VegetationMeshSetup & setup )
static

setup as mesh

◆ UpdateViewResources()

void Vegetation::VegetationContext::UpdateViewResources ( const Ptr< Graphics::View > & view,
const Graphics::FrameContext & ctx )
static

update resources

Member Data Documentation

◆ vegetationAllocator

VegetationContext::VegetationAllocator Vegetation::VegetationContext::vegetationAllocator
staticprivate

The documentation for this class was generated from the following files: