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.

46 lines
1.4 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. //=============================================================================
  4. // Valve includes
  5. #include "datamodel/dmelementfactoryhelper.h"
  6. #include "movieobjects/dmeeyeposition.h"
  7. // memdbgon must be the last include file in a .cpp file!!!
  8. #include "tier0/memdbgon.h"
  9. //-----------------------------------------------------------------------------
  10. // Expose this class to the scene database
  11. //-----------------------------------------------------------------------------
  12. IMPLEMENT_ELEMENT_FACTORY( DmeEyePosition, CDmeEyePosition );
  13. //-----------------------------------------------------------------------------
  14. //
  15. //-----------------------------------------------------------------------------
  16. void CDmeEyePosition::OnConstruction()
  17. {
  18. }
  19. //-----------------------------------------------------------------------------
  20. //
  21. //-----------------------------------------------------------------------------
  22. void CDmeEyePosition::OnDestruction()
  23. {
  24. }
  25. //-----------------------------------------------------------------------------
  26. // Returns the model relative position of the eyePosition
  27. //-----------------------------------------------------------------------------
  28. void CDmeEyePosition::GetWorldPosition( Vector &worldPosition )
  29. {
  30. matrix3x4_t mWorld;
  31. GetShapeToWorldTransform( mWorld );
  32. MatrixPosition( mWorld, worldPosition );
  33. }