Length-3 vectors.
More...
|
def | __init__ (self, arg=None) |
| Constructs a Vec3 object. More...
|
|
def | zero (self) |
| Sets to zero.
|
|
def | ssd (self, other) |
| Sum-square-differences of self and other.
|
|
def | nrm2 (self) |
| 2-norm (Euclidean) of self
|
|
def | __getitem__ (self, key) |
|
def | __setitem__ (self, key, item) |
|
def | cross (self, other) |
| Computes the cross product.
|
|
def | dot (self, other) |
| Computes the dot product.
|
|
def | __len__ (self) |
|
def | __repr__ (self) |
|
def | __iadd__ (self, other) |
|
def | __add__ (self, other) |
|
def | __radd__ (self, other) |
|
def | __isub__ (self, other) |
|
def | __sub__ (self, other) |
| Subtracts a scalar or vector from self.
|
|
def | __rsub__ (self, other) |
| Subtracts self or vector from self.
|
|
def | __imul__ (self, other) |
|
def | __mul__ (self, other) |
|
def | __rmul__ (self, other) |
|
def | __itruediv__ (self, other) |
|
def | __truediv__ (self, other) |
|
def | to_quat (self, h) |
| Converts to a quaternion and copies to h. More...
|
|
def | copy_from (self, src) |
| Copy elements from src to self.
|
|
def | copy_to (self, dst) |
| Copy elements from self to dst.
|
|
def | __eq__ (self, other) |
|
def | __ne__ (self, other) |
|
def | isclose (self, other, rel_tol=1e-09, abs_tol=0.0) |
| Returns true if object is close to other.
|
|
def | __div__ (self, other) |
|
def | __idiv__ (self, other) |
| Divide self by a scala.
|
|
Length-3 vectors.
Definition at line 45 of file tf.py.
◆ __init__()
def amino.tf.Vec3.__init__ |
( |
|
self, |
|
|
|
arg = None |
|
) |
| |
Constructs a Vec3 object.
* If arg is None, the object is unitialized.
* If arg is a list, the list elements are copied to the object.
Definition at line 58 of file tf.py.
◆ ensure()
def amino.tf.Vec3.ensure |
( |
|
thing | ) |
|
|
static |
Ensures thing is a Vec3.
If it's not, convert it.
Definition at line 74 of file tf.py.
◆ to_quat()
def amino.tf.Vec3.to_quat |
( |
|
self, |
|
|
|
h |
|
) |
| |
Converts to a quaternion and copies to h.
This functions sets the vector (xyz) part of h. The scalar
part (w) of h will be zero
Definition at line 211 of file tf.py.
The documentation for this class was generated from the following file:
- /home/ntd/git/amino/python/amino/tf.py