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

3D object class. More...

Detailed Description

3D object class.

Object3D objects are 2-level entities:

  • first level (parent) derives from a level-1 Mesh3D object, and owns properties such as world position, angle, etc.;
  • second level objects derive from level-2 Mesh3D objects, particularly the submeshes of the level-1 mesh from where the level-1 Object3D is also derived. This is way a Object3D is both a Managed and a Manager too: it is owned by Object3DManager but it owns its subobjects.

The biggest addition of Object3D to VertexTransfer is the renderability.

Definition at line 69 of file PureObject3DManager.h.

#include <PureObject3DManager.h>

+ Inheritance diagram for PureObject3D:

Classes

class  PureObject3DImpl
 

Public Member Functions

virtual ~PureObject3D ()
 
CConsole & getManagedConsole () const
 Returns access to console preset with logger module name as this class.
 
virtual TPureBool isLevel1 () const
 Tells if the mesh is a level-1 parent mesh.
 
virtual TPureBool isLevel2 () const
 Tells if the mesh is a level-2 submesh.
 
virtual TPURE_PRIMITIVE_FORMAT getPrimitiveFormat () const
 Gets the primitives' format.
 
virtual TPureUInt getVerticesCount () const
 Gets the number of total vertices.
 
virtual const TXYZgetVertices (TPureBool implicitAccessSubobject=true) const
 Gets the pointer to vertices.
 
virtual TXYZgetVertices (TPureBool implicitAccessSubobject=true)
 Gets the pointer to vertices.
 
virtual TPureUInt getVertexIndicesCount () const
 Gets the number of total vertex indices.
 
virtual const void * getVertexIndices (TPureBool implicitAccessSubobject=true) const
 Gets the pointer to vertex indices.
 
virtual unsigned int getVertexIndicesType (TPureBool implicitAccessSubobject=true) const
 Gets the type of the indices.
 
virtual TPureUInt getMinVertexIndex (TPureBool implicitAccessSubobject=true) const
 Gets the smallest index in the vertex indices array.
 
virtual TPureUInt getMaxVertexIndex (TPureBool implicitAccessSubobject=true) const
 Gets the greatest index in the vertex indices array.
 
virtual TPureUInt getVertexIndex (TPureUInt index, TPureBool implicitAccessSubobject=true) const
 Gets an index value from the vertex indices array.
 
virtual const TXYZgetNormals (TPureBool implicitAccessSubobject=true) const
 Gets the pointer to normals.
 
virtual TPureUInt getFaceCount () const
 Gets the number of faces/polygons formed by the vertices.
 
virtual TPureUInt getTriangleCount () const
 Gets the number of triangles formed by the vertices.
 
virtual TPURE_VERTEX_MODIFYING_HABIT getVertexModifyingHabit () const
 Gets vertex modifying habit.
 
virtual TPURE_VERTEX_REFERENCING_MODE getVertexReferencingMode () const
 Gets vertex referencing mode.
 
virtual TPURE_VERTEX_TRANSFER_MODE getVertexTransferMode () const
 Gets vertex transfer mode.
 
virtual TPureBool setVertexTransferMode (TPURE_VERTEX_TRANSFER_MODE vtrans)
 Sets vertex transfer mode.
 
virtual TPureUInt getLastTransferredVertexCount () const
 Gets the number of vertices sent to graphics pipeline by the last transferVertices() call.
 
virtual TPureUInt getLastTransferredTriangleCount () const
 Gets the number of triangles sent to graphics pipeline by the last transferVertices() call.
 
PureObject3DgetReferredObject () const
 Gets the original object which was cloned to create this object.
 
const std::set< PureObject3D * > & getReferrerObjects () const
 Gets the cloned objects referring to this object.
 
const TPURE_TRANSFORMED_VERTEXgetTransformedVertices (TPureBool implicitAccessSubobject=true) const
 Gets the pointer to transformed vertices.
 
TPURE_TRANSFORMED_VERTEXgetTransformedVertices (TPureBool implicitAccessSubobject=true)
 Gets the pointer to transformed vertices.
 
PureVectorgetAngleVec ()
 Gets the rotation angles.
 
const PureVectorgetAngleVec () const
 Gets the rotation angles.
 
virtual const PureVectorgetRelPosVec () const
 Gets the mesh-local relative position.
 
virtual const PureVectorgetSizeVec () const
 Gets the base sizes.
 
PureVector getScaledSizeVec () const
 Gets the real sizes considering the geometry size calculated from vertex data and the current scaling factor.
 
const PureVectorgetScaling () const
 Gets the scaling factor.
 
void SetScaling (TPureFloat value)
 Sets the scaling factor to given scalar.
 
void SetScaling (const PureVector &value)
 Sets the scaling factor to given vector.
 
void Scale (TPureFloat value)
 Scales by the given scalar value.
 
void Scale (const PureVector &value)
 Scales by the given vector.
 
TPureFloat getBiggestAreaScaled () const
 Gets the biggest area of the object on either plane (XY, XZ or YZ), scaled by current scaling factor.
 
TPureFloat recalculateBiggestAreaScaled ()
 Recalculates biggest area of object on either plane (XY, XZ or YZ), scaled by current scaling factor.
 
TPureBool isRenderingAllowed () const
 Gets if rendering is allowed.
 
void SetRenderingAllowed (TPureBool state)
 Sets if rendering is allowed.
 
void Show ()
 Enables rendering of this object.
 
void Hide ()
 Disables rendering of this object.
 
TPureBool isColliding_TO_BE_REMOVED () const
 Gets whether colliding is enabled.
 
void SetColliding_TO_BE_REMOVED (TPureBool value)
 Sets whether colliding is enabled.
 
TPURE_ROTATION_ORDER getRotationOrder () const
 Gets the rotation order.
 
void SetRotationOrder (TPURE_ROTATION_ORDER value)
 Sets the rotation order.
 
TPureBool isLit () const
 Gets the lit state.
 
void SetLit (TPureBool value)
 Sets the lit state.
 
TPureBool isDoubleSided () const
 Gets the double sided state.
 
void SetDoubleSided (TPureBool value)
 Sets the double sided state.
 
TPureBool isWireframed () const
 Gets the wireframed state.
 
void SetWireframed (TPureBool value)
 Sets the wireframed state.
 
TPureBool isWireframedCulled () const
 Gets the wireframed culling state.
 
void SetWireframedCulled (TPureBool value)
 Sets the wireframed culling state.
 
TPureBool isAffectingZBuffer () const
 Gets whether we write to the Z-Buffer while rendering.
 
void SetAffectingZBuffer (TPureBool value)
 Sets whether we write to the Z-Buffer while rendering.
 
TPureBool isTestingAgainstZBuffer () const
 Gets whether we test against the Z-Buffer while rendering.
 
void SetTestingAgainstZBuffer (TPureBool value)
 Sets whether we test against the Z-Buffer while rendering.
 
TPureBool isStickedToScreen () const
 Gets the sticked-to-screen state.
 
void SetStickedToScreen (TPureBool value)
 Sets the sticked-to-screen state.
 
TPureBool isOccluder () const
 Gets whether this object should be considered as an occluder during rendering.
 
void SetOccluder (TPureBool value)
 Sets whether this object should be considered as an occluder during rendering.
 
TPureBool isOccluded () const
 Gets whether this object was occluded or not based on the last finished occlusion test.
 
TPureBool isOcclusionTested () const
 Gets whether this object is being tested if it is occluded or not.
 
void SetOcclusionTested (TPureBool state)
 Sets whether this object should be tested if it is occluded or not.
 
const PureObject3DgetBoundingBoxObject () const
 Gets the bounding box object used for occlusion tests.
 
void ForceFinishOcclusionTest ()
 Waits for any pending occlusion test to be finished and reset occluded state.
 
virtual TPureUInt getUsedSystemMemory () const
 Gets the amount of allocated system memory.
 
virtual TPureUInt getUsedVideoMemory () const
 Gets the amount of allocated video memory.
 
TPureUInt draw (const TPURE_RENDER_PASS &renderPass, TPureBool bASyncQuery, TPureBool bRenderIfQueryPending)
 Draws the object.
 
- Public Member Functions inherited from PureVertexTransfer
virtual ~PureVertexTransfer ()
 
CConsole & getManagedConsole () const
 Returns access to console preset with logger module name as this class.
 
virtual TPureBool setVertexModifyingHabit (TPURE_VERTEX_MODIFYING_HABIT vmod)
 Sets vertex modifying habit.
 
virtual TPureBool setVertexReferencingMode (TPURE_VERTEX_REFERENCING_MODE vref)
 Sets vertex referencing mode.
 
- Public Member Functions inherited from PureMesh3D
virtual ~PureMesh3D ()
 
CConsole & getManagedConsole () const
 Returns access to console preset with logger module name as this class.
 
PureVectorgetPosVec ()
 Gets the position.
 
const PureVectorgetPosVec () const
 Gets the position.
 
void RecalculateSize ()
 Recalculates the sizes.
 
const PureMaterialgetMaterial (TPureBool implicitAccessSubobject=true) const
 Gets the material.
 
PureMaterialgetMaterial (TPureBool implicitAccessSubobject=true)
 Gets the material.
 
- Public Member Functions inherited from PureFiledManaged
 PureFiledManaged ()
 
virtual ~PureFiledManaged ()
 
CConsole & getManagedConsole () const
 Returns access to console preset with logger module name as this class.
 
const std::string & getFilename () const
 Gets the filename.
 
- Public Member Functions inherited from PureManaged
 PureManaged ()
 
virtual ~PureManaged ()
 
CConsole & getManagedConsole () const
 Returns access to console preset with logger module name as this class.
 
const PureManagedgetUtiliser () const
 Returns the managed that utilizes this managed.
 
PureManagedgetUtiliser ()
 Returns the managed that utilizes this managed.
 
void SetUtiliser (PureManaged *pUtiliser)
 Sets the managed that utilizes this managed.
 
void DetachFrom ()
 Removes the managed from its manager.
 
PureManagergetManager () const
 Gets the manager of the managed.
 
const std::string & getName () const
 Gets the name.
 
void SetName (const std::string &name)
 Sets the name.
 
virtual void FlushResources ()
 This can be used if the specialized managed object has some resources that may be released from memory when not needed anymore.
 
- 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.
 
virtual PureFiledManagedcreateFromFile (const char *filename)
 Should create a new managed from the given file.
 
void WriteList () const
 From PureManager, adding logging file names.
 
- 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.
 

Static Public Member Functions

static const char * getLoggerModuleName ()
 Returns the logger module name of this class.
 
- Static Public Member Functions inherited from PureVertexTransfer
static TPureBool isVertexTransferModeSelectable (TPURE_VERTEX_TRANSFER_MODE vtrans)
 Tells whether the given Vertex Transfer Mode is available on the current hardware.
 
static TPureBool isVertexReferencingIndexed (TPURE_VERTEX_TRANSFER_MODE vtrans)
 Tells whether the given Vertex Transfer Mode references vertices by indexing.
 
static TPureBool isVertexModifyingDynamic (TPURE_VERTEX_TRANSFER_MODE vtrans)
 Tells whether the given Vertex Transfer Mode means dynamic modifying habit.
 
static TPureBool isVideoMemoryUsed (TPURE_VERTEX_TRANSFER_MODE vtrans)
 Tells whether the given Vertex Transfer Mode uses VRAM.
 
static TPURE_VERTEX_TRANSFER_MODE selectVertexTransferMode (TPURE_VERTEX_MODIFYING_HABIT vmod, TPURE_VERTEX_REFERENCING_MODE vref, TPureBool bForceUseClientMemory)
 Selects a suitable vertex transfer mode.
 
static const char * getLoggerModuleName ()
 Returns the logger module name of this class.
 
- Static Public Member Functions inherited from PureMesh3D
static const char * getLoggerModuleName ()
 Returns the logger module name of this class.
 
- Static Public Member Functions inherited from PureFiledManaged
static const char * getLoggerModuleName ()
 Returns the logger module name of this class.
 
- Static Public Member Functions inherited from PureManaged
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

 PureObject3D (PureMaterialManager &matMgr, const TPURE_VERTEX_MODIFYING_HABIT &vmod=PURE_VMOD_STATIC, const TPURE_VERTEX_REFERENCING_MODE &vref=PURE_VREF_DIRECT, TPureBool bForceUseClientMemory=false)
 Only PureObject3DManager creates it.
 
 PureObject3D (const PureObject3D &)
 
PureObject3Doperator= (const PureObject3D &)
 
virtual void ResetLastTransferredCounts ()
 Reset counters used for measuring number of vertices, triangles, etc.
 
