OpenCores
URL https://opencores.org/ocsvn/orsoc_graphics_accelerator/orsoc_graphics_accelerator/trunk

Subversion Repositories orsoc_graphics_accelerator

[/] [orsoc_graphics_accelerator/] [trunk/] [sw/] [examples/] [bare/] [cube.obj.h] - Blame information for rev 5

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 5 maiden
/* Mesh definition */
2
 
3
#ifndef cube_H
4
#define cube_H
5
#include "orgfx_3d.h"
6
 
7
// Call this function to get an initialized mesh:
8
orgfx_mesh init_cube_mesh();
9
 
10
unsigned int cube_nverts = 8;
11
 
12
unsigned int cube_nuvs   = 0;
13
 
14
unsigned int cube_nfaces = 12;
15
 
16
orgfx_point3 cube_verts[] = {
17
{0, 0, 0},
18
{0, 0, 1},
19
{0, 1, 0},
20
{0, 1, 1},
21
{1, 0, 0},
22
{1, 0, 1},
23
{1, 1, 0},
24
{1, 1, 1},
25
};
26
 
27
orgfx_point2 cube_uvs[] = {
28
};
29
 
30
orgfx_face cube_faces[] = {
31
{0u, 6u, 4u, 26831u},
32
{0u, 2u, 6u, 52671u},
33
{0u, 3u, 2u, 16001u},
34
{0u, 1u, 3u, 898u},
35
{2u, 7u, 6u, 63251u},
36
{2u, 3u, 7u, 11416u},
37
{4u, 6u, 7u, 934u},
38
{4u, 7u, 5u, 11472u},
39
{0u, 4u, 5u, 52695u},
40
{0u, 5u, 1u, 28786u},
41
{1u, 5u, 7u, 56277u},
42
{1u, 7u, 3u, 21003u},
43
};
44
 
45
orgfx_mesh init_cube_mesh()
46
{
47
  return orgfx3d_make_mesh(cube_faces,
48
                           cube_nfaces,
49
                           cube_verts,
50
                           cube_nverts,
51
                           cube_uvs,
52
                           cube_nuvs);
53
}
54
 
55
#endif // cube_H

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.