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.

52 lines
1.6 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: sheet code for particles and other sprite functions
  4. //
  5. //===========================================================================//
  6. #ifndef PARTICLES_INTERNAL_H
  7. #define PARTICLES_INTERNAL_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "tier1/UtlStringMap.h"
  12. #include "tier1/utlbuffer.h"
  13. #include "tier2/fileutils.h"
  14. #define MAX_WORLD_PLANAR_CONSTRAINTS ( 26 + 5 + 10 )
  15. #define COLLISION_MODE_PER_PARTICLE_TRACE 0
  16. #define COLLISION_MODE_PER_FRAME_PLANESET 1
  17. #define COLLISION_MODE_INITIAL_TRACE_DOWN 2
  18. #define COLLISION_MODE_USE_NEAREST_TRACE 3
  19. struct CWorldCollideContextData
  20. {
  21. FourVectors m_TraceStartPnt[MAX_WORLD_PLANAR_CONSTRAINTS];
  22. FourVectors m_TraceEndPnt[MAX_WORLD_PLANAR_CONSTRAINTS];
  23. FourVectors m_PointOnPlane[MAX_WORLD_PLANAR_CONSTRAINTS];
  24. FourVectors m_PlaneNormal[MAX_WORLD_PLANAR_CONSTRAINTS];
  25. int m_nActivePlanes;
  26. int m_nNumFixedPlanes;
  27. float m_flLastUpdateTime;
  28. Vector m_vecLastUpdateOrigin;
  29. bool m_bPlaneActive[MAX_WORLD_PLANAR_CONSTRAINTS];
  30. void *operator new( size_t nSize );
  31. void *operator new( size_t nSize, int nBlockUse, const char *pFileName, int nLine );
  32. void operator delete(void *pData);
  33. void operator delete( void* p, int nBlockUse, const char *pFileName, int nLine );
  34. void SetBaseTrace( int nIndex, Vector const &rayStart, Vector const &traceDir, int nCollisionGroup, bool bKeepMisses );
  35. void CalculatePlanes( CParticleCollection *pParticles, int nCollisionMode, int nCollisionGroupNumber,
  36. Vector const *pCpOffset = NULL, float flMovementTolerance = 0. );
  37. };
  38. #endif // PARTICLES_INTERNAL_H