Class ExampleBase

java.lang.Object
com.ardor3d.example.ExampleBase
All Implemented Interfaces:
Scene, Updater, Runnable
Direct Known Subclasses:
AnimationBlinnPhongExample, AnimationCopyExample, AnimationDemoExample, AnimationStateExample, ArrayTerrainExample, AtlasExample, AtlasExampleMultiTextured, BillboardNodeExample, BillboardNodeZExample, BloomExample, BMTextExample, BoxExample, BubbleMarkUIExample, ClipStateExample, ColladaExample, ColladaManualAnimationExample, CollisionTreeExample, CombinerExample, DegenerateTrianglesExample, DisplayListDelegateExample, DisplayListExample, ExportImportExample, ExtrusionExample, GeneratedTexturesExample, GeometryInstancingExample, GLSLRibbonExample, ImageMapTerrainExample, InMemoryTerrainExample, InteractExample, InteractUIExample, InterpolationControllerBase, LineExample, MandelbrotExplorerExample, ManyCollisionsExample, ManyLightsExample, MaterialFaceExample, MatrixLookAtExample, MeshDataSharingExample, MountainShadowTerrainExample, MouseManagerExample, MultiPassTextureExample, MultiStripExample, NewDynamicSmokerExample, OrbitCamExample, ParallelSplitShadowMapExample, ParticleRampExample, ParticleSwarmExample, ParticleSystemExample, PointCubeExample, PointsExample, PointSpritesExample, PopOverUIExample, PrimitiveSkeletonExample, ProceduralTerrainExample, ProjectedGridExample, ProjectedGridWaterExample, QuadImposterExample, RenderEffectsExample, RenderQueueExample, RenderTextureCubeMapExample, RenderTextureSideBySideExample, RotatingUIExample, RTTShaderExample, ShadowedTerrainExample, ShapesExample, ShapesPlusProceduralTerrainExample, SimpleColladaExample, SimpleMd2Example, SimpleMd3Example, SimpleObjExample, SimpleOffExample, SimplePlyExample, SimpleStlExample, SimpleUIExample, SphereComparisonsExample, StereoExample, SwitchNodeExample, TerrainInteractExample, TerrainWaterExample, TexCombineExample, Texture3DExample, TextureProjectionExample, TrailExample, UpdateTextureExample, VBOSpeedExample, ViewportExample, WaterExample, WireframeGeometryShaderExample, ZupTerrainExample

public abstract class ExampleBase extends Object implements Runnable, Updater, Scene
  • Field Details

    • QUIT_VM_ON_EXIT

      public static boolean QUIT_VM_ON_EXIT
      If true (the default) we will call System.exit on end of demo.
    • _logicalLayer

      protected final LogicalLayer _logicalLayer
    • _physicalLayer

      protected PhysicalLayer _physicalLayer
    • _timer

      protected final Timer _timer
    • _frameHandler

      protected final FrameHandler _frameHandler
    • _settings

      protected DisplaySettings _settings
    • _root

      protected final Node _root
    • _lightState

      protected LightState _lightState
    • _wireframeState

      protected WireframeState _wireframeState
    • _exit

      protected volatile boolean _exit
    • _stereo

      protected static boolean _stereo
    • _showBounds

      protected boolean _showBounds
    • _showNormals

      protected boolean _showNormals
    • _showDepth

      protected boolean _showDepth
    • _doShot

      protected boolean _doShot
    • _canvas

      protected NativeCanvas _canvas
    • _screenShotExp

      protected ScreenShotImageExporter _screenShotExp
    • _mouseManager

      protected MouseManager _mouseManager
    • _controlHandle

      protected FirstPersonControl _controlHandle
    • _worldUp

      protected Vector3 _worldUp
    • light

      protected PointLight light
    • _minDepthBits

      protected static int _minDepthBits
    • _minAlphaBits

      protected static int _minAlphaBits
    • _minStencilBits

      protected static int _minStencilBits
  • Constructor Details

    • ExampleBase

      public ExampleBase()
  • Method Details

    • run

      public void run()
      Specified by:
      run in interface Runnable
    • exit

      public void exit()
    • init

      public void init()
      Specified by:
      init in interface Updater
    • initExample

      protected abstract void initExample()
    • update

      public void update(ReadOnlyTimer timer)
      Specified by:
      update in interface Updater
    • updateLogicalLayer

      protected void updateLogicalLayer(ReadOnlyTimer timer)
    • updateExample

      protected void updateExample(ReadOnlyTimer timer)
    • renderUnto

      public boolean renderUnto(Renderer renderer)
      Specified by:
      renderUnto in interface Scene
      Parameters:
      renderer - the renderer
      Returns:
      true if a render occurred and we should swap the buffers.
    • renderExample

      protected void renderExample(Renderer renderer)
    • renderDebug

      protected void renderDebug(Renderer renderer)
    • doPick

      public PickResults doPick(Ray3 pickRay)
      Description copied from interface: Scene
      A scene should be able to handle a pick execution as it is the only thing that has a complete picture of the scenegraph(s).
      Specified by:
      doPick in interface Scene
      Parameters:
      pickRay - the pick ray
      Returns:
      the pick results
    • processPicks

      protected void processPicks(PrimitivePickResults pickResults)
    • quit

      protected void quit(Renderer renderer)
    • start

      public static void start(Class<? extends ExampleBase> exampleClazz)
    • getAttributes

      protected PropertiesGameSettings getAttributes(PropertiesGameSettings settings)
    • registerInputTriggers

      protected void registerInputTriggers()