- Protected Member Functions inherited from PureVertexTransfer
 PureVertexTransfer (PureMaterialManager &matMgr, const TPURE_VERTEX_MODIFYING_HABIT &vmod=PURE_VMOD_STATIC, const TPURE_VERTEX_REFERENCING_MODE &vref=PURE_VREF_DIRECT, TPureBool bForceUseClientMemory=false)
 Only PureObject3D or PureObject3DManager creates it.
 
 PureVertexTransfer ()
 
 PureVertexTransfer (const PureVertexTransfer &)
 
PureVertexTransferoperator= (const PureVertexTransfer &)
 
TPureUInt transferVertices ()
 Sends vertices to the graphics pipeline.
 
- Protected Member Functions inherited from PureMesh3D
 PureMesh3D (TPURE_PRIMITIVE_FORMAT prfmt=PURE_PM_TRIANGLES)
 Only PureMesh3DManager creates it.
 
 PureMesh3D (const PureMesh3D &)
 
PureMesh3Doperator= (const PureMesh3D &)
 
- Protected Member Functions inherited from PureFiledManaged
 PureFiledManaged (const PureFiledManaged &other)
 
PureFiledManagedoperator= (const PureFiledManaged &other)
 
void SetFilename (const std::string &filename)
 Sets the filename.
 
- Protected Member Functions inherited from PureManaged
 PureManaged (const PureManaged &other)
 
PureManagedoperator= (const PureManaged &other)
 
- Protected Member Functions inherited from PureFiledManager
 PureFiledManager (const PureFiledManager &)
 
PureFiledManageroperator= (const PureFiledManager &)
 
virtual void WriteListCallback (const PureManaged &mngd) const
 From PureManager, printing filename.
 
- Protected Member Functions inherited from PureManager
 PureManager (const PureManager &other)
 
PureManageroperator= (const PureManager &)
 

Private Attributes

PureObject3DImplpImpl
 

Friends

class PureObject3DManager
 

Constructor & Destructor Documentation

◆ ~PureObject3D()

PureObject3D::~PureObject3D ( )
virtual

Definition at line 1555 of file PureObject3D.cpp.

◆ PureObject3D() [1/2]

PureObject3D::PureObject3D ( PureMaterialManager & matMgr,
const TPURE_VERTEX_MODIFYING_HABIT & vmod = PURE_VMOD_STATIC,
const TPURE_VERTEX_REFERENCING_MODE & vref = PURE_VREF_DIRECT,
TPureBool bForceUseClientMemory = false )
protected

Only PureObject3DManager creates it.

Parameters
matMgrA MaterialManager instance to be used for constructing of ancestor class.
vmodWhat vertex modifying habit to be set for the new Object3D instance.
vrefWhat vertex referencing mode to be set for the new Object3D instance.
bForceUseClientMemoryForce-select a vertex transfer mode storing geometry in client memory instead of server memory. Please note that this is considered only if dynamic modifying habit is specified. Specifying static modifying habit will always select a mode which places geometry data into server memory.
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 2573 of file PureObject3D.cpp.

◆ PureObject3D() [2/2]

PureObject3D::PureObject3D ( const PureObject3D & other)
protected
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 2588 of file PureObject3D.cpp.

Member Function Documentation

◆ draw()

TPureUInt PureObject3D::draw ( const TPURE_RENDER_PASS & renderPass,
TPureBool bASyncQuery,
TPureBool bRenderIfQueryPending )

Draws the object.

This is only valid from outside for level-1 objects. The call is ignored by level-2 subobjects. Only their level-1 parent object can call on its subobjects.

Parameters
renderPassWhich pass/mode of rendering we are doing now for this object. Some render passes depend on the effect of other passes, so order is important.
bASyncQueryIf true, it just checks if query is complete, but won't wait for it. If false, it will wait until query is finished.
bRenderIfQueryPendingIf true, and we do not have query result yet, the function will respond as if the object is NOT occluded. If false, and we do not have query result yet, the function will respond based on the last occlusion state of this object, meaning that: if the last finished query said the object was occluded, the function will respond as the object was occluded, otherwise it will respond as the object was not occluded. This parameter is used only with async queries.
Returns
The number of vertices sent to the graphics pipeline.

Definition at line 2552 of file PureObject3D.cpp.

◆ ForceFinishOcclusionTest()

void PureObject3D::ForceFinishOcclusionTest ( )

Waits for any pending occlusion test to be finished and reset occluded state.

This is actually a helper function for a renderer in rare cases when rendering path change requires all pending queries to be finished. This is called forced, so it waits for finish even when rendering path implements async occlusion query handling. Ignored for level-2 objects, as only level-1 objects can have occlusion test.

Definition at line 2483 of file PureObject3D.cpp.

◆ getAngleVec() [1/2]

PureVector & PureObject3D::getAngleVec ( )

Gets the rotation angles.

Rotation angle is currently ignored for level-2 objects, they are rotated by the same factor as their level-1 parent object using the same pivot point. By default this property is (0.0f, 0.0f, 0.0f).

Returns
Rotation angles vector.

Definition at line 1922 of file PureObject3D.cpp.

◆ getAngleVec() [2/2]

const PureVector & PureObject3D::getAngleVec ( ) const

Gets the rotation angles.

Rotation angle is currently ignored for level-2 objects, they are rotated by the same factor as their level-1 parent object using the same pivot point. By default this property is (0.0f, 0.0f, 0.0f).

Returns
Rotation angles vector.

Definition at line 1934 of file PureObject3D.cpp.

◆ getBiggestAreaScaled()

TPureFloat PureObject3D::getBiggestAreaScaled ( ) const

Gets the biggest area of the object on either plane (XY, XZ or YZ), scaled by current scaling factor.

Note that if you change the geometry on your own without a call to setVertexTransferMode(), this may give outdated area. See details at recalculateBiggestAreaScaled(). This value is used by the engine to determine which object should be an occluder. Although occluder state can be turned on or off manually by SetOccluder(), the engine automatically sets this state whenever recalculateBiggestAreaScaled() is invoked either automatically or manually.

Returns
Biggest area of the object on either plane (XY, XZ or YZ), scaled by current scaling factor.

Definition at line 2053 of file PureObject3D.cpp.

◆ getBoundingBoxObject()

const PureObject3D * PureObject3D::getBoundingBoxObject ( ) const

Gets the bounding box object used for occlusion tests.

