Solved

# Direct 3d 4th Vector

Posted on 2006-06-25
306 Views
Hi,

I'm trying to parse an old valve .map file for educational purposes

Here is a cube...

( 0 64 64 ) ( 64 64 64 ) ( 64 0 64 ) 0 0 0 1 1.000000 1.000000
( 0 0 0 ) ( 64 0 0 ) ( 64 64 0 ) 0 0 0 1 1.000000 1.000000
( 0 64 64 ) ( 0 0 64 ) ( 0 0 0 ) 0 0 0 1 1.000000 1.000000
( 64 64 0 ) ( 64 0 0 ) ( 64 0 64 ) 0 0 0 1 1.000000 1.000000
( 64 64 64 ) ( 0 64 64 ) ( 0 64 0 ) 0 0 0 1 1.000000 1.000000
( 64 0 0 ) ( 0 0 0 ) ( 0 0 64 ) 0 0 0 1 1.000000 1.000000

Only three vectors are provided per face. Obviously, three points per face doesn't compose the complete square required. Each face of the cube is partial, having one triangle...

Is anyone able to provide me with the correct formula for determining the opposing vertices, completing the partial faces?

Help with this is much appreciated...

0
Question by:HBPROCK
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points

LVL 18

Accepted Solution

Jose Parrot earned 320 total points
ID: 16987396
Hi,

(   0 64 64 ) ( 64 64 64 )  ( 64   0 64 )  (   0   0 64 )  0 0 0 1 1.000000   1.000000
(   0   0   0 ) ( 64   0   0 )  ( 64 64   0 )  (   0 64   0 )  0 0 0 1 1.000000   1.000000
(   0 64 64 ) (   0   0 64 )  (   0   0   0 )  (   0 64   0 )  0 0 0 1 1.000000   1.000000
( 64 64   0 ) ( 64   0   0 )  ( 64   0 64 )  ( 64 64 64 )  0 0 0 1 1.000000   1.000000
( 64 64 64 ) (   0 64 64 )  (   0 64   0 )  ( 64 64   0 )  0 0 0 1 1.000000   1.000000
( 64   0   0 ) (   0   0   0 )  (   0   0 64 )  ( 64   0 64 )  0 0 0 1 1.000000   1.000000

Notice that in each line one of the tree coordinates ( x  y  z) are the same. For exemple, in line 1, all z's are 64, meaning the plane is at z=64. This is the cube's back face.
Line 2 is the front face, all z's are 0.
Line 3 is left face, all x's are 0.

Seems to be an incomplete information. For exemple, there is no number of vertices, number of edges, number of faces. Maybe the data always refers to polygons. It depends on the software you are using.

Actually the model (in this case, a cube) isn't calculated by formula, but by an algorithm instead. Hope now you watch a cube in your screen.

Jose
0

Author Comment

ID: 16988423
It turns out you're right!

Unforunately the algorithm is extremely complicated. It'll be many pages of code later before I can watch a cube.

Many thanks for pointing me in the right direction.
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Artificial Intelligence comes in many forms, and for game developers, Path-Finding is an important ability for making an NPC (Non-Playable Character) maneuver through terrain.  A* is a particularly easy way to approach it.  I’ll start with the algor…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
###### Suggested Courses
Course of the Month3 days, 20 hours left to enroll