![]() |
OGRE-Next 4.0.0unstable
Object-Oriented Graphics Rendering Engine
|
The voxelizer consists in several stages. More...
#include <OgreVctVoxelizer.h>
Public Member Functions | |
VctVoxelizer (IdType id, RenderSystem *renderSystem, HlmsManager *hlmsManager, bool correctAreaLightShadows) | |
~VctVoxelizer () | |
void | _setNeedsAllMipmaps (bool bNeedsAllMipmaps) |
void | addItem (Item *item, bool bCompressed, uint32 indexCountSplit=0u) |
void | autoCalculateRegion () |
Does nothing if VctVoxelizer::setRegionToVoxelize( false, ... ) was called. | |
void | build (SceneManager *sceneManager) |
void | dividideOctants (uint32 numOctantsX, uint32 numOctantsY, uint32 numOctantsZ) |
void | removeAllItems () |
Removes all items added via VctVoxelizer::addItem. | |
void | removeItem (Item *item) |
Removes an item added via VctVoxelizer::addItem. | |
void | setRegionToVoxelize (bool autoRegion, const Aabb ®ionToVoxelize, const Aabb &maxRegion=Aabb::BOX_INFINITE) |
Call this function before VctVoxelizer::autoCalculateRegion. | |
void | setResolution (uint32 width, uint32 height, uint32 depth) |
Changes resolution. | |
![]() | |
VctVoxelizerSourceBase (IdType id, RenderSystem *renderSystem, HlmsManager *hlmsManager) | |
virtual | ~VctVoxelizerSourceBase () |
TextureGpu * | getAlbedoVox () |
VctVoxelizerSourceBase::DebugVisualizationMode | getDebugVisualizationMode () const |
TextureGpu * | getEmissiveVox () |
HlmsManager * | getHlmsManager () |
TextureGpu * | getNormalVox () |
RenderSystem * | getRenderSystem () |
TextureGpuManager * | getTextureGpuManager () |
Vector3 | getVoxelCellSize () const |
Vector3 | getVoxelOrigin () const |
Vector3 | getVoxelResolution () const |
Vector3 | getVoxelSize () const |
void | setDebugVisualization (VctVoxelizerSourceBase::DebugVisualizationMode mode, SceneManager *sceneManager) |
![]() | |
IdObject (IdType id) | |
We don't call generateNewId() here, to prevent objects in the stack (i.e. | |
IdType | getId () const |
Get the unique id of this object. | |
bool | operator() (const IdObject &left, const IdObject &right) |
bool | operator() (const IdObject *left, const IdObject *right) |
Additional Inherited Members | |
![]() | |
enum | DebugVisualizationMode { DebugVisualizationAlbedo , DebugVisualizationNormal , DebugVisualizationEmissive , DebugVisualizationNone } |
The voxelizer consists in several stages.
The main ones that requre explanation are:
Ogre::VctVoxelizer::VctVoxelizer | ( | IdType | id, |
RenderSystem * | renderSystem, | ||
HlmsManager * | hlmsManager, | ||
bool | correctAreaLightShadows | ||
) |
Ogre::VctVoxelizer::~VctVoxelizer | ( | ) |
|
inline |
item | |
bCompressed | True if we should compress: position to 16-bit SNORM normal to 16-bit SNORM uv as 16-bit Half False if we should use everything as 32-bit float If multiple Items using the same Mesh are added and one of them asks to not use compression, then not using compression takes precedence. |
indexCountSplit | 0 to use mDefaultIndexCountSplit. Use a different value to override This value is ignored if the mesh had already been added. |
Use std::numeric_limits<uint32>::max to avoid partitioning at all.
void Ogre::VctVoxelizer::autoCalculateRegion | ( | ) |
Does nothing if VctVoxelizer::setRegionToVoxelize( false, ... ) was called.
void Ogre::VctVoxelizer::build | ( | SceneManager * | sceneManager | ) |
void Ogre::VctVoxelizer::dividideOctants | ( | uint32 | numOctantsX, |
uint32 | numOctantsY, | ||
uint32 | numOctantsZ | ||
) |
void Ogre::VctVoxelizer::removeAllItems | ( | ) |
Removes all items added via VctVoxelizer::addItem.
void Ogre::VctVoxelizer::removeItem | ( | Item * | item | ) |
Removes an item added via VctVoxelizer::addItem.
Will throw if Item is not found.
item | Item to remove |
void Ogre::VctVoxelizer::setRegionToVoxelize | ( | bool | autoRegion, |
const Aabb & | regionToVoxelize, | ||
const Aabb & | maxRegion = Aabb::BOX_INFINITE |
||
) |
Call this function before VctVoxelizer::autoCalculateRegion.
autoRegion | True to autocalculate region to cover all the added items False to use 'regionToVoxelize' instead |
regionToVoxelize | When autoRegion = false, use this to manually provide the region When autoRegion = true, it is ignored as it will be overwritten by autoCalculateRegion |
maxRegion | Maximum size of the regions are allowed to cover (mostly useful when autoRegion = true) |
Changes resolution.
Note that after calling this, you will need to call VctVoxelizer::build again, and VctLighting::build again.
width | |
height | |
depth |