Public Member Functions | Static Public Member Functions | Properties

CC3PerformanceStatistics Class Reference

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

#import <CC3PerformanceStatistics.h>

Inheritance diagram for CC3PerformanceStatistics:
Inheritance graph
[legend]

List of all members.

Public Member Functions

(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

Static Public Member Functions

(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 world.

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.


Member Function 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 [read, assign]

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

- (ccTime) accumulatedUpdateTime [read, assign]

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

- (GLfloat) averageDrawingCallsMadePerFrame [read, assign]

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

- (GLfloat) averageFacesPresentedPerFrame [read, assign]

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 [read, assign]

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 [read, assign]

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

- (GLfloat) averageNodesUpdatedPerUpdate [read, assign]

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

- (GLfloat) averageNodesVisitedForDrawingPerFrame [read, assign]

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 [read, assign]

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

- (GLuint) facesPresented [read, assign]

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 [read, assign]

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

- (GLuint) framesHandled [read, assign]

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

- (GLuint) nodesDrawn [read, assign]

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 [read, assign]

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

- (GLuint) nodesUpdated [read, assign]

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

- (GLuint) nodesVisitedForDrawing [read, assign]

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 [read, assign]

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

- (GLuint) updatesHandled [read, assign]

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: