Hello,

I would appreciate your help in the following program.

I am using Phantom Omni in conjunction with OpenGL for sculpting models in 3-D immersive atmosphere.

How do i create a small haptic workspace in a graphic workspace with an object to be modified at certain areas? This is related to Mapping.

Please send me the codes.

I am currently using the codes below which gives me a 1:1 mapping between haptic workspace and graphic workspace


bool init_haptics() {


HDErrorInfo error;
hHD = hdInitDevice(HD_DEFAULT_DEVICE);
if (HD_DEVICE_ERROR(error = hdGetError()))
{
hduPrintError(stderr,

&error, "Failed to initialize haptic
device");
fprintf(stderr, "\nPress any key to quit.\n");
getch();
return -1;
}


hdEnable(HD_FORCE_OUTPUT);

hUpdateDeviceCallback = hdScheduleAsynchronous(
touchScene, 0, HD_MAX_SCHEDULER_PRIORITY);

hdStartScheduler();

hlMatrixMode(HL_TOUCHWORKSPACE);

hlLoadIdentity();
hlWorkspace (WORKSPACE_XMIN, WORKSPACE_YMIN, WORKSPACE_ZMIN, WORKSPACE_XMAX, WORKSPACE_YMAX, WORKSPACE_ZMAX);
hlOrtho (0.0, 1.0, 0.0, 1.0, -1.0, 1.0);

return TRUE;
}

Thanks,

Blesson Isaac MBA,MSME
Research Assistant
Mechanical Engineering
Prairie View A&M University
Texas