PyANGKernel.GKSectionObject¶
- class GKSectionObject¶
-
Inherited by:
GKVMS,GKPedestrianCrossing,GKMetering,GKDetector,GKDetectorStation,GKBusStopSynopsis¶
Methods¶
def
__init__()def
getFromLane()def
getHullAtSide()def
getLanesIndex()def
getLength()def
getPosition()def
getSection()def
getSubArea()def
getToLane()def
overlaps()
Virtual methods¶
def
adjust()def
allLanes()def
fixedLane()def
fixedWidth()def
manyLanes()def
minimumLength()def
oneLane()def
setLanes()def
setLength()def
setPosition()def
setSection()
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:
getSectionorgetBottomObjectThis 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 aadd()call must be made.- __init__()¶
- __init__(arg__1)
- Parameters:
arg__1 –
GKSectionObject
Returns the position as a point of this object in the center line of the section. Note that this position is absolute and the
getPositionis relative to the section that holds the object.Returns the position as a point of this object considering the used lanes. Note that this position is absolute and the
getPositionis relative to the section that holds the object.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.
This section object (if true) will take all the lanes
This section object (if true) can be place outside of the section (at left or right but touching it)
Translates this object to a new position
This section object (if true) cannot be moved to another lane after creation
This section object (if true) have a fixed (non editable) width
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
Returns the object length , that is the distance from the initial point to the end point
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
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
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
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.
Returns the end lane of the object
This section object (if true) can be only in one or more than one lane (consecutive)
This section object minimum allowed length
This section object (if true) can be only in one lane
- overlaps(other)¶
- Parameters:
other –
GKSectionObject- Return type:
Returns true if both objects (which must belong to the same section) overlaps
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
Sets the owner section of this object.
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.