Package org.dark.graphics.light
Class ThreatMapObject
java.lang.Object
org.dark.graphics.light.ThreatMapObject
- All Implemented Interfaces:
MapObjectAPI
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final com.fs.starfarer.api.impl.combat.threat.RoilingSwarmEffectprotected final com.fs.starfarer.api.graphics.SpriteAPIprotected final com.fs.starfarer.api.impl.combat.threat.RoilingSwarmEffect.SwarmMemberprotected final com.fs.starfarer.api.graphics.SpriteAPIprotected static TextureData.TextureDataTypeprotected final com.fs.starfarer.api.graphics.SpriteAPIstatic final Stringstatic final Stringstatic final String -
Constructor Summary
ConstructorsConstructorDescriptionThreatMapObject(com.fs.starfarer.api.impl.combat.threat.RoilingSwarmEffect.SwarmMember member, com.fs.starfarer.api.impl.combat.threat.RoilingSwarmEffect effect) -
Method Summary
Modifier and TypeMethodDescriptionorg.lwjgl.util.vector.Vector2fGets the current location of the object.floatGets the rotational angle for the normal map.booleanGets the horizontal flip flag for the normal map.booleanGets the vertical flip flag for the normal map.floatGets the magnitude scalar for the normal map.floatGets the render radius of the object.booleanReports if a normal map exists for this object.voidrender(com.fs.starfarer.api.combat.CombatEngineLayers layer, com.fs.starfarer.api.combat.ViewportAPI viewport, TextureData.TextureDataType type, boolean alwaysBind) Renders the object with the specified map type.
-
Field Details
-
THREAT_MATERIAL_PATH
- See Also:
-
THREAT_NORMAL_PATH
- See Also:
-
THREAT_SURFACE_PATH
- See Also:
-
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:MapObjectAPIGets the current location of the object.- Specified by:
getLocationin interfaceMapObjectAPI- Returns:
- The current location of the object.
-
getRenderRadius
public float getRenderRadius()Description copied from interface:MapObjectAPIGets 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:
getRenderRadiusin interfaceMapObjectAPI- Returns:
- The render radius of the object.
-
getNormalAngle
public float getNormalAngle()Description copied from interface:MapObjectAPIGets 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:
getNormalAnglein interfaceMapObjectAPI- Returns:
- The rotational angle for the normal map, in degrees.
-
getNormalFlipHorizontal
public boolean getNormalFlipHorizontal()Description copied from interface:MapObjectAPIGets the horizontal flip flag for the normal map. This is almost always false.- Specified by:
getNormalFlipHorizontalin interfaceMapObjectAPI- Returns:
- The horizontal flip flag for the normal map.
-
getNormalFlipVertical
public boolean getNormalFlipVertical()Description copied from interface:MapObjectAPIGets the vertical flip flag for the normal map. This is almost always false.- Specified by:
getNormalFlipVerticalin interfaceMapObjectAPI- Returns:
- The vertical flip flag for the normal map.
-
getNormalMagnitude
public float getNormalMagnitude()Description copied from interface:MapObjectAPIGets the magnitude scalar for the normal map.- Specified by:
getNormalMagnitudein interfaceMapObjectAPI- Returns:
- The magnitude multiplier for the normal map.
-
hasNormal
public boolean hasNormal()Description copied from interface:MapObjectAPIReports 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:
hasNormalin interfaceMapObjectAPI- 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:MapObjectAPIRenders the object with the specified map type.- Specified by:
renderin interfaceMapObjectAPI- 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.
-