Package com.fs.starfarer.api.combat
Interface BoundsAPI
public interface BoundsAPI
The bounds HAVE to be a polygon - can't just be a disconnected set of segments.
The polygon can be either concave or convex.
- Author:
- Alex Mosolov Copyright 2012 Fractal Softworks, LLC
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSegment
(float x2, float y2) Adds a segment using the end of the previously added segment as the starting point.void
addSegment
(float x1, float y1, float x2, float y2) Add a new segment.void
clear()
Remove all segments.void
update
(org.lwjgl.util.vector.Vector2f location, float facing) Updates the coordinates of the bounds to reflect the specified location and facing.
-
Method Details
-
update
void update(org.lwjgl.util.vector.Vector2f location, float facing) Updates the coordinates of the bounds to reflect the specified location and facing. -
getSegments
List<BoundsAPI.SegmentAPI> getSegments() -
clear
void clear()Remove all segments. -
addSegment
void addSegment(float x1, float y1, float x2, float y2) Add a new segment. Coordinates are relative to entity center, with entity facing 0 degrees (i.e., to the right).- Parameters:
x1
-y1
-x2
-y2
-
-
addSegment
void addSegment(float x2, float y2) Adds a segment using the end of the previously added segment as the starting point.- Parameters:
x2
-y2
-
-
getOrigSegments
List<BoundsAPI.SegmentAPI> getOrigSegments()
-