Class ConstantVerifierState

java.lang.Object
com.jme3.app.state.BaseAppState
com.jme3.app.state.ConstantVerifierState
All Implemented Interfaces:
AppState

public class ConstantVerifierState extends BaseAppState
Checks the various JME 'constants' for drift using either asserts or straight checks. The list of constants can also be configured but defaults to the standard JME Vector3f, Quaternion, etc. constants.
  • Constructor Details

    • ConstantVerifierState

      public ConstantVerifierState()
      Creates a verifier app state that will check all of the default constant checks using asserts.
    • ConstantVerifierState

      public ConstantVerifierState(ConstantVerifierState.ErrorType errorType)
      Creates a verifier app state that will check all of the default constant checks using the specified error reporting mechanism.
      Parameters:
      errorType - the mechanism to use
  • Method Details

    • addChecker

      public void addChecker(Object constant, Object goodValue)
    • setErrorType

      public void setErrorType(ConstantVerifierState.ErrorType errorType)
    • getErrorType

      public ConstantVerifierState.ErrorType getErrorType()
    • initialize

      protected void initialize(Application app)
      Description copied from class: BaseAppState
      Called during initialization once the app state is attached and before onEnable() is called.
      Specified by:
      initialize in class BaseAppState
      Parameters:
      app - the application
    • cleanup

      protected void cleanup(Application app)
      Description copied from class: BaseAppState
      Called after the app state is detached or during application shutdown if the state is still attached. onDisable() is called before this cleanup() method if the state is enabled at the time of cleanup.
      Specified by:
      cleanup in class BaseAppState
      Parameters:
      app - the application
    • onEnable

      protected void onEnable()
      Description copied from class: BaseAppState
      Called when the state is fully enabled, ie: is attached and isEnabled() is true or when the setEnabled() status changes after the state is attached.
      Specified by:
      onEnable in class BaseAppState
    • onDisable

      protected void onDisable()
      Description copied from class: BaseAppState
      Called when the state was previously enabled but is now disabled either because setEnabled(false) was called or the state is being cleaned up.
      Specified by:
      onDisable in class BaseAppState
    • postRender

      public void postRender()
      Description copied from interface: AppState
      Called after all rendering commands are flushed. This method will be called every render pass if the AppState is both attached and enabled.
      Specified by:
      postRender in interface AppState
      Overrides:
      postRender in class BaseAppState
    • checkValues

      protected void checkValues()