nanome.util.vector3 module¶
-
class
Vector3(x=0, y=0, z=0)[source]¶ Bases:
objectA vector that holds 3 values. Used for position and scale.-
classmethod
cross(v1, v2)[source]¶ - Returns the cross product of two vectors.
Parameters: - v1 (
Vector3) – The first vector - v2 (
Vector3) – The second vector
Returns: Cross product of v1 and v2
Return type: Vector3 - v1 (
-
classmethod
distance(v1, v2)[source]¶ - Returns the distance between two vectors.
Parameters: - v1 (
Vector3) – The first vector - v2 (
Vector3) – The second vector
- v1 (
-
classmethod
dot(v1, v2)[source]¶ - Returns the dot product of two vectors.
Parameters: - v1 (
Vector3) – The first vector - v2 (
Vector3) – The second vector
Returns: Dot product of v1 and v2
Return type: - v1 (
-
equals(other)[source]¶ - Returns True if the components of this vector are the same as another’s.
Parameters: other ( Vector3) – The other Vector3Returns: Whether or not this vector is component-equal to ‘other’ Return type: bool
-
normalize()[source]¶ - Normalizes this vector and returns itself.
Returns: This vector, now normalized. Return type: Vector3
-
normalized¶ - The normalized version of this vector
Type: Vector3
-
classmethod