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.

36 lines
1.0 KiB

  1. //--------------------------------------------------------------------------------------------------
  2. /**
  3. @file qhMass.h
  4. @author Dirk Gregorius
  5. @version 0.1
  6. @date 03/12/2011
  7. Copyright(C) 2011 by D. Gregorius. All rights reserved.
  8. */
  9. //--------------------------------------------------------------------------------------------------
  10. #pragma once
  11. #include "qhTypes.h"
  12. #include "qhMath.h"
  13. //--------------------------------------------------------------------------------------------------
  14. // qhMass
  15. //--------------------------------------------------------------------------------------------------
  16. struct qhMass
  17. {
  18. qhMass( void );
  19. qhReal Weight;
  20. qhVector3 Center;
  21. qhMatrix3 Inertia;
  22. qhMass& operator+=( const qhMass& Other );
  23. void ShiftToOrigin( void );
  24. void ShiftToCenter( void );
  25. };
  26. qhMass qhSphereMass( const qhVector3& Center, qhReal Radius, qhReal Density = qhReal( 1 ) );
  27. qhMass qhCapsuleMass( const qhVector3& Center1, const qhVector3& Center2, qhReal Radius, qhReal Density = qhReal( 1 ) );