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

Detailed Description

Definition at line 17 of file PureMesh3DImpl.h.

#include <PureMesh3DImpl.h>

Public Member Functions

virtual ~PureMesh3DImpl ()
 
TPureBool isLevel1 () const
 
TPureBool isLevel2 () const
 
TPURE_PRIMITIVE_FORMAT getPrimitiveFormat () const
 
TPureUInt getVerticesCount () const
 
const TXYZgetVertices (TPureBool implicitAccessSubobject=true) const
 
TXYZgetVertices (TPureBool implicitAccessSubobject=true)
 
TPureUInt getVertexIndicesCount () const
 
const void * getVertexIndices (TPureBool implicitAccessSubobject=true) const
 
unsigned int getVertexIndicesType (TPureBool implicitAccessSubobject=true) const
 
TPureUInt getMinVertexIndex (TPureBool implicitAccessSubobject=true) const
 
TPureUInt getMaxVertexIndex (TPureBool implicitAccessSubobject=true) const
 
TPureUInt getVertexIndex (TPureUInt index, TPureBool implicitAccessSubobject=true) const
 
const TXYZgetNormals (TPureBool implicitAccessSubobject=true) const
 
TPureUInt getFaceCount () const
 
TPureUInt getTriangleCount () const
 
PureVectorgetPosVec ()
 
const PureVectorgetPosVec () const
 
const PureVectorgetRelPosVec () const
 
const PureVectorgetSizeVec () const
 
void RecalculateSize ()
 
const PureMaterialgetMaterial (TPureBool implicitAccessSubobject=true) const
 
PureMaterialgetMaterial (TPureBool implicitAccessSubobject=true)
 
TPureUInt getUsedSystemMemory () const
 
TPureBool cannibalize (PureMesh3D &victim)
 Acquires the resources and properties of the given Mesh3D object, meaning that the given mesh will lose the geometry and other resources.
 

Protected Member Functions

 PureMesh3DImpl (PureMesh3D *owner, TPURE_PRIMITIVE_FORMAT prfmt)
 
 PureMesh3DImpl (const PureMesh3DImpl &)
 
PureMesh3DImploperator= (const PureMesh3DImpl &)
 
TPureBool setVertexIndex (TPureUInt index, TPureUInt value)
 Sets an index value in the vertex index array.
 

Protected Attributes

TPURE_PRIMITIVE_FORMAT primitiveFormat
 Primitives' format.
 
TXYZpVertices
 Pointer to vertices.
 
TXYZpNormals
 Pointer to normals.
 
void * pVertexIndices
 Pointer to vertex indices.
 
TPureUInt nVertexIndices_h
 Number of vertex indices.
 
TPureUInt nMinVertexIndex
 Smallest value in the pVertexIndices array.
 
TPureUInt nMaxVertexIndex
 Biggest value in the pVertexIndices array.
 
GLenum nIndicesType
 Type of indices stored in pVertexIndices array.
 
TPureUInt nVertices_h
 Number of vertices.
 
TPureUInt nFaces_h
 Number of faces.
 
PureVector vPos
 3D World-space Position.
 
PureVector vRelPos
 3D offset position of vertices relative to center of mesh [0,0,0].
 
PureVector vSize
 3D Size.
 

Private Attributes

PureMesh3D_pOwner
 The owner public object who creates this pimpl object.
 
PureMaterialpMaterial
 Pointer to material.
 

Friends

class PureMesh3D
 
class PureMesh3DManager
 

Constructor & Destructor Documentation

◆ ~PureMesh3DImpl()

PureMesh3D::PureMesh3DImpl::~PureMesh3DImpl ( )
virtual

Definition at line 28 of file PureMesh3D.cpp.

◆ PureMesh3DImpl() [1/2]

PureMesh3D::PureMesh3DImpl::PureMesh3DImpl ( PureMesh3D * owner,
TPURE_PRIMITIVE_FORMAT prfmt )
protected
Parameters
ownerThe public PureMesh3D class instance owning this pimpl object.
prfmtRequested primitive format for this mesh.

Definition at line 459 of file PureMesh3D.cpp.

◆ PureMesh3DImpl() [2/2]

PureMesh3D::PureMesh3DImpl::PureMesh3DImpl ( const PureMesh3DImpl & mimpl)
protected

Definition at line 483 of file PureMesh3D.cpp.

Member Function Documentation

◆ cannibalize()

TPureBool PureMesh3D::PureMesh3DImpl::cannibalize ( PureMesh3D & victim)

Acquires the resources and properties of the given Mesh3D object, meaning that the given mesh will lose the geometry and other resources.

This is a way of moving assets of a mesh to another mesh, MOVING, so no array copy is involved. Can be done only for level-2 meshes by level-2 meshes, or for level-1 meshes by level-1 meshes. This means that in order to fully cannibalize a level-1 mesh, this function should be called for the level-1 mesh by the level-1 mesh and then for all of its submeshes one by one by the submeshes of the cannibalizer mesh.

Returns
True on success, false on error: if the cannibalizer mesh already has any submesh or existing geometry.

Definition at line 392 of file PureMesh3D.cpp.

◆ getFaceCount()

TPureUInt PureMesh3D::PureMesh3DImpl::getFaceCount ( ) const

Definition at line 191 of file PureMesh3D.cpp.

◆ getMaterial() [1/2]

PureMaterial & PureMesh3D::PureMesh3DImpl::getMaterial ( TPureBool implicitAccessSubobject = true)

Definition at line 364 of file PureMesh3D.cpp.

◆ getMaterial() [2/2]

const PureMaterial & PureMesh3D::PureMesh3DImpl::getMaterial ( TPureBool implicitAccessSubobject = true) const

Definition at line 355 of file PureMesh3D.cpp.

◆ getMaxVertexIndex()

TPureUInt PureMesh3D::PureMesh3DImpl::getMaxVertexIndex ( TPureBool implicitAccessSubobject = true) const

Definition at line 148 of file PureMesh3D.cpp.

◆ getMinVertexIndex()

TPureUInt PureMesh3D::PureMesh3DImpl::getMinVertexIndex ( TPureBool implicitAccessSubobject = true) const

Definition at line 139 of file PureMesh3D.cpp.

◆ getNormals()

const TXYZ * PureMesh3D::PureMesh3DImpl::getNormals ( TPureBool implicitAccessSubobject = true) const

Definition at line 182 of file PureMesh3D.cpp.

◆ getPosVec() [1/2]

PureVector & PureMesh3D::PureMesh3DImpl::getPosVec ( )

Definition at line 243 of file PureMesh3D.cpp.

◆ getPosVec() [2/2]

const PureVector & PureMesh3D::PureMesh3DImpl::getPosVec ( ) const

Definition at line 255 of file PureMesh3D.cpp.

◆ getPrimitiveFormat()

TPURE_PRIMITIVE_FORMAT PureMesh3D::PureMesh3DImpl::getPrimitiveFormat ( ) const

Definition at line 59 of file PureMesh3D.cpp.

◆ getRelPosVec()

const PureVector & PureMesh3D::PureMesh3DImpl::getRelPosVec ( ) const

Definition at line 249 of file PureMesh3D.cpp.

◆ getSizeVec()

const PureVector & PureMesh3D::PureMesh3DImpl::getSizeVec ( ) const

Definition at line 261 of file PureMesh3D.cpp.

◆ getTriangleCount()

TPureUInt PureMesh3D::PureMesh3DImpl::getTriangleCount ( ) const

Definition at line 217 of file PureMesh3D.cpp.

◆ getUsedSystemMemory()

TPureUInt PureMesh3D::PureMesh3DImpl::getUsedSystemMemory ( ) const

Definition at line 373 of file PureMesh3D.cpp.

◆ getVertexIndex()

TPureUInt PureMesh3D::PureMesh3DImpl::getVertexIndex ( TPureUInt index,
TPureBool implicitAccessSubobject = true ) const

Definition at line 157 of file PureMesh3D.cpp.

◆ getVertexIndices()

const void * PureMesh3D::PureMesh3DImpl::getVertexIndices ( TPureBool implicitAccessSubobject = true) const

Definition at line 121 of file PureMesh3D.cpp.

◆ getVertexIndicesCount()

TPureUInt PureMesh3D::PureMesh3DImpl::getVertexIndicesCount ( ) const

Definition at line 102 of file PureMesh3D.cpp.

◆ getVertexIndicesType()

unsigned int PureMesh3D::PureMesh3DImpl::getVertexIndicesType ( TPureBool implicitAccessSubobject = true) const

Definition at line 130 of file PureMesh3D.cpp.

◆ getVertices() [1/2]

TXYZ * PureMesh3D::PureMesh3DImpl::getVertices ( TPureBool implicitAccessSubobject = true)

Definition at line 93 of file PureMesh3D.cpp.

◆ getVertices() [2/2]

const TXYZ * PureMesh3D::PureMesh3DImpl::getVertices ( TPureBool implicitAccessSubobject = true) const

Definition at line 84 of file PureMesh3D.cpp.

◆ getVerticesCount()

TPureUInt PureMesh3D::PureMesh3DImpl::getVerticesCount ( ) const

Definition at line 65 of file PureMesh3D.cpp.

◆ isLevel1()

