|
|
|
@ -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, 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;
|
|
|
|
@ -3044,6 +3070,7 @@ void displayPACSPrimitive()
|
|
|
|
|
|
|
|
|
|
// Distance
|
|
|
|
|
CVector position = prim->getFinalPosition(wI);
|
|
|
|
|
bool isStairs = false;
|
|
|
|
|
if ((position-UserEntity->pos()).sqrnorm() < (200*200))
|
|
|
|
|
{
|
|
|
|
|
// Choose a color
|
|
|
|
@ -3051,8 +3078,14 @@ void displayPACSPrimitive()
|
|
|
|
|
if (prim->isCollisionable())
|
|
|
|
|
{
|
|
|
|
|
// Static collision
|
|
|
|
|
if (prim->getReactionType() == UMovePrimitive::DoNothing)
|
|
|
|
|
if (prim->getTriggerType() == UMovePrimitive::OverlapStairsTrigger)
|
|
|
|
|
{
|
|
|
|
|
line.Color0 = CRGBA::Blue;
|
|
|
|
|
isStairs = true;
|
|
|
|
|
position.z -= 1.0f;
|
|
|
|
|
}
|
|
|
|
|
else if (prim->getReactionType() == UMovePrimitive::DoNothing)
|
|
|
|
|
{
|
|
|
|
|
line.Color0 = CRGBA::Red;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
@ -3082,8 +3115,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);
|
|
|
|
|