Start with the project you created in Transformation.
Take the following steps to add support for the camera:
Click the Class View tab in the project workspace.
Click to open the "MyVectorWindow" branch to display the class member functions.
Double click the MsgProcCallBack() member function.
Add a local variable after the VECTORPOINT VecPoint declaration:
VECTORCAMERA VecCamera;
Add the following cases to the switch(wParam) switch statement (immediately before the case 'x'):
case 'b':
case 'B':
// flip camera projection between parallel and perspective
GetCamera(&VecCamera );
VecCamera.bPerspective = !VecCamera.bPerspective;
SetCamera(&VecCamera );
break;
case 'T':
case 't':
// rotate the camera theta angle
GetCamera(&VecCamera );
VecCamera.Theta += 5.0;
SetCamera(&VecCamera );
break;
case 'P':
case 'p':
// rotate the camera phi angle
GetCamera(&VecCamera );
VecCamera.Phi += 5.0;
SetCamera(&VecCamera );
break;
Compile and run the demo.
From the program menu, browse to the C:\LEADTOOLS22\Resources\Images folder. Open the image random.dxf and click OK.
Now you should be able to rotate the camera using the T and P keys on your keyboard, and flip projection between parallel and perspective using the B key.
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document