Crystal Space
Welcome, Guest. Please login or register.
August 29, 2014, 12:29:59 am

Login with username, password and session length
Search:     Advanced search
9008 Posts in 2043 Topics by 8356 Members
Latest Member: Frisks7
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  Support
| | |-+  what is the correct vertex order in xml files?
« previous next »
Pages: [1] Print
Author Topic: what is the correct vertex order in xml files?  (Read 1860 times)
Newbie
*
Posts: 8


View Profile Email
« on: December 10, 2007, 12:33:50 am »

Hi, I had some problems writing a simple xml world definition (couldn't see anything) till I found out the order in which I was describing the mesh was not correct. I've searched through the forum and manual (not exhaustingly), and I couldn't find any reference to how to describe the vertex. Is there any doc where it is explained? Than you.


 Dan
Logged
jorrit
Administrator
Hero Member
*****
Posts: 1706


View Profile
« Reply #1 on: December 10, 2007, 06:20:18 am »

A vertex is described as <v x="..." y="..." z="..." />.

Greetings,
Logged
Newbie
*
Posts: 8


View Profile Email
« Reply #2 on: December 10, 2007, 06:45:22 am »

Yes, I mean the order... as describing a cube with

<v x="10" y="0" z="10"/>
<v x="10" y="0" z="-10"/>
<v x="-10" y="0" z="-10"/>
<v x="-10" y="0" z="10"/>
<v x="10" y="20" z="10"/>
<v x="10" y="20" z="-10"/>
<v x="-10" y="20" z="-10"/>
<v x="-10" y="20" z="10"/>

the order in which it is described is relevant (or, at least, when I altered this order the cube was not a cube). Is there a strict rule for the vertex?
 Thanks for your time

 Dan
Logged
jorrit
Administrator
Hero Member
*****
Posts: 1706


View Profile
« Reply #3 on: December 10, 2007, 06:48:53 am »

The order of the vertices doesn't matter. What matters is the numbers you specify in the triangles below. So if you have a triangle that you want to make of the vertices at position 0, 4, and 5 then those three indices are important. If you change vertex order then you should also adapt the indices in the triangles.

Greetings,
Logged
Newbie
*
Posts: 8


View Profile Email
« Reply #4 on: December 10, 2007, 06:51:22 am »

Ok, I understand now. Thank you very much!

 Dan
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 5.167 seconds with 16 queries.