ArcBall Class

From Derivative
Jump to: navigation, search

Encapsulates many aspects of 3D viewer interaction. Rotation via arcball, translation and scale.

a = tdu.ArcBall(forCamera=False)



Members

No operator specific members.


Methods

tdu.ArcBall.beginRotate(u, v)None:

Begin an arcball rotation at the given u and v.
m.beginRotate(.1, .2)

tdu.ArcBall.dolly(z)None:

Dolly the view by the given z value.
m.dolly(.3)

tdu.ArcBall.transform()tdu.Matrix:

Gets the current transform matrix for the arcball.
m.transform()

tdu.ArcBall.dollyTo(u, v, scale=1.0)None:

Dolly from the u,v given in the last call to beginDolly() to the given u and v, applying a scale as well to the dolly amount.(Keyword, Optional)
  • scale - Scale the operation by this amount.
m.dollyTo(.1, .2)

tdu.ArcBall.beginDolly(u, v)None:

Begin a dolly at at the given u and v.
m.beginDolly(.1, .2)

tdu.ArcBall.rotateTo(u, v, scale=1.0)None:

Rotates the arcball to the given u and v position.
  • scale - (Keyword, Optional) Scale the operation by this amount.
m.rotateTo(.1, .2)

tdu.ArcBall.identity()None:

Resets all values of the ArcBall to the default state.
m.identity()

tdu.ArcBall.beginPan(u, v)None:

Begin a pan at at the given u and v.
m.beginPan(.1, .2)

tdu.ArcBall.pan(u, v)None:

Pan the view by the given x and y.
m.pan(.1, .2)

tdu.ArcBall.setTransform(matrix)None:

Sets the current transform matrix for the arcball. Scales in the given matrix will be ignored.
m.setTransform(m)

tdu.ArcBall.panTo(u, v, scale=1.0)None:

Pan from the u,v given in the last call to beginPan() to the given u and v, applying a scale as well to the pan amount.
  • scale - (Keyword, Optional) Scale the operation by this amount.
m.panTo(.1, .2)