PyANGKernel.GKSectionObject

class GKSectionObject

Inheritance diagram of PyANGKernel.GKSectionObject

Inherited by: GKVMS, GKPedestrianCrossing, GKMetering, GKDetector, GKDetectorStation, GKBusStop

Synopsis

Methods

Virtual methods

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description

This object will be always over this section. To access the section that owns this object use: getSection or getBottomObject

This type of objects will never be added to the geoModel directly (never call add (( aLayer, aSectionObject ) ) IF the section is added to the geoModel after the creation of these types of object. In this case the call will be made automatically by the bottomObject. BUT if the object is created after the add the section to the geoModel a add() call must be made.

__init__()
__init__(arg__1)
Parameters:

arg__1GKSectionObject

absolutePosition()
Return type:

GKPoint

Returns the position as a point of this object in the center line of the section. Note that this position is absolute and the getPosition is relative to the section that holds the object.

absolutePositionInLanes()
Return type:

GKPoint

Returns the position as a point of this object considering the used lanes. Note that this position is absolute and the getPosition is relative to the section that holds the object.

adjust()
Return type:

bool

After a possible section geometry change, adjust this object to fit in the section. This includes changing the position, length and lanes. The object will try to keep the length changing first the position. If changing the position is not enough it will change the length. After changing position and length it will change, if needed, the lanes.

Returns true is some change has been performed, false otherwise.

allLanes()
Return type:

bool

This section object (if true) will take all the lanes

canBePlacedOutside()
Return type:

bool

This section object (if true) can be place outside of the section (at left or right but touching it)

directTranslate(delta)
Parameters:

deltaGKPoint

Translates this object to a new position

fixedLane()
Return type:

bool

This section object (if true) cannot be moved to another lane after creation

fixedWidth()
Return type:

bool

This section object (if true) have a fixed (non editable) width

getFromLane()
Return type:

int

Returns the initial lane of the object

getHullAtSide(side[, distanceFromSection=0.0])
Parameters:
  • side – int

  • distanceFromSection – float

Return type:

.std.pairGKPoints,uint

Returns the section object hull translated to left (side = 1) or right (side = 0) the specified distance

getLanesIndex()
Return type:

.list of uint

Returns the lanes index

getLength()
Return type:

float

Returns the object length , that is the distance from the initial point to the end point

getLengthInLanes()
Return type:

float

Returns the length along the lanes’ line from the initial point of the object projected into the lanes’ line to the end point of the object projected into the lanes’ line

getPosition()
Return type:

float

Returns the distance along the section’s central line from the initial point of the section’s central line to the initial point of the object projected into the section’s central line

getPositionInLanes()
Return type:

float

Returns the distance along the lanes’ line from the initial point of the lanes’ line to the initial point of the object projected into the lanes’ line

getSection()
Return type:

GKSection

Returns the section where this object is. Equivalent to:

dynamic_cast<GKSection*>(getBottomObject());
getSubArea()
Return type:

.std.pairGKPoints,uint

Convenience function. Returns the section’s getSubArea using the lane and position of this object.

getToLane()
Return type:

int

Returns the end lane of the object

manyLanes()
Return type:

bool

This section object (if true) can be only in one or more than one lane (consecutive)

minimumLength()
Return type:

float

This section object minimum allowed length

oneLane()
Return type:

bool

This section object (if true) can be only in one lane

overlaps(other)
Parameters:

otherGKSectionObject

Return type:

bool

Returns true if both objects (which must belong to the same section) overlaps

setLanes(fromLane, toLane)
Parameters:
  • fromLane – int

  • toLane – int

Return type:

bool

Sets the lanes for which this object will take place

setLength(length)
Parameters:

length – float

Sets the length of the object

setPosition(pos)
Parameters:

pos – float

Sets the position of the object, as the distance along the section’s central line from the initial point of the section

setSection(section)
Parameters:

sectionGKSection

Sets the owner section of this object.

translatePosition(delta)
Parameters:

deltaGKPoint

Return type:

float

Calculates what will be the new position after translating this object by a delta. The new position is returned BUT the actual position of the object will not be changed.