Aimsun Next Scripting
24.0
|
Public Member Functions | |
GKPolylineCutCmd () | |
void | setCut (const GKPoint &p) |
bool | init (GKGeoObject *aobject, const GKPoint &from, const GKPoint &to, bool keepConnection) |
GKPolyline * | getLeftPoly () const |
GKPolyline * | getRightPoly () const |
![]() | |
GKGeoObjectCutCmd () | |
virtual bool | init (GKGeoObject *, const GKPoint &, const GKPoint &, bool)=0 |
bool | isDone () const |
virtual void | setDone (bool avalue) |
void | doit () |
void | undoit () |
virtual void | commandToBeDone () |
virtual void | commandDone () |
virtual void | commandToBeUndone () |
virtual void | commandUndone () |
With this command you can split a polyline in two, given a line segment defined by two points.
GKPolylineCutCmd::GKPolylineCutCmd | ( | ) |
GKPolyline * GKPolylineCutCmd::getLeftPoly | ( | ) | const |
It will return the resulting polyline from the beginning of the original polyline to the cut point.
GKPolyline * GKPolylineCutCmd::getRightPoly | ( | ) | const |
It will return the resulting polyline from the cut point to the end of the original polyline.
|
virtual |
Init the cmd, it return true if the object can be cutted and false otherwise (maybe the object is locked?). This functions receives the object to be cutted and the segment uses to cut the object.
If keepConnection the cutted object will try to keep both parts connected (using a connector) if possible.
Implements GKGeoObjectCutCmd.
Reimplemented in GKSectionCutCmd.
void GKPolylineCutCmd::setCut | ( | const GKPoint & | p | ) |
Sets the cutting point for the polyline