Kohi Game Engine
geometry_utils.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "math_types.h"
4 
14 void geometry_generate_normals(u32 vertex_count, vertex_3d *vertices, u32 index_count, u32 *indices);
24 void geometry_generate_tangents(u32 vertex_count, vertex_3d *vertices, u32 index_count, u32 *indices);
39 void geometry_deduplicate_vertices(u32 vertex_count, vertex_3d *vertices, u32 index_count, u32 *indices, u32 *out_vertex_count, vertex_3d **out_vertices);
40 
41 struct terrain_vertex;
42 
43 void terrain_geometry_generate_normals(u32 vertex_count, struct terrain_vertex *vertices, u32 index_count, u32 *indices);
44 
45 void terrain_geometry_generate_tangents(u32 vertex_count, struct terrain_vertex *vertices, u32 index_count, u32 *indices);
unsigned int u32
Unsigned 32-bit integer.
Definition: defines.h:25
void geometry_generate_tangents(u32 vertex_count, vertex_3d *vertices, u32 index_count, u32 *indices)
Calculates tangents for the given vertex and index data. Modifies vertices in place.
void geometry_deduplicate_vertices(u32 vertex_count, vertex_3d *vertices, u32 index_count, u32 *indices, u32 *out_vertex_count, vertex_3d **out_vertices)
De-duplicates vertices, leaving only unique ones. Leaves the original vertices array intact....
void geometry_generate_normals(u32 vertex_count, vertex_3d *vertices, u32 index_count, u32 *indices)
Calculates normals for the given vertex and index data. Modifies vertices in place.
void terrain_geometry_generate_normals(u32 vertex_count, struct terrain_vertex *vertices, u32 index_count, u32 *indices)
void terrain_geometry_generate_tangents(u32 vertex_count, struct terrain_vertex *vertices, u32 index_count, u32 *indices)
Contains various math types required for the engine.
Definition: terrain.h:18
Represents a single vertex in 3D space.
Definition: math_types.h:175