Level-2 objects never have bounding box, only their level-1 parent object might have one.

Returns
The bounding box object used for occlusion tests. It might be PGENULL, if occlusion tests are not done for this object.

Definition at line 2471 of file PureObject3D.cpp.

◆ getFaceCount()

TPureUInt PureObject3D::getFaceCount ( ) const
virtual

Gets the number of faces/polygons formed by the vertices.

The details of this function are described in PureMesh3D class.

Addition to PureMesh3D behavior: if this is a cloned object, the returned value is the referred object's relevant value. This additional behavior is needed since a cloned object doesn't have its own geometry.

Reimplemented from PureMesh3D.

Definition at line 1734 of file PureObject3D.cpp.

◆ getLastTransferredTriangleCount()

TPureUInt PureObject3D::getLastTransferredTriangleCount ( ) const
virtual

Gets the number of triangles sent to graphics pipeline by the last transferVertices() call.

Same functionality as defined originally in PureVertexTransfer::getLastTransferredTriangleCount() but extended with awareness of:

  • optional bounding box object;
  • referred object in case of cloned object. So depending on the render pass and occlusion testing, if the object's bounding box was sent to the graphics pipeline by draw(), its triangles will be also counted. If this is a cloned object, this function returns the last transferred triangle count of the referred object since the transfer of triangles actually happens by the referred object, so counting also happens there, so we should return that value, otherwise it would be misleading to return cloned object's value of 0.

Reimplemented from PureVertexTransfer.

Definition at line 1844 of file PureObject3D.cpp.

◆ getLastTransferredVertexCount()

TPureUInt PureObject3D::getLastTransferredVertexCount ( ) const
virtual

Gets the number of vertices sent to graphics pipeline by the last transferVertices() call.

Same functionality as defined originally in PureVertexTransfer::getLastTransferredVertexCount() but extended with awareness of:

  • optional bounding box object;
  • referred object in case of cloned object. So depending on the render pass and occlusion testing, if the object's bounding box was sent to the graphics pipeline by draw(), its vertices will be also counted. If this is a cloned object, this function returns the last transferred vertex count of the referred object since the transfer of vertices actually happens by the referred object, so counting also happens there, so we should return that value, otherwise it would be misleading to return cloned object's value of 0.

Reimplemented from PureVertexTransfer.

Definition at line 1816 of file PureObject3D.cpp.

◆ getLoggerModuleName()

const char * PureObject3D::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 1581 of file PureObject3D.cpp.

◆ getManagedConsole()

CConsole & PureObject3D::getManagedConsole ( ) 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 1568 of file PureObject3D.cpp.

◆ getMaxVertexIndex()

TPureUInt PureObject3D::getMaxVertexIndex ( TPureBool implicitAccessSubobject = true) const
virtual

Gets the greatest index in the vertex indices array.

The details of this function are described in PureMesh3D class.

Addition to PureMesh3D behavior: if this is a cloned object, the returned value is the referred object's relevant value. This additional behavior is needed since a cloned object doesn't have its own geometry.

Reimplemented from PureMesh3D.

Definition at line 1702 of file PureObject3D.cpp.

◆ getMinVertexIndex()

TPureUInt PureObject3D::getMinVertexIndex ( TPureBool implicitAccessSubobject = true) const
virtual

Gets the smallest index in the vertex indices array.

The details of this function are described in PureMesh3D class.

Addition to PureMesh3D behavior: if this is a cloned object, the returned value is the referred object's relevant value. This additional behavior is needed since a cloned object doesn't have its own geometry.

Reimplemented from PureMesh3D.

Definition at line 1692 of file PureObject3D.cpp.

◆ getNormals()

const TXYZ * PureObject3D::getNormals ( TPureBool implicitAccessSubobject = true) const
virtual

Gets the pointer to normals.

The details of this function are described in PureMesh3D class.

Addition to PureMesh3D behavior: if this is a cloned object, the returned value is the referred object's relevant value. This additional behavior is needed since a cloned object doesn't have its own geometry.

Reimplemented from PureMesh3D.

Definition at line 1723 of file PureObject3D.cpp.

◆ getPrimitiveFormat()

TPURE_PRIMITIVE_FORMAT PureObject3D::getPrimitiveFormat ( ) const
virtual

Gets the primitives' format.

The details of this function are described in PureMesh3D class.

Addition to PureMesh3D behavior: if this is a cloned object, the returned value is the referred object's relevant value. This additional behavior is needed since a cloned object doesn't have its own geometry.

Reimplemented from PureMesh3D.

Definition at line 1613 of file PureObject3D.cpp.

◆ getReferredObject()

PureObject3D * PureObject3D::getReferredObject ( ) const

Gets the original object which was cloned to create this object.

Returns
NULL if this is a non-cloned object, otherwise the pointer to the original object which was cloned to create this cloned object.

Definition at line 1868 of file PureObject3D.cpp.

◆ getReferrerObjects()

const std::set< PureObject3D * > & PureObject3D::getReferrerObjects ( ) const

Gets the cloned objects referring to this object.

Returns
Cloned objects referring to this object.

Definition at line 1878 of file PureObject3D.cpp.

◆ getRelPosVec()

const PureVector & PureObject3D::getRelPosVec ( ) const
virtual

Gets the mesh-local relative position.

This position tells the offset of the vertex positions relative to the center of the mesh [0,0,0]. For level-2 (sub)mesh, this vector is always expected to be [0,0,0] since the position of submeshes is calculated with vertex positions and size.

Addition to PureMesh3D behavior: the Mesh3D part of a cloned object does not have its own geometry, thus even Mesh3D::RecalculateSize() would calculate it to 0. Thus if we are a cloned object, we need to return the relative position vector of the object we are referring to.

Returns
Mesh-local relative position vector.

Reimplemented from PureMesh3D.

Definition at line 1950 of file PureObject3D.cpp.

◆ getRotationOrder()

TPURE_ROTATION_ORDER PureObject3D::getRotationOrder ( ) const

Gets the rotation order.

Rotation order is currently ignored for level-2 objects, they are rotated the same way as their level-1 parent object. By default this property is PURE_YXZ.

Returns
Rotation order.

Definition at line 2162 of file PureObject3D.cpp.

◆ getScaledSizeVec()

PureVector PureObject3D::getScaledSizeVec ( ) const

Gets the real sizes considering the geometry size calculated from vertex data and the current scaling factor.

