SLProject  4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
SLNodeStats Struct Reference

Struct for scene graph statistics. More...

#include <SLNode.h>

Public Member Functions

void clear ()
 Resets all counters to zero. More...
 
void print () const
 Prints all statistic informations on the std out stream. More...
 

Public Attributes

SLuint numNodes
 NO. of children nodes. More...
 
SLuint numBytes
 NO. of bytes allocated. More...
 
SLuint numBytesAccel
 NO. of bytes in accel. structs. More...
 
SLuint numNodesGroup
 NO. of group nodes. More...
 
SLuint numNodesLeaf
 NO. of leaf nodes. More...
 
SLuint numNodesOpaque
 NO. of visible opaque nodes. More...
 
SLuint numNodesBlended
 NO. of visible blended nodes. More...
 
SLuint numMeshes
 NO. of meshes in node. More...
 
SLuint numLights
 NO. of lights in mesh. More...
 
SLuint numTriangles
 NO. of triangles in mesh. More...
 
SLuint numLines
 NO. of lines in mesh. More...
 
SLuint numVoxels
 NO. of voxels. More...
 
SLfloat numVoxEmpty
 NO. of empty voxels. More...
 
SLuint numVoxMaxTria
 Max. no. of triangles per voxel. More...
 
SLuint numAnimations
 NO. of animations. More...
 

Detailed Description

Struct for scene graph statistics.

The SLNodeStats struct holds some statistics that are set in the recursive SLNode::statsRec method.

Definition at line 36 of file SLNode.h.

Member Function Documentation

◆ clear()

void SLNodeStats::clear ( )
inline

Resets all counters to zero.

Definition at line 55 of file SLNode.h.

56  {
57  numNodes = 0;
58  numBytes = 0;
59  numBytesAccel = 0;
60  numNodesGroup = 0;
61  numNodesLeaf = 0;
62  numMeshes = 0;
63  numLights = 0;
64  numTriangles = 0;
65  numLines = 0;
66  numVoxels = 0;
67  numVoxEmpty = 0.0f;
68  numVoxMaxTria = 0;
69  numAnimations = 0;
70  }
SLuint numVoxMaxTria
Max. no. of triangles per voxel.
Definition: SLNode.h:51
SLuint numBytesAccel
NO. of bytes in accel. structs.
Definition: SLNode.h:40
SLuint numMeshes
NO. of meshes in node.
Definition: SLNode.h:45
SLuint numNodes
NO. of children nodes.
Definition: SLNode.h:38
SLuint numLights
NO. of lights in mesh.
Definition: SLNode.h:46
SLuint numTriangles
NO. of triangles in mesh.
Definition: SLNode.h:47
SLuint numAnimations
NO. of animations.
Definition: SLNode.h:52
SLuint numNodesLeaf
NO. of leaf nodes.
Definition: SLNode.h:42
SLuint numVoxels
NO. of voxels.
Definition: SLNode.h:49
SLuint numLines
NO. of lines in mesh.
Definition: SLNode.h:48
SLuint numNodesGroup
NO. of group nodes.
Definition: SLNode.h:41
SLuint numBytes
NO. of bytes allocated.
Definition: SLNode.h:39
SLfloat numVoxEmpty
NO. of empty voxels.
Definition: SLNode.h:50

◆ print()

void SLNodeStats::print ( ) const
inline

Prints all statistic informations on the std out stream.

Definition at line 73 of file SLNode.h.

74  {
75  SLfloat voxelsEmpty = numVoxels ? (SLfloat)numVoxEmpty /
76  (SLfloat)numVoxels * 100.0f
77  : 0;
78  SLfloat avgTriPerVox = numVoxels ? (SLfloat)numTriangles /
80  : 0;
81  SL_LOG("Voxels : %d", numVoxels);
82  SL_LOG("Voxels empty : %4.1f%%", voxelsEmpty);
83  SL_LOG("Avg. Tria/Voxel: %4.1f", avgTriPerVox);
84  SL_LOG("Max. Tria/Voxel: %d", numVoxMaxTria);
85  SL_LOG("MB Meshes : %f", (SLfloat)numBytes / 1000000.0f);
86  SL_LOG("MB Accel. : %f", (SLfloat)numBytesAccel / 1000000.0f);
87  SL_LOG("Group Nodes : %d", numNodesGroup);
88  SL_LOG("Leaf Nodes : %d", numNodesLeaf);
89  SL_LOG("Meshes : %d", numMeshes);
90  SL_LOG("Triangles : %d", numTriangles);
91  SL_LOG("Lights : %d\n", numLights);
92  }
float SLfloat
Definition: SL.h:173
#define SL_LOG(...)
Definition: SL.h:233

Member Data Documentation

◆ numAnimations

SLuint SLNodeStats::numAnimations

NO. of animations.

Definition at line 52 of file SLNode.h.

◆ numBytes

SLuint SLNodeStats::numBytes

NO. of bytes allocated.

Definition at line 39 of file SLNode.h.

◆ numBytesAccel

SLuint SLNodeStats::numBytesAccel

NO. of bytes in accel. structs.

Definition at line 40 of file SLNode.h.

◆ numLights

SLuint SLNodeStats::numLights

NO. of lights in mesh.

Definition at line 46 of file SLNode.h.

◆ numLines

SLuint SLNodeStats::numLines

NO. of lines in mesh.

Definition at line 48 of file SLNode.h.

◆ numMeshes

SLuint SLNodeStats::numMeshes

NO. of meshes in node.

Definition at line 45 of file SLNode.h.

◆ numNodes

SLuint SLNodeStats::numNodes

NO. of children nodes.

Definition at line 38 of file SLNode.h.

◆ numNodesBlended

SLuint SLNodeStats::numNodesBlended

NO. of visible blended nodes.

Definition at line 44 of file SLNode.h.

◆ numNodesGroup

SLuint SLNodeStats::numNodesGroup

NO. of group nodes.

Definition at line 41 of file SLNode.h.

◆ numNodesLeaf

SLuint SLNodeStats::numNodesLeaf

NO. of leaf nodes.

Definition at line 42 of file SLNode.h.

◆ numNodesOpaque

SLuint SLNodeStats::numNodesOpaque

NO. of visible opaque nodes.

Definition at line 43 of file SLNode.h.

◆ numTriangles

SLuint SLNodeStats::numTriangles

NO. of triangles in mesh.

Definition at line 47 of file SLNode.h.

◆ numVoxels

SLuint SLNodeStats::numVoxels

NO. of voxels.

Definition at line 49 of file SLNode.h.

◆ numVoxEmpty

SLfloat SLNodeStats::numVoxEmpty

NO. of empty voxels.

Definition at line 50 of file SLNode.h.

◆ numVoxMaxTria

SLuint SLNodeStats::numVoxMaxTria

Max. no. of triangles per voxel.

Definition at line 51 of file SLNode.h.


The documentation for this struct was generated from the following file: