Line2D
From Crumbled World Wiki
Members
| type | variable | description |
|---|---|---|
| Vec2 | startPos | |
| Vec2 | endPos |
Constructor
| function | description |
|---|---|
| Line2D(Vec2 startPos, Vec2 endPos) | |
| Line2D(Vec2 startPos, Vec2 atVec, float length) | |
| Line2D() |
Functions
| return | function | description |
|---|---|---|
| float | length() | Returns the line length. |
| float | getDist() | Returns the line length^2. |
| Vec2 | getCenterPos() | Returns the line center position. |
| setLine(Vec3 startPos, Vec3 endPos) | set the line. | |
| setLine(Line2D line) | set the line. |