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.

49 lines
2.0 KiB

  1. //====== Copyright � 1996-2004, Valve Corporation, All rights reserved. =====//
  2. //
  3. // Dme version of a collisionmodel
  4. //
  5. //===========================================================================//
  6. #include "mdlobjects/dmecollisionmodel.h"
  7. #include "datamodel/dmelementfactoryhelper.h"
  8. // memdbgon must be the last include file in a .cpp file!!!
  9. #include "tier0/memdbgon.h"
  10. //-----------------------------------------------------------------------------
  11. // Expose this class to the scene database
  12. //-----------------------------------------------------------------------------
  13. IMPLEMENT_ELEMENT_FACTORY( DmeCollisionModel, CDmeCollisionModel );
  14. //-----------------------------------------------------------------------------
  15. //
  16. //-----------------------------------------------------------------------------
  17. void CDmeCollisionModel::OnConstruction()
  18. {
  19. m_flMass.InitAndSet( this, "mass", 0.0f );
  20. m_bAutomaticMassComputation.InitAndSet( this, "automaticMassComputation", true );
  21. m_flInertia.InitAndSet( this, "inertia", 1.0f );
  22. m_flDamping.InitAndSet( this, "damping", 0.0f );
  23. m_flRotationalDamping.InitAndSet( this, "rotationalDamping", 0.0f );
  24. m_flDrag.InitAndSet( this, "drag", -1.0f );
  25. m_nMaxConvexPieces.InitAndSet( this, "maxConvexPieces", 40 );
  26. m_bRemove2D.InitAndSet( this, "remove2d", false );
  27. m_flWeldPositionTolerance.InitAndSet( this, "weldPositionTolerance", 0.0f );
  28. m_flWeldNormalTolerance.InitAndSet( this, "weldNormalTolerance", 0.999f );
  29. m_bConcave.InitAndSet( this, "concave", false );
  30. m_bForceMassCenter.InitAndSet( this, "forceMassCenter", false );
  31. m_vecMassCenter.InitAndSet( this, "massCenter", Vector( 0.0f, 0.0f, 0.0f ) );
  32. m_bAssumeWorldSpace.InitAndSet( this, "assumeWorldSpace", false );
  33. m_SurfaceProperty.InitAndSet( this, "surfaceProperty", "default" );
  34. }
  35. //-----------------------------------------------------------------------------
  36. //
  37. //-----------------------------------------------------------------------------
  38. void CDmeCollisionModel::OnDestruction()
  39. {
  40. }