Class QuadImposterNode

java.lang.Object
com.ardor3d.scenegraph.Spatial
com.ardor3d.scenegraph.Node
com.ardor3d.scenegraph.extension.QuadImposterNode
All Implemented Interfaces:
Hintable, Savable

public class QuadImposterNode extends Node
QuadImposterNode
  • Field Details

    • _tRenderer

      protected TextureRenderer _tRenderer
    • _texture

      protected Texture2D _texture
    • _targetScene

      protected Node _targetScene
    • _imposterQuad

      protected Quad _imposterQuad
    • _redrawRate

      protected double _redrawRate
    • _elapsed

      protected double _elapsed
    • _cameraAngleThreshold

      protected double _cameraAngleThreshold
    • _cameraDistanceThreshold

      protected double _cameraDistanceThreshold
    • _haveDrawn

      protected boolean _haveDrawn
    • _worldUpVector

      protected Vector3 _worldUpVector
    • _doUpdate

      protected boolean _doUpdate
    • _cam

      protected Camera _cam
    • _twidth

      protected int _twidth
    • _theight

      protected int _theight
    • _depth

      protected int _depth
    • _samples

      protected int _samples
    • _lastCamDir

      protected final Vector3 _lastCamDir
    • _lastCamDist

      protected double _lastCamDist
    • _corners

      protected Vector3[] _corners
    • _center

      protected final Vector3 _center
    • _extents

      protected final Vector3 _extents
    • _minScreenPos

      protected final Vector2 _minScreenPos
    • _maxScreenPos

      protected final Vector2 _maxScreenPos
    • _minMaxScreenPos

      protected final Vector2 _minMaxScreenPos
    • _maxMinScreenPos

      protected final Vector2 _maxMinScreenPos
    • _tempVec

      protected final Vector3 _tempVec
    • _minZ

      protected double _minZ
    • _nearPlane

      protected double _nearPlane
    • _farPlane

      protected double _farPlane
    • _timer

      protected Timer _timer
  • Constructor Details

    • QuadImposterNode

      public QuadImposterNode()
    • QuadImposterNode

      public QuadImposterNode(String name, int twidth, int theight)
    • QuadImposterNode

      public QuadImposterNode(String name, int twidth, int theight, Timer timer)
    • QuadImposterNode

      public QuadImposterNode(String name, int twidth, int theight, int depth, int samples, Timer timer)
  • Method Details

    • attachChild

      public int attachChild(Spatial child)
      Description copied from class: Node
      attachChild attaches a child to this node. This node becomes the child's parent. The current number of children maintained is returned.
      If the child already had a parent it is detached from that former parent.
      Overrides:
      attachChild in class Node
      Parameters:
      child - the child to attach to this node.
      Returns:
      the number of children maintained by this node.
    • attachChildAt

      public int attachChildAt(Spatial child, int index)
      Description copied from class: Node
      attachChildAt attaches a child to this node at an index. This node becomes the child's parent. The current number of children maintained is returned.
      If the child already had a parent it is detached from that former parent.
      Overrides:
      attachChildAt in class Node
      Parameters:
      child - the child to attach to this node.
      index - the index of the child to be attached.
      Returns:
      the number of children maintained by this node.
    • detachAllChildren

      public void detachAllChildren()
      Description copied from class: Node
      detachAllChildren removes all children attached to this node.
      Overrides:
      detachAllChildren in class Node
    • detachChild

      public int detachChild(Spatial child)
      Description copied from class: Node
      detachChild removes a given child from the node's list. This child will no longe be maintained.
      Overrides:
      detachChild in class Node
      Parameters:
      child - the child to remove.
      Returns:
      the index the child was at. -1 if the child was not in the list.
    • detachChildAt

      public Spatial detachChildAt(int index)
      Description copied from class: Node
      detachChildAt removes a child at a given index. That child is returned for saving purposes.
      Overrides:
      detachChildAt in class Node
      Parameters:
      index - the index of the child to be removed.
      Returns:
      the child at the supplied index.
    • detachChildNamed

      public int detachChildNamed(String childName)
      Description copied from class: Node
      detachChild removes a given child from the node's list. This child will no longe be maintained. Only the first child with a matching name is removed.
      Overrides:
      detachChildNamed in class Node
      Parameters:
      childName - the child to remove.
      Returns:
      the index the child was at. -1 if the child was not in the list.
    • draw

      public void draw(Renderer r)
      Description copied from class: Node
      draw calls the onDraw method for each child maintained by this node.
      Overrides:
      draw in class Node
      Parameters:
      r - the renderer to draw to.
      See Also:
    • updateChildren

      protected void updateChildren(double time)
      Description copied from class: Spatial
      Override to allow objects like Node to update their children.
      Overrides:
      updateChildren in class Node
      Parameters:
      time - The time in seconds between the last two consecutive frames (time per frame). See ReadOnlyTimer.getTimePerFrame()
    • setRedrawRate

      public void setRedrawRate(double rate)
    • getCameraDistanceThreshold

      public double getCameraDistanceThreshold()
    • setCameraDistanceThreshold

      public void setCameraDistanceThreshold(double cameraDistanceThreshold)
    • getCameraAngleThreshold

      public double getCameraAngleThreshold()
    • setCameraAngleThreshold

      public void setCameraAngleThreshold(double cameraAngleThreshold)
    • resetTexture

      public void resetTexture()
    • renderImposter

      public void renderImposter()
    • getWorldUpVector

      public Vector3 getWorldUpVector()
    • setWorldUpVector

      public void setWorldUpVector(Vector3 worldUpVector)
    • write

      public void write(OutputCapsule capsule) throws IOException
      Specified by:
      write in interface Savable
      Overrides:
      write in class Node
      Parameters:
      capsule - the capsule
      Throws:
      IOException - Signals that an I/O exception has occurred.
      See Also:
    • read

      public void read(InputCapsule capsule) throws IOException
      Specified by:
      read in interface Savable
      Overrides:
      read in class Node
      Parameters:
      capsule - the input capsule
      Throws:
      IOException - Signals that an I/O exception has occurred.
      See Also:
    • getTexture

      public Texture getTexture()
    • setDoUpdate

      public void setDoUpdate(boolean doUpdate)
    • isDoUpdate

      public boolean isDoUpdate()