polyadvent

A game engine from scratch in C
git clone git://jb55.com/polyadvent
Log | Files | Refs | README

commit ff7444bea0eaa7a41661d777849821ac054882cf
parent 8f244425a64dc2bb51727759d525bcfd22db89d8
Author: William Casarin <jb55@jb55.com>
Date:   Tue, 23 Oct 2018 20:04:52 -0700

use tris instead of quads in ply model

Diffstat:
Mdata/models/test-cube.ply | 58+++++++++++++++++++++++++++++++++-------------------------
1 file changed, 33 insertions(+), 25 deletions(-)

diff --git a/data/models/test-cube.ply b/data/models/test-cube.ply @@ -1,7 +1,7 @@ ply format ascii 1.0 comment Created by Blender 2.79 (sub 0) - www.blender.org, source file: 'test-cube.blend' -element vertex 24 +element vertex 26 property float x property float y property float z @@ -11,36 +11,44 @@ property float nz property uchar red property uchar green property uchar blue -element face 6 +element face 12 property list uchar uint vertex_indices end_header -1.000000 1.000000 -1.000000 0.000000 0.000000 -1.000000 152 255 243 -1.000000 -1.000000 -1.000000 0.000000 0.000000 -1.000000 153 255 243 --1.000000 -1.000000 -1.000000 0.000000 0.000000 -1.000000 152 255 243 --1.000000 1.000000 -1.000000 0.000000 0.000000 -1.000000 155 255 244 -1.000000 0.999999 1.000000 0.000000 -0.000000 1.000000 8 23 254 --1.000000 1.000000 1.000000 0.000000 -0.000000 1.000000 1 255 15 --1.000000 -1.000000 1.000000 0.000000 -0.000000 1.000000 255 1 3 -0.999999 -1.000001 1.000000 0.000000 -0.000000 1.000000 255 1 251 -1.000000 1.000000 -1.000000 1.000000 -0.000000 0.000000 253 4 5 -1.000000 0.999999 1.000000 1.000000 -0.000000 0.000000 152 255 243 -0.999999 -1.000001 1.000000 1.000000 -0.000000 0.000000 152 255 243 -1.000000 -1.000000 -1.000000 1.000000 -0.000000 0.000000 1 8 255 -1.000000 -1.000000 -1.000000 -0.000000 -1.000000 -0.000000 1 8 255 +1.000000 -1.000000 -1.000000 -0.000000 -0.000000 -1.000000 153 255 243 +-1.000000 1.000000 -1.000000 -0.000000 -0.000000 -1.000000 155 255 244 +1.000000 1.000000 -1.000000 -0.000000 -0.000000 -1.000000 152 255 243 +-1.000000 1.000000 1.000000 0.000000 0.000000 1.000000 1 255 15 +0.999999 -1.000001 1.000000 0.000000 0.000000 1.000000 255 1 251 +1.000000 0.999999 1.000000 0.000000 0.000000 1.000000 8 23 254 +1.000000 0.999999 1.000000 1.000000 0.000000 -0.000000 152 255 243 +1.000000 -1.000000 -1.000000 1.000000 0.000000 -0.000000 1 8 255 +1.000000 1.000000 -1.000000 1.000000 0.000000 -0.000000 253 4 5 0.999999 -1.000001 1.000000 -0.000000 -1.000000 -0.000000 255 1 251 --1.000000 -1.000000 1.000000 -0.000000 -1.000000 -0.000000 255 1 3 -1.000000 -1.000000 -1.000000 -0.000000 -1.000000 -0.000000 152 255 243 +1.000000 -1.000000 -1.000000 -0.000000 -1.000000 -0.000000 1 8 255 -1.000000 -1.000000 -1.000000 -1.000000 0.000000 -0.000000 154 255 243 --1.000000 -1.000000 1.000000 -1.000000 0.000000 -0.000000 255 1 3 -1.000000 1.000000 1.000000 -1.000000 0.000000 -0.000000 1 255 15 -1.000000 1.000000 -1.000000 -1.000000 0.000000 -0.000000 152 255 243 -1.000000 0.999999 1.000000 0.000000 1.000000 0.000000 152 255 243 1.000000 1.000000 -1.000000 0.000000 1.000000 0.000000 152 255 243 --1.000000 1.000000 -1.000000 0.000000 1.000000 0.000000 168 255 245 -1.000000 1.000000 1.000000 0.000000 1.000000 0.000000 152 255 243 -4 0 1 2 3 -4 4 5 6 7 -4 8 9 10 11 -4 12 13 14 15 -4 16 17 18 19 -4 20 21 22 23 +1.000000 0.999999 1.000000 0.000000 1.000000 0.000000 152 255 243 +-1.000000 -1.000000 -1.000000 0.000000 -0.000000 -1.000000 152 255 243 +-1.000000 -1.000000 1.000000 0.000000 -0.000000 1.000000 255 1 3 +1.000000 0.999999 1.000000 1.000000 -0.000001 0.000000 152 255 243 +0.999999 -1.000001 1.000000 1.000000 -0.000001 0.000000 152 255 243 +1.000000 -1.000000 -1.000000 1.000000 -0.000001 0.000000 1 8 255 +-1.000000 -1.000000 1.000000 -0.000000 -1.000000 0.000000 255 1 3 +-1.000000 -1.000000 1.000000 -1.000000 0.000000 -0.000000 255 1 3 +-1.000000 1.000000 -1.000000 0.000000 1.000000 0.000000 168 255 245 +3 0 1 2 +3 3 4 5 +3 6 7 8 +3 9 10 11 +3 12 13 14 +3 15 16 17 +3 0 18 1 +3 3 19 4 +3 20 21 22 +3 9 23 10 +3 12 24 13 +3 15 25 16