source files: xg.3d-tfm.lsp
(require "xg.3d-tfm.lsp") (SEND <tfm> :SET-TO-PRODUCT (list <tfm1> <tfm2> ... ))
This little convenience message sets <tfm> to the product of <tfm1> <tfm2> ...
It is equivalent to
(send <tfm> :SET-TO-IDENTITY) (send <tfm> :MULT-POST <tfm1>) (send <tfm> :MULT-POST <tfm2>) ...
It is intended to make implementing hierarchical motions a bit simpler: When implementing a hierarchical displaylist, the position of any leaf is the product of all the tranforms on the path from the root to the leaf. Given the list of transforms on that path for a given root, we may correctly position using code like:
;; tfm1 tfm2 tfm3 are presumed pre-existing: (setq my-tranform (:new class-matrix44)) (:set my-transform :per-frame-hook (lambda nil (:set-to-product my-tranform (list tfm1 tfm2 tfm3))) ) (setq my-thing (xg.3d-make-thing-of-triangles :want-point-normals t :transform my-transform ) )
It does not make sense to set any of the high-level (:LOCATION/:TARGET/:UP) properties on <tfm>, but it is perfectly sensible to use them on <tfm1> <tfm2> ...
The matrices specified by <tfm1> <tfm2> ... are computed first, then multiplied together to yield the matrix for <tfm>.
The product list may contain any number of transforms, including zero.
Return value is <tfm>.