RagdollLoader.h 762 B

123456789101112131415161718192021222324252627282930313233343536
  1. // Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
  2. // SPDX-FileCopyrightText: 2021 Jorrit Rouwe
  3. // SPDX-License-Identifier: MIT
  4. #pragma once
  5. namespace JPH {
  6. class RagdollSettings;
  7. enum class EMotionType : uint8;
  8. }
  9. #ifdef JPH_OBJECT_STREAM
  10. enum class EConstraintOverride
  11. {
  12. TypeFixed,
  13. TypePoint,
  14. TypeHinge,
  15. TypeSlider,
  16. TypeCone,
  17. TypeRagdoll,
  18. };
  19. #endif // JPH_OBJECT_STREAM
  20. class RagdollLoader
  21. {
  22. public:
  23. #ifdef JPH_OBJECT_STREAM
  24. /// Load a ragdoll from an ObjectStream file
  25. static RagdollSettings * sLoad(const char *inFileName, EMotionType inMotionType, EConstraintOverride inConstraintOverride = EConstraintOverride::TypeRagdoll);
  26. #endif // JPH_OBJECT_STREAM
  27. /// Create a ragdoll from code
  28. static RagdollSettings * sCreate();
  29. };