pymel.core.datatypes.Point

Inheritance diagram of Point

class Point(*args, **kwargs)

A 4 dimensional vector class that wraps Maya’s api Point class,

angle(start, end)

a.angle(b, c) –> float Returns the angle (in radians) of rotation from point b to c around a. Note that this angle is not signed, use axis to know the direction of the rotation

apicls

alias of MPoint

axis(start, end, normalize=False)

a.axis(b, c) –> Vector Returns the axis of rotation from point b to c around a as the vector n = (b-a)^(c-a) if the normalize keyword argument is set to True, n is also normalized

bWeights(*args)

p.bWeights(p0, p1, (...), pn) –> tuple Returns a tuple of (n0, n1, ...) normalized barycentric weights so that n0*p0 + n1*p1 + ... = p. This method works for n points defining a concave or convex n sided face, always returns positive normalized weights, and is continuous on the face limits (on the edges), but the n points must be coplanar, and p must be inside the face delimited by (p0, ..., pn)

cartesian()

p.cartesian() –> Point Returns the cartesianized version of p, without changing p.

cartesianize()

p.cartesianize() –> Point If the point instance p is of the form P(W*x, W*y, W*z, W), for some scale factor W != 0, then it is reset to be P(x, y, z, 1). This will only work correctly if the point is in homogenous form or cartesian form. If the point is in rational form, the results are not defined.

center(*args)

p.center(q, r, s (...)) –> Point Returns the Point that is the center of p, q, r, s (...)

cnames = ('x', 'y', 'z', 'w')
cotan(start, end)

a.cotan(b, c) –> float : cotangent of the (b-a), (c-a) angle, a, b, and c should be MPoints representing points a, b, c

homogen()

p.homogen() –> Point Returns the homogenized version of p, without changing p.

homogenize()

p.homogenize() –> Point If the point instance p is of the form P(x, y, z, W) (ie. is in rational or (for W==1) cartesian form), for some scale factor W != 0, then it is reset to be P(W*x, W*y, W*z, W).

isEquivalent(other, tol=None)

Returns true if both arguments considered as Point are equal within the specified tolerance

ndim = 1
one = dt.Point([1.0, 1.0, 1.0])
origin = dt.Point([0.0, 0.0, 0.0])
planar(*args, **kwargs)

p.planar(q, r, s (...), tol=tolerance) –> bool Returns True if all provided points are planar within given tolerance

rational()

p.rational() –> Point Returns the rationalized version of p, without changing p.

rationalize()

p.rationalize() –> Point If the point instance p is of the form P(W*x, W*y, W*z, W) (ie. is in homogenous or (for W==1) cartesian form), for some scale factor W != 0, then it is reset to be P(x, y, z, W). This will only work correctly if the point is in homogenous or cartesian form. If the point is already in rational form, the results are not defined.

shape = (4,)
size = 4
w
x
xAxis = dt.Point([1.0, 0.0, 0.0])
xNegAxis = dt.Point([-1.0, 0.0, 0.0])
y
yAxis = dt.Point([0.0, 1.0, 0.0])
yNegAxis = dt.Point([0.0, -1.0, 0.0])
z
zAxis = dt.Point([0.0, 0.0, 1.0])
zNegAxis = dt.Point([0.0, 0.0, -1.0])
zero = dt.Point([0.0, 0.0, 0.0])

Previous topic

pymel.core.datatypes.MetaMayaArrayTypeWrapper

Next topic

pymel.core.datatypes.Quaternion

Core

Core Modules

Other Modules

This Page