-
Notifications
You must be signed in to change notification settings - Fork 0
Daze.Geometry
Federico Capece edited this page Nov 20, 2017
·
1 revision
It's a circle... yes, just a circle.
public struct Daze.Geometry.CircleFields
| Type | Name | Summary |
|---|---|---|
Point |
center | The center of the circle |
Single |
radius | The radius of the circle |
Methods
| Type | Name | Summary |
|---|---|---|
Boolean |
contains(Point point) |
An abstract class that is the base for creating convex polygons for colliders.
public abstract class Daze.Geometry.ConvexPolygonFields
| Type | Name | Summary |
|---|---|---|
Line[] |
lines | The edges of this polygon |
Single |
ray | The ray of the polygon is the distance from the center and a vertex |
Properties
| Type | Name | Summary |
|---|---|---|
Point |
center | The center of this polygon |
Single |
rotation | The rotation of this polygon |
Methods
| Type | Name | Summary |
|---|---|---|
Boolean |
contains(Point point) |
Check if this polygon contains the specified point |
public struct Daze.Geometry.LineFields
| Type | Name | Summary |
|---|---|---|
Point |
point1 | |
Point |
point2 |
Methods
| Type | Name | Summary |
|---|---|---|
String |
ToString() |
A point, it has a X cordinate and a Y coordinate... that's pretty much all.
public struct Daze.Geometry.PointFields
| Type | Name | Summary |
|---|---|---|
Single |
x | The position of the point on the X axis |
Single |
y | The position of the point on the Y axis |
Methods
| Type | Name | Summary |
|---|---|---|
Point |
duplicate() | return a copy of this Point |
void |
rotatePointAroundO(Single angle) |
This method rotate the point counterclockwise around the origin point |
String |
ToString() | A string rapresentation of this point |
Static Fields
| Type | Name | Summary |
|---|---|---|
Point |
O | The origin point (0,0) |
A rectangle. Yes, it's just a rectangle.
public class Daze.Geometry.Rectangle
: ConvexPolygonFields
| Type | Name | Summary |
|---|---|---|
Point |
A | Vertex of the rectangle |
Point |
B | Vertex of the rectangle |
Point |
C | Vertex of the rectangle |
Point |
D | Vertex of the rectangle |
Properties
| Type | Name | Summary |
|---|---|---|
Point |
center | The center of the rectangle |
Single |
height | The height of the rectangle |
Single |
rotation | The rotation of the rectangle |
Single |
width | The width of the rectangle |
public struct Daze.Geometry.SizeFields
| Type | Name | Summary |
|---|---|---|
Int32 |
height | |
Int32 |
width |
Methods
| Type | Name | Summary |
|---|---|---|
Size |
duplicate() | |
void |
set(Int32 width, Int32 height) |
A static class with some methods that can be useful for creating new collider Types
public static class Daze.Geometry.UtilityStatic Methods
| Type | Name | Summary |
|---|---|---|
Boolean |
between(Single toCheck, Single extreme1, Single extreme2) |
|
Single |
calculateLineOffsetYFromO(Line line) |
|
Single |
distance(Point point1, Point point2) |
|
Single |
getAngularCoefficient(Line line) |
|
Single |
getAngularCoefficient(Point p1, Point p2) |
|
Single |
getHypotenuse(Single cathetus1, Single cathetus2) |
|
Boolean |
lineIntersect(Line line, Circle circle) |
|
Boolean |
linesIntersect(Line line1, Line line2) |
|
Boolean |
linesIntersect(Line line1, Circle circle) |
|
Boolean |
pointInSegmentBoundingBox(Point pointToCheck, Line line) |