[SHAPES] Make functions that draw point arrays take them as const (#4051)
* Update raylib_api.* by CI * make functions that take a pointer to an array take them as const pointers * Update raylib_api.* by CI * fix comment alignment. --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
0fc4b61906
commit
2609211207
7 changed files with 61 additions and 61 deletions
|
@ -5345,7 +5345,7 @@
|
|||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
"type": "Vector2 *",
|
||||
"type": "const Vector2 *",
|
||||
"name": "points"
|
||||
},
|
||||
{
|
||||
|
@ -6022,7 +6022,7 @@
|
|||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
"type": "Vector2 *",
|
||||
"type": "const Vector2 *",
|
||||
"name": "points"
|
||||
},
|
||||
{
|
||||
|
@ -6041,7 +6041,7 @@
|
|||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
"type": "Vector2 *",
|
||||
"type": "const Vector2 *",
|
||||
"name": "points"
|
||||
},
|
||||
{
|
||||
|
@ -6145,7 +6145,7 @@
|
|||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
"type": "Vector2 *",
|
||||
"type": "const Vector2 *",
|
||||
"name": "points"
|
||||
},
|
||||
{
|
||||
|
@ -6168,7 +6168,7 @@
|
|||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
"type": "Vector2 *",
|
||||
"type": "const Vector2 *",
|
||||
"name": "points"
|
||||
},
|
||||
{
|
||||
|
@ -6191,7 +6191,7 @@
|
|||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
"type": "Vector2 *",
|
||||
"type": "const Vector2 *",
|
||||
"name": "points"
|
||||
},
|
||||
{
|
||||
|
@ -6214,7 +6214,7 @@
|
|||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
"type": "Vector2 *",
|
||||
"type": "const Vector2 *",
|
||||
"name": "points"
|
||||
},
|
||||
{
|
||||
|
@ -6237,7 +6237,7 @@
|
|||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
"type": "Vector2 *",
|
||||
"type": "const Vector2 *",
|
||||
"name": "points"
|
||||
},
|
||||
{
|
||||
|
@ -6644,7 +6644,7 @@
|
|||
"name": "point"
|
||||
},
|
||||
{
|
||||
"type": "Vector2 *",
|
||||
"type": "const Vector2 *",
|
||||
"name": "points"
|
||||
},
|
||||
{
|
||||
|
@ -9613,7 +9613,7 @@
|
|||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
"type": "Vector3 *",
|
||||
"type": "const Vector3 *",
|
||||
"name": "points"
|
||||
},
|
||||
{
|
||||
|
|
|
@ -4636,7 +4636,7 @@ return {
|
|||
description = "Draw lines sequence (using gl lines)",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Vector2 *", name = "points"},
|
||||
{type = "const Vector2 *", name = "points"},
|
||||
{type = "int", name = "pointCount"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
|
@ -4947,7 +4947,7 @@ return {
|
|||
description = "Draw a triangle fan defined by points (first vertex is the center)",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Vector2 *", name = "points"},
|
||||
{type = "const Vector2 *", name = "points"},
|
||||
{type = "int", name = "pointCount"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
|
@ -4957,7 +4957,7 @@ return {
|
|||
description = "Draw a triangle strip defined by points",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Vector2 *", name = "points"},
|
||||
{type = "const Vector2 *", name = "points"},
|
||||
{type = "int", name = "pointCount"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
|
@ -5004,7 +5004,7 @@ return {
|
|||
description = "Draw spline: Linear, minimum 2 points",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Vector2 *", name = "points"},
|
||||
{type = "const Vector2 *", name = "points"},
|
||||
{type = "int", name = "pointCount"},
|
||||
{type = "float", name = "thick"},
|
||||
{type = "Color", name = "color"}
|
||||
|
@ -5015,7 +5015,7 @@ return {
|
|||
description = "Draw spline: B-Spline, minimum 4 points",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Vector2 *", name = "points"},
|
||||
{type = "const Vector2 *", name = "points"},
|
||||
{type = "int", name = "pointCount"},
|
||||
{type = "float", name = "thick"},
|
||||
{type = "Color", name = "color"}
|
||||
|
@ -5026,7 +5026,7 @@ return {
|
|||
description = "Draw spline: Catmull-Rom, minimum 4 points",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Vector2 *", name = "points"},
|
||||
{type = "const Vector2 *", name = "points"},
|
||||
{type = "int", name = "pointCount"},
|
||||
{type = "float", name = "thick"},
|
||||
{type = "Color", name = "color"}
|
||||
|
@ -5037,7 +5037,7 @@ return {
|
|||
description = "Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...]",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Vector2 *", name = "points"},
|
||||
{type = "const Vector2 *", name = "points"},
|
||||
{type = "int", name = "pointCount"},
|
||||
{type = "float", name = "thick"},
|
||||
{type = "Color", name = "color"}
|
||||
|
@ -5048,7 +5048,7 @@ return {
|
|||
description = "Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...]",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Vector2 *", name = "points"},
|
||||
{type = "const Vector2 *", name = "points"},
|
||||
{type = "int", name = "pointCount"},
|
||||
{type = "float", name = "thick"},
|
||||
{type = "Color", name = "color"}
|
||||
|
@ -5239,7 +5239,7 @@ return {
|
|||
returnType = "bool",
|
||||
params = {
|
||||
{type = "Vector2", name = "point"},
|
||||
{type = "Vector2 *", name = "points"},
|
||||
{type = "const Vector2 *", name = "points"},
|
||||
{type = "int", name = "pointCount"}
|
||||
}
|
||||
},
|
||||
|
@ -6855,7 +6855,7 @@ return {
|
|||
description = "Draw a triangle strip defined by points",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Vector3 *", name = "points"},
|
||||
{type = "const Vector3 *", name = "points"},
|
||||
{type = "int", name = "pointCount"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
|
|
|
@ -2130,7 +2130,7 @@ Function 212: DrawLineStrip() (3 input parameters)
|
|||
Name: DrawLineStrip
|
||||
Return type: void
|
||||
Description: Draw lines sequence (using gl lines)
|
||||
Param[1]: points (type: Vector2 *)
|
||||
Param[1]: points (type: const Vector2 *)
|
||||
Param[2]: pointCount (type: int)
|
||||
Param[3]: color (type: Color)
|
||||
Function 213: DrawLineBezier() (4 input parameters)
|
||||
|
@ -2360,14 +2360,14 @@ Function 239: DrawTriangleFan() (3 input parameters)
|
|||
Name: DrawTriangleFan
|
||||
Return type: void
|
||||
Description: Draw a triangle fan defined by points (first vertex is the center)
|
||||
Param[1]: points (type: Vector2 *)
|
||||
Param[1]: points (type: const Vector2 *)
|
||||
Param[2]: pointCount (type: int)
|
||||
Param[3]: color (type: Color)
|
||||
Function 240: DrawTriangleStrip() (3 input parameters)
|
||||
Name: DrawTriangleStrip
|
||||
Return type: void
|
||||
Description: Draw a triangle strip defined by points
|
||||
Param[1]: points (type: Vector2 *)
|
||||
Param[1]: points (type: const Vector2 *)
|
||||
Param[2]: pointCount (type: int)
|
||||
Param[3]: color (type: Color)
|
||||
Function 241: DrawPoly() (5 input parameters)
|
||||
|
@ -2402,7 +2402,7 @@ Function 244: DrawSplineLinear() (4 input parameters)
|
|||
Name: DrawSplineLinear
|
||||
Return type: void
|
||||
Description: Draw spline: Linear, minimum 2 points
|
||||
Param[1]: points (type: Vector2 *)
|
||||
Param[1]: points (type: const Vector2 *)
|
||||
Param[2]: pointCount (type: int)
|
||||
Param[3]: thick (type: float)
|
||||
Param[4]: color (type: Color)
|
||||
|
@ -2410,7 +2410,7 @@ Function 245: DrawSplineBasis() (4 input parameters)
|
|||
Name: DrawSplineBasis
|
||||
Return type: void
|
||||
Description: Draw spline: B-Spline, minimum 4 points
|
||||
Param[1]: points (type: Vector2 *)
|
||||
Param[1]: points (type: const Vector2 *)
|
||||
Param[2]: pointCount (type: int)
|
||||
Param[3]: thick (type: float)
|
||||
Param[4]: color (type: Color)
|
||||
|
@ -2418,7 +2418,7 @@ Function 246: DrawSplineCatmullRom() (4 input parameters)
|
|||
Name: DrawSplineCatmullRom
|
||||
Return type: void
|
||||
Description: Draw spline: Catmull-Rom, minimum 4 points
|
||||
Param[1]: points (type: Vector2 *)
|
||||
Param[1]: points (type: const Vector2 *)
|
||||
Param[2]: pointCount (type: int)
|
||||
Param[3]: thick (type: float)
|
||||
Param[4]: color (type: Color)
|
||||
|
@ -2426,7 +2426,7 @@ Function 247: DrawSplineBezierQuadratic() (4 input parameters)
|
|||
Name: DrawSplineBezierQuadratic
|
||||
Return type: void
|
||||
Description: Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...]
|
||||
Param[1]: points (type: Vector2 *)
|
||||
Param[1]: points (type: const Vector2 *)
|
||||
Param[2]: pointCount (type: int)
|
||||
Param[3]: thick (type: float)
|
||||
Param[4]: color (type: Color)
|
||||
|
@ -2434,7 +2434,7 @@ Function 248: DrawSplineBezierCubic() (4 input parameters)
|
|||
Name: DrawSplineBezierCubic
|
||||
Return type: void
|
||||
Description: Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...]
|
||||
Param[1]: points (type: Vector2 *)
|
||||
Param[1]: points (type: const Vector2 *)
|
||||
Param[2]: pointCount (type: int)
|
||||
Param[3]: thick (type: float)
|
||||
Param[4]: color (type: Color)
|
||||
|
@ -2574,7 +2574,7 @@ Function 265: CheckCollisionPointPoly() (3 input parameters)
|
|||
Return type: bool
|
||||
Description: Check if point is within a polygon described by array of vertices
|
||||
Param[1]: point (type: Vector2)
|
||||
Param[2]: points (type: Vector2 *)
|
||||
Param[2]: points (type: const Vector2 *)
|
||||
Param[3]: pointCount (type: int)
|
||||
Function 266: CheckCollisionLines() (5 input parameters)
|
||||
Name: CheckCollisionLines
|
||||
|
@ -3695,7 +3695,7 @@ Function 432: DrawTriangleStrip3D() (3 input parameters)
|
|||
Name: DrawTriangleStrip3D
|
||||
Return type: void
|
||||
Description: Draw a triangle strip defined by points
|
||||
Param[1]: points (type: Vector3 *)
|
||||
Param[1]: points (type: const Vector3 *)
|
||||
Param[2]: pointCount (type: int)
|
||||
Param[3]: color (type: Color)
|
||||
Function 433: DrawCube() (5 input parameters)
|
||||
|
|
|
@ -1317,7 +1317,7 @@
|
|||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawLineStrip" retType="void" paramCount="3" desc="Draw lines sequence (using gl lines)">
|
||||
<Param type="Vector2 *" name="points" desc="" />
|
||||
<Param type="const Vector2 *" name="points" desc="" />
|
||||
<Param type="int" name="pointCount" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
|
@ -1493,12 +1493,12 @@
|
|||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawTriangleFan" retType="void" paramCount="3" desc="Draw a triangle fan defined by points (first vertex is the center)">
|
||||
<Param type="Vector2 *" name="points" desc="" />
|
||||
<Param type="const Vector2 *" name="points" desc="" />
|
||||
<Param type="int" name="pointCount" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawTriangleStrip" retType="void" paramCount="3" desc="Draw a triangle strip defined by points">
|
||||
<Param type="Vector2 *" name="points" desc="" />
|
||||
<Param type="const Vector2 *" name="points" desc="" />
|
||||
<Param type="int" name="pointCount" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
|
@ -1525,31 +1525,31 @@
|
|||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawSplineLinear" retType="void" paramCount="4" desc="Draw spline: Linear, minimum 2 points">
|
||||
<Param type="Vector2 *" name="points" desc="" />
|
||||
<Param type="const Vector2 *" name="points" desc="" />
|
||||
<Param type="int" name="pointCount" desc="" />
|
||||
<Param type="float" name="thick" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawSplineBasis" retType="void" paramCount="4" desc="Draw spline: B-Spline, minimum 4 points">
|
||||
<Param type="Vector2 *" name="points" desc="" />
|
||||
<Param type="const Vector2 *" name="points" desc="" />
|
||||
<Param type="int" name="pointCount" desc="" />
|
||||
<Param type="float" name="thick" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawSplineCatmullRom" retType="void" paramCount="4" desc="Draw spline: Catmull-Rom, minimum 4 points">
|
||||
<Param type="Vector2 *" name="points" desc="" />
|
||||
<Param type="const Vector2 *" name="points" desc="" />
|
||||
<Param type="int" name="pointCount" desc="" />
|
||||
<Param type="float" name="thick" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawSplineBezierQuadratic" retType="void" paramCount="4" desc="Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...]">
|
||||
<Param type="Vector2 *" name="points" desc="" />
|
||||
<Param type="const Vector2 *" name="points" desc="" />
|
||||
<Param type="int" name="pointCount" desc="" />
|
||||
<Param type="float" name="thick" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawSplineBezierCubic" retType="void" paramCount="4" desc="Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...]">
|
||||
<Param type="Vector2 *" name="points" desc="" />
|
||||
<Param type="const Vector2 *" name="points" desc="" />
|
||||
<Param type="int" name="pointCount" desc="" />
|
||||
<Param type="float" name="thick" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
|
@ -1655,7 +1655,7 @@
|
|||
</Function>
|
||||
<Function name="CheckCollisionPointPoly" retType="bool" paramCount="3" desc="Check if point is within a polygon described by array of vertices">
|
||||
<Param type="Vector2" name="point" desc="" />
|
||||
<Param type="Vector2 *" name="points" desc="" />
|
||||
<Param type="const Vector2 *" name="points" desc="" />
|
||||
<Param type="int" name="pointCount" desc="" />
|
||||
</Function>
|
||||
<Function name="CheckCollisionLines" retType="bool" paramCount="5" desc="Check the collision between two lines defined by two points each, returns collision point by reference">
|
||||
|
@ -2440,7 +2440,7 @@
|
|||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawTriangleStrip3D" retType="void" paramCount="3" desc="Draw a triangle strip defined by points">
|
||||
<Param type="Vector3 *" name="points" desc="" />
|
||||
<Param type="const Vector3 *" name="points" desc="" />
|
||||
<Param type="int" name="pointCount" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
|
|
22
src/raylib.h
22
src/raylib.h
|
@ -1233,7 +1233,7 @@ RLAPI void DrawPixelV(Vector2 position, Color color);
|
|||
RLAPI void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color); // Draw a line
|
||||
RLAPI void DrawLineV(Vector2 startPos, Vector2 endPos, Color color); // Draw a line (using gl lines)
|
||||
RLAPI void DrawLineEx(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw a line (using triangles/quads)
|
||||
RLAPI void DrawLineStrip(Vector2 *points, int pointCount, Color color); // Draw lines sequence (using gl lines)
|
||||
RLAPI void DrawLineStrip(const Vector2 *points, int pointCount, Color color); // Draw lines sequence (using gl lines)
|
||||
RLAPI void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw line segment cubic-bezier in-out interpolation
|
||||
RLAPI void DrawCircle(int centerX, int centerY, float radius, Color color); // Draw a color-filled circle
|
||||
RLAPI void DrawCircleSector(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); // Draw a piece of a circle
|
||||
|
@ -1260,18 +1260,18 @@ RLAPI void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segment
|
|||
RLAPI void DrawRectangleRoundedLinesEx(Rectangle rec, float roundness, int segments, float lineThick, Color color); // Draw rectangle with rounded edges outline
|
||||
RLAPI void DrawTriangle(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw a color-filled triangle (vertex in counter-clockwise order!)
|
||||
RLAPI void DrawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle outline (vertex in counter-clockwise order!)
|
||||
RLAPI void DrawTriangleFan(Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points (first vertex is the center)
|
||||
RLAPI void DrawTriangleStrip(Vector2 *points, int pointCount, Color color); // Draw a triangle strip defined by points
|
||||
RLAPI void DrawTriangleFan(const Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points (first vertex is the center)
|
||||
RLAPI void DrawTriangleStrip(const Vector2 *points, int pointCount, Color color); // Draw a triangle strip defined by points
|
||||
RLAPI void DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a regular polygon (Vector version)
|
||||
RLAPI void DrawPolyLines(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a polygon outline of n sides
|
||||
RLAPI void DrawPolyLinesEx(Vector2 center, int sides, float radius, float rotation, float lineThick, Color color); // Draw a polygon outline of n sides with extended parameters
|
||||
|
||||
// Splines drawing functions
|
||||
RLAPI void DrawSplineLinear(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Linear, minimum 2 points
|
||||
RLAPI void DrawSplineBasis(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: B-Spline, minimum 4 points
|
||||
RLAPI void DrawSplineCatmullRom(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Catmull-Rom, minimum 4 points
|
||||
RLAPI void DrawSplineBezierQuadratic(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...]
|
||||
RLAPI void DrawSplineBezierCubic(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...]
|
||||
RLAPI void DrawSplineLinear(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Linear, minimum 2 points
|
||||
RLAPI void DrawSplineBasis(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: B-Spline, minimum 4 points
|
||||
RLAPI void DrawSplineCatmullRom(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Catmull-Rom, minimum 4 points
|
||||
RLAPI void DrawSplineBezierQuadratic(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...]
|
||||
RLAPI void DrawSplineBezierCubic(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...]
|
||||
RLAPI void DrawSplineSegmentLinear(Vector2 p1, Vector2 p2, float thick, Color color); // Draw spline segment: Linear, 2 points
|
||||
RLAPI void DrawSplineSegmentBasis(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float thick, Color color); // Draw spline segment: B-Spline, 4 points
|
||||
RLAPI void DrawSplineSegmentCatmullRom(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float thick, Color color); // Draw spline segment: Catmull-Rom, 4 points
|
||||
|
@ -1292,7 +1292,7 @@ RLAPI bool CheckCollisionCircleRec(Vector2 center, float radius, Rectangle rec);
|
|||
RLAPI bool CheckCollisionPointRec(Vector2 point, Rectangle rec); // Check if point is inside rectangle
|
||||
RLAPI bool CheckCollisionPointCircle(Vector2 point, Vector2 center, float radius); // Check if point is inside circle
|
||||
RLAPI bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3); // Check if point is inside a triangle
|
||||
RLAPI bool CheckCollisionPointPoly(Vector2 point, Vector2 *points, int pointCount); // Check if point is within a polygon described by array of vertices
|
||||
RLAPI bool CheckCollisionPointPoly(Vector2 point, const Vector2 *points, int pointCount); // Check if point is within a polygon described by array of vertices
|
||||
RLAPI bool CheckCollisionLines(Vector2 startPos1, Vector2 endPos1, Vector2 startPos2, Vector2 endPos2, Vector2 *collisionPoint); // Check the collision between two lines defined by two points each, returns collision point by reference
|
||||
RLAPI bool CheckCollisionPointLine(Vector2 point, Vector2 p1, Vector2 p2, int threshold); // Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]
|
||||
RLAPI bool CheckCollisionCircleLine(Vector2 center, float radius, Vector2 p1, Vector2 p2); // Check if circle collides with a line created betweeen two points [p1] and [p2]
|
||||
|
@ -1342,7 +1342,7 @@ RLAPI void ImageAlphaClear(Image *image, Color color, float threshold);
|
|||
RLAPI void ImageAlphaMask(Image *image, Image alphaMask); // Apply alpha mask to image
|
||||
RLAPI void ImageAlphaPremultiply(Image *image); // Premultiply alpha channel
|
||||
RLAPI void ImageBlurGaussian(Image *image, int blurSize); // Apply Gaussian blur using a box blur approximation
|
||||
RLAPI void ImageKernelConvolution(Image *image, float* kernel, int kernelSize); // Apply Custom Square image convolution kernel
|
||||
RLAPI void ImageKernelConvolution(Image *image, float* kernel, int kernelSize); // Apply Custom Square image convolution kernel
|
||||
RLAPI void ImageResize(Image *image, int newWidth, int newHeight); // Resize image (Bicubic scaling algorithm)
|
||||
RLAPI void ImageResizeNN(Image *image, int newWidth,int newHeight); // Resize image (Nearest-Neighbor scaling algorithm)
|
||||
RLAPI void ImageResizeCanvas(Image *image, int newWidth, int newHeight, int offsetX, int offsetY, Color fill); // Resize canvas and fill with color
|
||||
|
@ -1504,7 +1504,7 @@ RLAPI void DrawLine3D(Vector3 startPos, Vector3 endPos, Color color);
|
|||
RLAPI void DrawPoint3D(Vector3 position, Color color); // Draw a point in 3D space, actually a small line
|
||||
RLAPI void DrawCircle3D(Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color); // Draw a circle in 3D world space
|
||||
RLAPI void DrawTriangle3D(Vector3 v1, Vector3 v2, Vector3 v3, Color color); // Draw a color-filled triangle (vertex in counter-clockwise order!)
|
||||
RLAPI void DrawTriangleStrip3D(Vector3 *points, int pointCount, Color color); // Draw a triangle strip defined by points
|
||||
RLAPI void DrawTriangleStrip3D(const Vector3 *points, int pointCount, Color color); // Draw a triangle strip defined by points
|
||||
RLAPI void DrawCube(Vector3 position, float width, float height, float length, Color color); // Draw cube
|
||||
RLAPI void DrawCubeV(Vector3 position, Vector3 size, Color color); // Draw cube (Vector version)
|
||||
RLAPI void DrawCubeWires(Vector3 position, float width, float height, float length, Color color); // Draw cube wires
|
||||
|
|
|
@ -226,7 +226,7 @@ void DrawTriangle3D(Vector3 v1, Vector3 v2, Vector3 v3, Color color)
|
|||
}
|
||||
|
||||
// Draw a triangle strip defined by points
|
||||
void DrawTriangleStrip3D(Vector3 *points, int pointCount, Color color)
|
||||
void DrawTriangleStrip3D(const Vector3 *points, int pointCount, Color color)
|
||||
{
|
||||
if (pointCount < 3) return; // Security check
|
||||
|
||||
|
|
|
@ -196,7 +196,7 @@ void DrawLineV(Vector2 startPos, Vector2 endPos, Color color)
|
|||
}
|
||||
|
||||
// Draw lines sequuence (using gl lines)
|
||||
void DrawLineStrip(Vector2 *points, int pointCount, Color color)
|
||||
void DrawLineStrip(const Vector2 *points, int pointCount, Color color)
|
||||
{
|
||||
if (pointCount < 2) return; // Security check
|
||||
|
||||
|
@ -1385,7 +1385,7 @@ void DrawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color)
|
|||
// Draw a triangle fan defined by points
|
||||
// NOTE: First vertex provided is the center, shared by all triangles
|
||||
// By default, following vertex should be provided in counter-clockwise order
|
||||
void DrawTriangleFan(Vector2 *points, int pointCount, Color color)
|
||||
void DrawTriangleFan(const Vector2 *points, int pointCount, Color color)
|
||||
{
|
||||
if (pointCount >= 3)
|
||||
{
|
||||
|
@ -1416,7 +1416,7 @@ void DrawTriangleFan(Vector2 *points, int pointCount, Color color)
|
|||
|
||||
// Draw a triangle strip defined by points
|
||||
// NOTE: Every new vertex connects with previous two
|
||||
void DrawTriangleStrip(Vector2 *points, int pointCount, Color color)
|
||||
void DrawTriangleStrip(const Vector2 *points, int pointCount, Color color)
|
||||
{
|
||||
if (pointCount >= 3)
|
||||
{
|
||||
|
@ -1570,7 +1570,7 @@ void DrawPolyLinesEx(Vector2 center, int sides, float radius, float rotation, fl
|
|||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw spline: linear, minimum 2 points
|
||||
void DrawSplineLinear(Vector2 *points, int pointCount, float thick, Color color)
|
||||
void DrawSplineLinear(const Vector2 *points, int pointCount, float thick, Color color)
|
||||
{
|
||||
if (pointCount < 2) return;
|
||||
|
||||
|
@ -1687,7 +1687,7 @@ void DrawSplineLinear(Vector2 *points, int pointCount, float thick, Color color)
|
|||
}
|
||||
|
||||
// Draw spline: B-Spline, minimum 4 points
|
||||
void DrawSplineBasis(Vector2 *points, int pointCount, float thick, Color color)
|
||||
void DrawSplineBasis(const Vector2 *points, int pointCount, float thick, Color color)
|
||||
{
|
||||
if (pointCount < 4) return;
|
||||
|
||||
|
@ -1763,7 +1763,7 @@ void DrawSplineBasis(Vector2 *points, int pointCount, float thick, Color color)
|
|||
}
|
||||
|
||||
// Draw spline: Catmull-Rom, minimum 4 points
|
||||
void DrawSplineCatmullRom(Vector2 *points, int pointCount, float thick, Color color)
|
||||
void DrawSplineCatmullRom(const Vector2 *points, int pointCount, float thick, Color color)
|
||||
{
|
||||
if (pointCount < 4) return;
|
||||
|
||||
|
@ -1829,7 +1829,7 @@ void DrawSplineCatmullRom(Vector2 *points, int pointCount, float thick, Color co
|
|||
}
|
||||
|
||||
// Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...]
|
||||
void DrawSplineBezierQuadratic(Vector2 *points, int pointCount, float thick, Color color)
|
||||
void DrawSplineBezierQuadratic(const Vector2 *points, int pointCount, float thick, Color color)
|
||||
{
|
||||
if (pointCount < 3) return;
|
||||
|
||||
|
@ -1840,7 +1840,7 @@ void DrawSplineBezierQuadratic(Vector2 *points, int pointCount, float thick, Col
|
|||
}
|
||||
|
||||
// Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...]
|
||||
void DrawSplineBezierCubic(Vector2 *points, int pointCount, float thick, Color color)
|
||||
void DrawSplineBezierCubic(const Vector2 *points, int pointCount, float thick, Color color)
|
||||
{
|
||||
if (pointCount < 4) return;
|
||||
|
||||
|
@ -2195,7 +2195,7 @@ bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Vector2
|
|||
|
||||
// Check if point is within a polygon described by array of vertices
|
||||
// NOTE: Based on http://jeffreythompson.org/collision-detection/poly-point.php
|
||||
bool CheckCollisionPointPoly(Vector2 point, Vector2 *points, int pointCount)
|
||||
bool CheckCollisionPointPoly(Vector2 point, const Vector2 *points, int pointCount)
|
||||
{
|
||||
bool inside = false;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue