Aimsun Next Scripting  24.0
Public Member Functions | List of all members
GKPolylineCutCmd Class Reference
Inheritance diagram for GKPolylineCutCmd:
GKGeoObjectCutCmd GKBezierCurveCutCmd GKSectionCutCmd

Public Member Functions

 GKPolylineCutCmd ()
 
void setCut (const GKPoint &p)
 
bool init (GKGeoObject *aobject, const GKPoint &from, const GKPoint &to, bool keepConnection)
 
GKPolylinegetLeftPoly () const
 
GKPolylinegetRightPoly () const
 
- Public Member Functions inherited from GKGeoObjectCutCmd
 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 ()
 

Detailed Description

With this command you can split a polyline in two, given a line segment defined by two points.

Constructor & Destructor Documentation

◆ GKPolylineCutCmd()

GKPolylineCutCmd::GKPolylineCutCmd ( )

Member Function Documentation

◆ getLeftPoly()

GKPolyline * GKPolylineCutCmd::getLeftPoly ( ) const

It will return the resulting polyline from the beginning of the original polyline to the cut point.

◆ getRightPoly()

GKPolyline * GKPolylineCutCmd::getRightPoly ( ) const

It will return the resulting polyline from the cut point to the end of the original polyline.

◆ init()

bool GKPolylineCutCmd::init ( GKGeoObject aobject,
const GKPoint from,
const GKPoint to,
bool  keepConnection 
)
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.

◆ setCut()

void GKPolylineCutCmd::setCut ( const GKPoint p)

Sets the cutting point for the polyline

© Aimsun SLU
Aimsun ®