PURE API 0.5
PR00F's Ultimate Rendering Engine full documentation
Loading...
Searching...
No Matches
PureMesh3DManager::PureMesh3DManagerImpl Class Reference

Detailed Description

Definition at line 17 of file PureMesh3DManagerImpl.h.

#include <PureMesh3DManagerImpl.h>

Public Member Functions

virtual ~PureMesh3DManagerImpl ()
 
TPureBool isInitialized () const
 
TPureBool isMinimalIndexStorageEnabled () const
 
void SetMinimalIndexStorageEnabled (TPureBool state)
 
TPureBool convertToPlane (PureMesh3D &mesh, TPureFloat a, TPureFloat b)
 Converts the given Mesh to a plane with the given sizes.
 
TPureBool convertToBox (PureMesh3D &mesh, TPureFloat a, TPureFloat b, TPureFloat c)
 Converts the given Mesh to a box with the given sizes.
 
PureMaterialcreateMaterialForMesh (PureMesh3D &mesh) const
 Creates a material for the given Mesh if it doesn't yet have one.
 

Protected Member Functions

PureMesh3DloadOBJ (const char *filename)
 Loads OBJ files, handles the actual file operations, and creates the Mesh3D object.
 

Private Member Functions

 PureMesh3DManagerImpl ()
 
 PureMesh3DManagerImpl (PureMesh3DManager *owner, PureMaterialManager &matMgr)
 
 PureMesh3DManagerImpl (const PureMesh3DManagerImpl &)
 
PureMesh3DManagerImploperator= (const PureMesh3DManagerImpl &)
 

Private Attributes

PureMesh3DManager_pOwner
 The owner public object who creates this pimpl object.
 
PureMaterialManagermaterialMgr
 Used to auto-load/create materials for objects.
 
TPureBool bInited
 True if successfully inited, false if not functional.
 
TPureUInt nRunningCounter
 Always increased when creating a new level-1 Mesh3D instance.
 
TPureBool bMinimalIndexStorage
 True if storage of indices is minimalized.
 

Friends

class PureMesh3DManager
 

Constructor & Destructor Documentation

◆ ~PureMesh3DManagerImpl()

PureMesh3DManager::PureMesh3DManagerImpl::~PureMesh3DManagerImpl ( )
virtual

Definition at line 33 of file PureMesh3DManager.cpp.

◆ PureMesh3DManagerImpl() [1/3]

PureMesh3DManager::PureMesh3DManagerImpl::PureMesh3DManagerImpl ( )
private

Definition at line 1391 of file PureMesh3DManager.cpp.

◆ PureMesh3DManagerImpl() [2/3]

PureMesh3DManager::PureMesh3DManagerImpl::PureMesh3DManagerImpl ( PureMesh3DManager * owner,
PureMaterialManager & matMgr )
private
Parameters
ownerPublic class instance owning this pimpl object.
matMgrA MaterialManager instance to be used for creating materials used by Mesh3D instances.

Definition at line 1402 of file PureMesh3DManager.cpp.

◆ PureMesh3DManagerImpl() [3/3]

PureMesh3DManager::PureMesh3DManagerImpl::PureMesh3DManagerImpl ( const PureMesh3DManagerImpl & )
private

Definition at line 1414 of file PureMesh3DManager.cpp.

Member Function Documentation

◆ convertToBox()

TPureBool PureMesh3DManager::PureMesh3DManagerImpl::convertToBox ( PureMesh3D & mesh,
TPureFloat a,
TPureFloat b,
TPureFloat c )

Converts the given Mesh to a box with the given sizes.

Converts the given Mesh to a Box Mesh with the given sizes.

Expects level-1 Mesh (so it must have subobject) and it must have exactly 1 subobject only. This function is very useful for descendant classes that want to construct custom objects based on Mesh3D, since during the constructing of custom object, this function can be invoked to set up the underlying geometry. Example use case: Object3D, when being constructed, can be given as parameter to this function, so it will be a renderable Box object, without any array copy operation during construction.

Parameters
meshThe Mesh instance to be converted to a Box Mesh.
aLength of box (size on X-axis).
bHeight of box (size on Y-axis).
cDepth of box (size on Z-axis).

