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

3D mesh manager class. More...

Detailed Description

3D mesh manager class.

Definition at line 126 of file PureMesh3DManager.h.

#include <PureMesh3DManager.h>

+ Inheritance diagram for PureMesh3DManager:

Classes

class  PureMesh3DManagerImpl
 

Public Member Functions

 PureMesh3DManager (PureMaterialManager &matMgr)
 
virtual ~PureMesh3DManager ()
 
CConsole & getConsole () const
 Returns access to console preset with logger module name as this class.
 
TPureBool isInitialized () const
 Tells whether the object is correctly initialized or not.
 
TPureBool isMinimalIndexStorageEnabled () const
 Tells whether storage of indices is minimalized or not.
 
void SetMinimalIndexStorageEnabled (TPureBool state)
 Sets whether storage of indices is minimalized or not.
 
PureMesh3DcreatePlane (TPureFloat a, TPureFloat b)
 Creates a new plane with the given sizes.
 
PureMesh3DcreateBox (TPureFloat a, TPureFloat b, TPureFloat c)
 Creates a new box with the given sizes.
 
PureMesh3DcreateCube (TPureFloat a)
 Creates a new cube with the given sizes.
 
PureMesh3DcreateFromFile (const char *filename)
 Creates object from the given file.
 
virtual void WriteList () const
 From PureFiledManager, adding logging mesh data.
 
- Public Member Functions inherited from PureFiledManager
 PureFiledManager ()
 
virtual ~PureFiledManager ()
 
CConsole & getConsole () const
 Returns access to console preset with logger module name as this class.
 
PureFiledManagedgetByFilename (const char *filename) const
 Gets the FiledManaged by the specified filename.
 
- Public Member Functions inherited from PureManager
 PureManager ()
 
virtual ~PureManager ()
 
CConsole & getConsole () const
 Returns access to console preset with logger module name as this class.
 
TPureInt getCount () const
 Gets the number of managed objects.
 
TPureBool isEmpty () const
 Is the number of manageds 0?
 
TPureInt getSize () const
 Gets the number of allocated slots for managed objects; getSize() >= getCount().
 
PureManagedgetAttachedAt (TPureInt ind) const
 Gets the pointer to the managed at the given index.
 
TPureInt getAttachedIndex (const PureManaged &m) const
 Gets the index of the given managed.
 
void PreAlloc (TPureInt count)
 Allocates count free slots for manageds.
 
TPureBool hasAttached (const PureManaged &m) const
 Gets whether the given managed is managed by this manager.
 
virtual void Attach (PureManaged &m)
 Adds the given managed to the manager, if the managed has no manager yet.
 
virtual void Detach (PureManaged &m)
 Removes the given managed from the manager, so the managed will have no manager.
 
void DeleteAttachedInstance (PureManaged &m)
 Removes the given managed from the manager and destructs it.
 
void DeleteAll ()
 Removes and destructs every managed element in the manager.
 
virtual void HandleManagedPropertyChanged (PureManaged &m)
 Should be invoked when a managed's property got changed from a different kind of manager or managed.
 
virtual TPureUInt getUsedSystemMemory () const
 Gets the amount of allocated system memory for all manageds owner by this manager.
 

Static Public Member Functions

static const char * getLoggerModuleName ()
 Returns the logger module name of this class.
 
- Static Public Member Functions inherited from PureFiledManager
static const char * getLoggerModuleName ()
 Returns the logger module name of this class.
 
- Static Public Member Functions inherited from PureManager
static const char * getLoggerModuleName ()
 Returns the logger module name of this class.
 

Protected Member Functions

 PureMesh3DManager ()
 
 PureMesh3DManager (const PureMesh3DManager &)
 
PureMesh3DManageroperator= (const PureMesh3DManager &)
 
virtual void WriteListCallback (const PureManaged &mngd) const
 From PureManager, printing filename.
 
- Protected Member Functions inherited from PureFiledManager
 PureFiledManager (const PureFiledManager &)
 
PureFiledManageroperator= (const PureFiledManager &)
 
- Protected Member Functions inherited from PureManager
 PureManager (const PureManager &other)
 
PureManageroperator= (const PureManager &)
 

Private Attributes

PureMesh3DManagerImplpImpl
 

Friends

class PureObject3DManager
 
class SampleManagerForDescendantFromVertexTransfer
 

Constructor & Destructor Documentation

◆ PureMesh3DManager() [1/3]

PureMesh3DManager::PureMesh3DManager ( PureMaterialManager & matMgr)
Parameters
matMgrA MaterialManager instance to be used for creating materials used by Object3D instances.
Exceptions
std::bad_alloc- This class or its ancestor dynamically allocates memory with operator new, in case of failure the exception is not handled but propagated to caller.

Definition at line 1442 of file PureMesh3DManager.cpp.

◆ ~PureMesh3DManager()

PureMesh3DManager::~PureMesh3DManager ( )
virtual

Definition at line 1448 of file PureMesh3DManager.cpp.

◆ PureMesh3DManager() [2/3]

PureMesh3DManager::PureMesh3DManager ( )
protected

Definition at line 1743 of file PureMesh3DManager.cpp.

◆ PureMesh3DManager() [3/3]

PureMesh3DManager::PureMesh3DManager ( const PureMesh3DManager & )
protected

Definition at line 1749 of file PureMesh3DManager.cpp.

Member Function Documentation

◆ createBox()

PureMesh3D * PureMesh3DManager::createBox ( TPureFloat a,
TPureFloat b,
TPureFloat c )

