v2.0.2
Instance Methods | Class Methods | Properties | List of all members
CC3PerformanceStatistics Class Reference

#import <CC3PerformanceStatistics.h>

Inheritance diagram for CC3PerformanceStatistics:
Inheritance graph
[legend]

Instance Methods

(void) - addDrawingCallsMade:
 
(void) - addFacesPresented:
 
(void) - addFrameTime:
 
(void) - addNodesDrawn:
 
(void) - addNodesTransformed:
 
(void) - addNodesUpdated:
 
(void) - addNodesVisitedForDrawing:
 
(void) - addSingleCallFacesPresented:
 
(void) - addUpdateTime:
 
(NSString *) - fullDescription
 
(void) - incrementNodesDrawn
 
(void) - incrementNodesTransformed
 
(void) - incrementNodesUpdated
 
(void) - incrementNodesVisitedForDrawing
 
(void) - reset
 

Class Methods

(id) + statistics
 

Properties

CCTime accumulatedFrameTime
 
CCTime accumulatedUpdateTime
 
GLfloat averageDrawingCallsMadePerFrame
 
GLfloat averageFacesPresentedPerFrame
 
GLfloat averageNodesDrawnPerFrame
 
GLfloat averageNodesTransformedPerUpdate
 
GLfloat averageNodesUpdatedPerUpdate
 
GLfloat averageNodesVisitedForDrawingPerFrame
 
GLuint drawingCallsMade
 
GLuint facesPresented
 
GLfloat frameRate
 
GLuint framesHandled
 
GLuint nodesDrawn
 
GLuint nodesTransformed
 
GLuint nodesUpdated
 
GLuint nodesVisitedForDrawing
 
GLfloat updateRate
 
GLuint updatesHandled
 

Detailed Description

Collects statistics about the updating and drawing performance of the 3D scene.

To allow flexibility in calculating statistics, this class does not automatically clear the accumulated statistics. It is the responsibility of the application to read the values, and invoke the reset method on the instance periodically, to ensure this instance does not overflow. Depending on the complexity and capabilities of your application, you should reset the performance statistics at least every few seconds.

Method Documentation

- (void) addDrawingCallsMade: (GLuint)  callCount

Adds the specified number of drawing calls to the drawingCallsMade property.

- (void) addFacesPresented: (GLuint)  faceCount

Adds the specified number of faces to the facesPresented property.

- (void) addFrameTime: (CCTime)  deltaTime

Adds the specified single-frame delta-time to the accumulated frame time, and increments the count of frame handled by one.

- (void) addNodesDrawn: (GLuint)  nodeCount

Adds the specified number of nodes to the nodesDrawn property.

- (void) addNodesTransformed: (GLuint)  nodeCount

Adds the specified number of nodes to the nodesTransformed property.

- (void) addNodesUpdated: (GLuint)  nodeCount

Adds the specified number of nodes to the nodesUpdated property.

- (void) addNodesVisitedForDrawing: (GLuint)  nodeCount

Adds the specified number of nodes to the nodesVisitedForDrawing property.

- (void) addSingleCallFacesPresented: (GLuint)  faceCount

Canvenience method that adds the specified number of faces to the facesPresented property, and increments by one the number of drawing calls made.

- (void) addUpdateTime: (CCTime)  deltaTime

Adds the specified single-update delta-time to the accumulated update time, and increments the count of updates handled by one.

- (NSString*) fullDescription

Returns a detailed descripton of this instance.

- (void) incrementNodesDrawn

Increments the nodesDrawn property by one.

- (void) incrementNodesTransformed

Increments the nodesTransformed property by one.

- (void) incrementNodesUpdated

Increments the nodesUpdated property by one.

- (void) incrementNodesVisitedForDrawing

Increments the nodesVisitedForDrawing property by one.

- (void) reset

Resets all the performance statistics back to zero.

To allow flexibility in calculating statistics, this class does not automatically clear the accumulated statistics. It is the responsibility of the application to read the values, and invoke the reset method on the instance periodically, to ensure this instance does not overflow. Depending on the complexity and capabilities of your application, you should reset the performance statistics at least every few seconds.

