Back to class index
| Polygon::MapTo2DSyntaxfloat2 Polygon::MapTo2D(int i) const; [10 lines of code]Returns the given vertex of this polygon mapped to a local 2D space on this polygon. In the local space of the polygon, the z-coordinate is always zero, and the polygon lies in the XY-plane, with the first vertex of the polygon being in the origin, and the x-axis running in the direction given by BasisU() and the y-axis running in the direction given by BasisV(). ParametersintiThe index of the vertices of this polygon to generate, in the range [0, NumVertices()-1]. See AlsoSyntaxfloat2 Polygon::MapTo2D(const float4 &point) const; [12 lines of code]Maps the given global (world) space point to the local 2D space of this polygon. Work in progress:Todo: in float2 Polygon::MapTo2D(const float4 &point) const: Return a float3 to be able to read the distance of the point from the plane of the polygon? (or add an overload for that) Add MapTo2D(Line/LineSegment/Ray/Triangle/Polygon). |