summaryrefslogtreecommitdiff
path: root/src/examples
diff options
context:
space:
mode:
authorBogdan Devichev <b.devichev@samsung.com>2015-04-06 13:58:22 +0900
committerChunEon Park <chuneon.park@samsung.com>2015-04-06 13:58:22 +0900
commit5a5322706eb21ea5753d1bc7634098d9e5e50887 (patch)
tree9ff359fc4d3a27f535f936c3f7adfabfef0dd0a6 /src/examples
parenta30091ee93211c8c683ea2ea296a2b8276caa8d8 (diff)
evas-3D: primitives: cylinder is standardized now (normalized and z is a axis of symmetry)
Summary: {F13942} Test Plan: D2248 gives app for testing. Reviewers: cedric, Hermet, raster Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D2250
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/evas/evas-3d-primitives.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/examples/evas/evas-3d-primitives.c b/src/examples/evas/evas-3d-primitives.c
index ef6a321..baee7a1 100644
--- a/src/examples/evas/evas-3d-primitives.c
+++ b/src/examples/evas/evas-3d-primitives.c
@@ -427,18 +427,18 @@ evas_3d_add_cylinder_frame(Eo *mesh, int frame, int p, vec2 tex_scale)
427 fi = i * dfi; 427 fi = i * dfi;
428 sinfi = sin(fi); 428 sinfi = sin(fi);
429 cosfi = cos(fi); 429 cosfi = cos(fi);
430 vertices[i + vccount].x = vertices[i].x = sinfi ; 430 vertices[i + vccount].x = vertices[i].x = sinfi / 2.0;
431 vertices[i].y = -0.5; 431 vertices[i + vccount].y = vertices[i].y = cosfi / 2.0;
432 vertices[i + vccount].z = vertices[i].z = cosfi; 432 vertices[i].z = -0.5;
433 vertices[i + vccount].y = 0.5; 433 vertices[i + vccount].z = 0.5;
434 434
435 normals[i + vccount].x = normals[i].x = sinfi; 435 normals[i + vccount].x = normals[i].x = sinfi;
436 normals[i + vccount].y = normals[i].y = 0; 436 normals[i + vccount].y = normals[i].y = cosfi;
437 normals[i + vccount].z = normals[i].z = cosfi; 437 normals[i + vccount].z = normals[i].z = 0;
438 438
439 tangents[i + vccount].x = tangents[i].x = cosfi; 439 tangents[i + vccount].x = tangents[i].x = cosfi;
440 tangents[i + vccount].y = tangents[i].y = 0; 440 tangents[i + vccount].y = tangents[i].y = -sinfi;
441 tangents[i + vccount].z = tangents[i].z = -sinfi; 441 tangents[i + vccount].z = tangents[i].z = 0;
442 442
443 tex_coord[i].x = i / (float)(vccount - 1) * tex_scale.x; 443 tex_coord[i].x = i / (float)(vccount - 1) * tex_scale.x;
444 tex_coord[i].y = 0; 444 tex_coord[i].y = 0;