ClothConfiguration.cpp 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #include <AzCore/RTTI/ReflectContext.h>
  9. #include <AzCore/Serialization/SerializeContext.h>
  10. #include <Components/ClothConfiguration.h>
  11. namespace NvCloth
  12. {
  13. void ClothConfiguration::Reflect(AZ::ReflectContext* context)
  14. {
  15. if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
  16. {
  17. serializeContext->Class<ClothConfiguration>()
  18. ->Version(2)
  19. ->Field("Mesh Node", &ClothConfiguration::m_meshNode)
  20. ->Field("Mass", &ClothConfiguration::m_mass)
  21. ->Field("Use Custom Gravity", &ClothConfiguration::m_useCustomGravity)
  22. ->Field("Custom Gravity", &ClothConfiguration::m_customGravity)
  23. ->Field("Gravity Scale", &ClothConfiguration::m_gravityScale)
  24. ->Field("Stiffness Frequency", &ClothConfiguration::m_stiffnessFrequency)
  25. ->Field("Motion Constraints Max Distance", &ClothConfiguration::m_motionConstraintsMaxDistance)
  26. ->Field("Motion Constraints Scale", &ClothConfiguration::m_motionConstraintsScale)
  27. ->Field("Motion Constraints Bias", &ClothConfiguration::m_motionConstraintsBias)
  28. ->Field("Motion Constraints Stiffness", &ClothConfiguration::m_motionConstraintsStiffness)
  29. ->Field("Backstop Radius", &ClothConfiguration::m_backstopRadius)
  30. ->Field("Backstop Back Offset", &ClothConfiguration::m_backstopBackOffset)
  31. ->Field("Backstop Front Offset", &ClothConfiguration::m_backstopFrontOffset)
  32. ->Field("Damping", &ClothConfiguration::m_damping)
  33. ->Field("Linear Drag", &ClothConfiguration::m_linearDrag)
  34. ->Field("Angular Drag", &ClothConfiguration::m_angularDrag)
  35. ->Field("Linear Inertia", &ClothConfiguration::m_linearInteria)
  36. ->Field("Angular Inertia", &ClothConfiguration::m_angularInteria)
  37. ->Field("Centrifugal Inertia", &ClothConfiguration::m_centrifugalInertia)
  38. ->Field("Use Custom Wind Velocity", &ClothConfiguration::m_useCustomWindVelocity)
  39. ->Field("Wind Velocity", &ClothConfiguration::m_windVelocity)
  40. ->Field("Air Drag Coefficient", &ClothConfiguration::m_airDragCoefficient)
  41. ->Field("Air Lift Coefficient", &ClothConfiguration::m_airLiftCoefficient)
  42. ->Field("Fluid Density", &ClothConfiguration::m_fluidDensity)
  43. ->Field("Collision Friction", &ClothConfiguration::m_collisionFriction)
  44. ->Field("Collision Mass Scale", &ClothConfiguration::m_collisionMassScale)
  45. ->Field("Continuous Collision Detection", &ClothConfiguration::m_continuousCollisionDetection)
  46. ->Field("Collision Affects Static Particles", &ClothConfiguration::m_collisionAffectsStaticParticles)
  47. ->Field("Self Collision Distance", &ClothConfiguration::m_selfCollisionDistance)
  48. ->Field("Self Collision Stiffness", &ClothConfiguration::m_selfCollisionStiffness)
  49. ->Field("Horizontal Stiffness", &ClothConfiguration::m_horizontalStiffness)
  50. ->Field("Horizontal Stiffness Multiplier", &ClothConfiguration::m_horizontalStiffnessMultiplier)
  51. ->Field("Horizontal Compression Limit", &ClothConfiguration::m_horizontalCompressionLimit)
  52. ->Field("Horizontal Stretch Limit", &ClothConfiguration::m_horizontalStretchLimit)
  53. ->Field("Vertical Stiffness", &ClothConfiguration::m_verticalStiffness)
  54. ->Field("Vertical Stiffness Multiplier", &ClothConfiguration::m_verticalStiffnessMultiplier)
  55. ->Field("Vertical Compression Limit", &ClothConfiguration::m_verticalCompressionLimit)
  56. ->Field("Vertical Stretch Limit", &ClothConfiguration::m_verticalStretchLimit)
  57. ->Field("Bending Stiffness", &ClothConfiguration::m_bendingStiffness)
  58. ->Field("Bending Stiffness Multiplier", &ClothConfiguration::m_bendingStiffnessMultiplier)
  59. ->Field("Bending Compression Limit", &ClothConfiguration::m_bendingCompressionLimit)
  60. ->Field("Bending Stretch Limit", &ClothConfiguration::m_bendingStretchLimit)
  61. ->Field("Shearing Stiffness", &ClothConfiguration::m_shearingStiffness)
  62. ->Field("Shearing Stiffness Multiplier", &ClothConfiguration::m_shearingStiffnessMultiplier)
  63. ->Field("Shearing Compression Limit", &ClothConfiguration::m_shearingCompressionLimit)
  64. ->Field("Shearing Stretch Limit", &ClothConfiguration::m_shearingStretchLimit)
  65. ->Field("Tether Constraint Stiffness", &ClothConfiguration::m_tetherConstraintStiffness)
  66. ->Field("Tether Constraint Scale", &ClothConfiguration::m_tetherConstraintScale)
  67. ->Field("Solver Frequency", &ClothConfiguration::m_solverFrequency)
  68. ->Field("Acceleration Filter Iterations", &ClothConfiguration::m_accelerationFilterIterations)
  69. ->Field("Remove Static Triangles", &ClothConfiguration::m_removeStaticTriangles)
  70. ->Field("Update Normals of Static Particles", &ClothConfiguration::m_updateNormalsOfStaticParticles)
  71. ;
  72. }
  73. }
  74. } // namespace NvCloth