Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.6 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. #ifndef C_TRACER_H
  9. #define C_TRACER_H
  10. class Vector;
  11. class ParticleDraw;
  12. class CMeshBuilder;
  13. //-----------------------------------------------------------------------------
  14. // Tracer_Draw(): draws a tracer, assuming the modelview matrix is identity
  15. // This function accepts all arguments in CAMERA (pre-projected) space
  16. //
  17. // arguments
  18. // [in] Vector& : The origin of the tracer (CAMERA space)
  19. // [in] Vector& : The direction and length of the tracer (CAMERA space)
  20. // [in] float : The tracer width (CAMERA space)
  21. // [in] float* : r, g, b, a (0 - 1)
  22. //-----------------------------------------------------------------------------
  23. void Tracer_Draw( ParticleDraw* pDraw, Vector const& start, Vector const& delta,
  24. float width, float* color, float startV = 0.0, float endV = 1.0 );
  25. void Tracer_Draw( CMeshBuilder *pMeshBuilder, Vector const& start, Vector const& delta, float width, float* color, float startV = 0.0, float endV = 1.0 );
  26. //-----------------------------------------------------------------------------
  27. // Computes the four verts to draw the tracer with, in the following order:
  28. // start vertex left side, start vertex right side
  29. // end vertex left side, end vertex right side
  30. // returne false if the tracer is offscreen
  31. //-----------------------------------------------------------------------------
  32. bool Tracer_ComputeVerts( const Vector &start, const Vector &delta, float width, Vector *pVerts );
  33. #endif // C_TRACER_H