From 35e05b092c4c0af3919abd0fd90158dd37e2ba87 Mon Sep 17 00:00:00 2001 From: Daniel Ramirez Date: Thu, 28 Apr 2016 03:14:55 -0500 Subject: [PATCH] Partial documentation for Polygon2D and Raycast2D (#4467) (cherry picked from commit 9f29b4b26a9c9d24235c266f750c14339c038227) --- doc/base/classes.xml | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/doc/base/classes.xml b/doc/base/classes.xml index 4b451ed31bf..f970da8b4bd 100644 --- a/doc/base/classes.xml +++ b/doc/base/classes.xml @@ -25954,80 +25954,94 @@ This method controls whether the position between two cached points is interpola + 2D polygon representation + A Polygon2D is defined by a set of n points connected together by line segments, meaning that the point 1 will be connected with point 2, point 2 with point 3 ..., point n-1 with point n and point n with point 1 in order to close the loop and define a plane. + Defines the set of points that will represent the polygon. + Returns the set of points that defines this polygon + Sets the uv value for every point of the polygon + Returns the uv value associated with every point of the polygon + Sets the polygon fill color, if the polygon has a texture defined, the defined texture will be tinted to the polygon fill color. + Returns the polygon fill color + Sets the polygon texture. + Returns the polygon texture + Sets the offset of the polygon texture. Initially the texture will appear anchored to the polygon position, the offset is used to move the texture location away from that point (notice that the texture origin is set to its top left corner, so when offset is 0,0 the top left corner of the texture is at the polygon position), for example setting the offset to 10, 10 will move the texture 10 units to the left and 10 units to the top. + Returns the polygon texture offset + Sets the amount of rotation of the polygon texture, [code]texture_rotation[/code] is specified in degrees and clockwise rotation, meaning that if the texture rotation is set to 45 degrees, the texture will be rotated 45 degrees clockwise along the polygon position plus the texture offset. + Returns the rotation in degrees of the texture polygon @@ -26046,12 +26060,14 @@ This method controls whether the position between two cached points is interpola + Sets the polygon as the defined polygon bounding box minus the defined polygon (the defined polygon will appear as a hole on square that contains the defined polygon). + Returns whether this polygon is inverted or not @@ -26070,12 +26086,14 @@ This method controls whether the position between two cached points is interpola + Sets the amount of distance from the polygon points from the polygon position, for example if the offset is set to 10,10 then all the polygon points will move 10 units to the right and 10 units to the bottom. + Returns the polygon points offset to the polygon position. @@ -27277,39 +27295,45 @@ This method controls whether the position between two cached points is interpola + Query the closest object intersecting a ray + A RayCast2D represents a line from its origin to its destination position [code]cast_to[/code], it is used to query the 2D space in order to find the closest object intersecting with the ray. + Enables the RayCast2D. Only enabled raycasts will be able to query the space and report collisions. + Returns whether this raycast is enabled or not + Sets the ray destination point, so that the ray will test from the ray's origin to [code]local_point[/code] + Return the destination point of this ray object - Return whether the closest object the ray is pointing to is colliding with the vector, with the vector length considered. + Return whether the closest object the ray is pointing to is colliding with the vector (considering the vector length). @@ -27323,18 +27347,21 @@ This method controls whether the position between two cached points is interpola + Returns the collision shape of the closest object the ray is pointing to. + Returns the collision point in which the ray intersects the closest object. + Returns the normal of the intersecting object shape face containing the collision point. @@ -27347,6 +27374,7 @@ This method controls whether the position between two cached points is interpola + Adds a collision exception so the ray does not report collisions with the specified [code]node[/code]. @@ -27359,10 +27387,12 @@ This method controls whether the position between two cached points is interpola + Removes a collision exception so the ray does report collisions with the specified [code]node[/code]. + Removes all collision exception for this ray. @@ -27375,6 +27405,7 @@ This method controls whether the position between two cached points is interpola + Returns the layer mask for this ray.