Aimsun Next Scripting  22
Public Member Functions | List of all members
G2DDrawer Class Referenceabstract
Inheritance diagram for G2DDrawer:
GDrawer G2DViewLayer

Public Member Functions

 G2DDrawer ()
 
virtual ~G2DDrawer ()
 
virtual void draw (G2DDrawContext &)=0
 
virtual GDrawerHithit (G2DDrawContext &, GKPoint &)=0
 
virtual void updateGeometry (const G2DUpdateGeometryContext &dc)=0
 
- Public Member Functions inherited from GDrawer
 GDrawer ()
 
virtual GKGeoObjectgetModel () const
 
virtual const GKBBoxgetBBox () const
 
void hide (bool v)
 
virtual bool isHidden (GView *view) const
 

Constructor & Destructor Documentation

◆ G2DDrawer()

G2DDrawer::G2DDrawer ( )

◆ ~G2DDrawer()

virtual G2DDrawer::~G2DDrawer ( )
virtual

Member Function Documentation

◆ draw()

virtual void G2DDrawer::draw ( G2DDrawContext )
pure virtual

Draws an object in a 2D View. Called by the G2DView.

◆ hit()

virtual GDrawerHit * G2DDrawer::hit ( G2DDrawContext ,
GKPoint  
)
pure virtual

Returns information about a possible hit over this object. This hit functions is tested after testing the hit on all the top objects of this object (if any).

If an object can have top objects then maybe the G2DDrawer::preHit method should be written.

The layer will test the hit over an object following this steps:

  • will call G2DDrawer::preHit
  • if G2DDrawer::preHit returns None will look for the G2DDrawer::hit on the top objects
  • if G2DDrawer::preHit returns None and all the top objects hit returns None then it will call G2DDrawer::hit.

◆ updateGeometry()

virtual void G2DDrawer::updateGeometry ( const G2DUpdateGeometryContext dc)
pure virtual

Synchronizes the drawer with the object that it draws (due to a change in the object): This method syncs the dylabels so be sure to call it when overwriting the function.

© Aimsun SLU
Aimsun ®