#include <moldtool.h>
Inheritance diagram for OpRectangularPerspective:
Public Member Functions | |
OpRectangularPerspective () | |
Constructor for Detach mould operation. | |
void | Do (OpDescriptor *) |
Scan through the selection finding mould objects. Each mould will have its contents remoulded, having has its mould path rotated around logically by one element. The result will be to spin the orientation of the moulded objects around. | |
void | GetOpName (String_256 *OpName) |
The GetOpName fn is overridden so that we return back a description appropriate to the type of attribute that the operation applies. | |
Static Public Member Functions | |
static BOOL | Init () |
Initialise the rotate mould operation so that it can be accessed from the interface. | |
static OpState | GetState (String_256 *, OpDescriptor *) |
For finding the OpRotateMould state. |
Definition at line 609 of file moldtool.h.
|
Constructor for Detach mould operation.
Definition at line 3226 of file moldtool.cpp.
|
|
Scan through the selection finding mould objects. Each mould will have its contents remoulded, having has its mould path rotated around logically by one element. The result will be to spin the orientation of the moulded objects around.
Reimplemented from Operation. Definition at line 3335 of file moldtool.cpp. 03336 { 03337 BeginSlowJob(); 03338 03339 // Assume faied until proven otherwise. 03340 BOOL Failed=TRUE; 03341 03342 // Create a manifold to use 03343 Path* pDefShape = new Path; 03344 if (pDefShape!=NULL) 03345 { 03346 if (pDefShape->Initialise(12,12)) 03347 { 03348 if (PerspectiveShapes::Rectangular(pDefShape)) 03349 { 03350 Failed=!CreateNewMould(pDefShape, MOULDSPACE_PERSPECTIVE, TRUE, FALSE); 03351 } 03352 } 03353 // remove the shape once used 03354 delete pDefShape; 03355 } 03356 03357 if (Failed) 03358 FailAndExecute(); 03359 03360 End(); 03361 }
|
|
The GetOpName fn is overridden so that we return back a description appropriate to the type of attribute that the operation applies.
Reimplemented from Operation. Definition at line 3312 of file moldtool.cpp. 03313 { 03314 *OpName = String_256(_R(IDS_UNDO_RECTANGULARPERSPECTIVE)); 03315 }
|
|
For finding the OpRotateMould state.
Definition at line 3276 of file moldtool.cpp. 03277 { 03278 OpState OpSt; 03279 String_256 DisableReason; 03280 OpSt.Greyed = TRUE; 03281 03282 ObjChangeFlags cFlags; 03283 cFlags.MultiReplaceNode = TRUE; 03284 ObjChangeParam ObjChange(OBJCHANGE_STARTING,cFlags,NULL,NULL); 03285 03286 SelRange* pSelRange = GetApplication()->FindSelection(); 03287 Node* pNode = pSelRange->FindFirst(); 03288 03289 while (pNode != NULL && OpSt.Greyed) 03290 { 03291 OpSt.Greyed = !(pNode->AllowOp(&ObjChange,FALSE)); 03292 pNode = pSelRange->FindNext(pNode); 03293 } 03294 03295 return (OpSt); 03296 }
|
|
Initialise the rotate mould operation so that it can be accessed from the interface.
Reimplemented from SimpleCCObject. Definition at line 3250 of file moldtool.cpp. 03251 { 03252 return (RegisterOpDescriptor(0, // tool ID 03253 _R(IDS_RECTANGULARPERSPECTIVE), // string resource ID 03254 CC_RUNTIME_CLASS(OpRectangularPerspective), // runtime class for Op 03255 OPTOKEN_RECTANGULARPERSPECTIVE, // Ptr to token string 03256 OpRectangularPerspective::GetState, // GetState function 03257 0, // help ID 03258 _R(IDBBL_RECTANGULARPERSPECTIVE) 03259 )); 03260 }
|