Class SlipstreamBuilder

java.lang.Object
com.fs.starfarer.api.impl.campaign.velfield.SlipstreamBuilder

public class SlipstreamBuilder extends Object
  • Field Details

    • MIN_SPACING

      public static float MIN_SPACING
    • MAX_SPACING

      public static float MAX_SPACING
    • WIDTH_TO_SPACING_MULT

      public static float WIDTH_TO_SPACING_MULT
    • MIN_NARROW

      public static float MIN_NARROW
    • MAX_NARROW

      public static float MAX_NARROW
    • MIN_NORMAL

      public static float MIN_NORMAL
    • MAX_NORMAL

      public static float MAX_NORMAL
    • MIN_WIDE

      public static float MIN_WIDE
    • MAX_WIDE

      public static float MAX_WIDE
    • MIN_VERY_WIDE

      public static float MIN_VERY_WIDE
    • MAX_VERY_WIDE

      public static float MAX_VERY_WIDE
    • WCHANGE_SLOW_T_MULT_MIN

      public static float WCHANGE_SLOW_T_MULT_MIN
    • WCHANGE_SLOW_T_MULT_MIN_MAX

      public static float WCHANGE_SLOW_T_MULT_MIN_MAX
    • WCHANGE_MEDIUM_T_MULT_MIN

      public static float WCHANGE_MEDIUM_T_MULT_MIN
    • WCHANGE_MEDIUM_T_MULT_MAX

      public static float WCHANGE_MEDIUM_T_MULT_MAX
    • WCHANGE_FAST_T_MULT_MIN

      public static float WCHANGE_FAST_T_MULT_MIN
    • WCHANGE_FAST_T_MULT_MAX

      public static float WCHANGE_FAST_T_MULT_MAX
    • WRAND_NONE_MULT

      public static float WRAND_NONE_MULT
    • WRAND_LOW_MULT

      public static float WRAND_LOW_MULT
    • WRAND_MEDIUM_MULT

      public static float WRAND_MEDIUM_MULT
    • WRAND_HIGH_MULT

      public static float WRAND_HIGH_MULT
    • FLUCT_LENGTH_MIN

      public static float FLUCT_LENGTH_MIN
    • FLUCT_LENGTH_MAX

      public static float FLUCT_LENGTH_MAX
    • FLUCT_MAG_MIN

      public static float FLUCT_MAG_MIN
    • FLUCT_MAG_MAX

      public static float FLUCT_MAG_MAX
    • FLUCT_NONE_MULT

      public static float FLUCT_NONE_MULT
    • FLUCT_LOW_MULT

      public static float FLUCT_LOW_MULT
    • FLUCT_MEDIUM_MULT

      public static float FLUCT_MEDIUM_MULT
    • FLUCT_HIGH_MULT

      public static float FLUCT_HIGH_MULT
    • WIDTH_NARROW

      public static final int WIDTH_NARROW
      See Also:
    • WIDTH_NORMAL

      public static final int WIDTH_NORMAL
      See Also:
    • WIDTH_WIDE

      public static final int WIDTH_WIDE
      See Also:
    • WIDTH_VERY_WIDE

      public static final int WIDTH_VERY_WIDE
      See Also:
    • WRAND_NONE

      public static final int WRAND_NONE
      See Also:
    • WRAND_LOW

      public static final int WRAND_LOW
      See Also:
    • WRAND_MEDIUM

      public static final int WRAND_MEDIUM
      See Also:
    • WRAND_HIGH

      public static final int WRAND_HIGH
      See Also:
    • WCHANGE_SLOW

      public static final int WCHANGE_SLOW
      See Also:
    • WCHANGE_MEDIUM

      public static final int WCHANGE_MEDIUM
      See Also:
    • WCHANGE_FAST

      public static final int WCHANGE_FAST
      See Also:
    • FLUCT_NONE

      public static final int FLUCT_NONE
      See Also:
    • FLUCT_LOW

      public static final int FLUCT_LOW
      See Also:
    • FLUCT_MEDIUM

      public static final int FLUCT_MEDIUM
      See Also:
    • FLUCT_HIGH

      public static final int FLUCT_HIGH
      See Also:
    • widthTM

      protected float[][] widthTM
    • wrandTM

      protected float[][] wrandTM
    • wchangeTM

      protected float[][] wchangeTM
    • fluctTM

      protected float[][] fluctTM
    • random

      protected Random random
    • params

    • plugin

      protected SlipstreamTerrainPlugin2 plugin
    • sections

    • currWidth

      protected int currWidth
    • currWRand

      protected int currWRand
    • currWChange

      protected int currWChange
    • currFluct

      protected int currFluct
    • start

      protected org.lwjgl.util.vector.Vector2f start
    • type

    • maxAngleVarianceForCurve

      protected float maxAngleVarianceForCurve
    • maxAngleVariance

      protected float maxAngleVariance
    • buildNoise

      protected float[] buildNoise
  • Constructor Details

  • Method Details

    • initTransitionMatrices

      public void initTransitionMatrices()
    • getMaxAngleVariance

      public float getMaxAngleVariance()
    • setMaxAngleVariance

      public void setMaxAngleVariance(float maxAngleVariance)
    • getMaxAngleVarianceForCurve

      public float getMaxAngleVarianceForCurve()
    • setMaxAngleVarianceForCurve

      public void setMaxAngleVarianceForCurve(float maxAngleVarianceForCurve)
    • buildToDestination

      public void buildToDestination(org.lwjgl.util.vector.Vector2f control, org.lwjgl.util.vector.Vector2f control2, org.lwjgl.util.vector.Vector2f to)
    • buildToDestination

      public void buildToDestination(org.lwjgl.util.vector.Vector2f control, org.lwjgl.util.vector.Vector2f to)
    • buildToDestination

      public void buildToDestination(org.lwjgl.util.vector.Vector2f to)
    • buildTest

      public void buildTest()
    • generate

      public void generate()
    • buildStream

      public void buildStream()
    • getFluctuationFunc

      protected float getFluctuationFunc(float t)
    • adjustSharpInflectionPoints

      protected void adjustSharpInflectionPoints()
    • getWRandMult

      protected float getWRandMult(SlipstreamBuilder.SlipstreamSection curr)
    • getFluctMult

      protected float getFluctMult(SlipstreamBuilder.SlipstreamSection curr)
    • getWChangeMult

      protected float getWChangeMult(SlipstreamBuilder.SlipstreamSection curr)
    • getGoalWidth

      protected float getGoalWidth(SlipstreamBuilder.SlipstreamSection curr)
    • computeControlPoints

      protected void computeControlPoints()
    • addSection

      public void addSection(org.lwjgl.util.vector.Vector2f to)
    • addSection

      public void addSection(org.lwjgl.util.vector.Vector2f to, boolean alreadyPicked)
    • addSection

      public void addSection(org.lwjgl.util.vector.Vector2f to, int width, int wrand, int wchange, int fluct)
    • addSection

      public void addSection(org.lwjgl.util.vector.Vector2f to, int width, int wrand, int wchange, int fluct, int insertIndex)
    • getPrev

    • getNext

    • pickAllNext

      public void pickAllNext()
    • pickWidth

      public int pickWidth(int curr)
    • pickWRand

      public int pickWRand(int curr)
    • pickWChange

      public int pickWChange(int curr)
    • pickFluct

      public int pickFluct(int curr)
    • pickNext

      public int pickNext(int curr, float[][] matrix)
    • renderDebug

      public void renderDebug(float alpha)
    • getInterpNoise

      public static float getInterpNoise(float[] noise, float t)
    • normalizeNoise1D

      public static void normalizeNoise1D(float[] noise)
      To [0, 1]
      Parameters:
      noise -
    • initNoise1D

      public static float[] initNoise1D(Random random, int size, float spikes)
    • genNoise1D

      public static void genNoise1D(Random random, float[] noise, int size, float spikes)
    • genNoise1DFill

      public static void genNoise1DFill(Random random, float[] noise, int x1, int x2, int iter, float spikes)
    • getApproximateBezierLength

      public static float getApproximateBezierLength(org.lwjgl.util.vector.Vector2f p0, org.lwjgl.util.vector.Vector2f p1, org.lwjgl.util.vector.Vector2f p2)
    • getApproximateBezierLength

      public static float getApproximateBezierLength(org.lwjgl.util.vector.Vector2f p0, org.lwjgl.util.vector.Vector2f p1, org.lwjgl.util.vector.Vector2f p2, org.lwjgl.util.vector.Vector2f p3)