WebLVC 1.7d API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes
MAKVrExchange::DtFrameTimer Class Reference

Classes

struct  SectionInfo
 Stores timing info for a single frame section. More...
 

Public Types

enum  FrameSectionType {
  FRAME, INTERNAL, EXTERNAL, MESSAGE_PROC,
  TRANSLATION, OUT_OF_FRAME, EXTERNAL_OTHER, FRAME_OTHER,
  USER_START
}
 Enumerates the default frame section types. More...
 
typedef DtFrameTimer *(* DtFrameTimerCreator )(DtPortalConnection *)
 
typedef std::map
< FrameSectionType,
SectionInfo
SectionInfoMap
 

Public Member Functions

virtual ~DtFrameTimer ()
 Virtual DTOR. More...
 
virtual void markFrameStart ()
 Tells the timer that a frame is beginning. More...
 
virtual void markFrameEnd ()
 Tells the timer that a frame is ending. More...
 
virtual void markStart (FrameSectionType section)
 Tells the timer that a frame section is starting. More...
 
virtual void markEnd (FrameSectionType section)
 Tells the timer that a frame section is ending. More...
 
virtual void generateReport ()
 Generates a report based on the recorded statistics since the last report. More...
 
virtual void printFrameStatistics ()
 Prints the statistics from the last report to DtInfo. More...
 
virtual const SectionInfoMapsectionInfo () const
 Accessor for the section info map (read-only). More...
 
virtual double fps () const
 Accessor for the FPS. More...
 

Static Public Member Functions

static DtFrameTimercreate (DtPortalConnection *portalConn)
 Default creation method for instantiating frame timers. More...
 

Static Public Attributes

static DtFrameTimerCreator theFrameTimerCreator
 Storage for the method used to create the frame timer. More...
 

Protected Member Functions

 DtFrameTimer (DtPortalConnection *portalConn)
 CTOR. More...
 
virtual DtString roundPercent (double percent)
 Converts fraction to percent, rounds to int, & appends %. More...
 

Protected Attributes

SectionInfoMap mySectionInfo
 
unsigned int myFrameCounter
 
unsigned int myLastFrameCount
 
DtTime myLastReportTime
 
double myFps
 
DtPortalConnectionmyPortalConn
 

Member Typedef Documentation

typedef DtFrameTimer*(* MAKVrExchange::DtFrameTimer::DtFrameTimerCreator)(DtPortalConnection *)

Member Enumeration Documentation

Enumerates the default frame section types.

Enumerator
FRAME 
INTERNAL 
EXTERNAL 
MESSAGE_PROC 
TRANSLATION 
OUT_OF_FRAME 
EXTERNAL_OTHER 
FRAME_OTHER 
USER_START 

Constructor & Destructor Documentation

virtual MAKVrExchange::DtFrameTimer::~DtFrameTimer ( )
virtual

Virtual DTOR.

MAKVrExchange::DtFrameTimer::DtFrameTimer ( DtPortalConnection portalConn)
protected

CTOR.

Member Function Documentation

static DtFrameTimer* MAKVrExchange::DtFrameTimer::create ( DtPortalConnection portalConn)
static

Default creation method for instantiating frame timers.

virtual double MAKVrExchange::DtFrameTimer::fps ( ) const
virtual

Accessor for the FPS.

Note: Should only be called after a generateReport() call and before the next frame start.

virtual void MAKVrExchange::DtFrameTimer::generateReport ( )
virtual

Generates a report based on the recorded statistics since the last report.

Frame and section times and percentages are averaged over the number of frames elapsed since the last report was generated.

virtual void MAKVrExchange::DtFrameTimer::markEnd ( FrameSectionType  section)
virtual

Tells the timer that a frame section is ending.

virtual void MAKVrExchange::DtFrameTimer::markFrameEnd ( )
virtual

Tells the timer that a frame is ending.

virtual void MAKVrExchange::DtFrameTimer::markFrameStart ( )
virtual

Tells the timer that a frame is beginning.

virtual void MAKVrExchange::DtFrameTimer::markStart ( FrameSectionType  section)
virtual

Tells the timer that a frame section is starting.

virtual void MAKVrExchange::DtFrameTimer::printFrameStatistics ( )
virtual

Prints the statistics from the last report to DtInfo.

virtual DtString MAKVrExchange::DtFrameTimer::roundPercent ( double  percent)
protectedvirtual

Converts fraction to percent, rounds to int, & appends %.

virtual const SectionInfoMap& MAKVrExchange::DtFrameTimer::sectionInfo ( ) const
virtual

Accessor for the section info map (read-only).

Note: Should only be called after a generateReport() call and before the next frame start.

Member Data Documentation

double MAKVrExchange::DtFrameTimer::myFps
protected
unsigned int MAKVrExchange::DtFrameTimer::myFrameCounter
protected
unsigned int MAKVrExchange::DtFrameTimer::myLastFrameCount
protected
DtTime MAKVrExchange::DtFrameTimer::myLastReportTime
protected
DtPortalConnection* MAKVrExchange::DtFrameTimer::myPortalConn
protected
SectionInfoMap MAKVrExchange::DtFrameTimer::mySectionInfo
protected
DtFrameTimerCreator MAKVrExchange::DtFrameTimer::theFrameTimerCreator
static

Storage for the method used to create the frame timer.

Overridden frame timer creators can be set here in order to use a customized frame timer. Make sure the creator is set here before the broker begins processing messages to ensure it is used.


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

Document ID: Generated on Wed Jun 21 15:05:44 EDT 2023 from SVN revision 256253
Copyright © 2005-2023 MAK Technologies. All Rights Reserved (www.mak.com)