Public Member Functions | Private Attributes | List of all members
tf_quaternion.transformations.Arcball Class Reference
Inheritance diagram for tf_quaternion.transformations.Arcball:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, initial=None)
 
def down (self, point)
 
def drag (self, point)
 
def getconstrain (self)
 
def matrix (self)
 
def next (self, acceleration=0.0)
 
def place (self, center, radius)
 
def setaxes (self, axes)
 
def setconstrain (self, constrain)
 

Private Attributes

 _axes
 
 _axis
 
 _center
 
 _constrain
 
 _qdown
 
 _qnow
 
 _qpre
 
 _radius
 
 _vdown
 

Detailed Description

Virtual Trackball Control.

>>> ball = Arcball()
>>> ball = Arcball(initial=numpy.identity(4))
>>> ball.place([320, 320], 320)
>>> ball.down([500, 250])
>>> ball.drag([475, 275])
>>> R = ball.matrix()
>>> numpy.allclose(numpy.sum(R), 3.90583455)
True
>>> ball = Arcball(initial=[0, 0, 0, 1])
>>> ball.place([320, 320], 320)
>>> ball.setaxes([1,1,0], [-1, 1, 0])
>>> ball.setconstrain(True)
>>> ball.down([400, 200])
>>> ball.drag([200, 400])
>>> R = ball.matrix()
>>> numpy.allclose(numpy.sum(R), 0.2055924)
True
>>> ball.next()

Definition at line 1356 of file transformations.py.

Constructor & Destructor Documentation

def tf_quaternion.transformations.Arcball.__init__ (   self,
  initial = None 
)
Initialize virtual trackball control.

initial : quaternion or rotation matrix

Definition at line 1380 of file transformations.py.

Member Function Documentation

def tf_quaternion.transformations.Arcball.down (   self,
  point 
)
Set initial cursor window coordinates and pick constrain-axis.

Definition at line 1435 of file transformations.py.

def tf_quaternion.transformations.Arcball.drag (   self,
  point 
)
Update current cursor window coordinates.

Definition at line 1446 of file transformations.py.

def tf_quaternion.transformations.Arcball.getconstrain (   self)
Return state of constrain to axis mode.

Definition at line 1431 of file transformations.py.

def tf_quaternion.transformations.Arcball.matrix (   self)
Return homogeneous rotation matrix.

Definition at line 1467 of file transformations.py.

def tf_quaternion.transformations.Arcball.next (   self,
  acceleration = 0.0 
)
Continue rotation in direction of last drag.

Definition at line 1462 of file transformations.py.

def tf_quaternion.transformations.Arcball.place (   self,
  center,
  radius 
)
Place Arcball, e.g. when window size changes.

center : sequence[2]
    Window coordinates of trackball center.
radius : float
    Radius of trackball in window coordinates.

Definition at line 1407 of file transformations.py.

def tf_quaternion.transformations.Arcball.setaxes (   self,
  axes 
)
Set axes to constrain rotations.

Definition at line 1420 of file transformations.py.

def tf_quaternion.transformations.Arcball.setconstrain (   self,
  constrain 
)
Set state of constrain to axis mode.

Definition at line 1427 of file transformations.py.

Member Data Documentation

tf_quaternion.transformations.Arcball._axes
private

Definition at line 1387 of file transformations.py.

tf_quaternion.transformations.Arcball._axis
private

Definition at line 1386 of file transformations.py.

tf_quaternion.transformations.Arcball._center
private

Definition at line 1389 of file transformations.py.

tf_quaternion.transformations.Arcball._constrain
private

Definition at line 1391 of file transformations.py.

tf_quaternion.transformations.Arcball._qdown
private

Definition at line 1394 of file transformations.py.

tf_quaternion.transformations.Arcball._qnow
private

Definition at line 1405 of file transformations.py.

tf_quaternion.transformations.Arcball._qpre
private

Definition at line 1405 of file transformations.py.

tf_quaternion.transformations.Arcball._radius
private

Definition at line 1388 of file transformations.py.

tf_quaternion.transformations.Arcball._vdown
private

Definition at line 1390 of file transformations.py.


The documentation for this class was generated from the following file:


uuv_assistants
Author(s): Musa Morena Marcusso Manhaes , Sebastian Scherer , Luiz Ricardo Douat
autogenerated on Thu Jun 18 2020 03:28:20