Foray Library
rapid prototyping framework for crossplatform development of vulkan hardware ray tracing applications
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
foray::scene::gcomp::GeometryStore Class Reference

Stores all geometry in a single set of index and vertex buffers. More...

#include <foray_geometrymanager.hpp>

Inheritance diagram for foray::scene::gcomp::GeometryStore:
foray::scene::GlobalComponent foray::scene::Component foray::NoMoveDefaults foray::Polymorphic

Public Member Functions

 GeometryStore ()
 
void InitOrUpdate ()
 Rewrites Indices and Vertices from CPU side storage to the GPU buffers.
 
void Destroy ()
 
virtual ~GeometryStore ()
 
bool CmdBindBuffers (VkCommandBuffer commandBuffer)
 
VkDescriptorBufferInfo GetVertexBufferDescriptorInfo () const
 
VkDescriptorBufferInfo GetIndexBufferDescriptorInfo () const
 
- Public Member Functions inherited from foray::scene::GlobalComponent
virtual SceneGetScene () override
 Scene this component is a part of. Casts mRegistry to Scene.
 
virtual RegistryGetGlobals () override
 Global component registry. Returns mRegistry.
 
virtual core::ContextGetContext () override
 Vulkan Context. Casts mRegistry to Scene and returns Scene->GetContext()
 
- Public Member Functions inherited from foray::scene::Component
virtual ~Component ()
 Destructor. Provide virtual constructors in inheriting classes, to make sure they get finalized correctly.
 
- Public Member Functions inherited from foray::NoMoveDefaults
 NoMoveDefaults ()=default
 
 NoMoveDefaults (const NoMoveDefaults &other)=delete
 
 NoMoveDefaults (NoMoveDefaults &&other)=default
 
NoMoveDefaultsoperator= (const NoMoveDefaults &other)=delete
 

Protected Attributes

core::ManagedBuffer mIndicesBuffer
 
core::ManagedBuffer mVerticesBuffer
 
std::vector< VertexmVertices
 
std::vector< uint32_t > mIndices
 
std::vector< std::unique_ptr< Mesh > > mMeshes
 
- Protected Attributes inherited from foray::scene::Component
RegistrymRegistry = nullptr
 
std::string mName = ""
 

Additional Inherited Members

- Public Attributes inherited from foray::scene::Component
friend Registry
 
- Protected Member Functions inherited from foray::Polymorphic
virtual void __makeMePolymorphic ()
 

Detailed Description

Stores all geometry in a single set of index and vertex buffers.

Constructor & Destructor Documentation

◆ GeometryStore()

foray::scene::gcomp::GeometryStore::GeometryStore ( )

◆ ~GeometryStore()

virtual foray::scene::gcomp::GeometryStore::~GeometryStore ( )
inlinevirtual

Member Function Documentation

◆ CmdBindBuffers()

bool foray::scene::gcomp::GeometryStore::CmdBindBuffers ( VkCommandBuffer  commandBuffer)

◆ Destroy()

void foray::scene::gcomp::GeometryStore::Destroy ( )

◆ GetIndexBufferDescriptorInfo()

VkDescriptorBufferInfo foray::scene::gcomp::GeometryStore::GetIndexBufferDescriptorInfo ( ) const
inline

◆ GetVertexBufferDescriptorInfo()

VkDescriptorBufferInfo foray::scene::gcomp::GeometryStore::GetVertexBufferDescriptorInfo ( ) const
inline

◆ InitOrUpdate()

void foray::scene::gcomp::GeometryStore::InitOrUpdate ( )

Rewrites Indices and Vertices from CPU side storage to the GPU buffers.

Member Data Documentation

◆ mIndices

std::vector<uint32_t> foray::scene::gcomp::GeometryStore::mIndices
protected

◆ mIndicesBuffer

core::ManagedBuffer foray::scene::gcomp::GeometryStore::mIndicesBuffer
protected

◆ mMeshes

std::vector<std::unique_ptr<Mesh> > foray::scene::gcomp::GeometryStore::mMeshes
protected

◆ mVertices

std::vector<Vertex> foray::scene::gcomp::GeometryStore::mVertices
protected

◆ mVerticesBuffer

core::ManagedBuffer foray::scene::gcomp::GeometryStore::mVerticesBuffer
protected

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