Files
Cesarus85--mjolnir-vr/source/math/geometry.h
T
2026-08-20 11:21:16 -07:00

67 lines
1.3 KiB
C

/*
GEOMETRY.H
header included in hcex build.
*/
#ifndef __GEOMETRY_H
#define __GEOMETRY_H
#pragma once
/* ---------- constants */
/* ---------- macros */
/* ---------- structures */
struct geosphere
{
short segment_count;
short pad2;
real_point3d *vertices;
short *triangle_strip_vertex_indices;
short vertex_count;
short triangle_count;
short triangle_strip_count;
short pad18;
};
/* ---------- prototypes/GEOMETRY.C */
struct geosphere *geosphere_new(
short segment_count);
void geosphere_dispose(
struct geosphere *sphere);
boolean convex_hull2d_test_point(short count, union real_point2d const *points, union real_point2d const *point, real epsilon);
boolean convex_hull2d_test_circle(
short count,
real_point2d const *points,
real_point2d const *center,
real radius);
boolean convex_hull2d_test_point_indexed(
short count,
short const *indices,
real_point2d const *points,
real_point2d const *point,
real epsilon);
real convex_hull2d_area(
short count,
real_point2d const *vertices);
boolean convex_hull2d_test_vector(
short count,
real_point2d const *points,
real_point2d const *origin,
real_vector2d const *vector,
real *minimum_distance,
real *maximum_distance);
boolean convex_polygon2d_verify(
short count,
real *vertices);
/* ---------- globals */
/* ---------- public code */
#endif // __GEOMETRY_H