2015-07-12 23:32:09 +03:00
|
|
|
#include "precompiled.h"
|
|
|
|
|
|
|
|
/* <1262b3> ../cstrike/dlls/plane.cpp:24 */
|
2015-08-20 13:35:01 +03:00
|
|
|
CPlane::CPlane(void)
|
2015-07-12 23:32:09 +03:00
|
|
|
{
|
|
|
|
m_fInitialized = FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* <1262d4> ../cstrike/dlls/plane.cpp:33 */
|
2015-08-20 13:35:01 +03:00
|
|
|
NOXREF void CPlane::InitializePlane(const Vector &vecNormal, const Vector &vecPoint)
|
2015-07-12 23:32:09 +03:00
|
|
|
{
|
2015-06-30 12:46:07 +03:00
|
|
|
m_vecNormal = vecNormal;
|
2015-07-12 23:32:09 +03:00
|
|
|
m_fInitialized = TRUE;
|
2015-08-20 13:35:01 +03:00
|
|
|
m_flDist = DotProduct(m_vecNormal, vecPoint);
|
2015-07-12 23:32:09 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
/* <126343> ../cstrike/dlls/plane.cpp:45 */
|
2015-08-20 13:35:01 +03:00
|
|
|
NOXREF BOOL CPlane::PointInFront(const Vector &vecPoint)
|
2015-07-12 23:32:09 +03:00
|
|
|
{
|
2015-06-30 12:46:07 +03:00
|
|
|
if (!m_fInitialized)
|
2015-08-20 13:35:01 +03:00
|
|
|
{
|
2015-06-30 12:46:07 +03:00
|
|
|
return FALSE;
|
2015-08-20 13:35:01 +03:00
|
|
|
}
|
2015-06-30 12:46:07 +03:00
|
|
|
|
|
|
|
float flFace = DotProduct(m_vecNormal, vecPoint) - m_flDist;
|
|
|
|
|
|
|
|
if (flFace >= 0.0f)
|
2015-08-20 13:35:01 +03:00
|
|
|
{
|
2015-06-30 12:46:07 +03:00
|
|
|
return TRUE;
|
2015-08-20 13:35:01 +03:00
|
|
|
}
|
2015-06-30 12:46:07 +03:00
|
|
|
|
2015-07-12 23:32:09 +03:00
|
|
|
return FALSE;
|
|
|
|
}
|