+ (id) statistics

Allocates and initializes an autoreleased instance.

Property Documentation

- (CCTime) accumulatedFrameTime
readnonatomicassign

The total time accumulated for frames since the reset method was last invoked.

- (CCTime) accumulatedUpdateTime
readnonatomicassign

The total time accumulated for updates since the reset method was last invoked.

- (GLfloat) averageDrawingCallsMadePerFrame
readnonatomicassign

The average GL drawing calls made per drawing frame, calculated by dividing the drawingCallsMade property by the framesHandled property.

- (GLfloat) averageFacesPresentedPerFrame
readnonatomicassign

The average number of triangle faces presented to the GL engine per drawing frame, calculated by dividing the facesPresented property by the framesHandled property.

When drawing lines or points, this will be the total number of lines or points presented to the GL engine. This is not necessarily the number of triangles (or other primitives) that were actually drawn, because the GL engine will cull faces that are not visible to the camera.

- (GLfloat) averageNodesDrawnPerFrame
readnonatomicassign

The average nodes drawn per drawing frame, calculated by dividing the nodesDrawn property by the framesHandled property.

The difference between the averageNodesVisitedForDrawingPerFrame property and this property is the average number of nodes per frame that were not visible or were culled and not presented to the GL engine for drawing.

- (GLfloat) averageNodesTransformedPerUpdate
readnonatomicassign

The average nodes whose globalTransformMatrix was recalculated per update, calculated by dividing the nodesTransformed property by the updatesHandled property.

- (GLfloat) averageNodesUpdatedPerUpdate
readnonatomicassign

The average nodes updated per update, calculated by dividing the nodesUpdated property by the updatesHandled property.

- (GLfloat) averageNodesVisitedForDrawingPerFrame
readnonatomicassign

The average nodes visited per drawing frame, calculated by dividing the nodesVisitedForDrawing property by the framesHandled property.

The difference between this property and the averageNodesDrawnPerFrame property is the average number of nodes per frame that were not visible or were culled and not presented to the GL engine for drawing.

- (GLuint) drawingCallsMade
readnonatomicassign

The total number of drawing calls that were made to the GL engine (glDrawArrays & glDrawElements) since the reset method was last invoked.

- (GLuint) facesPresented
readnonatomicassign

The total number of triangle faces presented to the GL engine since the reset method was last invoked.

When drawing lines or points, this will be the total number of lines or points presented to the GL engine. This is not necessarily the number of triangles (or other primitives) that were actually drawn, because the GL engine will cull faces that are not visible to the camera.

- (GLfloat) frameRate
readnonatomicassign

The average drawing frame rate, calculated by dividing the framesHandled property by the accumulatedFrameTime property.

- (GLuint) framesHandled
readnonatomicassign

The number of frames that have been processed since the reset method was last invoked.

- (GLuint) nodesDrawn
readnonatomicassign

The total number of nodes drawn by the GL engine since the reset method was last invoked.

The difference between the nodesVisitedForDrawing property and this property is the total number of nodes that were not visible or were culled and not presented to the GL engine for drawing.

- (GLuint) nodesTransformed
readnonatomicassign

The total number of nodes whose globalTransformMatrix was recalculated since the reset method was last invoked.

- (GLuint) nodesUpdated
readnonatomicassign

The total number of nodes updated since the reset method was last invoked.

- (GLuint) nodesVisitedForDrawing
readnonatomicassign

The total number of nodes visited for drawing since the reset method was last invoked.

This includes both nodes that were drawn, and nodes that were culled prior to drawing.

The difference between this property and the nodesDrawn property is the total number of nodes that were not visible or were culled and not presented to the GL engine for drawing.

- (GLfloat) updateRate
readnonatomicassign

The average update rate, calculated by dividing the updatesHandled property by the accumulatedUpdateTime property.

- (GLuint) updatesHandled
readnonatomicassign

The number of updates that have been processed since the reset method was last invoked.


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