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
Solved

Direct 3d 4th Vector

Posted on 2006-06-25
2
304 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
2 Comments
 
LVL 18

Accepted Solution

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

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: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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

Suggested Solutions

Title # Comments Views Activity
Help about porting DirectX 9.0c to DirectX 11 5 654
Ruby, Python, Perl, nodeJS, JavaScript, AJAX, Jscript 2 226
java continue statement 10 155
Beginner to Unreal Engine 4 5 94
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 …
Recently, in one of the tech-blogs I usually read, I saw a post about the best-selling video games through history. The first place in the list is for the classic, extremely addictive Tetris. Well, a long time ago, in a galaxy far far away, I was…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

809 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