Team Fortress 2 Source Code as on 22/4/2020
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.

62 lines
1.5 KiB

  1. //============ Copyright (c) Valve Corporation, All rights reserved. ==========
  2. //
  3. //=============================================================================
  4. #ifndef DELTAUTILS_H
  5. #define DELTAUTILS_H
  6. // Valve includes
  7. #include "tier1/utlstring.h"
  8. #include "tier1/utlsymbol.h"
  9. #include "tier1/utlvector.h"
  10. //=============================================================================
  11. //
  12. //=============================================================================
  13. class CDeltaUtils
  14. {
  15. public:
  16. enum Corrector_t
  17. {
  18. CT_NO_CORRECTORS,
  19. CT_SINGLE_UNDERSCORE,
  20. CT_DOUBLE_UNDERSCORES
  21. };
  22. enum DeltaSortForwardBackward_t
  23. {
  24. DS_FORWARD,
  25. DS_BACKWARD
  26. };
  27. static void SplitDeltaName(
  28. CUtlVector< CUtlSymbol > &splitDeltaName,
  29. CUtlSymbolTable &deltaSymbolTable,
  30. const CUtlString &sDeltaName,
  31. Corrector_t nCorrectorType );
  32. static void ComputeDependentDeltas(
  33. CUtlVector< CUtlVector< int > > &dependentDeltaList,
  34. const CUtlVector< CUtlString > &deltaList,
  35. Corrector_t nCorrectorType );
  36. static void ComputeDeltaOrder(
  37. CUtlVector< int > &deltaOrder,
  38. const CUtlVector< CUtlVector< int > > &dependentDeltaList,
  39. DeltaSortForwardBackward_t eForwardBackward );
  40. static void MakeDeltaVerticesAbsolute(
  41. CUtlVector< CUtlVector< Vector > > &vDeltaVerticesList,
  42. const CUtlVector< CUtlString > &deltaList,
  43. Corrector_t nCorrectorType );
  44. static void MakeDeltaVerticesRelative(
  45. CUtlVector< CUtlVector< Vector > > &vDeltaVerticesList,
  46. const CUtlVector< CUtlString > &deltaList,
  47. Corrector_t nCorrectorType );
  48. };
  49. #endif // DELTAUTILS_H