Debuggers: Added a cBoundingBox test.
This commit is contained in:
parent
0aff42a4bc
commit
c41183d450
@ -1741,3 +1741,58 @@ end
|
||||
|
||||
|
||||
|
||||
|
||||
function HandleConsoleBBox(a_Split)
|
||||
local bbox = cBoundingBox(0, 10, 0, 10, 0, 10)
|
||||
local v1 = Vector3d(1, 1, 1)
|
||||
local v2 = Vector3d(5, 5, 5)
|
||||
local v3 = Vector3d(11, 11, 11)
|
||||
|
||||
if (bbox:IsInside(v1)) then
|
||||
LOG("v1 is inside bbox")
|
||||
else
|
||||
LOG("v1 is not inside bbox")
|
||||
end
|
||||
|
||||
if (bbox:IsInside(v2)) then
|
||||
LOG("v2 is inside bbox")
|
||||
else
|
||||
LOG("v2 is not inside bbox")
|
||||
end
|
||||
|
||||
if (bbox:IsInside(v3)) then
|
||||
LOG("v3 is inside bbox")
|
||||
else
|
||||
LOG("v3 is not inside bbox")
|
||||
end
|
||||
|
||||
if (bbox:IsInside(v1, v2)) then
|
||||
LOG("v1*v2 is inside bbox")
|
||||
else
|
||||
LOG("v1*v2 is not inside bbox")
|
||||
end
|
||||
|
||||
if (bbox:IsInside(v2, v1)) then
|
||||
LOG("v2*v1 is inside bbox")
|
||||
else
|
||||
LOG("v2*v1 is not inside bbox")
|
||||
end
|
||||
|
||||
if (bbox:IsInside(v1, v3)) then
|
||||
LOG("v1*v3 is inside bbox")
|
||||
else
|
||||
LOG("v1*v3 is not inside bbox")
|
||||
end
|
||||
|
||||
if (bbox:IsInside(v2, v3)) then
|
||||
LOG("v2*v3 is inside bbox")
|
||||
else
|
||||
LOG("v2*v3 is not inside bbox")
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -200,6 +200,12 @@ g_PluginInfo =
|
||||
|
||||
ConsoleCommands =
|
||||
{
|
||||
["bbox"] =
|
||||
{
|
||||
Handler = HandleConsoleBBox,
|
||||
HelpString = "Performs cBoundingBox API tests",
|
||||
},
|
||||
|
||||
["hash"] =
|
||||
{
|
||||
Handler = HandleConsoleHash,
|
||||
|
Loading…
Reference in New Issue
Block a user