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.

24 lines
891 B

  1. //========= Copyright (c) Valve Corporation, All rights reserved. ==========
  2. #ifndef MATHLIB_BOX_BUOYANCY_H
  3. #define MATHLIB_BOX_BUOYANCY_H
  4. #include "ssemath.h"
  5. #include "mathlib/vector4d.h"
  6. // returns the volume of the part of the box submerged in water
  7. // box is defined as mutually orthogonal half-sizes. THe halfsizes MUST be orthogonal!
  8. // the water plane is z=0, and the box center's z coordinate is taken from the f4Origin parameter
  9. // (only z is used in f4Origin)
  10. extern fltx4 GetBoxBuoyancy4x3( const fltx4& f4a, const fltx4& f4b, const fltx4&f4c, const fltx4&f4Origin );
  11. extern Vector4D GetBoxBuoyancy( const Vector& a, const Vector& b, const Vector& c, const Vector& vecOrigin );
  12. // this takes a,b,c half-sizes and the center position of the box in the columns of the 3x4 matrix
  13. extern fltx4 GetBoxBuoyancy3x4( const FourVectors &box );
  14. extern void TestBuoyancy();
  15. #endif