|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.j3d.renderer.aviatrix3d.util.PerformanceMonitor
public class PerformanceMonitor
Utility class for watching the performance of the application (measured by frame rate) and then issuing notifications on when to upgrade or downgrade the rendering infrastructure to keep it within the goal bounds.
The system collects a set of listeners that register with the monitor and provide their own priority. A higher priority listener will be called before a lower priority listener for updates to both upgrade and downgrade their performance.
Internationalisation Resource Names
Constructor Summary | |
---|---|
PerformanceMonitor()
Create a new monitor instance. |
Method Summary | |
---|---|
void |
addPerformanceListener(SystemPerformanceListener l,
int priority)
Add a system performance listener to the list to be processed. |
void |
appShutdown()
Notification that the AV3D internal shutdown handler has detected a system-wide shutdown. |
float |
getMaximumFrameRate()
Get the current maximum acceptable frame rate. |
float |
getMinimumFrameRate()
Get the current minimum acceptable frame rate. |
int |
getUpdateInterval()
Get the current checking interval. |
void |
removePerformanceListener(SystemPerformanceListener l)
Remove a system performance listener from the current processing list. |
void |
setMaximumFrameRate(float fps)
Get the current maximum acceptable frame rate. |
void |
setMinimumFrameRate(float fps)
Get the current minimum acceptable frame rate. |
void |
setUpdateInterval(int interval)
Set the update interval. |
void |
updateMetrics()
Notification that now is a good time to update the scene graph. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PerformanceMonitor()
Method Detail |
---|
public void updateMetrics()
public void appShutdown()
public int getUpdateInterval()
public void setUpdateInterval(int interval) throws java.lang.IllegalArgumentException
interval
- The new interval value to set. Must be > zero
java.lang.IllegalArgumentException
- The value was not positivepublic float getMinimumFrameRate()
public void setMinimumFrameRate(float fps) throws java.lang.IllegalArgumentException
fps
- The frames per second number
java.lang.IllegalArgumentException
- The value was negative or greater than
or equal to the max FPSpublic float getMaximumFrameRate()
public void setMaximumFrameRate(float fps) throws java.lang.IllegalArgumentException
fps
- The frames per second number
java.lang.IllegalArgumentException
- The value was negative or less than or
equal to the minimum FPSpublic void addPerformanceListener(SystemPerformanceListener l, int priority)
l
- The new listener instance to be handledpublic void removePerformanceListener(SystemPerformanceListener l)
l
- The listener instance to be removed
|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |