Class ThreatMapObject

java.lang.Object
org.dark.graphics.light.ThreatMapObject
All Implemented Interfaces:
MapObjectAPI

public class ThreatMapObject extends Object implements MapObjectAPI
  • Field Details

    • THREAT_MATERIAL_PATH

      public static final String THREAT_MATERIAL_PATH
      See Also:
    • THREAT_NORMAL_PATH

      public static final String THREAT_NORMAL_PATH
      See Also:
    • THREAT_SURFACE_PATH

      public static final String THREAT_SURFACE_PATH
      See Also:
    • prevBindType

      protected static TextureData.TextureDataType prevBindType
    • member

      protected final com.fs.starfarer.api.impl.combat.threat.RoilingSwarmEffect.SwarmMember member
    • effect

      protected final com.fs.starfarer.api.impl.combat.threat.RoilingSwarmEffect effect
    • materialSprite

      protected final com.fs.starfarer.api.graphics.SpriteAPI materialSprite
    • normalSprite

      protected final com.fs.starfarer.api.graphics.SpriteAPI normalSprite
    • surfaceSprite

      protected final com.fs.starfarer.api.graphics.SpriteAPI surfaceSprite
  • Constructor Details

    • ThreatMapObject

      public ThreatMapObject(com.fs.starfarer.api.impl.combat.threat.RoilingSwarmEffect.SwarmMember member, com.fs.starfarer.api.impl.combat.threat.RoilingSwarmEffect effect)
  • Method Details

    • getLocation

      public org.lwjgl.util.vector.Vector2f getLocation()
      Description copied from interface: MapObjectAPI
      Gets the current location of the object.

      Specified by:
      getLocation in interface MapObjectAPI
      Returns:
      The current location of the object.

    • getRenderRadius

      public float getRenderRadius()
      Description copied from interface: MapObjectAPI
      Gets the render radius of the object. This is not exactly the same as the usual getRenderRadius(); make sure to explicitly include the entity's visible radius.

      Specified by:
      getRenderRadius in interface MapObjectAPI
      Returns:
      The render radius of the object.

    • getNormalAngle

      public float getNormalAngle()
      Description copied from interface: MapObjectAPI
      Gets the rotational angle for the normal map. This is used to transform the vector components when the map is being rendered. This should almost always be the in-engine getFacing() angle of the object, minus 90 degrees.

      Specified by:
      getNormalAngle in interface MapObjectAPI
      Returns:
      The rotational angle for the normal map, in degrees.

    • getNormalFlipHorizontal

      public boolean getNormalFlipHorizontal()
      Description copied from interface: MapObjectAPI
      Gets the horizontal flip flag for the normal map. This is almost always false.

      Specified by:
      getNormalFlipHorizontal in interface MapObjectAPI
      Returns:
      The horizontal flip flag for the normal map.

    • getNormalFlipVertical

      public boolean getNormalFlipVertical()
      Description copied from interface: MapObjectAPI
      Gets the vertical flip flag for the normal map. This is almost always false.

      Specified by:
      getNormalFlipVertical in interface MapObjectAPI
      Returns:
      The vertical flip flag for the normal map.

    • getNormalMagnitude

      public float getNormalMagnitude()
      Description copied from interface: MapObjectAPI
      Gets the magnitude scalar for the normal map.

      Specified by:
      getNormalMagnitude in interface MapObjectAPI
      Returns:
      The magnitude multiplier for the normal map.

    • hasNormal

      public boolean hasNormal()
      Description copied from interface: MapObjectAPI
      Reports if a normal map exists for this object. If none exists, different shader settings are used prior to the render() call, which should render the material map or diffuse sprite in place of a normal map.

      Specified by:
      hasNormal in interface MapObjectAPI
      Returns:
      Whether a normal map exists for this object.

    • render

      public void render(com.fs.starfarer.api.combat.CombatEngineLayers layer, com.fs.starfarer.api.combat.ViewportAPI viewport, TextureData.TextureDataType type, boolean alwaysBind)
      Description copied from interface: MapObjectAPI
      Renders the object with the specified map type.

      Specified by:
      render in interface MapObjectAPI
      Parameters:
      layer - Will presently *always* be ABOVE_SHIPS_LAYER.
      viewport - Same as the usual render() viewport argument.
      type - Map type that should be rendered.
      alwaysBind - Flag to indicate if the sprite texture should always be bound on this call.