Class Spacecraft

    • Field Detail

      • thrustLength

        public static final double thrustLength
        This is the power
        See Also:
        Constant Field Values
      • thrustFactor

        public static final double[] thrustFactor
        Factor (adapt to be able to navigate small and large scale structures
      • fullPowerTime

        public double fullPowerTime
        Seconds to reach full power
      • force

        public Vector3d force
        Force, acceleration and velocity
      • accel

        public Vector3d accel
        Force, acceleration and velocity
      • vel

        public Vector3d vel
        Force, acceleration and velocity
      • direction

        public Vector3d direction
        Direction and up vectors
      • up

        public Vector3d up
        Direction and up vectors
      • posf

        public com.badlogic.gdx.math.Vector3 posf
        Float counterparts
      • directionf

        public com.badlogic.gdx.math.Vector3 directionf
        Float counterparts
      • upf

        public com.badlogic.gdx.math.Vector3 upf
        Float counterparts
      • thrust

        public Vector3d thrust
        Engine thrust vector
      • mass

        public double mass
        Mass in kg
      • sizeFactor

        public double sizeFactor
        Factor hack
      • rotationMatrix

        public com.badlogic.gdx.math.Matrix4 rotationMatrix
        Only the rotation matrix
      • thrustFactorIndex

        public int thrustFactorIndex
        Index of the current engine power setting
      • enginePower

        public double enginePower
        Instantaneous engine power, this is in [0..1]
      • yawp

        public double yawp
        Yaw, pitch and roll
      • pitchp

        public double pitchp
        Yaw, pitch and roll
      • rollp

        public double rollp
        Yaw, pitch and roll
      • yawf

        public double yawf
      • pitchf

        public double pitchf
      • rollf

        public double rollf
      • yawa

        public double yawa
      • pitcha

        public double pitcha
      • rolla

        public double rolla
      • yawv

        public double yawv
      • pitchv

        public double pitchv
      • rollv

        public double rollv
      • yaw

        public double yaw
      • pitch

        public double pitch
      • roll

        public double roll
      • leveling

        public boolean leveling
      • stopping

        public boolean stopping
    • Constructor Detail

      • Spacecraft

        public Spacecraft()
    • Method Detail

      • doneLoading

        public void doneLoading​(com.badlogic.gdx.assets.AssetManager manager)
        doneLoading in class Satellite
      • notify

        public void notify​(Events event,
                           java.lang.Object... data)
        Specified by:
        notify in interface IObserver
      • 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.
        updateLocal in class ModelBody
      • updateLocalTransform

        protected void updateLocalTransform()
        Description copied from class: ModelBody
        Update the local transform with the transform and the rotations/scales necessary. Override if your model contains more than just the position and size.
        updateLocalTransform in class Satellite
      • computeDirectionUp

        public double computeDirectionUp​(double dt,
                                         Pair<Vector3d,​Vector3d> pair)
      • 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.
        updateLocalValues in class Satellite
      • stopAllMovement

        public void stopAllMovement()
      • setEnginePower

        public void setEnginePower​(double enginePower)
        Sets the current engine power
        enginePower - The power in [-1..1]
      • setYawPower

        public void setYawPower​(double yawp)
        Sets the current yaw power
        yawp - The yaw power in [-1..1]
      • setPitchPower

        public void setPitchPower​(double pitchp)
        Sets the current pitch power
        pitchp - The pitch power in [-1..1]
      • setRollPower

        public void setRollPower​(double rollp)
        Sets the current roll power
        rollp - The roll power in [-1..1]
      • increaseThrustFactorIndex

        public void increaseThrustFactorIndex​(boolean broadcast)
      • decreaseThrustFactorIndex

        public void decreaseThrustFactorIndex​(boolean broadcast)
      • setThrustFactorIndex

        public void setThrustFactorIndex​(int i,
                                         boolean broadcast)
      • addToRenderLists

        protected void addToRenderLists​(ICamera camera)
        Adds this entity to the necessary render lists after the distance to the camera and the view angle have been determined.
        addToRenderLists in class GenericSpacecraft
      • setSize

        public void setSize​(java.lang.Double size)
        Sets the absolute size of this entity
        setSize in class Satellite
        size -
      • setSize

        public void setSize​(java.lang.Long size)
        Description copied from class: SceneGraphNode
        Sets the absolute size (diameter) of this entity
        setSize in class Satellite
        size - The diameter in internal units
      • getRadius

        public double getRadius()
        Description copied from class: SceneGraphNode
        Returns the radius in internal units
        Specified by:
        getRadius in interface IFocus
        getRadius in class ModelBody
        The radius of the object, in internal units
      • 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
        getSize in class ModelBody
        The size in internal units.
      • setMass

        public void setMass​(java.lang.Double mass)
      • isStopping

        public boolean isStopping()
      • isStabilising

        public boolean isStabilising()
      • getRotationQuaternion

        public com.badlogic.gdx.math.Quaternion getRotationQuaternion()
      • dispose

        public void dispose()
        Specified by:
        dispose in interface com.badlogic.gdx.utils.Disposable
        dispose in class ModelBody
      • render

        public void render​(IntModelBatch modelBatch,
                           float alpha,
                           double t,
                           boolean shadowEnv)
        Model opaque rendering for light glow pass. Do not render shadows
        render in class ModelBody
      • mustUpdatePosition

        protected boolean mustUpdatePosition​(ITimeFrameProvider time)
        Description copied from class: SceneGraphNode
        Whether position must be recomputed for this entity. By default, only when time is on
        mustUpdatePosition in class SceneGraphNode
        time - The current time
        True if position should be recomputed for this entity