Class ParticleGroup

All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, IObserver, I3DTextRenderable, IRenderable, IFocus, IStarContainer, IVisibilitySwitch, IPosition
Direct Known Subclasses:
StarGroup

public class ParticleGroup extends FadeNode implements I3DTextRenderable, IFocus, IObserver
This class represents a group of non-focusable particles, all with the same luminosity. The contents of this group will be sent once to GPU memory and stay there, so all particles get rendered directly in the GPU from the GPU with no CPU intervention. This allows for much faster rendering. Use this for large groups of particles.
  • Field Details

    • pointData

      protected List<IParticleRecord> pointData
      List that contains the point data. It contains only [x y z]
    • provider

      protected String provider
      Fully qualified name of data provider class
    • datafile

      protected String datafile
      Path of data file
    • profileDecay

      public float profileDecay
      Profile decay of the particles in the shader
    • colorNoise

      public float colorNoise
      Noise factor for the color in [0,1]
    • particleSizeLimits

      public double[] particleSizeLimits
      Particle size limits, in pixels
    • offset

      public int offset
    • count

      public int count
    • fixedMeanPosition

      protected boolean fixedMeanPosition
      This flag indicates whether the mean position is already given by the JSON injector
    • factor

      protected Double factor
      Factor to apply to the data points, usually to normalise distances
    • ccMin

      protected float[] ccMin
      Mapping colors
    • ccMax

      protected float[] ccMax
      Mapping colors
    • lastSortTime

      protected long lastSortTime
      Stores the time when the last sort operation finished, in ms
    • meanDistance

      protected double meanDistance
      The mean distance from the origin of all points in this group. Gives a sense of the scale.
    • maxDistance

      protected double maxDistance
    • minDistance

      protected double minDistance
    • focus

      protected IParticleRecord focus
      Reference to the current focus
    • proximity

      protected Proximity proximity
      Proximity particles
    • disposed

      public boolean disposed
    • index

      protected Map<String,​Integer> index
    • UPDATE_INTERVAL_MS

      protected static final double UPDATE_INTERVAL_MS
      See Also:
      Constant Field Values
    • metadata

      protected double[] metadata
    • indices1

      protected Integer[] indices1
    • indices2

      protected Integer[] indices2
    • active

      protected Integer[] active
    • background

      protected Integer[] background
    • visibilityArray

      protected byte[] visibilityArray
    • updating

      protected volatile boolean updating
    • updaterTask

      protected ParticleGroup.UpdaterTask updaterTask
    • CAM_DX_TH

      protected static final double CAM_DX_TH
    • lastSortCameraPos

      protected Vector3d lastSortCameraPos
    • cPosD

      protected Vector3d cPosD
  • Constructor Details

    • ParticleGroup

      public ParticleGroup()
  • Method Details

    • initialize

      public void initialize()
      Overrides:
      initialize in class SceneGraphNode
    • initialize

      public void initialize(boolean dataLoad, boolean createCatalogInfo)
    • computeMinMeanMaxDistances

      public void computeMinMeanMaxDistances()
    • computeMeanPosition

      public void computeMeanPosition()
    • setLabelPosition

      public void setLabelPosition()
    • doneLoading

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

      protected void initSortingData()
    • data

      public List<IParticleRecord> data()
      Returns the data list
      Returns:
      The data list
    • setData

      public void setData(List<IParticleRecord> pointData)
    • setData

      public void setData(List<IParticleRecord> pointData, boolean regenerateIndex)
    • isVisible

      public boolean isVisible(int index)
      Checks whether the particle with the given index is visible
      Parameters:
      index - The index of the particle
      Returns:
      The visibility of the particle
    • isVisible

      public boolean isVisible()
      Specified by:
      isVisible in interface IVisibilitySwitch
      Overrides:
      isVisible in class SceneGraphNode
    • isVisible

      public boolean isVisible(boolean attributeValue)
      Overrides the isVisible() method, and uses the current focus index, if any
      Specified by:
      isVisible in interface IVisibilitySwitch
      Overrides:
      isVisible in class SceneGraphNode
      Parameters:
      attributeValue - Whether to use the visibility attribute directly
      Returns:
      The visibility
    • setVisible

      public void setVisible(int index, boolean visible)
      Sets the visibility of the particle with the given index. If the visibility has changed, it marks the particle group for update.
      Parameters:
      index - The index of the particle
      visible - Visibility flag
    • setVisible

      public void setVisible(boolean visible, String name)
      Specified by:
      setVisible in interface IVisibilitySwitch
      Overrides:
      setVisible in class SceneGraphNode
    • isVisible

      public boolean isVisible(String name)
      Specified by:
      isVisible in interface IVisibilitySwitch
      Overrides:
      isVisible in class SceneGraphNode
    • setVisible

      public void setVisible(boolean visible)
      Overrides the setVisible() method and uses the current focus index, if any.
      Specified by:
      setVisible in interface IVisibilitySwitch
      Overrides:
      setVisible in class SceneGraphNode
      Parameters:
      visible - The visibility state
    • isVisibleGroup

      public boolean isVisibleGroup()
      Overrides:
      isVisibleGroup in class SceneGraphNode
    • setVisibleGroup

      public void setVisibleGroup(boolean visibility)
      Overrides:
      setVisibleGroup in class SceneGraphNode
    • regenerateIndex

      public void regenerateIndex()
      Regenerates the name index
    • generateIndex

      public Map<String,​Integer> generateIndex(List<IParticleRecord> pointData)
      Generates the index (maps name to array index) and computes the geometric center of this group
      Parameters:
      pointData - The data
      Returns:
      An map{string,int} mapping names to indices
    • addToIndex

      protected void addToIndex(com.badlogic.gdx.utils.ObjectMap<String,​SceneGraphNode> map)
      Description copied from class: SceneGraphNode
      Special actions to be taken for this object when adding to the index.
      Overrides:
      addToIndex in class SceneGraphNode
      Parameters:
      map - The index
    • removeFromIndex

      protected void removeFromIndex(com.badlogic.gdx.utils.ObjectMap<String,​SceneGraphNode> map)
      Description copied from class: SceneGraphNode
      Special actions to be taken for this object when removing from the index. Must implement if addToIndex is implemented
      Overrides:
      removeFromIndex in class SceneGraphNode
      Parameters:
      map - The index
    • get

      public IParticleRecord get(int index)
    • getRandomParticleName

      public String getRandomParticleName()
      Gets the name of a random particle in this group
      Returns:
      The name of a random particle
    • computeGeomCentre

      public Vector3d computeGeomCentre()
      Computes the geometric centre of this data cloud
    • computeGeomCentre

      public Vector3d computeGeomCentre(boolean forceRecompute)
      Computes the geometric centre of this data cloud
      Parameters:
      forceRecompute - Recomputes the geometric centre even if it has been already computed
    • size

      public int size()
      Number of objects of this group
      Returns:
      The number of objects
    • update

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

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

      public void updateFocus(ICamera camera)
      Updates the parameters of the focus, if the focus is active in this group
      Parameters:
      camera - The current camera
    • 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 FadeNode
    • render

      public void render(ExtSpriteBatch batch, ExtShaderProgram shader, FontRenderSystem sys, RenderingContext rc, ICamera camera)
      Label rendering
      Specified by:
      render in interface I3DTextRenderable
      Parameters:
      batch - The sprite batch
      shader - The shader
      sys - The font render system
      rc - The render context
      camera - The camera
    • textPosition

      public void textPosition(ICamera cam, Vector3d out, double len, double rad)
    • textScale

      public float textScale()
      Description copied from interface: I3DTextRenderable
      Returns the text scale for the scale varying in the shader
      Specified by:
      textScale in interface I3DTextRenderable
      Returns:
      The scale
    • getProvider

      public String getProvider()
    • setProvider

      public void setProvider(String provider)
    • setDatafile

      public void setDatafile(String datafile)
    • 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 FadeNode
    • renderText

      public boolean renderText()
      Description copied from interface: I3DTextRenderable
      Tells whether the text must be rendered or not for this entity
      Specified by:
      renderText in interface I3DTextRenderable
      Returns:
      True if text must be rendered
    • textColour

      public float[] textColour()
      Description copied from interface: I3DTextRenderable
      Returns an array with the text colour in the fashion [r, g, b, a]
      Specified by:
      textColour in interface I3DTextRenderable
      Returns:
      Array with the colour
    • textSize

      public float textSize()
      Description copied from interface: I3DTextRenderable
      Returns the text size
      Specified by:
      textSize in interface I3DTextRenderable
      Returns:
      The text size
    • textPosition

      public void textPosition(ICamera cam, Vector3d out)
      Description copied from interface: I3DTextRenderable
      Sets the position of this text in the out vector
      Specified by:
      textPosition in interface I3DTextRenderable
      out - The out parameter with the result
    • text

      public String text()
      Description copied from interface: I3DTextRenderable
      Returns the text
      Specified by:
      text in interface I3DTextRenderable
      Returns:
      The text
    • textDepthBuffer

      public void textDepthBuffer()
      Description copied from interface: I3DTextRenderable
      Executes the blending for the text
      Specified by:
      textDepthBuffer in interface I3DTextRenderable
    • isLabel

      public boolean isLabel()
      Description copied from interface: I3DTextRenderable
      Is it a label or another kind of text?
      Specified by:
      isLabel in interface I3DTextRenderable
      Returns:
      Whether this is a label
    • setFactor

      public void setFactor(Double factor)
    • setProfiledecay

      public void setProfiledecay(Double profiledecay)
    • setColornoise

      public void setColornoise(Double colorNoise)
    • setParticlesizelimits

      public void setParticlesizelimits(double[] sizeLimits)
    • getFocusSize

      public double getFocusSize()
      Default size if not in data, 1e5 km
      Returns:
      The size
    • getId

      public long getId()
      Returns the id
      Specified by:
      getId in interface IFocus
      Overrides:
      getId in class SceneGraphNode
      Returns:
      The id
    • getClosestName

      public String getClosestName()
      Description copied from interface: IFocus
      Specified by:
      getClosestName in interface IFocus
      Returns:
      The name
    • getClosestDistToCamera

      public double getClosestDistToCamera()
      Description copied from interface: IFocus
      Specified by:
      getClosestDistToCamera in interface IFocus
      Returns:
      The distance to the camera in internal units
    • getClosestAbsolutePos

      public Vector3b getClosestAbsolutePos(Vector3b out)
      Description copied from interface: IFocus
      Specified by:
      getClosestAbsolutePos in interface IFocus
      Parameters:
      out - Vector3d where to put the return value
      Returns:
      The absolute position, same as aux
    • getStarCount

      public int getStarCount()
      Specified by:
      getStarCount in interface IStarContainer
      Overrides:
      getStarCount in class SceneGraphNode
    • isActive

      public boolean isActive()
      Description copied from interface: IFocus
      Returns whether this focus object is active or not. Useful for particle groups
      Specified by:
      isActive in interface IFocus
      Returns:
      The active status
    • setPosition

      public void setPosition(double[] pos)
      Returns position of focus
      Overrides:
      setPosition in class FadeNode
    • addFocusableObjects

      public void addFocusableObjects(com.badlogic.gdx.utils.Array<IFocus> list)
      Adds all the children that are focusable objects to the list.
      Overrides:
      addFocusableObjects in class SceneGraphNode
      Parameters:
      list -
    • getComputedAncestor

      public SceneGraphNode getComputedAncestor()
    • getFirstStarAncestor

      public SceneGraphNode getFirstStarAncestor()
      Description copied from class: SceneGraphNode
      Gets the first ancestor of this node that is of type Star
      Specified by:
      getFirstStarAncestor in interface IFocus
      Overrides:
      getFirstStarAncestor in class SceneGraphNode
      Returns:
      The first ancestor of type Star
    • getAbsolutePosition

      public Vector3b getAbsolutePosition(Vector3b out)
      Description copied from class: SceneGraphNode
      Returns the absolute position of this entity in the native coordinates (equatorial system) and internal units
      Specified by:
      getAbsolutePosition in interface IFocus
      Overrides:
      getAbsolutePosition in class SceneGraphNode
      Parameters:
      out - Auxiliary vector to put the result in
      Returns:
      The vector with the position
    • getAbsolutePosition

      public Vector3b getAbsolutePosition(String name, Vector3b out)
      Description copied from interface: IFocus
      Returns the absolute position of the entity identified by name within this entity in the native reference system
      Specified by:
      getAbsolutePosition in interface IFocus
      Overrides:
      getAbsolutePosition in class SceneGraphNode
      Parameters:
      name - The name (lowercase) of the entity to get the position from (useful in case of star groups)
      out - Vector3d to put the return value
      Returns:
      The absolute position of the entity if it exists, null otherwise
    • getPredictedPosition

      public Vector3b getPredictedPosition(Vector3b aux, ITimeFrameProvider time, ICamera camera, boolean force)
      Description copied from class: SceneGraphNode
      Gets the position of this entity in the next time step in the internal reference system using the given time provider and the given camera.
      Specified by:
      getPredictedPosition in interface IFocus
      Overrides:
      getPredictedPosition in class SceneGraphNode
      Parameters:
      aux - The out vector where the result will be stored.
      time - The time frame provider.
      camera - The camera.
      force - Whether to force the computation if time is off.
      Returns:
      The aux vector for chaining.
    • getPosSph

      public Vector2d getPosSph()
      Description copied from interface: IFocus
      Gets the position in equatorial spherical coordinates
      Specified by:
      getPosSph in interface IFocus
      Overrides:
      getPosSph in class SceneGraphNode
      Returns:
      The position in alpha, delta
    • getDistToCamera

      public double getDistToCamera()
      Description copied from class: SceneGraphNode
      Returns the current distance to the camera in internal units.
      Specified by:
      getDistToCamera in interface IFocus
      Specified by:
      getDistToCamera in interface IRenderable
      Overrides:
      getDistToCamera in class SceneGraphNode
      Returns:
      The current distance to the camera, in internal units.
    • getViewAngle

      public double getViewAngle()
      Description copied from class: SceneGraphNode
      Returns the current view angle of this entity, in radians.
      Specified by:
      getViewAngle in interface IFocus
      Overrides:
      getViewAngle in class SceneGraphNode
      Returns:
      The view angle in radians.
    • getViewAngleApparent

      public double getViewAngleApparent()
      Description copied from class: SceneGraphNode
      Returns the current apparent view angle (view angle corrected with the field of view) of this entity, in radians.
      Specified by:
      getViewAngleApparent in interface IFocus
      Overrides:
      getViewAngleApparent in class SceneGraphNode
      Returns:
      The apparent view angle in radians.
    • getSize

      public double getSize()
      Description copied from class: SceneGraphNode
      Returns the size (diameter) of this entity in internal units.
      Specified by:
      getSize in interface IFocus
      Overrides:
      getSize in class SceneGraphNode
      Returns:
      The size in internal units.
    • getAppmag

      public float getAppmag()
      Description copied from interface: IFocus
      Gets the apparent magnitude
      Specified by:
      getAppmag in interface IFocus
      Returns:
      The apparent magnitude
    • getAbsmag

      public float getAbsmag()
      Description copied from interface: IFocus
      Gets the absolute magnitude
      Specified by:
      getAbsmag in interface IFocus
      Returns:
      The absolute magnitude
    • getName

      public String getName()
      Description copied from interface: IFocus
      Returns the first name of this focus
      Specified by:
      getName in interface IFocus
      Specified by:
      getName in interface IVisibilitySwitch
      Overrides:
      getName in class SceneGraphNode
      Returns:
      The first name
    • getNames

      public String[] getNames()
      Description copied from interface: IFocus
      Returns all names of this focus
      Specified by:
      getNames in interface IFocus
      Overrides:
      getNames in class SceneGraphNode
      Returns:
      All names of this focus
    • hasName

      public boolean hasName(String candidate)
      Description copied from interface: IFocus
      Checks whether the focus has the given name
      Specified by:
      hasName in interface IFocus
      Overrides:
      hasName in class SceneGraphNode
      Parameters:
      candidate - The name
      Returns:
      True if there is a match
    • hasName

      public boolean hasName(String candidate, boolean matchCase)
      Description copied from interface: IFocus
      Checks whether the focus has the given name
      Specified by:
      hasName in interface IFocus
      Overrides:
      hasName in class SceneGraphNode
      Parameters:
      candidate - The name
      matchCase - Whether to match the case when comparing
      Returns:
      True if there is a match
    • getSize

      public double getSize(int i)
      Returns the size of the particle at index i
      Parameters:
      i - The index
      Returns:
      The size
    • getRadius

      public double getRadius(int i)
    • getRadius

      public double getRadius()
      Description copied from class: SceneGraphNode
      Returns the radius in internal units
      Specified by:
      getRadius in interface IFocus
      Overrides:
      getRadius in class SceneGraphNode
      Returns:
      The radius of the object, in internal units
    • getRotationComponent

      public RotationComponent getRotationComponent()
      Description copied from interface: IFocus
      Returns the rotation component of this focus
      Specified by:
      getRotationComponent in interface IFocus
      Returns:
      The rotation component. Can be null
    • getOrientationQuaternion

      public Quaterniond getOrientationQuaternion()
      Description copied from interface: IFocus
      Returns the orientation quaternion of this focus
      Specified by:
      getOrientationQuaternion in interface IFocus
      Returns:
      The orientation quaternion. Can be null
    • getColor

      public float[] getColor()
      Description copied from interface: IFocus
      Gets the color of this object
      Specified by:
      getColor in interface IFocus
      Overrides:
      getColor in class SceneGraphNode
      Returns:
      The color as a RGBA float array
    • highlightedSizeFactor

      public float highlightedSizeFactor()
    • addHit

      public void addHit(int screenX, int screenY, int w, int h, int pxdist, NaturalCamera camera, com.badlogic.gdx.utils.Array<IFocus> hits)
      Description copied from interface: IFocus
      Adds this focus to the hits list if it is hit by the [screenX, screenY] position
      Specified by:
      addHit in interface IFocus
      Parameters:
      screenX - The x position of the hit
      screenY - The y position of the hit
      w - The viewport width
      h - The viewport height
      pxdist - The minimum pixel distance to consider as hit
      camera - The camera
      hits - The list where to add the element
    • addHit

      public void addHit(Vector3d p0, Vector3d p1, NaturalCamera camera, com.badlogic.gdx.utils.Array<IFocus> hits)
      Description copied from interface: IFocus
      Adds this focus to the hits list if it is hit by the given ray
      Specified by:
      addHit in interface IFocus
      Parameters:
      p0 - Start point of the ray
      p1 - End point of the ray
      camera - The camera
      hits - The list where the focus is to be added
    • notify

      public void notify(Events event, Object... data)
      Specified by:
      notify in interface IObserver
    • setFocusIndex

      public void setFocusIndex(int index)
    • makeFocus

      public void makeFocus()
      Description copied from interface: IFocus
      Hook that runs when the candidate is actually made focus
      Specified by:
      makeFocus in interface IFocus
    • getCandidateIndex

      public int getCandidateIndex()
    • getCandidateId

      public long getCandidateId()
      Description copied from interface: IFocus
      Returns the id of the focus candidate of this object. Defaults to IFocus.getId()
      Specified by:
      getCandidateId in interface IFocus
      Returns:
      The id of the candidate
    • getCandidateName

      public String getCandidateName()
      Description copied from interface: IFocus
      Returns the name of the focus candidate of this object. Defaults to IFocus.getName()
      Specified by:
      getCandidateName in interface IFocus
      Returns:
      The name of the candidate
    • getCandidateViewAngleApparent

      public double getCandidateViewAngleApparent()
      Description copied from interface: IFocus
      Returns the candidate apparent view angle (view angle corrected with the field of view) of this entity, in radians
      Specified by:
      getCandidateViewAngleApparent in interface IFocus
      Returns:
      The apparent view angle in radians
    • getFocus

      public IFocus getFocus(String name)
      Description copied from interface: IFocus
      Prepares the candidate with the given name
      Specified by:
      getFocus in interface IFocus
      Parameters:
      name - The name in lower case
    • getCandidateBean

      public IParticleRecord getCandidateBean()
    • getAlpha

      public double getAlpha()
      Description copied from interface: IFocus
      Returns the right ascension angle of this focus object
      Specified by:
      getAlpha in interface IFocus
      Overrides:
      getAlpha in class SceneGraphNode
      Returns:
      The right ascension angle in degrees
    • getDelta

      public double getDelta()
      Description copied from interface: IFocus
      Returns the declination angle of this focus object
      Specified by:
      getDelta in interface IFocus
      Overrides:
      getDelta in class SceneGraphNode
      Returns:
      The declination angle in degrees
    • getBaseOpacity

      protected float getBaseOpacity()
      Overrides:
      getBaseOpacity in class FadeNode
    • fetchPosition

      protected Vector3d fetchPosition(IParticleRecord pb, Vector3d campos, Vector3d destination, double deltaYears)
      Fetches the real position of the particle. It will apply the necessary integrations (i.e. proper motion).
      Parameters:
      pb - The particle bean
      campos - The position of the camera. If null, the camera position is not subtracted so that the coordinates are given in the global reference system instead of the camera reference system.
      destination - The destination factor
      deltaYears - The delta years
      Returns:
      The vector for chaining
    • getMeanDistance

      public double getMeanDistance()
    • getMinDistance

      public double getMinDistance()
    • getMaxDistance

      public double getMaxDistance()
    • getDeltaYears

      protected double getDeltaYears()
      Returns the delta years to integrate the proper motion.
      Returns:
    • isCoordinatesTimeOverflow

      public boolean isCoordinatesTimeOverflow()
      Description copied from interface: IFocus
      Checks whether this foucs is within its valid time range, so that it can be used as a focus
      Specified by:
      isCoordinatesTimeOverflow in interface IFocus
      Returns:
      Whether the focus object is within its valid time range
    • canSelect

      public boolean canSelect()
    • mustAddToIndex

      public boolean mustAddToIndex()
      Description copied from class: SceneGraphNode
      Whether to add this node to the index
      Overrides:
      mustAddToIndex in class SceneGraphNode
      Returns:
      True if the node needs to be added to the index.
    • dispose

      public void dispose()
      Specified by:
      dispose in interface com.badlogic.gdx.utils.Disposable
      Overrides:
      dispose in class SceneGraphNode
    • inGpu

      public boolean inGpu()
    • inGpu

      public void inGpu(boolean inGpu)
    • setInGpu

      public void setInGpu(boolean inGpu)
    • getTextOpacity

      public float getTextOpacity()
      Description copied from interface: I3DTextRenderable
      Gets the text opacity
      Specified by:
      getTextOpacity in interface I3DTextRenderable
      Returns:
      Text opacity
    • highlight

      public void highlight(boolean hl, float[] color, boolean allVisible)
      Description copied from class: FadeNode
      Highlight using a plain color
      Overrides:
      highlight in class FadeNode
      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)
      Description copied from class: FadeNode
      Highlight using a colormap
      Overrides:
      highlight in class FadeNode
      Parameters:
      hl - Whether to highlight
      cmi - Color map index
      cma - Color map attribute
      cmmin - Min mapping value
      cmmax - Max mapping value
    • setColorMin

      public void setColorMin(double[] colorMin)
    • setColorMin

      public void setColorMin(float[] colorMin)
    • setColorMax

      public void setColorMax(double[] colorMax)
    • setColorMax

      public void setColorMax(float[] colorMax)
    • getColorMin

      public float[] getColorMin()
    • getColorMax

      public float[] getColorMax()
    • shouldRender

      protected boolean shouldRender()
      Overridden because the SceneGraphNode.visible is not used in particle groups. visibilityArray is used instead.
      Overrides:
      shouldRender in class SceneGraphNode
      Returns:
      Whether the particle group should be sent to render
    • filter

      public boolean filter(int index)
      Evaluates the filter of this dataset (if any) for the given particle index
      Parameters:
      index - The index to filter
      Returns:
      The result of the filter evaluation, true if the particle passed the filtering, false otherwise
    • getParticleGroup

      public static ParticleGroup getParticleGroup(String name, List<IParticleRecord> data, DatasetOptions dops)
      Creates a default particle group with some parameters, given the name and data
      Parameters:
      name - The name of the particle group. Any occurrence of '%%PGID%%' will be replaced with the id of the particle group
      data - The data of the particle group
      dops - The dataset options
      Returns:
      A new particle group with the given parameters
    • updateMetadata

      public void updateMetadata(ITimeFrameProvider time, ICamera camera)
      Updates the metadata information, to use for sorting. For particles, only the position (distance from camera) is important.
      Parameters:
      time - The time frame provider
      camera - The camera
    • updateSorter

      public void updateSorter(ITimeFrameProvider time, ICamera camera)
    • swapBuffers

      protected void swapBuffers()