Kohi Game Engine
kgeometry Struct Reference

Represents geometry to be used for various purposes (rendering objects in the world, physics/collision, etc.). More...

#include <geometry.h>

Data Fields

kname name
 The geometry name. More...
 
kgeometry_type type
 The geometry type. More...
 
u16 generation
 The geometry generation. Incremented every time the geometry changes. More...
 
vec3 center
 The center of the geometry in local coordinates. More...
 
extents_3d extents
 The extents of the geometry in local coordinates. More...
 
u32 vertex_count
 The vertex count. More...
 
u32 vertex_element_size
 The size of each vertex. Ignored unless type is KGEOMETRY_TYPE_CUSTOM. More...
 
void * vertices
 The vertex data. More...
 
u64 vertex_buffer_offset
 The offset from the beginning of the vertex buffer. More...
 
u32 index_count
 The index count. More...
 
u32 index_element_size
 The size of each index. Ignored unless type is KGEOMETRY_TYPE_CUSTOM. More...
 
void * indices
 The index data. More...
 
u64 index_buffer_offset
 The offset from the beginning of the index buffer. More...
 

Detailed Description

Represents geometry to be used for various purposes (rendering objects in the world, physics/collision, etc.).

Field Documentation

◆ center

vec3 center

The center of the geometry in local coordinates.

◆ extents

extents_3d extents

The extents of the geometry in local coordinates.

◆ generation

u16 generation

The geometry generation. Incremented every time the geometry changes.

◆ index_buffer_offset

u64 index_buffer_offset

The offset from the beginning of the index buffer.

◆ index_count

u32 index_count

The index count.

◆ index_element_size

u32 index_element_size

The size of each index. Ignored unless type is KGEOMETRY_TYPE_CUSTOM.

◆ indices

void* indices

The index data.

◆ name

kname name

The geometry name.

◆ type

The geometry type.

◆ vertex_buffer_offset

u64 vertex_buffer_offset

The offset from the beginning of the vertex buffer.

◆ vertex_count

u32 vertex_count

The vertex count.

◆ vertex_element_size

u32 vertex_element_size

The size of each vertex. Ignored unless type is KGEOMETRY_TYPE_CUSTOM.

◆ vertices

void* vertices

The vertex data.


The documentation for this struct was generated from the following file: