|
|
|
@ -2979,15 +2979,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, 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),
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
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, 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;
|
|
|
|
@ -3041,6 +3067,7 @@ void displayPACSPrimitive()
|
|
|
|
|
|
|
|
|
|
// Distance
|
|
|
|
|
CVector position = prim->getFinalPosition(wI);
|
|
|
|
|
bool isStairs = false;
|
|
|
|
|
if ((position-UserEntity->pos()).sqrnorm() < (200*200))
|
|
|
|
|
{
|
|
|
|
|
// Choose a color
|
|
|
|
@ -3048,8 +3075,14 @@ void displayPACSPrimitive()
|
|
|
|
|
if (prim->isCollisionable())
|
|
|
|
|
{
|
|
|
|
|
// 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;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
@ -3079,8 +3112,16 @@ void displayPACSPrimitive()
|
|
|
|
|
// Draw the primitive
|
|
|
|
|
if (prim->getPrimitiveType() == UMovePrimitive::_2DOrientedBox)
|
|
|
|
|
{
|
|
|
|
|
lines = PacsBox;
|
|
|
|
|
linecount = PacsBoxPointCount/2;
|
|
|
|
|
if (isStairs)
|
|
|
|
|
{
|
|
|
|
|
lines = PacsStair;
|
|
|
|
|
linecount = PacsStairPointCount/2;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
lines = PacsBox;
|
|
|
|
|
linecount = PacsBoxPointCount/2;
|
|
|
|
|
}
|
|
|
|
|
float width;
|
|
|
|
|
float depth;
|
|
|
|
|
prim->getSize (width, depth);
|
|
|
|
|