containsOBB_OBB
Definition
-- @/lua/common/mathlib.lua:1360
function containsOBB_OBB(c1, x1, y1, z1, c2, x2, y2, z2)
tmpv1:setSub2(c1, c2)
return abs(tmpv1:dot(x1))+abs(x1:dot(x2))+abs(x1:dot(y2))+abs(x1:dot(z2))<=x1:squaredLength()
and abs(tmpv1:dot(y1))+abs(y1:dot(x2))+abs(y1:dot(y2))+abs(y1:dot(z2))<=y1:squaredLength()
and abs(tmpv1:dot(z1))+abs(z1:dot(x2))+abs(z1:dot(y2))+abs(z1:dot(z2))<=z1:squaredLength()
end
Callers
@/lua/ge/extensions/gameplay/markers/parkingMarker.lua
if self.mode == "contained" then
self.overlap = (data.cruisingSpeedFactor < 1) and containsOBB_OBB(self.pos, self.xVec, self.yVec, self.zVec, data.bbCenter, data.bbHalfAxis0, data.bbHalfAxis1, data.bbHalfAxis2)
elseif self.mode == "overlap" then