?
Solved

Direct 3d 4th Vector

Posted on 2006-06-25
2
Medium Priority
?
308 Views
Last Modified: 2013-12-26
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...

Thanks in advance
0
Comment
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
  • Learn & ask questions
2 Comments
 
LVL 18

Accepted Solution

by:
Jose Parrot earned 960 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

by:HBPROCK
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

What is RenderMan: RenderMan is a not any particular piece of software. RenderMan is an industry standard, defining set of rules that any rendering software should use, to be RenderMan-compliant. Pixar's RenderMan is a flagship implementation of …
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…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses
Course of the Month9 days, 15 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question