Returns
Real sizes vector.

Definition at line 1974 of file PureObject3D.cpp.

◆ getScaling()

const PureVector & PureObject3D::getScaling ( ) const

Gets the scaling factor.

By default this property is (1.0f, 1.0f, 1.0f).

Returns
Scaling.

Definition at line 1985 of file PureObject3D.cpp.

◆ getSizeVec()

const PureVector & PureObject3D::getSizeVec ( ) const
virtual

Gets the base sizes.

Addition to PureMesh3D behavior: the Mesh3D part of a cloned object does not have its own geometry, thus even Mesh3D::RecalculateSize() would calculate it to 0. Thus if we are a cloned object, we need to return the size of the object we are referring to.

Returns
Base sizes vector.

Reimplemented from PureMesh3D.

Definition at line 1964 of file PureObject3D.cpp.

◆ getTransformedVertices() [1/2]

TPURE_TRANSFORMED_VERTEX * PureObject3D::getTransformedVertices ( TPureBool implicitAccessSubobject = true)

Gets the pointer to transformed vertices.

These are generated only during first rendering. This value is irrelevant for a level-1 object since the geometry is owned by its level-2 subobjects. Still the returned value for a level-1 object can be a non-NULL value, see below.

Returns
Pointer to transformed vertices. If the object's own vertex count is 0 but it has exactly 1 subobject, the returned pointer is the subobject's transformed vertices pointer. This implicit behavior is for convenience for objects storing only 1 subobject like internally created objects.

Definition at line 1910 of file PureObject3D.cpp.

◆ getTransformedVertices() [2/2]

const TPURE_TRANSFORMED_VERTEX * PureObject3D::getTransformedVertices ( TPureBool implicitAccessSubobject = true) const

Gets the pointer to transformed vertices.

These are generated only during first rendering. This value is irrelevant for a level-1 object since the geometry is owned by its level-2 subobjects. Still the returned value for a level-1 object can be a non-NULL value, see below.

Returns
Pointer to transformed vertices. If the object's own vertex count is 0 but it has exactly 1 subobject, the returned pointer is the subobject's transformed vertices pointer. This implicit behavior is for convenience for objects storing only 1 subobject like internally created objects.

Definition at line 1894 of file PureObject3D.cpp.

◆ getTriangleCount()

TPureUInt PureObject3D::getTriangleCount ( ) const
virtual

Gets the number of triangles formed by the vertices.

The details of this function are described in PureMesh3D class.

Addition to PureMesh3D behavior: if this is a cloned object, the returned value is the referred object's relevant value. This additional behavior is needed since a cloned object doesn't have its own geometry.

Reimplemented from PureMesh3D.

Definition at line 1744 of file PureObject3D.cpp.

◆ getUsedSystemMemory()

TPureUInt PureObject3D::getUsedSystemMemory ( ) const
virtual

Gets the amount of allocated system memory.

It includes the allocated Material size as well (getMaterial(false)). Level-1 (parent) objects summarize the memory usage of their level-2 subobjects and include it in the returned value.

Returns
Amount of allocated system memory in Bytes.

Reimplemented from PureVertexTransfer.

Definition at line 2497 of file PureObject3D.cpp.

◆ getUsedVideoMemory()

TPureUInt PureObject3D::getUsedVideoMemory ( ) const
virtual

Gets the amount of allocated video memory.

The details of this function are described in VertexTransfer class.

If this is a cloned object, the returned value is usually 0 since it just refers to the mesh- and bounding box geometries of the original object. Small amount of extra video memory might be also used for the bounding box object utilized by this object.

Returns
Amount of allocated video memory in Bytes for storing geometry of the underlying mesh, including all subobjects.

Reimplemented from PureVertexTransfer.

Definition at line 2520 of file PureObject3D.cpp.

◆ getVertexIndex()

TPureUInt PureObject3D::getVertexIndex ( TPureUInt index,
TPureBool implicitAccessSubobject = true ) const
virtual

Gets an index value from the vertex indices array.

The details of this function are described in PureMesh3D class.

Addition to PureMesh3D behavior: if this is a cloned object, the returned value is the referred object's relevant value. This additional behavior is needed since a cloned object doesn't have its own geometry.

Reimplemented from PureMesh3D.

Definition at line 1712 of file PureObject3D.cpp.

◆ getVertexIndices()

const void * PureObject3D::getVertexIndices ( TPureBool implicitAccessSubobject = true) const
virtual

Gets the pointer to vertex indices.

The details of this function are described in PureMesh3D class.

Addition to PureMesh3D behavior: if this is a cloned object, the returned value is the referred object's relevant value. This additional behavior is needed since a cloned object doesn't have its own geometry.

Reimplemented from PureMesh3D.

Definition at line 1670 of file PureObject3D.cpp.

◆ getVertexIndicesCount()

TPureUInt PureObject3D::getVertexIndicesCount ( ) const
virtual

Gets the number of total vertex indices.

The details of this function are described in PureMesh3D class.

Addition to PureMesh3D behavior: if this is a cloned object, the returned value is the referred object's relevant value. This additional behavior is needed since a cloned object doesn't have its own geometry, but it would be misleading to report 0.

Reimplemented from PureMesh3D.

Definition at line 1659 of file PureObject3D.cpp.

◆ getVertexIndicesType()

unsigned int PureObject3D::getVertexIndicesType ( TPureBool implicitAccessSubobject = true) const
virtual

Gets the type of the indices.

The details of this function are described in PureMesh3D class.

Addition to PureMesh3D behavior: if this is a cloned object, the returned value is the referred object's relevant value. This additional behavior is needed since a cloned object doesn't have its own geometry.

Reimplemented from PureMesh3D.

Definition at line 1681 of file PureObject3D.cpp.

◆ getVertexModifyingHabit()

TPURE_VERTEX_MODIFYING_HABIT PureObject3D::getVertexModifyingHabit ( ) const
virtual

Gets vertex modifying habit.

The details of this function are described in PureVertexTransfer class.

Addition to PureVertexTransfer behavior: if this is a cloned object, the returned value is the same as the referred object's value.

Reimplemented from PureVertexTransfer.

Definition at line 1754 of file PureObject3D.cpp.

◆ getVertexReferencingMode()

TPURE_VERTEX_REFERENCING_MODE PureObject3D::getVertexReferencingMode ( ) const
virtual

Gets vertex referencing mode.

