Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/intern/draw_cache.c
| Show First 20 Lines • Show All 2,003 Lines • ▼ Show 20 Lines | |||||
| * Example: triangle {2, 1, 0} is adjacent to {3, 2, 0}, {1, 4, 0} and {5, 1, 2}. | * Example: triangle {2, 1, 0} is adjacent to {3, 2, 0}, {1, 4, 0} and {5, 1, 2}. | ||||
| * {2, 1, 0} becomes {0, 1, 2} | * {2, 1, 0} becomes {0, 1, 2} | ||||
| * {3, 2, 0} becomes {3, 4, 5} | * {3, 2, 0} becomes {3, 4, 5} | ||||
| * {1, 4, 0} becomes {9, 10, 11} | * {1, 4, 0} becomes {9, 10, 11} | ||||
| * {5, 1, 2} becomes {12, 13, 14} | * {5, 1, 2} becomes {12, 13, 14} | ||||
| * According to opengl specification it becomes (starting from | * According to opengl specification it becomes (starting from | ||||
| * the first vertex of the first face aka. vertex 2): | * the first vertex of the first face aka. vertex 2): | ||||
| * {0, 12, 1, 10, 2, 3} | * {0, 12, 1, 10, 2, 3} | ||||
| **/ | */ | ||||
| static const uint bone_octahedral_wire_lines_adjacency[12][4] = { | static const uint bone_octahedral_wire_lines_adjacency[12][4] = { | ||||
| { 0, 1, 2, 6}, { 0, 12, 1, 6}, { 0, 3, 12, 6}, { 0, 2, 3, 6}, | { 0, 1, 2, 6}, { 0, 12, 1, 6}, { 0, 3, 12, 6}, { 0, 2, 3, 6}, | ||||
| { 1, 6, 2, 3}, { 1, 12, 6, 3}, { 1, 0, 12, 3}, { 1, 2, 0, 3}, | { 1, 6, 2, 3}, { 1, 12, 6, 3}, { 1, 0, 12, 3}, { 1, 2, 0, 3}, | ||||
| { 2, 0, 1, 12}, { 2, 3, 0, 12}, { 2, 6, 3, 12}, { 2, 1, 6, 12}, | { 2, 0, 1, 12}, { 2, 3, 0, 12}, { 2, 6, 3, 12}, { 2, 1, 6, 12}, | ||||
| }; | }; | ||||
| #if 0 /* UNUSED */ | #if 0 /* UNUSED */ | ||||
| static const uint bone_octahedral_solid_tris_adjacency[8][6] = { | static const uint bone_octahedral_solid_tris_adjacency[8][6] = { | ||||
| ▲ Show 20 Lines • Show All 135 Lines • ▼ Show 20 Lines | static const uint bone_box_solid_tris[12][3] = { | ||||
| {4, 5, 6}, /* top */ | {4, 5, 6}, /* top */ | ||||
| {4, 6, 7}, | {4, 6, 7}, | ||||
| }; | }; | ||||
| /** | /** | ||||
| * Store indices of generated verts from bone_box_solid_tris to define adjacency infos. | * Store indices of generated verts from bone_box_solid_tris to define adjacency infos. | ||||
| * See bone_octahedral_solid_tris for more infos. | * See bone_octahedral_solid_tris for more infos. | ||||
| **/ | */ | ||||
| static const uint bone_box_wire_lines_adjacency[12][4] = { | static const uint bone_box_wire_lines_adjacency[12][4] = { | ||||
| { 4, 2, 0, 11}, { 0, 1, 2, 8}, { 2, 4, 1, 14}, { 1, 0, 4, 20}, /* bottom */ | { 4, 2, 0, 11}, { 0, 1, 2, 8}, { 2, 4, 1, 14}, { 1, 0, 4, 20}, /* bottom */ | ||||
| { 0, 8, 11, 14}, { 2, 14, 8, 20}, { 1, 20, 14, 11}, { 4, 11, 20, 8}, /* top */ | { 0, 8, 11, 14}, { 2, 14, 8, 20}, { 1, 20, 14, 11}, { 4, 11, 20, 8}, /* top */ | ||||
| { 20, 0, 11, 2}, { 11, 2, 8, 1}, { 8, 1, 14, 4}, { 14, 4, 20, 0}, /* sides */ | { 20, 0, 11, 2}, { 11, 2, 8, 1}, { 8, 1, 14, 4}, { 14, 4, 20, 0}, /* sides */ | ||||
| }; | }; | ||||
| #if 0 /* UNUSED */ | #if 0 /* UNUSED */ | ||||
| static const uint bone_box_solid_tris_adjacency[12][6] = { | static const uint bone_box_solid_tris_adjacency[12][6] = { | ||||
| ▲ Show 20 Lines • Show All 1,609 Lines • Show Last 20 Lines | |||||