where : ibrtses delphi

Delphi - spacemouse

disclaimer

the source code of this page may not appear correctly in certain browsers
due to special characters. Have a look at the source of this HTML page
with notepad instead
To my knowledge, LogiCad3D's space mouse is currently the only 
payable 3D pointing device. It controls 3 axis in translation and rotation.

This component implements the device and its communication into a Delphi 
application. It currently requires an installed version of turbopower's 
Asynch Pro for the communication. As there are only strings being sent 
and received, a simpler package may do. I'm going to change that soon. 
This implementation just covers the device. A follow up version,
(OpenGLmouse) will also implement the matrix generation and swapping 
the camera with the scene.

the code for the device

It is not yet a component dragable from the palette. Just use the unit 
and include it into the project. 'USES spacemouse;'

Then create the object :
 TForm1 = class(TForm)
 ..
 public
  ..
  MyMouse:TSMouse;
 end;

procedure TForm.Formcreate(..);
begin
 MyMouse.create(self);
 MyMouse.OnMouseMove:=MouseMove;
end;

procedure TForm1.MouseMove(Sender:TComponent;dx,dy,dz,da,db,dc:smallint);
begin
// dx, dy, dz are the increments in translation
// da, db, dc are the increments in rotation
end;

OpenGL mouse(soon)

OpenGLMouse is coming soon, I'm currently getting the material together.
It's purpose is either move (translate&rotate) the camera, or a selected
object.




Feedback is welcome





sponsored links




Delphi
home

last updated: 3.dec.99

Copyright (99,2000) Ing.Büro R.Tschaggelar