The details of this function are described in PureVertexTransfer class.

Addition to PureVertexTransfer behavior: if this is a cloned object, the returned value is the same as the referred object's value.

Reimplemented from PureVertexTransfer.

Definition at line 1764 of file PureObject3D.cpp.

◆ getVertexTransferMode()

TPURE_VERTEX_TRANSFER_MODE PureObject3D::getVertexTransferMode ( ) const
virtual

Gets vertex transfer mode.

The details of this function are described in PureVertexTransfer class.

Addition to PureVertexTransfer behavior: if this is a cloned object, the returned value is the same as the referred object's value.

Reimplemented from PureVertexTransfer.

Definition at line 1774 of file PureObject3D.cpp.

◆ getVertices() [1/2]

TXYZ * PureObject3D::getVertices ( TPureBool implicitAccessSubobject = true)
virtual

Gets the pointer to vertices.

The details of this function are described in PureMesh3D class.

Addition to PureMesh3D behavior: if this is a cloned object, the returned value is the referred object's relevant value. This additional behavior is needed since a cloned object doesn't have its own geometry.

Reimplemented from PureMesh3D.

Definition at line 1647 of file PureObject3D.cpp.

◆ getVertices() [2/2]

const TXYZ * PureObject3D::getVertices ( TPureBool implicitAccessSubobject = true) const
virtual

Gets the pointer to vertices.

The details of this function are described in PureMesh3D class.

Addition to PureMesh3D behavior: if this is a cloned object, the returned value is the referred object's relevant value. This additional behavior is needed since a cloned object doesn't have its own geometry.

Reimplemented from PureMesh3D.

Definition at line 1636 of file PureObject3D.cpp.

◆ getVerticesCount()

TPureUInt PureObject3D::getVerticesCount ( ) const
virtual

Gets the number of total vertices.

The details of this function are described in PureMesh3D class.

Addition to PureMesh3D behavior: if this is a cloned object, the returned value is the referred object's relevant value. This additional behavior is needed since a cloned object doesn't have its own geometry, but it would be misleading to report 0.

Reimplemented from PureMesh3D.

Definition at line 1625 of file PureObject3D.cpp.

◆ Hide()

void PureObject3D::Hide ( )

Disables rendering of this object.

Equivalent to SetRenderingAllowed(false). See the details there.

Definition at line 2125 of file PureObject3D.cpp.

◆ isAffectingZBuffer()

TPureBool PureObject3D::isAffectingZBuffer ( ) const

Gets whether we write to the Z-Buffer while rendering.

This property is currently ignored for level-2 objects, they inherit this property from their level-1 parent object. By default this property is true.

Returns
True if we write to Z-Buffer while rendering, false otherwise.

Definition at line 2289 of file PureObject3D.cpp.

◆ isColliding_TO_BE_REMOVED()

TPureBool PureObject3D::isColliding_TO_BE_REMOVED ( ) const

Gets whether colliding is enabled.

Legacy function unrelated to the purpose of this class, will need to be removed! By default this property is false.

Returns
True, if colliding is enabled, false otherwise.

Definition at line 2137 of file PureObject3D.cpp.

◆ isDoubleSided()

TPureBool PureObject3D::isDoubleSided ( ) const

Gets the double sided state.

This property is currently ignored for level-2 objects, they inherit this property from their level-1 parent object. By default this property is false.

Returns
True if double sided, false otherwise.

Definition at line 2212 of file PureObject3D.cpp.

◆ isLevel1()

TPureBool PureObject3D::isLevel1 ( ) const
virtual

Tells if the mesh is a level-1 parent mesh.

The details of this function are described in PureMesh3D class.

Addition to PureMesh3D behavior: if this is a cloned object, it is definitely level-1 since only level-1 objects can be cloned, and although they don't have their own level-2 subobject, they use the referred level-1 object's subobjects like they were their own.

Reimplemented from PureMesh3D.

Definition at line 1592 of file PureObject3D.cpp.

◆ isLevel2()

TPureBool PureObject3D::isLevel2 ( ) const
virtual

Tells if the mesh is a level-2 submesh.

The details of this function are described in PureMesh3D class.

Addition to PureMesh3D behavior: if this is a cloned object, it is definitely level-1 since only level-1 objects can be cloned, and although they don't have their own level-2 subobject, they use the referred level-1 object's subobjects like they were their own.

Reimplemented from PureMesh3D.

Definition at line 1602 of file PureObject3D.cpp.

◆ isLit()

TPureBool PureObject3D::isLit ( ) const

Gets the lit state.

This property is currently ignored for level-2 objects, they inherit this property from their level-1 parent object. By default this property is true.

Returns
True if lit, false otherwise.

Definition at line 2187 of file PureObject3D.cpp.

◆ isOccluded()

TPureBool PureObject3D::isOccluded ( ) const

Gets whether this object was occluded or not based on the last finished occlusion test.

This last state might be a few rendered frames behind the current occlusion status, as occlusion tests might not be finished in the same frame they are started. By default this property is false after creating the object, but might be changed after the first few rendered frames.

For more details on occlusion testing, read description of SetOcclusionTested().

Returns
True if last occlusion test said it was occluded, false otherwise. Result is always false if the object is not tested for occlusion, see isOcclusionTested() member function for more info.

Definition at line 2416 of file PureObject3D.cpp.

◆ isOccluder()

TPureBool PureObject3D::isOccluder ( ) const

Gets whether this object should be considered as an occluder during rendering.

Occluders are rendered before non-occluder objects. This property is currently ignored for level-2 objects, they inherit this property from their level-1 parent object. By default this property is decided based on the size of the object compared to other objects. More info about this can be read at the description of SetOccluder().

Returns
True if considered as occluder, false otherwise (potential occludee).

Definition at line 2375 of file PureObject3D.cpp.

◆ isOcclusionTested()

TPureBool PureObject3D::isOcclusionTested ( ) const

Gets whether this object is being tested if it is occluded or not.

For more details on occlusion testing, read description of SetOcclusionTested().

Returns
True if occlusion test is executed for this object, false otherwise.

Definition at line 2428 of file PureObject3D.cpp.

◆ isRenderingAllowed()

TPureBool PureObject3D::isRenderingAllowed ( ) const

Gets if rendering is allowed.

