Class WavefrontTerrainPlugin
java.lang.Object
com.fs.starfarer.api.impl.campaign.terrain.BaseTerrain
com.fs.starfarer.api.impl.campaign.terrain.WavefrontTerrainPlugin
- All Implemented Interfaces:
CampaignTerrainPlugin
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.lwjgl.util.vector.Vector2f
protected float
protected float
protected float
protected float
protected FaderUtil
protected int
protected org.lwjgl.util.vector.Vector2f
protected org.lwjgl.util.vector.Vector2f
protected WavefrontTerrainPlugin.WavefrontParams
protected float
protected SpriteAPI
protected org.lwjgl.util.vector.Vector2f
Fields inherited from class com.fs.starfarer.api.impl.campaign.terrain.BaseTerrain
entity, EXTRA_SOUND_RADIUS, name, TERRAIN_LOCK_KEY, terrainId
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
advance
(float amount) void
applyEffect
(SectorEntityToken entity, float days) boolean
boolean
containsPoint
(org.lwjgl.util.vector.Vector2f point, float radius) void
createTooltip
(TooltipMakerAPI tooltip, boolean expanded) Set of layers can not change.protected float
float
getForceDirAtPoint
(org.lwjgl.util.vector.Vector2f point) float
getIntensityAtPoint
(org.lwjgl.util.vector.Vector2f point) float
getMaxEffectRadius
(org.lwjgl.util.vector.Vector2f locFrom) Mainly intended for AI use.float
getMinEffectRadius
(org.lwjgl.util.vector.Vector2f locFrom) Mainly intended for AI use.float
getOptimalEffectRadius
(org.lwjgl.util.vector.Vector2f locFrom) Mainly intended for AI use.protected float
float
How far away from the viewport the center of this entity can be before it stops being rendered.float
boolean
boolean
void
init
(String terrainId, SectorEntityToken entity, Object param) boolean
void
render
(CampaignEngineLayers layer, ViewportAPI viewport) protected void
protected void
Methods inherited from class com.fs.starfarer.api.impl.campaign.terrain.BaseTerrain
containsEntity, createCombatSection, createFirstSection, createTravelSection, getEntity, getExtraSoundRadius, getIconSpriteName, getLoopFourPitch, getLoopFourVolume, getLoopOnePitch, getLoopOneVolume, getLoopThreePitch, getLoopThreeVolume, getLoopTwoPitch, getLoopTwoVolume, getModId, getNameAOrAn, getProximitySoundFactor, getRelatedEntity, getSpec, getTerrainId, hasAIFlag, hasAIFlag, isPreventedFromAffecting, preventOtherTerrainFromAffecting, preventOtherTerrainFromAffecting, renderOnMap, renderOnMapAbove, renderOnRadar, setEntity, setTerrainId, setTerrainName, shouldCheckFleetsToApplyEffect, shouldPlayLoopFour, shouldPlayLoopOne, shouldPlayLoopThree, shouldPlayLoopTwo, stacksWithSelf
-
Field Details
-
texture
-
params
-
arcOrigin
protected org.lwjgl.util.vector.Vector2f arcOrigin -
velDir
protected org.lwjgl.util.vector.Vector2f velDir -
p1
protected org.lwjgl.util.vector.Vector2f p1 -
p2
protected org.lwjgl.util.vector.Vector2f p2 -
distanceTravelled
protected float distanceTravelled -
currentWidth
protected float currentWidth -
currentThickness
protected float currentThickness -
currentArc
protected float currentArc -
phaseAngle
protected float phaseAngle -
numSegments
protected int numSegments -
fader
-
-
Constructor Details
-
WavefrontTerrainPlugin
public WavefrontTerrainPlugin()
-
-
Method Details
-
init
- Specified by:
init
in interfaceCampaignTerrainPlugin
- Overrides:
init
in classBaseTerrain
-
getPixelsPerSegment
protected float getPixelsPerSegment() -
getActiveLayers
Description copied from interface:CampaignTerrainPlugin
Set of layers can not change.- Specified by:
getActiveLayers
in interfaceCampaignTerrainPlugin
- Overrides:
getActiveLayers
in classBaseTerrain
- Returns:
-
getParams
-
updateArcOrigin
protected void updateArcOrigin() -
advance
public void advance(float amount) - Specified by:
advance
in interfaceCampaignTerrainPlugin
- Overrides:
advance
in classBaseTerrain
-
render
- Specified by:
render
in interfaceCampaignTerrainPlugin
- Overrides:
render
in classBaseTerrain
-
getRenderRange
public float getRenderRange()Description copied from interface:CampaignTerrainPlugin
How far away from the viewport the center of this entity can be before it stops being rendered. Should at least be the radius of the entity; sometimes more may be necessary depending on the visual effect desired.- Specified by:
getRenderRange
in interfaceCampaignTerrainPlugin
- Overrides:
getRenderRange
in classBaseTerrain
- Returns:
-
updateArcOfCurrWidth
protected void updateArcOfCurrWidth() -
getFadeDist
protected float getFadeDist() -
containsPoint
public boolean containsPoint(org.lwjgl.util.vector.Vector2f point, float radius) - Specified by:
containsPoint
in interfaceCampaignTerrainPlugin
- Overrides:
containsPoint
in classBaseTerrain
-
applyEffect
- Overrides:
applyEffect
in classBaseTerrain
-
getForceDirAtPoint
public float getForceDirAtPoint(org.lwjgl.util.vector.Vector2f point) -
getIntensityAtPoint
public float getIntensityAtPoint(org.lwjgl.util.vector.Vector2f point) -
getNameColor
- Specified by:
getNameColor
in interfaceCampaignTerrainPlugin
- Overrides:
getNameColor
in classBaseTerrain
-
hasTooltip
public boolean hasTooltip()- Specified by:
hasTooltip
in interfaceCampaignTerrainPlugin
- Overrides:
hasTooltip
in classBaseTerrain
-
createTooltip
- Specified by:
createTooltip
in interfaceCampaignTerrainPlugin
- Overrides:
createTooltip
in classBaseTerrain
-
isTooltipExpandable
public boolean isTooltipExpandable()- Specified by:
isTooltipExpandable
in interfaceCampaignTerrainPlugin
- Overrides:
isTooltipExpandable
in classBaseTerrain
-
getTooltipWidth
public float getTooltipWidth()- Specified by:
getTooltipWidth
in interfaceCampaignTerrainPlugin
- Overrides:
getTooltipWidth
in classBaseTerrain
-
getTerrainName
- Specified by:
getTerrainName
in interfaceCampaignTerrainPlugin
- Overrides:
getTerrainName
in classBaseTerrain
-
getNameForTooltip
- Specified by:
getNameForTooltip
in interfaceCampaignTerrainPlugin
- Overrides:
getNameForTooltip
in classBaseTerrain
-
getEffectCategory
- Overrides:
getEffectCategory
in classBaseTerrain
-
getMaxEffectRadius
public float getMaxEffectRadius(org.lwjgl.util.vector.Vector2f locFrom) Description copied from interface:CampaignTerrainPlugin
Mainly intended for AI use.- Specified by:
getMaxEffectRadius
in interfaceCampaignTerrainPlugin
- Overrides:
getMaxEffectRadius
in classBaseTerrain
- Returns:
-
getMinEffectRadius
public float getMinEffectRadius(org.lwjgl.util.vector.Vector2f locFrom) Description copied from interface:CampaignTerrainPlugin
Mainly intended for AI use.- Specified by:
getMinEffectRadius
in interfaceCampaignTerrainPlugin
- Overrides:
getMinEffectRadius
in classBaseTerrain
- Returns:
-
getOptimalEffectRadius
public float getOptimalEffectRadius(org.lwjgl.util.vector.Vector2f locFrom) Description copied from interface:CampaignTerrainPlugin
Mainly intended for AI use.- Specified by:
getOptimalEffectRadius
in interfaceCampaignTerrainPlugin
- Overrides:
getOptimalEffectRadius
in classBaseTerrain
- Returns:
-
hasMapIcon
public boolean hasMapIcon()- Specified by:
hasMapIcon
in interfaceCampaignTerrainPlugin
- Overrides:
hasMapIcon
in classBaseTerrain
-
canPlayerHoldStationIn
public boolean canPlayerHoldStationIn()- Specified by:
canPlayerHoldStationIn
in interfaceCampaignTerrainPlugin
- Overrides:
canPlayerHoldStationIn
in classBaseTerrain
-