source files: [xc]tfm.[ch]
SYNTAX
(SEND <tfm> :COPY-SPACEBALL-MATRIX)
DESCRIPTION
Copies the contents of the spaceball matrix into the transform, overwriting the original 4x4 matrix in the xtfm. On systems with no active spaceball, this matrix will usually be the identity transform.
On systems with a spaceball, this is a simple way to allow the user direct control over the position and orientation of a thing.
Your system must have been compiled with SUPPORT_SPACEBALL defined for this call to be supported.
The :PER-FRAME-HOOK facility provides a convenient mechanism by which to have a given TRANSFORM continuously track the spaceball:
(let* (
(our-transform transform) ; Build a local binding for TRANSFORM
)
(:set our-transform :per-frame-hook
(list
(lambda NIL ; Our 'lambda' will lock in OUR-TRANSFORM
(send our-transform :COPY-SPACEBALL-MATRIX)))))