Creates a new box with the given sizes.

Creates a new box mesh with the given sizes.

This box consists of quads instead of triangles and has 24 vertices. Every vertex has a normal, a color, and texture uvw-coordinates in separate arrays. All faces are defined counter-clockwise starting from the lower left vertex, thus the order of texture uvw-coordinates are the same for each face. Order of faces is: front face towards the viewer, back, left, right, top, bottom.

Parameters
aLength of box (size on X-axis).
bHeight of box (size on Y-axis).
cDepth of box (size on Z-axis).
Returns
New 3D box mesh with 6 faces and 24 vertices. PGENULL if Mesh3DManager is not yet initialized.

Definition at line 1584 of file PureMesh3DManager.cpp.

◆ createCube()

PureMesh3D * PureMesh3DManager::createCube ( TPureFloat a)

Creates a new cube with the given sizes.

Creates a new cube mesh with the given sizes.

Equivalent to createBox(a, a, a).

Parameters
aLength of edges.
Returns
New 3D cube mesh with 6 faces and 24 vertices. PGENULL if PureMesh3DManager is not yet initialized.

Definition at line 1634 of file PureMesh3DManager.cpp.

◆ createFromFile()

PureMesh3D * PureMesh3DManager::createFromFile ( const char * filename)
virtual

Creates object from the given file.

Creates 3D mesh from the given file.

Parameters
filenameThe model file to be loaded to be an Object3D instance.
Returns
The created mesh. PGENULL if PureMesh3DManager is not yet initialized or the specified file does not exist or the specified file format is not known.

Reimplemented from PureFiledManager.

Reimplemented in PureObject3DManager.

Definition at line 1660 of file PureMesh3DManager.cpp.

◆ createPlane()

PureMesh3D * PureMesh3DManager::createPlane ( TPureFloat a,
TPureFloat b )

Creates a new plane with the given sizes.

Creates a new plane mesh with the given sizes.

Parameters
aLength of plane (size on X-axis).
bHeight of plane (size on Y-axis).
Returns
New 3D mesh with 1 face and 4 vertices. PGENULL if Mesh3DManager is not yet initialized.

Definition at line 1527 of file PureMesh3DManager.cpp.

◆ getConsole()

CConsole & PureMesh3DManager::getConsole ( ) const

Returns access to console preset with logger module name as this class.

Intentionally not virtual, so the getConsole() in derived class should hide this instead of overriding.

Returns
Console instance used by this class.

Definition at line 1461 of file PureMesh3DManager.cpp.

◆ getLoggerModuleName()

const char * PureMesh3DManager::getLoggerModuleName ( )
static

Returns the logger module name of this class.

Intentionally not virtual, so derived class should hide this instead of overriding. Not even private, so user can also access this from outside, for any reason like controlling log filtering per logger module name.

Returns
The logger module name of this class.

Definition at line 1474 of file PureMesh3DManager.cpp.

◆ isInitialized()

TPureBool PureMesh3DManager::isInitialized ( ) const

Tells whether the object is correctly initialized or not.

Returns
True if the given TextureManager instance was initialized correctly, false otherwise.

Definition at line 1484 of file PureMesh3DManager.cpp.

◆ isMinimalIndexStorageEnabled()

TPureBool PureMesh3DManager::isMinimalIndexStorageEnabled ( ) const

Tells whether storage of indices is minimalized or not.

Minimalized storage of indices means that the software always tries to pack geometry indices into as small storage types as possible. This can happen in both system and video memory. If enabled, geometry indices generally take less memory and rendering may be faster. Enabled by default.

Definition at line 1497 of file PureMesh3DManager.cpp.

◆ operator=()

PureMesh3DManager & PureMesh3DManager::operator= ( const PureMesh3DManager & )
protected

Definition at line 1755 of file PureMesh3DManager.cpp.

◆ SetMinimalIndexStorageEnabled()

void PureMesh3DManager::SetMinimalIndexStorageEnabled ( TPureBool state)

Sets whether storage of indices is minimalized or not.

Minimalized storage of indices means that the software always tries to pack geometry indices into as small storage types as possible. This can happen in both system or video memory. If enabled, geometry indices generally take less memory and rendering may be faster. Enabled by default.

Note: disabling is unimplemented currently!

Definition at line 1512 of file PureMesh3DManager.cpp.

◆ WriteList()

void PureMesh3DManager::WriteList ( ) const
virtual

From PureFiledManager, adding logging mesh data.

Reimplemented from PureFiledManager.

Reimplemented in PureObject3DManager.

Definition at line 1730 of file PureMesh3DManager.cpp.

◆ WriteListCallback()

void PureMesh3DManager::WriteListCallback ( const PureManaged & mngd) const
protectedvirtual

From PureManager, printing filename.

Reimplemented from PureFiledManager.

Reimplemented in PureObject3DManager.

Definition at line 1761 of file PureMesh3DManager.cpp.

Friends And Related Symbol Documentation

◆ PureObject3DManager

friend class PureObject3DManager
friend

Definition at line 172 of file PureMesh3DManager.h.

◆ SampleManagerForDescendantFromVertexTransfer

friend class SampleManagerForDescendantFromVertexTransfer
friend

Definition at line 173 of file PureMesh3DManager.h.

Member Data Documentation

◆ pImpl

PureMesh3DManagerImpl* PureMesh3DManager::pImpl
private

Definition at line 170 of file PureMesh3DManager.h.


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