amino  1.0-beta2
Lightweight Robot Utility Library
amino.tf.Vec3 Class Reference

Length-3 vectors. More...

Inheritance diagram for amino.tf.Vec3:
amino.mixin.VecMixin amino.mixin.CopyEltsMixin amino.mixin.SSDEqMixin amino.mixin.DivCompatMixin

Public Member Functions

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...
 
- Public Member Functions inherited from amino.mixin.CopyEltsMixin
def copy_from (self, src)
 Copy elements from src to self.
 
def copy_to (self, dst)
 Copy elements from self to dst.
 
- Public Member Functions inherited from amino.mixin.SSDEqMixin
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.
 
- Public Member Functions inherited from amino.mixin.DivCompatMixin
def __div__ (self, other)
 
def __idiv__ (self, other)
 Divide self by a scala.
 

Static Public Member Functions

def ensure (thing)
 Ensures thing is a Vec3. More...
 
def identity ()
 Returns the identity Vec3.
 

Public Attributes

 x
 
 y
 
 z
 

Detailed Description

Length-3 vectors.

Definition at line 45 of file tf.py.

Constructor & Destructor Documentation

◆ __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.

Member Function Documentation

◆ 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: