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
This commit is contained in:
parent
a30091ee93
commit
5a5322706e
|
@ -427,18 +427,18 @@ evas_3d_add_cylinder_frame(Eo *mesh, int frame, int p, vec2 tex_scale)
|
||||||
fi = i * dfi;
|
fi = i * dfi;
|
||||||
sinfi = sin(fi);
|
sinfi = sin(fi);
|
||||||
cosfi = cos(fi);
|
cosfi = cos(fi);
|
||||||
vertices[i + vccount].x = vertices[i].x = sinfi ;
|
vertices[i + vccount].x = vertices[i].x = sinfi / 2.0;
|
||||||
vertices[i].y = -0.5;
|
vertices[i + vccount].y = vertices[i].y = cosfi / 2.0;
|
||||||
vertices[i + vccount].z = vertices[i].z = cosfi;
|
vertices[i].z = -0.5;
|
||||||
vertices[i + vccount].y = 0.5;
|
vertices[i + vccount].z = 0.5;
|
||||||
|
|
||||||
normals[i + vccount].x = normals[i].x = sinfi;
|
normals[i + vccount].x = normals[i].x = sinfi;
|
||||||
normals[i + vccount].y = normals[i].y = 0;
|
normals[i + vccount].y = normals[i].y = cosfi;
|
||||||
normals[i + vccount].z = normals[i].z = cosfi;
|
normals[i + vccount].z = normals[i].z = 0;
|
||||||
|
|
||||||
tangents[i + vccount].x = tangents[i].x = cosfi;
|
tangents[i + vccount].x = tangents[i].x = cosfi;
|
||||||
tangents[i + vccount].y = tangents[i].y = 0;
|
tangents[i + vccount].y = tangents[i].y = -sinfi;
|
||||||
tangents[i + vccount].z = tangents[i].z = -sinfi;
|
tangents[i + vccount].z = tangents[i].z = 0;
|
||||||
|
|
||||||
tex_coord[i].x = i / (float)(vccount - 1) * tex_scale.x;
|
tex_coord[i].x = i / (float)(vccount - 1) * tex_scale.x;
|
||||||
tex_coord[i].y = 0;
|
tex_coord[i].y = 0;
|
||||||
|
|
Loading…
Reference in New Issue