|
@@ -36,8 +36,7 @@
|
|
#include "core/math/transform_3d.h"
|
|
#include "core/math/transform_3d.h"
|
|
#include "core/math/vector3.h"
|
|
#include "core/math/vector3.h"
|
|
|
|
|
|
-class _NO_DISCARD_ Face3 {
|
|
|
|
-public:
|
|
|
|
|
|
+struct _NO_DISCARD_ Face3 {
|
|
enum Side {
|
|
enum Side {
|
|
SIDE_OVER,
|
|
SIDE_OVER,
|
|
SIDE_UNDER,
|
|
SIDE_UNDER,
|
|
@@ -48,14 +47,11 @@ public:
|
|
Vector3 vertex[3];
|
|
Vector3 vertex[3];
|
|
|
|
|
|
/**
|
|
/**
|
|
- *
|
|
|
|
* @param p_plane plane used to split the face
|
|
* @param p_plane plane used to split the face
|
|
* @param p_res array of at least 3 faces, amount used in function return
|
|
* @param p_res array of at least 3 faces, amount used in function return
|
|
* @param p_is_point_over array of at least 3 booleans, determining which face is over the plane, amount used in function return
|
|
* @param p_is_point_over array of at least 3 booleans, determining which face is over the plane, amount used in function return
|
|
- * @param _epsilon constant used for numerical error rounding, to add "thickness" to the plane (so coplanar points can happen)
|
|
|
|
* @return amount of faces generated by the split, either 0 (means no split possible), 2 or 3
|
|
* @return amount of faces generated by the split, either 0 (means no split possible), 2 or 3
|
|
*/
|
|
*/
|
|
-
|
|
|
|
int split_by_plane(const Plane &p_plane, Face3 *p_res, bool *p_is_point_over) const;
|
|
int split_by_plane(const Plane &p_plane, Face3 *p_res, bool *p_is_point_over) const;
|
|
|
|
|
|
Plane get_plane(ClockDirection p_dir = CLOCKWISE) const;
|
|
Plane get_plane(ClockDirection p_dir = CLOCKWISE) const;
|