Aimsun Next Scripting
22
|
Public Types | |
enum | GKBezierCurveType { eSegment = 0 , eSimpleCurve = 1 , eCurve = 2 } |
![]() | |
enum | GKGeoContainer { eNothing = 0 , ePartially = 1 , eTotally = 2 } |
![]() | |
enum | IdentifierFormFlag { eIdentifierDefault , eIdentifierId , eIdentifierName , eIdentifierExternalId , eIdentifierTypeExternalName , eIdentifierDescription , eIdentifierStandard , eIdentifierStandardWithType , eIdentifierAll } |
enum | GKLockType { eNone , eModification , eDelete , eModificationDelete } |
enum | GKObjectStatus { eNew , eSaved , eModified , eDeleted } |
typedef QFlags< GKObject::IdentifierFormFlag > | IdentifierForm |
Public Member Functions | |
GKBezierCurve () | |
void | addSegment (GKBezierCurveType type) |
void | setPoint (int s, int i, const GKPoint &p) |
void | setPoint (int i, const GKPoint &p) |
void | setCurve (const GKBezierCurve &curve) |
void | setFromSegment (const GKPoint &p1, const GKPoint &p2, GKBezierCurveType type) |
void | setFromPoints (const GKPoints &ps, GKBezierCurveType type) |
uint | getNbSegments () const |
virtual void | addCurvePointAt (int pos, const GKPoint &p) |
virtual void | removePoint (uint pos) |
virtual bool | canPointBeAdded (uint pos) const |
GKPoints | calculatePolyline (uint nbpoints=0, bool simplify=true, QVector< int > *segmentsBeginPos=NULL) const |
bool | isASegment () const |
bool | onlyContainsSegments () const |
GKBezierCurveType | getCurveType (uint pos) const |
GKCoord | length2D (uint nbpoints=0) const |
GKCoord | length3D (uint nbpoints=0) const |
GKCoord | getSegmentLength (uint pos, uint nbpoints=0) const |
GKBezierCurve | getSegment (uint pos) const |
int | getNumSegmentControlPoints (int pos) const |
GKPoint | calculateBezierPoint (float t) const |
GKVector | calculateBezierDerivative (float t) const |
GKVector | calculateBezierSecondDerivative (float t) const |
GKCoord | calculateBezierRadius (const GKPoints &p, uint nbpoints=0) const |
GKCoord | getBezierRadiusatPoint (const GKPoints &p, const GKPoint &p1, uint nbpoints=0) const |
GKCoord | MeanRadius (uint nbpoints=0) const |
bool | hit (const GKPoint &p, float epsilon) const |
virtual void | changeDirection () |
virtual void | join (const GKPolyline *pol, bool atStart) |
virtual void | removePoints (uint nbPoints, bool atStart, int &nbSegmentsRemoved) |
GKPoint | pointAtPos (float pos) const |
float | posAtPoint (const GKPoint &p, GKCoord maxDistToCurve=0.01) const |
int | segmentAtPos (GKCoord pos, double *length=NULL) const |
int | segmentAtPosComplete (const GKPoints &points, GKCoord pos, double *retLength=NULL) const |
uint | nbParts () const |
GKCoord | angleToCurve (const GKBezierCurve &curve) const |
virtual GKCoord | getAltitude () const |
virtual void | setAltitude (GKCoord value) |
![]() | |
GKPolyline () | |
uint | nbPoints () const |
const GKPoint & | getPoint (uint at) const |
void | setPoint (uint at, const GKPoint &p) |
const GKPoints & | getPoints () const |
virtual void | addPoint (const GKPoint &p) |
virtual void | addPointAt (int pos, const GKPoint &p) |
virtual void | removePoint (uint pos) |
virtual void | setPoints (const GKPoints &ps) |
virtual GKCoord | length2D () const |
virtual GKCoord | length3D () const |
virtual bool | canPointBeAdded (uint pos) const |
virtual void | join (const GKPolyline *pol, bool atStart) |
virtual void | removePoints (uint nbPoints, bool atStart) |
virtual bool | canBeJoined (const GKPolyline *pol) const |
void | prepend (const GKPoints &ps) |
void | add (const GKPoints &ps) |
void | setPointSelected (uint p, bool value) |
bool | isPointSelected (uint p) const |
void | selectAllPoints () |
void | unselectAllPoints () |
int | getNbSelPoints () const |
virtual void | changeDirection () |
GKCoord | getSlope (int segmentPos) const |
GKBBox | getBBox () const |
void | setPenColor (const QColor &color) |
virtual const QColor & | getPenColor () const |
void | setPenStyle (const Qt::PenStyle &astyle) |
const Qt::PenStyle & | getPenStyle () const |
void | setPenSize (float size) |
float | getPenSize () const |
void | setPenSizeUnits (const GK::SizeUnits &units) |
const GK::SizeUnits & | getPenSizeUnits () const |
![]() | |
GKGeoObject () | |
virtual void | setSelected (bool newState) |
virtual bool | isSelected () const |
bool | canBeModified () const |
bool | canBeEdited () const |
virtual bool | canBeGrouped () const |
int | getMark () const |
void | setMark (int newMark) |
void | addMark (int newMark) |
void | unmark () |
const QVector< int > * | getMarks () const |
uint | getNumberOfMarks () const |
GKLayer * | getLayer () const |
void | setLayer (GKLayer *alayer) |
virtual void | translate (const GKPoint &delta) |
virtual void | rotate (const GKPoint ¢er, double angle) |
virtual void | scale (const GKPoint &) |
virtual GKCoord | getAltitude () const |
virtual void | setAltitude (GKCoord value) |
void | addTopObject (GKGeoObject *) |
QSet< GKGeoObject * > * | getTopObjects () const |
GKGeoObject * | getBottomObject () const |
void | setLabeled (bool value) |
bool | isLabeled () const |
GKGeoContainer | getContainedWay (const GKPoints &points, const GKBBox &bboxPoints) const |
virtual GKGeoContainer | doGetContainedWay (const GKBBox &myBBox, const GKPoints &points, const GKBBox &bboxPoints) const |
GK::ConnectionType | objectConnectionType (const GKGeoObject *object) const |
QSet< GKObjectConnection * > | getConnections () const |
QSet< GKObjectConnection * > | getConnections (const GKGeoObject *) const |
bool | anyConnection (const GKGeoObject *) const |
virtual void | addConnection (GKObjectConnection *) |
virtual void | removeConnection (GKObjectConnection *, GK::ObjectDeletionBehaviour) |
virtual void | changeConnectionObject (GKGeoObject *oldObject, GKGeoObject *newObject, GK::ConnectionType connectionType=GK::eConnectionUndefined) |
virtual void | removeAllConnections (GK::ObjectDeletionBehaviour) |
virtual bool | acceptConnection (GKGeoObject *object) const |
virtual GKGeoObjectCutCmd * | getCutCmd (const GKPoint &from, const GKPoint &to, bool keepConnection) |
virtual bool | exists (quint32 scenarioId) const |
![]() | |
GKObject () | |
GKObject (const GKObject &o) | |
virtual void | addedToCatalog () |
virtual void | removedFromCatalog () |
uint | getTick () const |
virtual void | increaseTick () |
void | setTick (uint t) |
virtual GKObject * | clone (bool addItToModel=true) const |
virtual GKObject * | cloneAsTemporary (bool addItToModel=true) const |
GKFolder * | getCreateRootFolder () |
GKFolder * | getRootFolder () const |
void | setRootFolder (GKFolder *afolder) |
GKFolder * | findFolder (const QString &byName) const |
QVector< GKFolder * > | getParentFolders () const |
bool | isDataValueNull (const GKColumn *attr) const |
virtual QVariant * | getDataValue (const GKColumn *attr, bool *deleteit, const GKContext &context=GKContext::anyContext) const |
QVariant * | getDataValueByID (uint attrId, bool *deleteit, const GKContext &context=GKContext::anyContext) const |
virtual void | setDataValue (const GKColumn *attr, const QVariant &v) |
void | setDataValueByID (uint attrId, const QVariant &v) |
virtual void | setDataValueObject (const GKColumn *attr, const GKObject *obj) |
void | setDataValueObjectByID (uint attrId, const GKObject *obj) |
virtual void | setDataValueDouble (const GKColumn *attr, double v) |
void | setDataValueDoubleByID (uint attrId, double v) |
virtual double | getDataValueInTS (const GKColumn *attr, GKTimeSerieIndex index, double *deviation=NULL) const |
double | getDataValueInTSByID (uint attrId, GKTimeSerieIndex index, double *deviation=NULL) const |
bool | hasAnyTSWithData () const |
virtual GKTimeSerie * | getDataValueTS (const GKColumn *attr) const |
GKTimeSerie * | getDataValueTSByID (uint attrId) const |
virtual void | setDataValueInTS (const GKColumn *attr, GKTimeSerieIndex index, double value, double deviation, GKTSDescription *aDescription=NULL, int reservedSize=0) |
virtual void | setDataValueInTS (const GKColumn *attr, GKTimeSerieIndex index, double value, double deviation, double lowerValue, GKTSDescription *aDescription=NULL, int reservedSize=0) |
virtual void | setDataValueInSingleTS (const GKColumn *attr, GKTimeSerieIndex index, double value, double deviation, GKTSDescription *aDescription) |
void | setDataValueInTSByID (uint attrId, GKTimeSerieIndex index, double value, double deviation, GKTSDescription *aDescription=NULL, int reservedSize=0) |
virtual void | setAggregatedValueInTS (const GKColumn *attr, double value, double deviation, GKTSDescription *aDescription=NULL) |
void | setAggregatedValueInTSByID (uint attrId, double value, double deviation, GKTSDescription *aDescription=NULL) |
virtual void | clearDataValueTS (const GKColumn *attr, GKTSDescription *aDescription=NULL) |
void | clearDataValueTSByID (uint attrId, GKTSDescription *aDescription=NULL) |
virtual int | getDataValueInt (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const |
int | getDataValueIntByID (uint attrId, const GKContext &context=GKContext::anyContext) const |
virtual double | getDataValueDouble (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const |
double | getDataValueDoubleByID (uint attrId, const GKContext &context=GKContext::anyContext) const |
QString | getDataValueString (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const |
QString | getDataValueStringByID (uint attrId, const GKContext &context=GKContext::anyContext) const |
virtual bool | getDataValueBool (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const |
bool | getDataValueBoolByID (uint attrId, const GKContext &context=GKContext::anyContext) const |
virtual GKObject * | getDataValueObject (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const |
GKObject * | getDataValueObjectByID (uint attrId, const GKContext &context=GKContext::anyContext) const |
QDate | getDataValueDate (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const |
QDate | getDataValueDateByID (uint attrId, const GKContext &context=GKContext::anyContext) const |
QTime | getDataValueTime (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const |
QTime | getDataValueTimeByID (uint attrId, const GKContext &context=GKContext::anyContext) const |
QDateTime | getDataValueDateTime (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const |
QDateTime | getDataValueDateTimeByID (uint attrId, const GKContext &context=GKContext::anyContext) const |
GKTimeDuration | getDataValueTimeDuration (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const |
GKTimeDuration | getDataValueTimeDurationByID (uint attrId, const GKContext &context=GKContext::anyContext) const |
void | removeDataValue (const GKColumn *attr) |
void | removeDataValueByID (uint attrId) |
const QString & | getDescription () const |
void | setDescription (const QString &adescription) |
const QString & | getExternalId () const |
void | setExternalId (const QString &anId) |
virtual GKObjectDelCmd * | getDelCmd () |
virtual GKObjectConnectionDelCmd * | getDelConnectionCmd (GKObject *target) |
virtual void | nonCommandObjectRemoved (GKObject *) |
virtual void | init () |
virtual void | setId (uint aid, GKModel *model) |
uint | getId () const |
QUuid | getUUID () const |
virtual void | setName (const QString &aname) |
const QString & | getName () const |
QString | getExtendedId (IdentifierForm form=eIdentifierDefault) const |
QString | getNameOrExtendedId (IdentifierForm form=eIdentifierDefault) const |
virtual const QString & | getTypeName () const |
virtual QString | getTypeExternalName () const |
const GKObject * | getMaster () const |
GKType * | getType () const |
virtual void | setType (GKType *atype) |
bool | isA (const GKType *atype) const |
bool | isA (const QString &typeName) const |
virtual void | setModel (GKModel *amodel) |
GKModel * | getModel () const |
virtual void | setLock (GKLockType atype) |
GKLockType | getLock () const |
virtual bool | canBeDeleted () const |
virtual bool | canBeModified () const |
virtual bool | canBeEdited () const |
GKObjectStatus | getStatus () const |
virtual void | setStatus (const GKObjectStatus astatus) |
void | notifyStatusChange () |
bool | isTemporary () const |
void | setTemporary (bool value) |
bool | isExternal () const |
void | setExternal (bool value) |
virtual void | preferencesChanged () |
void | removeColumn (GKColumn *column) |
void | resetColumn (GKColumn *column) |
![]() | |
GKBaseObject () | |
if (base) | |
virtual uint | getId () const =0 |
virtual const QString & | getTypeName () const =0 |
virtual QString | getTypeExternalName () const =0 |
virtual const GKObject * | getMaster () const =0 |
virtual const QString & | getName () const =0 |
virtual const QString & | getExternalId () const =0 |
virtual const QString & | getDescription () const =0 |
virtual GKModel * | getModel () const =0 |
virtual QVariant * | getDataValue (const GKColumn *attr, bool *deleteit, const GKContext &context=GKContext::anyContext) const =0 |
virtual QVariant * | getDataValueByID (uint attrId, bool *deleteit, const GKContext &context=GKContext::anyContext) const =0 |
virtual double | getDataValueInTS (const GKColumn *attr, GKTimeSerieIndex index, double *deviation=NULL) const =0 |
virtual double | getDataValueInTSByID (uint attrId, GKTimeSerieIndex index, double *deviation=NULL) const =0 |
virtual GKTimeSerie * | getDataValueTS (const GKColumn *attr) const =0 |
virtual GKTimeSerie * | getDataValueTSByID (uint attrId) const =0 |
virtual int | getDataValueInt (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0 |
virtual int | getDataValueIntByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0 |
virtual double | getDataValueDouble (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0 |
virtual double | getDataValueDoubleByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0 |
virtual QString | getDataValueString (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0 |
virtual QString | getDataValueStringByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0 |
virtual bool | getDataValueBool (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0 |
virtual bool | getDataValueBoolByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0 |
virtual GKObject * | getDataValueObject (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0 |
virtual GKObject * | getDataValueObjectByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0 |
virtual QDate | getDataValueDate (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0 |
virtual QDate | getDataValueDateByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0 |
virtual QTime | getDataValueTime (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0 |
virtual QTime | getDataValueTimeByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0 |
virtual QDateTime | getDataValueDateTime (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0 |
virtual QDateTime | getDataValueDateTimeByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0 |
virtual GKTimeDuration | getDataValueTimeDuration (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0 |
virtual GKTimeDuration | getDataValueTimeDurationByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0 |
Additional Inherited Members | |
![]() | |
ConvertToSubClassCode Py_BEGIN_ALLOW_THREADS GKBaseObject * | base = (GKBaseObject*)sipCpp |
sipType = 0 | |
![]() | |
static uint | markAtt |
static uint | altitudeAtt |
static uint | numberOfConnectionsAtt |
static uint | layerAtt |
![]() | |
static uint | typeNameAtt |
static uint | typeExternalNameAtt |
static uint | revisedAtt |
![]() | |
Py_END_ALLOW_THREADS static End uint | idAtt |
static uint | nameAtt |
static uint | externalIdAtt |
static uint | descriptionAtt |
This class holds a set of consecutive, connected, segments. Each segment can be either a bezier curve or a straight segment. Its possible to mix these two types of segments.
Besides a straight segment, it support two types of curves:
GKBezierCurve::GKBezierCurve | ( | ) |
|
virtual |
At a point at position pos. This will convert a segment in a simple curve and a simple curve in a complex curve. In a complex curve a line segment will be create for this new point.
void GKBezierCurve::addSegment | ( | GKBezierCurveType | type | ) |
Add a new segment. This call do not add any new point so it will be called always with methods that adds points.
GKCoord GKBezierCurve::angleToCurve | ( | const GKBezierCurve & | curve | ) | const |
This function returns the angle in radians (-GKPI, GKPI] between the last part of this bezier curve and the first part of the 'curve' given as parameter of the function. If it is necessary it calculates the polyline of both bezier curves. The convention followed is: the angle is positive if from the first line to the second one the direction is counterclockwise. If the lines are parallel lines and going in the same direction it returns 0.0
GKVector GKBezierCurve::calculateBezierDerivative | ( | float | t | ) | const |
Computes the derivative of a Bezier section using the value of the parametrized variable
GKPoint GKBezierCurve::calculateBezierPoint | ( | float | t | ) | const |
Computes the point of a Bezier section using the value of the parametrized variable
GKCoord GKBezierCurve::calculateBezierRadius | ( | const GKPoints & | p, |
uint | nbpoints = 0 |
||
) | const |
Calculates the mean radius of a bezier section. Note that it discretizes the curve so it it's an approximation and not the real minimum radius. if nbpoints is 0 then the value of GKPoints::gkDefaultBezierPoints will be used.
GKVector GKBezierCurve::calculateBezierSecondDerivative | ( | float | t | ) | const |
Computes the second derivative of a Bezier section using the value of the parametrized variable
GKPoints GKBezierCurve::calculatePolyline | ( | uint | nbpoints = 0 , |
bool | simplify = true , |
||
QVector< int > * | segmentsBeginPos = NULL |
||
) | const |
Calculates a polyline that represents a this GKBezierCurve. The polyline is calculated in "points" and "points" is also returned.
if nbpoints is 0 then the value of GKPoints::gkDefaultBezierPoints will be used.
|
virtual |
Can a new point at position "pos" be added?
Reimplemented from GKPolyline.
Reimplemented in GKTurning.
|
virtual |
|
virtual |
Get the altitude of this object (the minimum Z among all the possible Z of the object)
Reimplemented from GKGeoObject.
GKCoord GKBezierCurve::getBezierRadiusatPoint | ( | const GKPoints & | p, |
const GKPoint & | p1, | ||
uint | nbpoints = 0 |
||
) | const |
GKBezierCurveType GKBezierCurve::getCurveType | ( | uint | pos | ) | const |
Returns the curve type of the point at the specified pos.
uint GKBezierCurve::getNbSegments | ( | ) | const |
Return the number of segments. Equivalent to:
int GKBezierCurve::getNumSegmentControlPoints | ( | int | pos | ) | const |
Returns the number of control points for one and only one of the segments of this curve
GKBezierCurve GKBezierCurve::getSegment | ( | uint | pos | ) | const |
Retuns a curve for one and only one of the segments of this curve
GKCoord GKBezierCurve::getSegmentLength | ( | uint | pos, |
uint | nbpoints = 0 |
||
) | const |
Returns the length of the segment at "pos". It will use nbpoints points to evaluate the segment if it is a curve.
if nbpoints is 0 then the value of GKPoints::gkDefaultBezierPoints will be used.
bool GKBezierCurve::hit | ( | const GKPoint & | p, |
float | epsilon | ||
) | const |
Hit: is p over the curve?
bool GKBezierCurve::isASegment | ( | ) | const |
Return true is this object is a segment (it has a single segment and it is of type: eSegment)
|
virtual |
Add "pol" information to this curve either at the beginning (atStart = true) or at the end (atStart = false). Note that pol will not be moified and/or removed.
If pol is a curve both curves (pol and this) will be joined. The union between the two will try to share a segment (moving up the curve "order": from segment to simple curve, from simple curve to complex curve). If it is not possible a new segment (type segment will be added).
If pol is a polyline it will be added to the curve as new segment points (no curve).
Reimplemented from GKPolyline.
Reimplemented in GKSection.
GKCoord GKBezierCurve::length2D | ( | uint | nbpoints = 0 | ) | const |
Length of this curve in 2D. Note that it first converts the curve to a polyline so it it's an approximation and not the real length. It will use "nbpoints" points to evaluate the curve.
if nbpoints is 0 then the value of GKPoints::gkDefaultBezierPoints will be used.
GKCoord GKBezierCurve::length3D | ( | uint | nbpoints = 0 | ) | const |
Length of this curve. Note that it first converts the curve to a polyline so it it's an approximation and not the real length. It will use "nbpoints" points to evaluate the curve.
if nbpoints is 0 then the value of GKPoints::gkDefaultBezierPoints will be used.
GKCoord GKBezierCurve::MeanRadius | ( | uint | nbpoints = 0 | ) | const |
Mean radius of this curve. Note that it uses discretization of the curve so it it's an approximation and not the real mean radius. It will use "nbpoints" points to evaluate the curve. If nbpoints is 0 then the value of GKPoints::gkDefaultBezierPoints will be used.
uint GKBezierCurve::nbParts | ( | ) | const |
bool GKBezierCurve::onlyContainsSegments | ( | ) | const |
Return true is this object only contains segments
GKPoint GKBezierCurve::pointAtPos | ( | float | pos | ) | const |
Return the point in the center line at position "pos" relative to the start of the curve (pos = 0.0 is the start point, pos = length2D() is the end point.
float GKBezierCurve::posAtPoint | ( | const GKPoint & | p, |
GKCoord | maxDistToCurve = 0.01 |
||
) | const |
Return the position in the center line at point "p". The point can be outside of the center line and, if so, the method will calculate the point at the more close segment (perpendicular to p) and will use this new point.
|
virtual |
Removes a point from the curve. This will simplify the curve (4 points curve to 3 points curve, 3 points curve to a segment, if it is a segment it will be removed).
Reimplemented from GKPolyline.
Reimplemented in GKSection.
|
virtual |
Removes nbPoints from this curve either at the beginning (atStart = true) or at the end (atStart = false). The segments associated with these points will be removed too. It returns the number of segments removed in nbSegmentsRemoved.
int GKBezierCurve::segmentAtPos | ( | GKCoord | pos, |
double * | length = NULL |
||
) | const |
Return the segment in the center line at position "pos" relative to the start of the section (pos = 0.0 is the start point, pos = length2D() is the end point). The length of the 0 --> pos - 1 segments is returned too if "length" is not None.
int GKBezierCurve::segmentAtPosComplete | ( | const GKPoints & | points, |
GKCoord | pos, | ||
double * | retLength = NULL |
||
) | const |
Evaluates all the segments calculating their subsegments (if needed).
When a segment is eSegment the number subsegments is one. When a segment is eCurve or eSimpleCurve it is converted into GKPoints::gkDefaultBezierPoints subsegments.
Returns the subsegment in the center line at position "pos" relative to the start of the section (pos = 0.0 is the start point, pos = length2D() is the end point). The length of the 0 --> pos - 1 subSegments is returned too if "retLength" is not None.
|
virtual |
Sets the altitude of the bezier curve.
Reimplemented from GKGeoObject.
void GKBezierCurve::setCurve | ( | const GKBezierCurve & | curve | ) |
Copies a curve geometry on this curve.
void GKBezierCurve::setFromPoints | ( | const GKPoints & | ps, |
GKBezierCurveType | type | ||
) |
Create a curve geometry from a polyline.
void GKBezierCurve::setFromSegment | ( | const GKPoint & | p1, |
const GKPoint & | p2, | ||
GKBezierCurveType | type | ||
) |
Create a curve geometry from two points.
void GKBezierCurve::setPoint | ( | int | i, |
const GKPoint & | p | ||
) |
void GKBezierCurve::setPoint | ( | int | s, |
int | i, | ||
const GKPoint & | p | ||
) |
Sets p as the i-th point of segment s. Segments are numbered from 0 to n-1. i can be 0 or 1 for straight segments; 0, 1 or 2 for simple curve segments and 0,1, 2 or 3 for cruve with two control points. The last point of one segment is the first point of the next segment so the last of these two points set will override the previous point if defined previously