TPureBool PureMesh3D::PureMesh3DImpl::isLevel1 ( ) const

Definition at line 48 of file PureMesh3D.cpp.

◆ isLevel2()

TPureBool PureMesh3D::PureMesh3DImpl::isLevel2 ( ) const

Definition at line 53 of file PureMesh3D.cpp.

◆ operator=()

PureMesh3D::PureMesh3DImpl & PureMesh3D::PureMesh3DImpl::operator= ( const PureMesh3DImpl & )
protected

Definition at line 527 of file PureMesh3D.cpp.

◆ RecalculateSize()

void PureMesh3D::PureMesh3DImpl::RecalculateSize ( )

Definition at line 267 of file PureMesh3D.cpp.

◆ setVertexIndex()

TPureBool PureMesh3D::PureMesh3DImpl::setVertexIndex ( TPureUInt index,
TPureUInt value )
protected

Sets an index value in the vertex index array.

Since this also checks for violating range defined by nMinVertexIndex and nMaxVertexIndex, even during building up a geometry, those limits should be properly updated before using this function.

Returns
True on success, false otherwise.

Definition at line 540 of file PureMesh3D.cpp.

Friends And Related Symbol Documentation

◆ PureMesh3D

friend class PureMesh3D
friend

Definition at line 95 of file PureMesh3DImpl.h.

◆ PureMesh3DManager

friend class PureMesh3DManager
friend

Definition at line 96 of file PureMesh3DImpl.h.

Member Data Documentation

◆ _pOwner

PureMesh3D* PureMesh3D::PureMesh3DImpl::_pOwner
private

The owner public object who creates this pimpl object.

Definition at line 90 of file PureMesh3DImpl.h.

◆ nFaces_h

TPureUInt PureMesh3D::PureMesh3DImpl::nFaces_h
protected

Number of faces.

Definition at line 76 of file PureMesh3DImpl.h.

◆ nIndicesType

GLenum PureMesh3D::PureMesh3DImpl::nIndicesType
protected

Type of indices stored in pVertexIndices array.

Should be as small as possible per object.

Definition at line 74 of file PureMesh3DImpl.h.

◆ nMaxVertexIndex

TPureUInt PureMesh3D::PureMesh3DImpl::nMaxVertexIndex
protected

Biggest value in the pVertexIndices array.

Used by glDrawRangeElementsEXT().

Definition at line 73 of file PureMesh3DImpl.h.

◆ nMinVertexIndex

TPureUInt PureMesh3D::PureMesh3DImpl::nMinVertexIndex
protected

Smallest value in the pVertexIndices array.

Used by glDrawRangeElementsEXT().

Definition at line 72 of file PureMesh3DImpl.h.

◆ nVertexIndices_h

TPureUInt PureMesh3D::PureMesh3DImpl::nVertexIndices_h
protected

Number of vertex indices.

Definition at line 71 of file PureMesh3DImpl.h.

◆ nVertices_h

TPureUInt PureMesh3D::PureMesh3DImpl::nVertices_h
protected

Number of vertices.

Definition at line 75 of file PureMesh3DImpl.h.

◆ pMaterial

PureMaterial* PureMesh3D::PureMesh3DImpl::pMaterial
private

Pointer to material.

Definition at line 91 of file PureMesh3DImpl.h.

◆ pNormals

TXYZ* PureMesh3D::PureMesh3DImpl::pNormals
protected

Pointer to normals.

Definition at line 69 of file PureMesh3DImpl.h.

◆ primitiveFormat

TPURE_PRIMITIVE_FORMAT PureMesh3D::PureMesh3DImpl::primitiveFormat
protected

Primitives' format.

Definition at line 67 of file PureMesh3DImpl.h.

◆ pVertexIndices

void* PureMesh3D::PureMesh3DImpl::pVertexIndices
protected

Pointer to vertex indices.

We use these to index into arrays of Material too.

Definition at line 70 of file PureMesh3DImpl.h.

◆ pVertices

TXYZ* PureMesh3D::PureMesh3DImpl::pVertices
protected

Pointer to vertices.

Definition at line 68 of file PureMesh3DImpl.h.

◆ vPos

PureVector PureMesh3D::PureMesh3DImpl::vPos
protected

3D World-space Position.

Definition at line 78 of file PureMesh3DImpl.h.

◆ vRelPos

PureVector PureMesh3D::PureMesh3DImpl::vRelPos
protected

3D offset position of vertices relative to center of mesh [0,0,0].

Definition at line 79 of file PureMesh3DImpl.h.

◆ vSize

PureVector PureMesh3D::PureMesh3DImpl::vSize
protected

3D Size.

Definition at line 80 of file PureMesh3DImpl.h.


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