Understanding Papervision3D: Matrix3D
This post will cover how you use a Matrix3D to scale, pitch, yaw, roll, and translate 3d objects:
Every 3d object within Papervision3D has a Matrix3D that defines its scale, pitch, yaw, roll, x, y, and z (changing x, y, and z is referred to as “translation” because they move a group of points equally). You will find the Matrix3D in the “transform” property of your 3d object.
The default 4 column by 4 row Matrix 3d with no scale, yaw, pitch, roll, or translation is set up as follows:
1, 0, 0, 0 0, 1, 0, 0 0, 0, 1, 0 0, 0, 0, 1
These values are stored in the “transform” property of your 3d object using a “n”, a integer defining the row, and an integer for the column:
n11, n12, n13, n14 n21, n22, n23, n24 n31, n32, n33, n34 n41, n42, n43, n44
For example: cube.transform.n11
Scale, pitch, yaw, and roll are handled in the first 3 columns and rows of the matrix (play with the explorer above to figure out how it works):
1, 0, 0 0, 1, 0 0, 0, 1
x, y, and z are all handled first 3 numbers in the last column:
0 0 0
The last row hangs around to make Matrix multiplication possible. Have fun playing with the explorer to get a hang of how 3d objects are moved around. I hope to cover some of the Matrix3D math functions in the future.
-
Livein80
-
Damien MIRAS
-
kimpai
-
Dan
-
Casey
-
sliz
-
Marcus Booster
-
zhaohongri
-
John Lindquist
-
zhaohongri
Search
Recommended Books
Speaking at FITC Toronto
Recent Posts
- Moving to johnlindquist.com
- AsyncCommand with Robotlegs, Signals, Flight, MinimalComps
- Search Widget – Robotlegs, Signals, Flight, Minimal Comps, Yahoo Astra
- FDT Super Awesome March Deal
- haXe Tutorial
- AS3 Signals Tutorial
- Preferred Video Tutorial Resolution?
- TweenMax – Tweening a timeline (Advanced Tweening)
- Robotlegs + Flight + Union Platform
- Back in the saddle
- Eclipse Theme Designer Preview
- RobotLegs Hello World Video Tutorial
- 10 Things Every Senior Flash Developer Should Know
- Efflex – 3D Effects for Flex
- MorphController – Mighty Morphing Papervision3D
Recent Comments
- Hosting company on archive
- aanbae on Back in the saddle
- Domain registration on Looking around the inside of a Sphere
- website designing company on Looking around the inside of a Sphere
- Honda Motor on Augmented Reality – Recursive Webcam
- Zena on Augmented Reality – Recursive Webcam
- web hosting on Augmented Reality – Recursive Webcam
- web hosting on Twitter + Papervision3D (using Tweetr)
- web hosting on Efflex – 3D Effects for Flex
- web hosting on TweenMax – Tweening a timeline (Advanced Tweening)
Categories
Archives
Preferred Video Tutorial Resolution
- 1024x768 (53%, 85 Votes)
- 1280x1024 (15%, 24 Votes)
- 1920x1080 (15%, 24 Votes)
- 800x600 (13%, 20 Votes)
- 480x320 (4%, 6 Votes)
- 640x480 (0%, 2 Votes)
Total Voters: 160


