Class FadeNode

All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, IFadeObject, IStarContainer, IVisibilitySwitch, IPosition
Direct Known Subclasses:
AbstractOctreeWrapper, BackgroundModel, GenericCatalog, ParticleGroup, RecursiveGrid, Text2D

public class FadeNode extends SceneGraphNode implements IFadeObject
Node that offers fade-in and fade-out capabilities.
  • Field Details

    • labelPosition

      protected Vector3b labelPosition
      Position of label
    • currentDistance

      protected double currentDistance
      The current distance at each cycle, in internal units
    • position

      protected SceneGraphNode position
      If set, the fade distance is the distance between the current fade node and this object. Otherwise, it is the length of the current object's position.
    • inSceneGraph

      public boolean inSceneGraph
      Is the node already in the scene graph?
    • catalogInfo

      protected CatalogInfo catalogInfo
      Information on the catalog this fade node represents (particle group, octree, etc.)
    • initialUpdate

      protected boolean initialUpdate
    • highlighted

      protected boolean highlighted
      Is it highlighted?
    • hlplain

      protected boolean hlplain
    • hlc

      protected float[] hlc
    • hlallvisible

      protected boolean hlallvisible
    • hlcmi

      protected int hlcmi
    • hlcma

      protected IAttribute hlcma
    • hlcmmin

      protected double hlcmmin
    • hlcmmax

      protected double hlcmmax
    • pointscaling

      protected float pointscaling
  • Constructor Details

  • Method Details

    • initializeCatalogInfo

      protected void initializeCatalogInfo(boolean create, String name, String desc, int nParticles, String dataFile)
    • doneLoading

      public void doneLoading(com.badlogic.gdx.assets.AssetManager manager)
      Overrides:
      doneLoading in class SceneGraphNode
    • update

      public void update(ITimeFrameProvider time, Vector3b parentTransform, ICamera camera, float opacity)
      Overrides:
      update in class SceneGraphNode
    • updateLocal

      public void updateLocal(ITimeFrameProvider time, ICamera camera)
      Description copied from class: SceneGraphNode
      Updates the transform matrix with the transformations that will apply to the children and the local transform matrix with the transformations that will apply only to this object.
      Overrides:
      updateLocal in class SceneGraphNode
    • updateOpacity

      protected void updateOpacity()
    • getBaseOpacity

      protected float getBaseOpacity()
    • addToRenderLists

      protected void addToRenderLists(ICamera camera)
      Description copied from class: SceneGraphNode
      Adds this entity to the necessary render lists after the distance to the camera and the view angle have been determined.
      Overrides:
      addToRenderLists in class SceneGraphNode
    • updateLocalValues

      public void updateLocalValues(ITimeFrameProvider time, ICamera camera)
      Description copied from class: SceneGraphNode
      This function updates all the local values before the localTransform is updated. Position, rotations and scale must be updated in here.
      Overrides:
      updateLocalValues in class SceneGraphNode
    • getFadeIn

      public Vector2d getFadeIn()
      Description copied from interface: IFadeObject
      Gets the fade in distances.
      Specified by:
      getFadeIn in interface IFadeObject
      Returns:
      The fade in distances in internal units.
    • setFadeIn

      public void setFadeIn(double nearPc, double farPc)
      Description copied from interface: IFadeObject
      Sets the near and far fade in distances.
      Specified by:
      setFadeIn in interface IFadeObject
      Parameters:
      nearPc - Near fade in distance in parsecs.
      farPc - Far fade in distance in parsecs.
    • setFadein

      public void setFadein(double[] fadein)
    • getFadeOut

      public Vector2d getFadeOut()
      Description copied from interface: IFadeObject
      Gets the fade out distances.
      Specified by:
      getFadeOut in interface IFadeObject
      Returns:
      The fade out distances in internal units.
    • setFadeOut

      public void setFadeOut(double nearPc, double farPc)
      Description copied from interface: IFadeObject
      Sets the near and far fade out distances.
      Specified by:
      setFadeOut in interface IFadeObject
      Parameters:
      nearPc - Near fade out distance in parsecs.
      farPc - Far fade out distance in parsecs.
    • setFadeout

      public void setFadeout(double[] fadeout)
    • setPosition

      public void setPosition(double[] pos)
    • setPosition

      public void setPosition(int[] pos)
    • setLabelposition

      public void setLabelposition(double[] labelposition)
      Sets the position of the label, in parsecs and in the internal reference frame.
      Parameters:
      labelposition - The position of the label in internal cartesian coordinates.
    • setPositionobjectname

      public void setPositionobjectname(String po)
    • setCatalogInfoBare

      public void setCatalogInfoBare(CatalogInfo info)
    • setCatalogInfo

      public void setCatalogInfo(CatalogInfo info)
    • getCatalogInfo

      public CatalogInfo getCatalogInfo()
    • setCataloginfo

      public void setCataloginfo(Map<String,String> map)
    • highlight

      public void highlight(boolean hl, float[] color, boolean allVisible)
      Highlight using a plain color
      Parameters:
      hl - Whether to highlight
      color - The plain color
      allVisible - All visible
    • highlight

      public void highlight(boolean hl, int cmi, IAttribute cma, double cmmin, double cmmax, boolean allVisible)
      Highlight using a colormap
      Parameters:
      hl - Whether to highlight
      cmi - Color map index
      cma - Color map attribute
      cmmin - Min mapping value
      cmmax - Max mapping value
    • isHighlighted

      public boolean isHighlighted()
    • setUp

      public void setUp(ISceneGraph sceneGraph)
      Overrides:
      setUp in class SceneGraphNode
    • setSize

      public void setSize(Long size)
      Description copied from class: SceneGraphNode
      Sets the absolute size (diameter) of this entity
      Overrides:
      setSize in class SceneGraphNode
      Parameters:
      size - The diameter in internal units
    • setSize

      public void setSize(Double size)
      Description copied from class: SceneGraphNode
      Sets the absolute size (diameter) of this entity
      Overrides:
      setSize in class SceneGraphNode
      Parameters:
      size - The diameter in internal units
    • isHlplain

      public boolean isHlplain()
    • getHlcmi

      public int getHlcmi()
    • getHlcma

      public IAttribute getHlcma()
    • getHlcmmin

      public double getHlcmmin()
    • getHlcmmax

      public double getHlcmmax()
    • isHlAllVisible

      public boolean isHlAllVisible()
    • getPointscaling

      public float getPointscaling()
    • setPointscaling

      public void setPointscaling(float pointscaling)