...
Create a derived class of A3DTreeVisitor including
visitEnter
method forA3DPartConnector
Code Block language cpp ... static MY_CHAR acLogFileName[_MAX_PATH * 2]; class bodyOperationVisitor: public A3DTreeVisitor { public: bodyOperationVisitor(A3DVisitorContainer* psContainer = NULL) : A3DTreeVisitor(psContainer) {}; ~bodyOperationVisitor() {}; public: virtual A3DStatus visitEnter(const A3DPartConnector& sConnector) override { A3DStatus iRet = A3DTreeVisitor::visitEnter(sConnector); // My processes return iRet; } }; void traverseModelFile(A3DAsmModelFile* pModelFile) ...
Use the derived
bodyOperationVisitor
class instead ofA3DTessVisitor
in thetraverseModelFile
functionCode Block language cpp ... // Prepare body operation visitor and set to the container bodyOperationVisitor *pBodyOpVisitor = new bodyOperationVisitor(&sA3DVisitorContainer); sA3DVisitorContainer.push(pBodyOpVisitor); ...
Build the project
Create break points in the
bodyOperationVisitor
class and verify that the class is called during run time
Info |
---|
Thanks to the Implementing functions and timing for splitting multi body part will be the following image: |
...