work
This commit is contained in:
@@ -288,9 +288,15 @@ fn reduce_simplex(
|
||||
let uv_p = uv.dot(p);
|
||||
|
||||
// if pvw/uvw >= 0 and upw/uvw >= 0 and uvp/uvw >= 0 then
|
||||
// local direction = Vector3.new(0, 0, 0)
|
||||
// return direction, a0, a1, b0, b1, c0, c1, d0, d1
|
||||
// end
|
||||
// TODO: reduce this
|
||||
if (pv_w.is_zero()||pv_w.is_negative()^uv_w.is_negative())
|
||||
||(up_w.is_zero()||up_w.is_negative()^uv_w.is_negative())
|
||||
||(uv_p.is_zero()||uv_p.is_negative()^uv_w.is_negative()){
|
||||
// origin is contained, this is a positive detection
|
||||
// local direction = Vector3.new(0, 0, 0)
|
||||
// return direction, a0, a1, b0, b1, c0, c1, d0, d1
|
||||
return (vec3::zero(),simplex);
|
||||
}
|
||||
|
||||
// local uvwSign = uvw < 0 and -1 or uvw > 0 and 1 or 0
|
||||
// local uvDist = uvp*uvwSign/uv.magnitude
|
||||
|
||||
Reference in New Issue
Block a user