|
|
@ -2982,15 +2982,41 @@ CVector PacsBox[PacsBoxPointCount] =
|
|
|
|
CVector( 0.5f, 0.5f, 0), CVector( -0.5f, 0.5f, 0),
|
|
|
|
CVector( 0.5f, 0.5f, 0), CVector( -0.5f, 0.5f, 0),
|
|
|
|
CVector( -0.5f, 0.5f, 0), CVector( -0.5f, -0.5f, 0),
|
|
|
|
CVector( -0.5f, 0.5f, 0), CVector( -0.5f, -0.5f, 0),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CVector( -0.5f, -0.5f, 0), CVector( -0.5f, -0.5f, 1),
|
|
|
|
|
|
|
|
CVector( 0.5f, -0.5f, 0), CVector( 0.5f, -0.5f, 1),
|
|
|
|
|
|
|
|
CVector( 0.5f, 0.5f, 0), CVector( 0.5f, 0.5f, 1),
|
|
|
|
|
|
|
|
CVector( -0.5f, 0.5f, 0), CVector( -0.5f, 0.5f, 1),
|
|
|
|
|
|
|
|
|
|
|
|
CVector( -0.5f, -0.5f, 1), CVector( 0.5f, -0.5f, 1),
|
|
|
|
CVector( -0.5f, -0.5f, 1), CVector( 0.5f, -0.5f, 1),
|
|
|
|
CVector( 0.5f, -0.5f, 1), CVector( 0.5f, 0.5f, 1),
|
|
|
|
CVector( 0.5f, -0.5f, 1), CVector( 0.5f, 0.5f, 1),
|
|
|
|
CVector( 0.5f, 0.5f, 1), CVector( -0.5f, 0.5f, 1),
|
|
|
|
CVector( 0.5f, 0.5f, 1), CVector( -0.5f, 0.5f, 1),
|
|
|
|
CVector( -0.5f, 0.5f, 1), CVector( -0.5f, -0.5f, 1),
|
|
|
|
CVector( -0.5f, 0.5f, 1), CVector( -0.5f, -0.5f, 1),
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const uint PacsStairPointCount = 32;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CVector PacsStair[PacsStairPointCount] =
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
CVector( -0.5f, -0.5f, 0), CVector( 0.5f, -0.5f, 0),
|
|
|
|
|
|
|
|
CVector( 0.5f, -0.5f, 0), CVector( 0.5f, 0.5f, 0),
|
|
|
|
|
|
|
|
CVector( 0.5f, 0.5f, 0), CVector( -0.5f, 0.5f, 0),
|
|
|
|
|
|
|
|
CVector( -0.5f, 0.5f, 0), CVector( -0.5f, -0.5f, 0),
|
|
|
|
|
|
|
|
|
|
|
|
CVector( -0.5f, -0.5f, 0), CVector( -0.5f, -0.5f, 1),
|
|
|
|
CVector( -0.5f, -0.5f, 0), CVector( -0.5f, -0.5f, 1),
|
|
|
|
CVector( 0.5f, -0.5f, 0), CVector( 0.5f, -0.5f, 1),
|
|
|
|
CVector( 0.5f, -0.5f, 0), CVector( 0.5f, -0.5f, 1),
|
|
|
|
CVector( 0.5f, 0.5f, 0), CVector( 0.5f, 0.5f, 1),
|
|
|
|
CVector( 0.5f, 0.5f, 0), CVector( 0.5f, 0.5f, 1),
|
|
|
|
CVector( -0.5f, 0.5f, 0), CVector( -0.5f, 0.5f, 1),
|
|
|
|
CVector( -0.5f, 0.5f, 0), CVector( -0.5f, 0.5f, 1),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CVector( -0.5f, -0.5f, 1), CVector( 0.5f, -0.5f, 1),
|
|
|
|
|
|
|
|
CVector( 0.5f, -0.5f, 1), CVector( 0.5f, 0.5f, 1),
|
|
|
|
|
|
|
|
CVector( 0.5f, 0.5f, 1), CVector( -0.5f, 0.5f, 1),
|
|
|
|
|
|
|
|
CVector( -0.5f, 0.5f, 1), CVector( -0.5f, -0.5f, 1),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CVector( -0.5f, -0.5f, 1), CVector( 0.5f, 0.5f, 1),
|
|
|
|
|
|
|
|
CVector( -0.5f, 0.5f, 1), CVector( 0.5f, -0.5f, 1),
|
|
|
|
|
|
|
|
CVector( -0.5f, 0, 1), CVector( 0.5f, 0, 1),
|
|
|
|
|
|
|
|
CVector( 0, - 0.5f, 1), CVector( 0, 0.5f, 1),
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const uint PacsCylPointCount = 48;
|
|
|
|
const uint PacsCylPointCount = 48;
|
|
|
@ -3044,6 +3070,7 @@ void displayPACSPrimitive()
|
|
|
|
|
|
|
|
|
|
|
|
// Distance
|
|
|
|
// Distance
|
|
|
|
CVector position = prim->getFinalPosition(wI);
|
|
|
|
CVector position = prim->getFinalPosition(wI);
|
|
|
|
|
|
|
|
bool isStairs = false;
|
|
|
|
if ((position-UserEntity->pos()).sqrnorm() < (200*200))
|
|
|
|
if ((position-UserEntity->pos()).sqrnorm() < (200*200))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Choose a color
|
|
|
|
// Choose a color
|
|
|
@ -3051,7 +3078,13 @@ void displayPACSPrimitive()
|
|
|
|
if (prim->isCollisionable())
|
|
|
|
if (prim->isCollisionable())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Static collision
|
|
|
|
// Static collision
|
|
|
|
if (prim->getReactionType() == UMovePrimitive::DoNothing)
|
|
|
|
if (prim->getTriggerType() == UMovePrimitive::OverlapStairsTrigger)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
line.Color0 = CRGBA::Green;
|
|
|
|
|
|
|
|
isStairs = true;
|
|
|
|
|
|
|
|
position.z -= 10.0f;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (prim->getReactionType() == UMovePrimitive::DoNothing)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
line.Color0 = CRGBA::Red;
|
|
|
|
line.Color0 = CRGBA::Red;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -3081,9 +3114,17 @@ void displayPACSPrimitive()
|
|
|
|
|
|
|
|
|
|
|
|
// Draw the primitive
|
|
|
|
// Draw the primitive
|
|
|
|
if (prim->getPrimitiveType() == UMovePrimitive::_2DOrientedBox)
|
|
|
|
if (prim->getPrimitiveType() == UMovePrimitive::_2DOrientedBox)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (isStairs)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
lines = PacsStair;
|
|
|
|
|
|
|
|
linecount = PacsStairPointCount/2;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
lines = PacsBox;
|
|
|
|
lines = PacsBox;
|
|
|
|
linecount = PacsBoxPointCount/2;
|
|
|
|
linecount = PacsBoxPointCount/2;
|
|
|
|
|
|
|
|
}
|
|
|
|
float width;
|
|
|
|
float width;
|
|
|
|
float depth;
|
|
|
|
float depth;
|
|
|
|
prim->getSize (width, depth);
|
|
|
|
prim->getSize (width, depth);
|
|
|
|