Home Page > Programming Samples and Tutorials > C++ Samples > eMotion
eMotion C++ Sample
eMotion C++ Sample
Overview
Design
eMotionDlg - Handles GUI for the application and coordinates
interaction among other objects.
Machine - Implements functionality which simulates the cutting
machine. Manages state of the machine and manages moves
Move - Keeps information and implements functionality related to a
single move.
The main eMotionDlg dialog has m_machine member of
Machine class.
Machine keeps array of moves in m_arrMoves member.
Implementation
Machine::Simulate(BOOL bDryRun) is the main method executed on the
Simulate command.The Cut(bDryRun); line performs the most critical
part of calclating swept volumes one per each cutting move and executing Boolean
Operations on the workpiece. The StartAnimation(); line prepares
results and starts timer which will drive animation of the scene.
Machine::OnTimer() handles the timer calls to show intermediate
machne state dirung the current move and switches to the next move when it is
reached.
|