New upstream version 24.0.1+dfsg1
This commit is contained in:
parent
b14f9eae6d
commit
5a730d6ec3
842 changed files with 42245 additions and 33385 deletions
|
|
@ -29,7 +29,7 @@ struct matrix4;
|
|||
|
||||
struct plane {
|
||||
struct vec3 dir;
|
||||
float dist;
|
||||
float dist;
|
||||
};
|
||||
|
||||
static inline void plane_copy(struct plane *dst, const struct plane *p)
|
||||
|
|
@ -39,52 +39,50 @@ static inline void plane_copy(struct plane *dst, const struct plane *p)
|
|||
}
|
||||
|
||||
static inline void plane_set(struct plane *dst, const struct vec3 *dir,
|
||||
float dist)
|
||||
float dist)
|
||||
{
|
||||
vec3_copy(&dst->dir, dir);
|
||||
dst->dist = dist;
|
||||
}
|
||||
|
||||
static inline void plane_setf(struct plane *dst, float a, float b, float c,
|
||||
float d)
|
||||
float d)
|
||||
{
|
||||
vec3_set(&dst->dir, a, b, c);
|
||||
dst->dist = d;
|
||||
}
|
||||
|
||||
EXPORT void plane_from_tri(struct plane *dst,
|
||||
const struct vec3 *v1,
|
||||
const struct vec3 *v2,
|
||||
const struct vec3 *v3);
|
||||
EXPORT void plane_from_tri(struct plane *dst, const struct vec3 *v1,
|
||||
const struct vec3 *v2, const struct vec3 *v3);
|
||||
|
||||
EXPORT void plane_transform(struct plane *dst, const struct plane *p,
|
||||
const struct matrix4 *m);
|
||||
const struct matrix4 *m);
|
||||
EXPORT void plane_transform3x4(struct plane *dst, const struct plane *p,
|
||||
const struct matrix3 *m);
|
||||
const struct matrix3 *m);
|
||||
|
||||
EXPORT bool plane_intersection_ray(const struct plane *p,
|
||||
const struct vec3 *orig, const struct vec3 *dir, float *t);
|
||||
const struct vec3 *orig,
|
||||
const struct vec3 *dir, float *t);
|
||||
EXPORT bool plane_intersection_line(const struct plane *p,
|
||||
const struct vec3 *v1, const struct vec3 *v2, float *t);
|
||||
const struct vec3 *v1,
|
||||
const struct vec3 *v2, float *t);
|
||||
|
||||
EXPORT bool plane_tri_inside(const struct plane *p,
|
||||
const struct vec3 *v1,
|
||||
const struct vec3 *v2,
|
||||
const struct vec3 *v3,
|
||||
float precision);
|
||||
EXPORT bool plane_tri_inside(const struct plane *p, const struct vec3 *v1,
|
||||
const struct vec3 *v2, const struct vec3 *v3,
|
||||
float precision);
|
||||
|
||||
EXPORT bool plane_line_inside(const struct plane *p, const struct vec3 *v1,
|
||||
const struct vec3 *v2, float precision);
|
||||
const struct vec3 *v2, float precision);
|
||||
|
||||
static inline bool plane_close(const struct plane *p1, const struct plane *p2,
|
||||
float precision)
|
||||
float precision)
|
||||
{
|
||||
return vec3_close(&p1->dir, &p2->dir, precision) &&
|
||||
close_float(p1->dist, p2->dist, precision);
|
||||
}
|
||||
|
||||
static inline bool plane_coplanar(const struct plane *p1,
|
||||
const struct plane *p2, float precision)
|
||||
const struct plane *p2, float precision)
|
||||
{
|
||||
float cos_angle = vec3_dot(&p1->dir, &p2->dir);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue