how it works
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.
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
- Ocatarinabelachichix on about
- Rajiv on faq
- Rajiv on 3ds max texture baking for Papervision3D
- Anupam Biswas on Maya Texture Baking
- Anupam Biswas on Maya Texture Baking
- Arindam Mojumder on requests
- Arindam Mojumder on requests
- Arindam Mojumder on Full Screen Cube
- Arindam Mojumder on faq
- Mimosa123321 on requests
Categories
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « May | ||||||
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | 31 | |
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


