Ejemplo n.º 1
0
FBox2D FRect2D::GetBoundingBox()
{
    FVector2D Min = Centre,
              Max = Centre;
    FVector2D PosExtentX = GetExtentX();
    FVector2D PosExtentY = GetExtentY();
    if (PosExtentX.X < 0) PosExtentX.X *= -1;
    if (PosExtentX.Y < 0) PosExtentX.Y *= -1;
    if (PosExtentY.X < 0) PosExtentY.X *= -1;
    if (PosExtentY.Y < 0) PosExtentY.Y *= -1;
    Max += (PosExtentX + PosExtentY);
    Min -= (PosExtentX + PosExtentY);
    return FBox2D(Min, Max);
}
Ejemplo n.º 2
0
    CVector3 CAABB3::GetExtents() const
	{
        return CVector3(GetExtentX(), GetExtentY(), GetExtentZ());
	}