Open Broadcaster Software
Free, open source software for live streaming and recording
bounds.h File Reference

Go to the source code of this file.

Data Structures

struct  bounds
 

Macros

#define BOUNDS_MAX_X   1
 
#define BOUNDS_MAX_Y   2
 
#define BOUNDS_MAX_Z   4
 
#define BOUNDS_OUTSIDE   1
 
#define BOUNDS_INSIDE   2
 
#define BOUNDS_PARTIAL   3
 

Functions

EXPORT void bounds_move (struct bounds *dst, const struct bounds *b, const struct vec3 *v)
 
EXPORT void bounds_scale (struct bounds *dst, const struct bounds *b, const struct vec3 *v)
 
EXPORT void bounds_merge (struct bounds *dst, const struct bounds *b1, const struct bounds *b2)
 
EXPORT void bounds_merge_point (struct bounds *dst, const struct bounds *b, const struct vec3 *v)
 
EXPORT void bounds_get_point (struct vec3 *dst, const struct bounds *b, unsigned int i)
 
EXPORT void bounds_get_center (struct vec3 *dst, const struct bounds *b)
 
EXPORT void bounds_transform (struct bounds *dst, const struct bounds *b, const struct matrix4 *m)
 
EXPORT void bounds_transform3x4 (struct bounds *dst, const struct bounds *b, const struct matrix3 *m)
 
EXPORT bool bounds_intersection_ray (const struct bounds *b, const struct vec3 *orig, const struct vec3 *dir, float *t)
 
EXPORT bool bounds_intersection_line (const struct bounds *b, const struct vec3 *p1, const struct vec3 *p2, float *t)
 
EXPORT bool bounds_plane_test (const struct bounds *b, const struct plane *p)
 
EXPORT bool bounds_under_plane (const struct bounds *b, const struct plane *p)
 
EXPORT bool bounds_intersects (const struct bounds *b, const struct bounds *test, float epsilon)
 
EXPORT bool bounds_intersects_obb (const struct bounds *b, const struct bounds *test, const struct matrix4 *m, float epsilon)
 
EXPORT bool bounds_intersects_obb3x4 (const struct bounds *b, const struct bounds *test, const struct matrix3 *m, float epsilon)
 
EXPORT float bounds_min_dist (const struct bounds *b, const struct plane *p)
 

Macro Definition Documentation

◆ BOUNDS_INSIDE

#define BOUNDS_INSIDE   2

◆ BOUNDS_MAX_X

#define BOUNDS_MAX_X   1

◆ BOUNDS_MAX_Y

#define BOUNDS_MAX_Y   2

◆ BOUNDS_MAX_Z

#define BOUNDS_MAX_Z   4

◆ BOUNDS_OUTSIDE

#define BOUNDS_OUTSIDE   1

◆ BOUNDS_PARTIAL

#define BOUNDS_PARTIAL   3

Function Documentation

◆ bounds_get_center()

EXPORT void bounds_get_center ( struct vec3 dst,
const struct bounds b 
)

◆ bounds_get_point()

EXPORT void bounds_get_point ( struct vec3 dst,
const struct bounds b,
unsigned int  i 
)

◆ bounds_intersection_line()

EXPORT bool bounds_intersection_line ( const struct bounds b,
const struct vec3 p1,
const struct vec3 p2,
float *  t 
)

◆ bounds_intersection_ray()

EXPORT bool bounds_intersection_ray ( const struct bounds b,
const struct vec3 orig,
const struct vec3 dir,
float *  t 
)

◆ bounds_intersects()

EXPORT bool bounds_intersects ( const struct bounds b,
const struct bounds test,
float  epsilon 
)

◆ bounds_intersects_obb()

EXPORT bool bounds_intersects_obb ( const struct bounds b,
const struct bounds test,
const struct matrix4 m,
float  epsilon 
)

◆ bounds_intersects_obb3x4()

EXPORT bool bounds_intersects_obb3x4 ( const struct bounds b,
const struct bounds test,
const struct matrix3 m,
float  epsilon 
)

◆ bounds_merge()

EXPORT void bounds_merge ( struct bounds dst,
const struct bounds b1,
const struct bounds b2 
)

◆ bounds_merge_point()

EXPORT void bounds_merge_point ( struct bounds dst,
const struct bounds b,
const struct vec3 v 
)

◆ bounds_min_dist()

EXPORT float bounds_min_dist ( const struct bounds b,
const struct plane p 
)

◆ bounds_move()

EXPORT void bounds_move ( struct bounds dst,
const struct bounds b,
const struct vec3 v 
)

◆ bounds_plane_test()

EXPORT bool bounds_plane_test ( const struct bounds b,
const struct plane p 
)

◆ bounds_scale()

EXPORT void bounds_scale ( struct bounds dst,
const struct bounds b,
const struct vec3 v 
)

◆ bounds_transform()

EXPORT void bounds_transform ( struct bounds dst,
const struct bounds b,
const struct matrix4 m 
)

Note: transforms as OBB, then converts back to AABB, which can result in the actual size becoming larger than it originally was.

◆ bounds_transform3x4()

EXPORT void bounds_transform3x4 ( struct bounds dst,
const struct bounds b,
const struct matrix3 m 
)

◆ bounds_under_plane()

EXPORT bool bounds_under_plane ( const struct bounds b,
const struct plane p 
)