Point3
- class Point3
Point
holds three 32-bit floating point coordinates.Example:
point = skia.Point3(0.0, 0.0, 0.0) point = skia.Point3((0.0, 0.0, 0.0)) # Convert from tuple print(point.fX, point.fY, point.fZ) x, y, z = tuple(point) # Convert to tuple
Methods
Returns the cross product of a and b, treating them as 3D vectors.
Returns the dot product of a and b, treating them as 3D vectors.
Returns the Euclidian distance from (0,0,0) to (x,y,z)
Overloaded function.
Returns true if fX, fY, and fZ are measurable values.
Return the Euclidian distance from (0,0,0) to the point.
Return a new point whose X, Y and Z coordinates are scaled.
Set the point (vector) to be unit-length in the same direction as it already points.
Scale the point's coordinates by scale.
Attributes
x-axis value
y-axis value
z-axis value
Methods
- static Point3.CrossProduct(a: skia.Point3, b: skia.Point3) skia.Point3
Returns the cross product of a and b, treating them as 3D vectors.
- static Point3.DotProduct(a: skia.Point3, b: skia.Point3) float
Returns the dot product of a and b, treating them as 3D vectors.
- static Point3.Length(x: float, y: float, z: float) float
Returns the Euclidian distance from (0,0,0) to (x,y,z)
- static Point3.Make(x: float, y: float, z: float) skia.Point3
- Point3.__init__(*args, **kwargs)
Overloaded function.
__init__(self: skia.Point3, x: float, y: float, z: float) -> None
__init__(self: skia.Point3, t: tuple) -> None
- Point3.cross(self: skia.Point3, vec: skia.Point3) skia.Point3
- Point3.dot(self: skia.Point3, vec: skia.Point3) float
- Point3.isFinite(self: skia.Point3) bool
Returns true if fX, fY, and fZ are measurable values.
- Point3.length(self: skia.Point3) float
Return the Euclidian distance from (0,0,0) to the point.
- Point3.makeScale(self: skia.Point3, scale: float) skia.Point3
Return a new point whose X, Y and Z coordinates are scaled.
- Point3.normalize(self: skia.Point3) bool
Set the point (vector) to be unit-length in the same direction as it already points.
If the point has a degenerate length (i.e., nearly 0) then set it to (0,0,0) and return false; otherwise return true.
- Point3.scale(self: skia.Point3, scale: float) None
Scale the point’s coordinates by scale.
- Point3.set(self: skia.Point3, x: float, y: float, z: float) None
- Point3.x(self: skia.Point3) float
- Point3.y(self: skia.Point3) float
- Point3.z(self: skia.Point3) float
Attributes
- Point3.fX
x-axis value
- Point3.fY
y-axis value
- Point3.fZ
z-axis value