Csg.dpr 946 B

12345678910111213141516171819202122232425262728293031323334
  1. { Demo of Constructive Solid Geometry in GLScene.
  2. Its kept very simple, you can use mouse to rotate view(drag)
  3. and mousewheel to zoom/unzoom.
  4. The CSG system uses BSP to optimize what triangles it considers.
  5. Its kept on a mesh basis to simplyfy things, it allways generates new BSP's,
  6. even the meshes allready had BSP optimization.
  7. The demo uses the polyhedron.3ds, resource from the GLScene pack.
  8. Author: Joen Joensen.
  9. Contributed to the GLScene community.
  10. Features: CSG_Union, CSG_Subtraction, CSG_Intersection.
  11. History :
  12. 29/11/03 - JAJ - Created and Submitted to GLScene.
  13. Sometimes a single tri is messed up...
  14. often(1/3) happends on 2 triangles in this demo when using intersection)
  15. }
  16. program Csg;
  17. uses
  18. Forms,
  19. fCsg in 'fCsg.pas' {FormCsg};
  20. {$R *.res}
  21. begin
  22. Application.Initialize;
  23. Application.CreateForm(TFormCsg, FormCsg);
  24. Application.Run;
  25. end.