aboutsummaryrefslogtreecommitdiff
path: root/sp/src/game/client/c_tracer.h
diff options
context:
space:
mode:
authorJoe Ludwig <[email protected]>2013-06-26 15:22:04 -0700
committerJoe Ludwig <[email protected]>2013-06-26 15:22:04 -0700
commit39ed87570bdb2f86969d4be821c94b722dc71179 (patch)
treeabc53757f75f40c80278e87650ea92808274aa59 /sp/src/game/client/c_tracer.h
downloadsource-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.tar.xz
source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.zip
First version of the SOurce SDK 2013
Diffstat (limited to 'sp/src/game/client/c_tracer.h')
-rw-r--r--sp/src/game/client/c_tracer.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/sp/src/game/client/c_tracer.h b/sp/src/game/client/c_tracer.h
new file mode 100644
index 00000000..2f1a2848
--- /dev/null
+++ b/sp/src/game/client/c_tracer.h
@@ -0,0 +1,40 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//
+//=============================================================================//
+
+#ifndef C_TRACER_H
+#define C_TRACER_H
+
+class Vector;
+class ParticleDraw;
+class CMeshBuilder;
+
+//-----------------------------------------------------------------------------
+// Tracer_Draw(): draws a tracer, assuming the modelview matrix is identity
+// This function accepts all arguments in CAMERA (pre-projected) space
+//
+// arguments
+// [in] Vector& : The origin of the tracer (CAMERA space)
+// [in] Vector& : The direction and length of the tracer (CAMERA space)
+// [in] float : The tracer width (CAMERA space)
+// [in] float* : r, g, b, a (0 - 1)
+//-----------------------------------------------------------------------------
+void Tracer_Draw( ParticleDraw* pDraw, Vector& start, Vector& delta,
+ float width, float* color, float startV = 0.0, float endV = 1.0 );
+
+void Tracer_Draw( CMeshBuilder *pMeshBuilder, Vector& start, Vector& delta, float width, float* color, float startV = 0.0, float endV = 1.0 );
+
+
+//-----------------------------------------------------------------------------
+// Computes the four verts to draw the tracer with, in the following order:
+// start vertex left side, start vertex right side
+// end vertex left side, end vertex right side
+// returne false if the tracer is offscreen
+//-----------------------------------------------------------------------------
+bool Tracer_ComputeVerts( const Vector &start, const Vector &delta, float width, Vector *pVerts );
+
+#endif // C_TRACER_H \ No newline at end of file