pointto.cpp 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. /*: Demo/test case for the PointTo method of objects.
  2. The PointTo method allows to easily orient an object to point toward another
  3. object, whatever their relative positions in the scene hierarchy.<br>
  4. In this sample, we have a green sphere turning in circle and riding a sin,
  5. while a blue arrow, turning in a smaller circle, is maintained pointed
  6. toward the sphere. The other items (lines...) are just here to help visualize
  7. the 3D nature of the thing.
  8. */
  9. //---------------------------------------------------------------------------
  10. #include <vcl.h>
  11. #pragma hdrstop
  12. USERES("pointto.res");
  13. USEFORM("Unit1.cpp", Form1);
  14. //---------------------------------------------------------------------------
  15. WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
  16. {
  17. try
  18. {
  19. Application->Initialize();
  20. Application->CreateForm(__classid(TForm1), &Form1);
  21. Application->Run();
  22. }
  23. catch (Exception &exception)
  24. {
  25. Application->ShowException(&exception);
  26. }
  27. return 0;
  28. }
  29. //---------------------------------------------------------------------------