#include <geometry.h>
Classes | |
struct | MeshData |
Static Public Member Functions | |
static float | get_closest_points_between_segments (const Vector2 &p1, const Vector2 &q1, const Vector2 &p2, const Vector2 &q2, Vector2 &c1, Vector2 &c2) |
static void | get_closest_points_between_segments (const Vector3 &p1, const Vector3 &p2, const Vector3 &q1, const Vector3 &q2, Vector3 &c1, Vector3 &c2) |
static float | get_closest_distance_between_segments (const Vector3 &p_from_a, const Vector3 &p_to_a, const Vector3 &p_from_b, const Vector3 &p_to_b) |
static bool | ray_intersects_triangle (const Vector3 &p_from, const Vector3 &p_dir, const Vector3 &p_v0, const Vector3 &p_v1, const Vector3 &p_v2, Vector3 *r_res=0) |
static bool | segment_intersects_triangle (const Vector3 &p_from, const Vector3 &p_to, const Vector3 &p_v0, const Vector3 &p_v1, const Vector3 &p_v2, Vector3 *r_res=0) |
static bool | segment_intersects_sphere (const Vector3 &p_from, const Vector3 &p_to, const Vector3 &p_sphere_pos, real_t p_sphere_radius, Vector3 *r_res=0, Vector3 *r_norm=0) |
static bool | segment_intersects_cylinder (const Vector3 &p_from, const Vector3 &p_to, float p_height, float p_radius, Vector3 *r_res=0, Vector3 *r_norm=0) |
static bool | segment_intersects_convex (const Vector3 &p_from, const Vector3 &p_to, const Plane *p_planes, int p_plane_count, Vector3 *p_res, Vector3 *p_norm) |
static Vector3 | get_closest_point_to_segment (const Vector3 &p_point, const Vector3 *p_segment) |
static Vector3 | get_closest_point_to_segment_uncapped (const Vector3 &p_point, const Vector3 *p_segment) |
static Vector2 | get_closest_point_to_segment_2d (const Vector2 &p_point, const Vector2 *p_segment) |
static bool | is_point_in_triangle (const Vector2 &s, const Vector2 &a, const Vector2 &b, const Vector2 &c) |
static Vector2 | get_closest_point_to_segment_uncapped_2d (const Vector2 &p_point, const Vector2 *p_segment) |
static bool | segment_intersects_segment_2d (const Vector2 &p_from_a, const Vector2 &p_to_a, const Vector2 &p_from_b, const Vector2 &p_to_b, Vector2 *r_result) |
static bool | point_in_projected_triangle (const Vector3 &p_point, const Vector3 &p_v1, const Vector3 &p_v2, const Vector3 &p_v3) |
static bool | triangle_sphere_intersection_test (const Vector3 *p_triangle, const Vector3 &p_normal, const Vector3 &p_sphere_pos, real_t p_sphere_radius, Vector3 &r_triangle_contact, Vector3 &r_sphere_contact) |
static real_t | segment_intersects_circle (const Vector2 &p_from, const Vector2 &p_to, const Vector2 &p_circle_pos, real_t p_circle_radius) |
static Vector< Vector3 > | clip_polygon (const Vector< Vector3 > &polygon, const Plane &p_plane) |
static Vector< int > | triangulate_polygon (const Vector< Vector2 > &p_polygon) |
static Vector< Vector< Vector2 > > | decompose_polygon (const Vector< Vector2 > &p_polygon) |
static DVector< DVector< Face3 > > | separate_objects (DVector< Face3 > p_array) |
static DVector< Face3 > | wrap_geometry (DVector< Face3 > p_array, float *p_error=NULL) |
create a "wrap" that encloses the given geometry | |
static _FORCE_INLINE_ int | get_uv84_normal_bit (const Vector3 &p_vector) |
static _FORCE_INLINE_ int | get_uv84_normal_bit_neighbors (int p_idx) |
static double | vec2_cross (const Point2 &O, const Point2 &A, const Point2 &B) |
static Vector< Point2 > | convex_hull_2d (Vector< Point2 > P) |
static MeshData | build_convex_mesh (const DVector< Plane > &p_planes) |
static DVector< Plane > | build_sphere_planes (float p_radius, int p_lats, int p_lons, Vector3::Axis p_axis=Vector3::AXIS_Z) |
static DVector< Plane > | build_box_planes (const Vector3 &p_extents) |
static DVector< Plane > | build_cylinder_planes (float p_radius, float p_height, int p_sides, Vector3::Axis p_axis=Vector3::AXIS_Z) |
static DVector< Plane > | build_capsule_planes (float p_radius, float p_height, int p_sides, int p_lats, Vector3::Axis p_axis=Vector3::AXIS_Z) |
static void | make_atlas (const Vector< Size2i > &p_rects, Vector< Point2i > &r_result, Size2i &r_size) |
Static Public Attributes | |
static Vector< Vector< Vector2 > >(* | _decompose_func )(const Vector< Vector2 > &p_polygon) =NULL |
|
inlinestatic |
2nd) TEST INSIDE TRIANGLE
3rd TEST INSIDE EDGE CYLINDERS
i could discard by range here to make the algorithm quicker? dunno..
4th TEST INSIDE EDGE POINTS