Interface StaticTrailTracker.Result

Enclosing interface:
StaticTrailTracker

public static interface StaticTrailTracker.Result
  • Method Details

    • getPreviousRecordsLocation

      org.lwjgl.util.vector.Vector2f getPreviousRecordsLocation()
      Should not change it, just for get the position.

      In the first records or all the nodes was playing finished, it is {NaN, NaN}.

    • getPreviousRecordsDistanceSq

      float getPreviousRecordsDistanceSq(float targetX, float targetY)
      Returns:
      NaN if in the first records or all the nodes was playing finished.
    • getPreviousRecordsDistanceSq

      float getPreviousRecordsDistanceSq(org.lwjgl.util.vector.Vector2f targetLocation)
      Returns:
      NaN if in the first records or all the nodes was playing finished.
    • getPreviousRecordsDistanceSq

      float getPreviousRecordsDistanceSq()
      About current location.
      Returns:
      NaN if in the first records or all the nodes was playing finished.
    • isNotRecommendedRecordsCurrent

      boolean isNotRecommendedRecordsCurrent(float targetX, float targetY)
      Check the current-previous location distance square whether to should not record.
    • isNotRecommendedRecordsCurrent

      boolean isNotRecommendedRecordsCurrent(org.lwjgl.util.vector.Vector2f targetLocation)
      Check the current-previous location distance square whether to should not record.
    • isNotRecommendedRecordsCurrent

      boolean isNotRecommendedRecordsCurrent()
      Check the current-previous location distance square whether to should not record.

      About current location.

    • getCurrentLocation

      org.lwjgl.util.vector.Vector2f getCurrentLocation()
      Returns:
      {1.0f, 0.0f} for default.
    • setCurrentLocation

      void setCurrentLocation(float x, float y)
    • setCurrentLocation

      void setCurrentLocation(org.lwjgl.util.vector.Vector2f location)
    • getCurrentFacing

      org.lwjgl.util.vector.Vector2f getCurrentFacing()
    • setCurrentFacing

      void setCurrentFacing(float x, float y)
      Should be a normalized vector.
    • setCurrentFacing

      void setCurrentFacing(org.lwjgl.util.vector.Vector2f facingVector)
      Should be a normalized vector.
    • getCurrentColor

      byte[] getCurrentColor()
      The color is represented internally as a byte array, therefore recommended to perform read/write operations using the byte type, int is the next preferred type.
      Returns:
      the direct reference to the internal array in the order {red, green, blue, alpha}.

      The default value is opaque white, expressed as {BoxEnum.ONE_COLOR, BoxEnum.ONE_COLOR, BoxEnum.ONE_COLOR, BoxEnum.ONE_COLOR}.

    • getCurrentColorC

      Color getCurrentColorC()
    • getCurrentColorV

      org.lwjgl.util.vector.Vector4f getCurrentColorV()
    • setCurrentColor

      void setCurrentColor(byte r, byte g, byte b, byte a)
    • setCurrentColor

      void setCurrentColor(int r, int g, int b, int a)
    • setCurrentColor

      void setCurrentColor(float r, float g, float b, float a)
    • setCurrentColor

      void setCurrentColor(@NotNull Color color)
    • setCurrentColor

      void setCurrentColor(@NotNull org.lwjgl.util.vector.Vector4f color)
    • getCurrentAlpha

      byte getCurrentAlpha()
    • getCurrentAlphaI

      int getCurrentAlphaI()
    • getCurrentAlphaF

      float getCurrentAlphaF()
    • setCurrentAlpha

      void setCurrentAlpha(byte a)
    • setCurrentAlpha

      void setCurrentAlpha(int a)
    • setCurrentAlpha

      void setCurrentAlpha(float a)
    • pauseOnce

      void pauseOnce()
      Prevents node spawn in current frame, and then next records will be a new trail segment.

      Also can use to 'cut' the trail.

    • destroy

      void destroy()
      REQUIRED, call when the target expires or was removed, it waits for all the node to finish playing before performing free, and StaticTrailTracker.advance(float, float, Result) is still running during this time.
    • destroyImmediate

      void destroyImmediate()
      Same as destroy(), but ignores the current state and directly notifies the system to free, and remove this tracker immediate.
    • isExpired

      boolean isExpired()
      This method is only effective when the trail is destroyed solely via destroy().
      Returns:
      true if the trail has entered the destruction process, and the trail memory on vRAM will be released after the trail has completely finished playing.