| |
- Vec3
-
- vec3
class Vec3 |
|
A three dimensional vector class. |
|
Methods defined here:
- __eq__(self, another)
- Determine whether this vector is identical to another one.
- __hash__(self)
- Determine whether this vector is identical to another one.
- __init__(self, x=0.0, y=0.0, z=0.0)
- __ne__(self, another)
- Determine whether this vector is not identical to another one.
- __repr__(self)
- Get the string representation of this Vec3.
- add(self, another)
- Add another Vec3 to this one.
- distance(self, another)
- Get the Euclidean distance between this vector and another one.
Keyword arguments:
another -- Vec3 whose distance to the original will be calculated
- distance2(self, another)
- Get the square of the Euclidean distance between this vector and another one.
Keyword arguments:
another -- Vec3 whose squared distance to the original will be calculated
- dot(self, another)
- Calculate the dot product of this vector with another one.
- dropAxis(self, which)
- Get a complex by removing one axis of this one.
Keyword arguments:
which -- the axis to drop (0=X, 1=Y, 2=Z)
- equals(self, another)
- Determine whether this vector is identical to another one.
- getFromVec3(self, another)
- Get a new Vec3 identical to another one.
- getFromXYZ(self, x, y, z)
- Get a new Vec3 with the specified x, y, and z components.
- length(self)
- Get the length of the Vec3.
- length2(self)
- Get the square of the length of the Vec3.
- minus(self, subtractVec3)
- Get the difference between the Vec3 and another one.
Keyword arguments:
subtractVec3 -- Vec3 which will be subtracted from the original
- multiply(self, another)
- Multiply each component of this vector by the corresponding component of another vector.
- normalize(self)
- Scale each component of this Vec3 so that it has a length of 1. If this Vec3 has a length of 0, this method has no effect.
- plus(self, plusVec3)
- Get the sum of this Vec3 and another one.
Keyword arguments:
plusVec3 -- Vec3 which will be added to the original
- scale(self, multiplier)
- Scale each component of this Vec3 by a multiplier.
- setToVec3(self, another)
- Set this Vec3 to be identical to another one.
- setToXYZ(self, x, y, z)
- Set the x, y, and z components of this Vec3.
- subtract(self, another)
- Subtract another Vec3 from this one.
- times(self, multiplier)
- Get a new Vec3 by multiplying each component of this one by a multiplier.
|
class vec3(Vec3) |
|
A three dimensional vector class which completely inherits from Vec3 and is deprecated, please use Vec3 instead. |
|
Methods defined here:
- __init__(self, x=0.0, y=0.0, z=0.0)
Methods inherited from Vec3:
- __eq__(self, another)
- Determine whether this vector is identical to another one.
- __hash__(self)
- Determine whether this vector is identical to another one.
- __ne__(self, another)
- Determine whether this vector is not identical to another one.
- __repr__(self)
- Get the string representation of this Vec3.
- add(self, another)
- Add another Vec3 to this one.
- distance(self, another)
- Get the Euclidean distance between this vector and another one.
Keyword arguments:
another -- Vec3 whose distance to the original will be calculated
- distance2(self, another)
- Get the square of the Euclidean distance between this vector and another one.
Keyword arguments:
another -- Vec3 whose squared distance to the original will be calculated
- dot(self, another)
- Calculate the dot product of this vector with another one.
- dropAxis(self, which)
- Get a complex by removing one axis of this one.
Keyword arguments:
which -- the axis to drop (0=X, 1=Y, 2=Z)
- equals(self, another)
- Determine whether this vector is identical to another one.
- getFromVec3(self, another)
- Get a new Vec3 identical to another one.
- getFromXYZ(self, x, y, z)
- Get a new Vec3 with the specified x, y, and z components.
- length(self)
- Get the length of the Vec3.
- length2(self)
- Get the square of the length of the Vec3.
- minus(self, subtractVec3)
- Get the difference between the Vec3 and another one.
Keyword arguments:
subtractVec3 -- Vec3 which will be subtracted from the original
- multiply(self, another)
- Multiply each component of this vector by the corresponding component of another vector.
- normalize(self)
- Scale each component of this Vec3 so that it has a length of 1. If this Vec3 has a length of 0, this method has no effect.
- plus(self, plusVec3)
- Get the sum of this Vec3 and another one.
Keyword arguments:
plusVec3 -- Vec3 which will be added to the original
- scale(self, multiplier)
- Scale each component of this Vec3 by a multiplier.
- setToVec3(self, another)
- Set this Vec3 to be identical to another one.
- setToXYZ(self, x, y, z)
- Set the x, y, and z components of this Vec3.
- subtract(self, another)
- Subtract another Vec3 from this one.
- times(self, multiplier)
- Get a new Vec3 by multiplying each component of this one by a multiplier.
| |