2022-07-12 17:46:47 +02:00
|
|
|
|
//===== Copyright <20> 1996-2005, Valve Corporation, All rights reserved. ======//
|
|
|
|
|
//
|
|
|
|
|
// Purpose: Debug overlay engine interface.
|
|
|
|
|
//
|
|
|
|
|
//===========================================================================//
|
|
|
|
|
//
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
#ifndef IDEBUGOVERLAY_H
|
|
|
|
|
#define IDEBUGOVERLAY_H
|
|
|
|
|
|
|
|
|
|
#include "mathlib/vector.h"
|
|
|
|
|
class IVDebugOverlay
|
|
|
|
|
{
|
|
|
|
|
void* __vftable /*VFT*/;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class CIVDebugOverlay : public IVDebugOverlay
|
|
|
|
|
{
|
|
|
|
|
public:
|
2023-01-23 02:20:21 +01:00
|
|
|
|
void AddBoxOverlay(matrix3x4_t& vTransforms, const Vector3D& vMins, const Vector3D& vMaxs, int r, int g, int b, int a, bool bZBuffer, float flDuration)
|
2022-07-12 17:46:47 +02:00
|
|
|
|
{
|
2022-08-31 14:38:49 +02:00
|
|
|
|
const static int index = 1;
|
2022-07-12 17:46:47 +02:00
|
|
|
|
CallVFunc<void>(index, this, vTransforms, vMins, vMaxs, r, g, b, a, bZBuffer, flDuration);
|
|
|
|
|
}
|
|
|
|
|
void AddSphereOverlay(const Vector3D& vOrigin, float flRadius, int nTheta, int nPhi, int r, int g, int b, int a, float flDuration)
|
|
|
|
|
{
|
2022-08-31 14:38:49 +02:00
|
|
|
|
const static int index = 3;
|
2022-07-12 17:46:47 +02:00
|
|
|
|
CallVFunc<void>(index, this, vOrigin, flRadius, nTheta, nPhi, r, g, b, a, flDuration);
|
|
|
|
|
}
|
2023-01-22 12:28:48 +01:00
|
|
|
|
void AddLineOverlay(const Vector3D& vStart, const Vector3D& vEnd, int r, int g, int b, char noDepthTest, float flDuration)
|
2022-07-12 17:46:47 +02:00
|
|
|
|
{
|
2022-08-31 14:38:49 +02:00
|
|
|
|
const static int index = 5;
|
2023-01-22 12:28:48 +01:00
|
|
|
|
CallVFunc<void>(index, this, vStart, vEnd, r, g, b, noDepthTest, flDuration);
|
2022-07-12 17:46:47 +02:00
|
|
|
|
}
|
|
|
|
|
void AddCapsuleOverlay(const Vector3D& vStart, const Vector3D& vEnd, const Vector3D& vRadius, const Vector3D& vTop, const Vector3D& vBottom, int r, int g, int b, int a, float flDuration)
|
|
|
|
|
{
|
2022-08-31 14:38:49 +02:00
|
|
|
|
const static int index = 12;
|
2022-07-12 17:46:47 +02:00
|
|
|
|
CallVFunc<void>(index, this, vStart, vEnd, vRadius, vTop, vBottom, r, g, b, a, flDuration);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
inline CIVDebugOverlay* g_pDebugOverlay = nullptr;
|
|
|
|
|
#endif // IDEBUGOVERLAY_H
|