molecular
Classes | Public Member Functions | List of all members
molecular::gfx::DrawMeshData Class Reference

RenderFunction that draws a group of meshes. More...

#include <DrawMeshData.h>

Inheritance diagram for molecular::gfx::DrawMeshData:
molecular::gfx::DrawingFunction molecular::gfx::RenderFunction

Public Member Functions

template<class TRenderManager >
 DrawMeshData (TRenderManager &manager, MeshDataSource &source)
 Construct and load data. More...
 
template<class TRenderManager >
 DrawMeshData (TRenderManager &manager)
 Construct without loading data. More...
 
 ~DrawMeshData () override
 
void Execute () override
 
util::AxisAlignedBox GetBounds () const override
 
void Load (MeshDataSource &source)
 Store mesh data in Renderer. More...
 
void Load (const meshfile::MeshFile &file)
 Store mesh data in Renderer. More...
 
void Unload ()
 
- Public Member Functions inherited from molecular::gfx::DrawingFunction
template<class TRenderManager >
 DrawingFunction (TRenderManager &manager)
 
bool BoundsChangedSince (int framecounter) const override
 
- Public Member Functions inherited from molecular::gfx::RenderFunction
template<class TRenderManager >
 RenderFunction (TRenderManager &manager)
 
 RenderFunction (Scoping &scoping, RenderCmdSink &renderer)
 
virtual ~RenderFunction ()
 
virtual void Set (Hash, bool)
 Set bool property with given name. More...
 

Additional Inherited Members

- Protected Member Functions inherited from molecular::gfx::DrawingFunction
RenderCmdSink::ProgramPrepareProgram ()
 
- Protected Member Functions inherited from molecular::gfx::RenderFunction
template<class T >
const T * GetVariable (Hash key)
 Convenience shortcut to a variable pointer from the dynamic scope. More...
 
- Protected Attributes inherited from molecular::gfx::DrawingFunction
ProgramProvidermProgramProvider
 
- Protected Attributes inherited from molecular::gfx::RenderFunction
ScopingmScoping
 
RenderCmdSinkmRenderer
 

Detailed Description

RenderFunction that draws a group of meshes.

Note
Do not use this class directly! Use DrawMesh instead, which automatically instantiates DrawMeshData when necessary.
Todo:
LOD

Constructor & Destructor Documentation

template<class TRenderManager >
molecular::gfx::DrawMeshData::DrawMeshData ( TRenderManager &  manager,
MeshDataSource source 
)
inline

Construct and load data.

template<class TRenderManager >
molecular::gfx::DrawMeshData::DrawMeshData ( TRenderManager &  manager)
inline

Construct without loading data.

Data must be loaded later with Load().

molecular::gfx::DrawMeshData::~DrawMeshData ( )
override

Member Function Documentation

void molecular::gfx::DrawMeshData::Execute ( )
overridevirtual

Draws meshes if they are loaded. Does nothing otherwise.

Implements molecular::gfx::RenderFunction.

util::AxisAlignedBox molecular::gfx::DrawMeshData::GetBounds ( ) const
inlineoverridevirtual
void molecular::gfx::DrawMeshData::Load ( MeshDataSource source)

Store mesh data in Renderer.

Called by MeshLoader::StoreNmbMesh, MeshLoader::StoreObjMesh or MeshLoader::StoreXmlMesh.

Deprecated:
Load compiled meshes!
void molecular::gfx::DrawMeshData::Load ( const meshfile::MeshFile file)

Store mesh data in Renderer.

Called by MeshLoader::StoreCompiledMesh.

void molecular::gfx::DrawMeshData::Unload ( )

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