If rendering is not allowed, it is not rendered. This property is manual user setting, not related to any visibility testing that might be done by renderer. This means that even if the object is seen by the camera, not occluded by other object, it won't be rendered if this property is manually set to false. Similarly, if the object is occluded by other objects and isOccluded() returns true, this manual visibility setting can stay true, since it is user's preference. By default this property is true.

Returns
True if rendering is enabled, false otherwise.

Definition at line 2088 of file PureObject3D.cpp.

◆ isStickedToScreen()

TPureBool PureObject3D::isStickedToScreen ( ) const

Gets the sticked-to-screen state.

This property is currently ignored for level-2 objects, they inherit this property from their level-1 parent object. By default this property is false.

Returns
True if sticked to screen, false otherwise.

Definition at line 2340 of file PureObject3D.cpp.

◆ isTestingAgainstZBuffer()

TPureBool PureObject3D::isTestingAgainstZBuffer ( ) const

Gets whether we test against the Z-Buffer while rendering.

This property is currently ignored for level-2 objects, they inherit this property from their level-1 parent object. By default this property is true.

Returns
True if we test against the Z-Buffer while rendering, false otherwise.

Definition at line 2315 of file PureObject3D.cpp.

◆ isWireframed()

TPureBool PureObject3D::isWireframed ( ) const

Gets the wireframed state.

This property is currently ignored for level-2 objects, they inherit this property from their level-1 parent object. By default this property is false.

Returns
True if wireframed, false otherwise.

Definition at line 2237 of file PureObject3D.cpp.

◆ isWireframedCulled()

TPureBool PureObject3D::isWireframedCulled ( ) const

Gets the wireframed culling state.

This property is currently ignored for level-2 objects, they inherit this property from their level-1 parent object. By default this property is false.

Returns
True if culling is enabled in wireframed state, false otherwise.

Definition at line 2264 of file PureObject3D.cpp.

◆ operator=()

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

Definition at line 2594 of file PureObject3D.cpp.

◆ recalculateBiggestAreaScaled()

TPureFloat PureObject3D::recalculateBiggestAreaScaled ( )

Recalculates biggest area of object on either plane (XY, XZ or YZ), scaled by current scaling factor.

This function is automatically called when scaling factor is changed or when setVertexTransferMode() is invoked. However, getBiggestAreaScaled() may sometimes give you stale result, for example, after you change the mesh geometry (e.g. through accessing them with PureMesh3D::getVertices() ), and don't invoke setVertexTransferMode() to upload changed geometry to host (e.g. because you keep geometry in client memory). In such case it is recommended to invoke this function yourself. This value is used by the engine to determine which object should be an occluder. Although occluder state can be turned on or off manually by SetOccluder(), the engine automatically sets this state whenever recalculateBiggestAreaScaled() is invoked either automatically or manually.

Returns
The recalculated biggest area, scaled by current scaling factor.

Definition at line 2072 of file PureObject3D.cpp.

◆ ResetLastTransferredCounts()

void PureObject3D::ResetLastTransferredCounts ( )
protectedvirtual

Reset counters used for measuring number of vertices, triangles, etc.

Same functionality as defined originally in PureVertexTransfer::ResetLastTransferredCounts() but extended with awareness of:

sent to the graphics pipeline by the last transferVertices().

  • optional bounding box object;
  • referred object in case of cloned object. If there is a bounding box object, its counters should be reset. If this is a cloned object, this function resets the last transferred counts of the referred object since the transfer actually happens by the referred object, so counting also happens there, so we should reset those values.

Reimplemented from PureVertexTransfer.

Definition at line 2608 of file PureObject3D.cpp.

◆ Scale() [1/2]

void PureObject3D::Scale ( const PureVector & value)

Scales by the given vector.

Scaling factor is currently ignored for level-2 objects, they are scaled by the same factor as their level-1 parent object. By default this property is (1.0f, 1.0f, 1.0f).

Parameters
valueThe vector to be scalen by.

Definition at line 2037 of file PureObject3D.cpp.

◆ Scale() [2/2]

void PureObject3D::Scale ( TPureFloat value)

Scales by the given scalar value.

Scaling factor is currently ignored for level-2 objects, they are scaled by the same factor as their level-1 parent object. By default this property is (1.0f, 1.0f, 1.0f).

Parameters
valueThe factor to be scalen by.

Definition at line 2024 of file PureObject3D.cpp.

◆ SetAffectingZBuffer()

void PureObject3D::SetAffectingZBuffer ( TPureBool value)

Sets whether we write to the Z-Buffer while rendering.

This property is currently ignored for level-2 objects, they inherit this property from their level-1 parent object. By default this property is true. If set to false, the object's occluder state will be also forced to false.

Parameters
valueThe desired state.

Definition at line 2303 of file PureObject3D.cpp.

◆ SetColliding_TO_BE_REMOVED()

void PureObject3D::SetColliding_TO_BE_REMOVED ( TPureBool value)

Sets whether colliding is enabled.

Legacy function unrelated to the purpose of this class, will need to be removed! By default this property is false.

Parameters
valueThe desired state.

Definition at line 2150 of file PureObject3D.cpp.

◆ SetDoubleSided()

void PureObject3D::SetDoubleSided ( TPureBool value)

Sets the double sided state.

This property is currently ignored for level-2 objects, they inherit this property from their level-1 parent object. By default this property is false.

Parameters
valueThe desired state.

Definition at line 2225 of file PureObject3D.cpp.

◆ SetLit()

void PureObject3D::SetLit ( TPureBool value)

Sets the lit state.

This property is currently ignored for level-2 objects, they inherit this property from their level-1 parent object. By default this property is true.

Parameters
valueThe desired state.

Definition at line 2200 of file PureObject3D.cpp.

◆ SetOccluder()

void PureObject3D::SetOccluder ( TPureBool value)

Sets whether this object should be considered as an occluder during rendering.

Occluders are rendered before non-occluder objects. This property is currently ignored for level-2 objects, they inherit this property from their level-1 parent object. By default this property is decided based on the size of the object compared to other objects. The following properties are incompatible with occluder state:

  • hidden by user;
  • wireframed;
  • having blended material;
  • not affecting z-buffer;
  • sticked-to-screen. Setting occluder state to true will be ignored when an Object3D already has any of the above properties.

Note that renderer might invoke PureObject3DManager::UpdateOccluderStates() that can override your manual setting. This function is mostly for the engine to switch occluder state, not for the user. In the future this might change though.

Parameters
valueThe desired state.

