UVPoint
A point in 2D space. This object lives in the Lua session only. Points are defined by numbers and cannot be defined with expressions. Mathematical operations can be done on points.
Example
-- Create a default 'UVPoint' at (0,0,0) p1 = pf.UVPoint.New() -- Assign values to each component of the point p1.x = 1 p1.y = 1 -- Create a 'UVPoint' with number values p2 = pf.UVPoint(2,2) -- Determine the distance between two points distance = p1:distanceTo(p2) -- Some of the valid operators for 'UVPoint' p3 = 2 * p1 p4 = p2 * 2 p5 = p2 / 2 p6 = -p2 p7 = p1 + p2 p8 = p1 - p2 if (p1 ~= p2) then print(p1.." is not equal to "..p2) end
Usage locations
The UVPoint object can be accessed from the following locations:
Property List
Method List
- DistanceTo (point UVPoint)
- Returns the distance between this point and another. (Returns a number object.)