ClothActorD.dpr 994 B

123456789101112131415161718192021222324252627282930
  1. (* Verlet cloth simulation and verlet constraints controlled by an
  2. actor's skeleton.
  3. Verlet physics is used to simulate a cloth-like effect on a mesh.
  4. In this demo, the cape mesh is linked to the verlet world and the
  5. verlet nodes control the surface of the mesh. Verlet constraints
  6. define boundaries that the verlet nodes cannot enter.
  7. The skeleton colliders define the verlet constraints for the actor
  8. using simple spheres and capsules (sphere-capped cylinders). The
  9. constraints get updated each frame to match the actor's current
  10. skeleton frame. Using simple primitives to approximate a mesh is
  11. much quicker than determining mesh volume -> verlet interactions.
  12. A dynamic octree is used here to give a little performace boost to
  13. the verlet testing.
  14. *)
  15. program ClothActorD;
  16. uses
  17. Forms,
  18. fClothActorD in 'fClothActorD.pas';
  19. {$R *.res}
  20. begin
  21. Application.Initialize;
  22. Application.CreateForm(TFormClothActor, FormClothActor);
  23. Application.Run;
  24. end.