Solved

Direct 3d 4th Vector

Posted on 2006-06-25
2
301 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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

744 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now