Transform point using localToSceneTransform

Pedro Duque Vieira pedro.duquevieira at gmail.com
Mon Jul 23 12:29:01 PDT 2012


>
>
>
Uses of matrix transpose:
- Goraud and Phong shading models use this.
- Also one example I've found:
An application of a transpose matrix is animated firing guns in a
1st-person view. The eye matrix maps world-to-eye coordinates. The tracer
rounds from the gun are modeled starting from a local coordinate system.
What is needed is a local matrix that maps local-to-world coordinates and
it must be aligned with the eye matrix. The transpose of the eye matrix can
be used as the local matrix. Although the transposed eye matrix apparently
maps eye-to-world coordinates, it will work as the result of the
transformation is in world coordinates (on the output side). Local
coordinates are substituted for eye coordinates on the input side. A copy
of the eye matrix used as the local matrix would not work because the two
transformations from local-to-world and world-to-eye would nonsensically
pass thru the eye matrix (which is meant for the latter transformation
only).

Cheers,

-- 
Pedro Duque Vieira


More information about the openjfx-dev mailing list