Definition at line 2399 of file PureObject3D.cpp.

◆ SetOcclusionTested()

void PureObject3D::SetOcclusionTested ( TPureBool state)

Sets whether this object should be tested if it is occluded or not.

Sets whether this object should be tested for occlusion or not.

Creates or deletes an occlusion query object and bounding box for the given object. If it failes to generate occlusion query id, the object won't be tested for occlusion later. Check state with isOcclusionTested() member function. This property is currently ignored for level-2 objects, they inherit this property from their level-1 parent object.

Important: if you turn occlusion testing off for an object referred by other cloned objects, the occlusion testing is also implicitly turned off for those referring cloned objects. However, later you can still turn occlusion testing on for the specific cloned objects if you want to, without affecting the occlusion testing state of the original object referred by the cloned object.

Occlusion status of objects having occlusion test enabled are continuously checked by renderer, so rendering the scene is needed to have these test done. The result can be obtained with isOccluded() member function after rendering at least a few frames. The renderer can optimize scene rendering by not skipping occluded objects, however occlusion testing is needed to decide if an object is occluded or not. Too many occlusion tests might also impact performance negatively, hence it is not recommended to turn occlusion testing on for every single objects in the scene.

By default this property is decided based on the geometric complexity of the object.

Occlusion tests are curently based on hardware occlusion queries, so this is not available on all hardware. Usually it is available since 2003 on desktop computers. Mobile is not yet supported by PURE. Occlusion tests are not supported when software rendering is active.

Exceptions
std::runtime_error- In case of inability of creating bounding box object or if this object instance doesn't have manager associated.

Definition at line 2459 of file PureObject3D.cpp.

◆ SetRenderingAllowed()

void PureObject3D::SetRenderingAllowed ( TPureBool state)

Sets if rendering is allowed.

If rendering is not allowed, it is not rendered. This property is manual user setting, not related to any visibility testing that might be done by renderer. This means that even if the object is seen by the camera, not occluded by other object, it won't be rendered if this property is manually set to false. Similarly, if the object is occluded by other objects and isOccluded() returns true, this manual visibility state can stay true, since it is user's preference. By default this property is true. If set to false, the object's occluder state will be also forced to false.

Parameters
valueThe desired state: true to let the object be rendered, false to hide (skip rendering) it.

Definition at line 2105 of file PureObject3D.cpp.

◆ SetRotationOrder()

void PureObject3D::SetRotationOrder ( TPURE_ROTATION_ORDER value)

Sets the rotation order.

Rotation order is currently ignored for level-2 objects, they are rotated the same way as their level-1 parent object. By default this property is PURE_YXZ.

Parameters
valueThe desired state.

Definition at line 2175 of file PureObject3D.cpp.

◆ SetScaling() [1/2]

void PureObject3D::SetScaling ( const PureVector & value)

Sets the scaling factor to given vector.

Scaling factor is currently ignored for level-2 objects, they are scaled by the same factor as their level-1 parent object. By default this property is (1.0f, 1.0f, 1.0f).

Parameters
valueThe desired scaling factor.

Definition at line 2011 of file PureObject3D.cpp.

◆ SetScaling() [2/2]

void PureObject3D::SetScaling ( TPureFloat value)

Sets the scaling factor to given scalar.

Scaling factor is currently ignored for level-2 objects, they are scaled by the same factor as their level-1 parent object. By default this property is (1.0f, 1.0f, 1.0f).

Parameters
valueThe desired scaling factor.

Definition at line 1998 of file PureObject3D.cpp.

◆ SetStickedToScreen()

void PureObject3D::SetStickedToScreen ( TPureBool value)

Sets the sticked-to-screen state.

Sticked to screen means the object is rendered with orthogonal projection and not overlapped by non-sticked objects. Suitable for 2D object rendering such as GUI elements. Note that this call not only changes sticked state of the object but also calls the following methods:

  • SetDoubleSided(true);
  • SetLit(false);
  • SetTestingAgainstZBuffer(false). This property is currently ignored for level-2 objects, they inherit this property from their level-1 parent object. By default this property is false. If set to true, the object's occluder state will be forced to false.
Parameters
valueThe desired state.

Definition at line 2360 of file PureObject3D.cpp.

◆ SetTestingAgainstZBuffer()

void PureObject3D::SetTestingAgainstZBuffer ( TPureBool value)

Sets whether we test against the Z-Buffer while rendering.

This property is currently ignored for level-2 objects, they inherit this property from their level-1 parent object. By default this property is true.

Parameters
valueThe desired state.

Definition at line 2328 of file PureObject3D.cpp.

◆ setVertexTransferMode()

TPureBool PureObject3D::setVertexTransferMode ( TPURE_VERTEX_TRANSFER_MODE vtrans)
virtual

Sets vertex transfer mode.

The details of this function are described in PureVertexTransfer class.

Same functionality as defined originally in PureVertexTransfer::setVertexTransferMode() but extended with a check for being a cloned object or not. This function has no effect when called for a cloned object.

Parameters
vtransVertex referencing mode to be set.
Returns
True on success, false otherwise, including if called for a cloned object.

Reimplemented from PureVertexTransfer.

Definition at line 1787 of file PureObject3D.cpp.

◆ SetWireframed()

void PureObject3D::SetWireframed ( TPureBool value)

Sets the wireframed state.

This property is currently ignored for level-2 objects, they inherit this property from their level-1 parent object. By default this property is false. If set to true, the object's occluder state will be forced to false.

Parameters
valueThe desired state.

Definition at line 2251 of file PureObject3D.cpp.

◆ SetWireframedCulled()

void PureObject3D::SetWireframedCulled ( TPureBool value)

Sets the wireframed culling state.

This property is currently ignored for level-2 objects, they inherit this property from their level-1 parent object. By default this property is false.

Parameters
valueThe desired state.

Definition at line 2277 of file PureObject3D.cpp.

◆ Show()

void PureObject3D::Show ( )

Enables rendering of this object.

Equivalent to SetRenderingAllowed(true). See the details there.

Definition at line 2115 of file PureObject3D.cpp.

Friends And Related Symbol Documentation

◆ PureObject3DManager

friend class PureObject3DManager
friend

Definition at line 209 of file PureObject3DManager.h.

Member Data Documentation

◆ pImpl

PureObject3DImpl* PureObject3D::pImpl
private

Definition at line 207 of file PureObject3DManager.h.


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