Definition at line 259 of file PureMesh3DManager.cpp.

◆ convertToPlane()

TPureBool PureMesh3DManager::PureMesh3DManagerImpl::convertToPlane ( PureMesh3D & mesh,
TPureFloat a,
TPureFloat b )

Converts the given Mesh to a plane with the given sizes.

Converts the given Mesh to a Plane Mesh with the given sizes.

Expects level-1 Mesh (so it must have subobject) and it must have exactly 1 subobject only. This function is very useful for descendant classes that want to construct custom objects based on Mesh3D, since during the constructing of custom object, this function can be invoked to set up the underlying geometry. Example use case: Object3D, when being constructed, can be given as parameter to this function, so it will be a renderable Plane object, without any array copy operation during construction.

Parameters
meshThe Mesh instance to be converted to a Plane Mesh.
aLength of plane (size on X-axis).
bHeight of plane (size on Y-axis).

Definition at line 75 of file PureMesh3DManager.cpp.

◆ createMaterialForMesh()

PureMaterial * PureMesh3DManager::PureMesh3DManagerImpl::createMaterialForMesh ( PureMesh3D & mesh) const

Creates a material for the given Mesh if it doesn't yet have one.

Won't create new material if the given Mesh already has a material.

Parameters
meshThe mesh for we want to create a material.
Returns
The created or already existing material. PGENULL in case of error.

Definition at line 756 of file PureMesh3DManager.cpp.

◆ isInitialized()

TPureBool PureMesh3DManager::PureMesh3DManagerImpl::isInitialized ( ) const

Definition at line 42 of file PureMesh3DManager.cpp.

◆ isMinimalIndexStorageEnabled()

TPureBool PureMesh3DManager::PureMesh3DManagerImpl::isMinimalIndexStorageEnabled ( ) const

Definition at line 48 of file PureMesh3DManager.cpp.

◆ loadOBJ()

PureMesh3D * PureMesh3DManager::PureMesh3DManagerImpl::loadOBJ ( const char * filename)
protected

Loads OBJ files, handles the actual file operations, and creates the Mesh3D object.

Parameters
filenameThe model file to be loaded to be an Mesh3D instance.
Returns
The created Mesh3D object on success, PGENULL otherwise.

Definition at line 790 of file PureMesh3DManager.cpp.

◆ operator=()

PureMesh3DManager::PureMesh3DManagerImpl & PureMesh3DManager::PureMesh3DManagerImpl::operator= ( const PureMesh3DManagerImpl & )
private

Definition at line 1421 of file PureMesh3DManager.cpp.

◆ SetMinimalIndexStorageEnabled()

void PureMesh3DManager::PureMesh3DManagerImpl::SetMinimalIndexStorageEnabled ( TPureBool state)

Definition at line 55 of file PureMesh3DManager.cpp.

Friends And Related Symbol Documentation

◆ PureMesh3DManager

friend class PureMesh3DManager
friend

Definition at line 57 of file PureMesh3DManagerImpl.h.

Member Data Documentation

◆ _pOwner

PureMesh3DManager* PureMesh3DManager::PureMesh3DManagerImpl::_pOwner
private

The owner public object who creates this pimpl object.

Definition at line 41 of file PureMesh3DManagerImpl.h.

◆ bInited

TPureBool PureMesh3DManager::PureMesh3DManagerImpl::bInited
private

True if successfully inited, false if not functional.

Definition at line 45 of file PureMesh3DManagerImpl.h.

◆ bMinimalIndexStorage

TPureBool PureMesh3DManager::PureMesh3DManagerImpl::bMinimalIndexStorage
private

True if storage of indices is minimalized.

Definition at line 47 of file PureMesh3DManagerImpl.h.

◆ materialMgr

PureMaterialManager& PureMesh3DManager::PureMesh3DManagerImpl::materialMgr
private

Used to auto-load/create materials for objects.

Definition at line 43 of file PureMesh3DManagerImpl.h.

◆ nRunningCounter

TPureUInt PureMesh3DManager::PureMesh3DManagerImpl::nRunningCounter
private

Always increased when creating a new level-1 Mesh3D instance.

Definition at line 46 of file PureMesh3DManagerImpl.h.


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