tulipogl module API

Parametric curves computation

tlpogl.computeBezierPoint(controlPoints, t)

Computes the position of the point at t (0 <= t <= 1) along a Bezier curve defined by a set of control points.

Parameters:
  • controlPoints (list of tlp.Coord) – the control points of the Bezier curve
  • t (float) – the curve parameter
Return type:

tlp.Coord

tlpogl.computeBezierPoints(controlPoints[, nbCurvePoints=100])

Computes a set of points approximating a Bezier curve.

Parameters:
  • controlPoints (list of tlp.Coord) – the control points of the Bezier curve
  • nbCurvePoints (integer) – the number of curve points to compute
Return type:

list of tlp.Coord

tlpogl.computeCatmullRomPoint(controlPoints, t[, closedCurve=False, alpha=0.5])

Computes the position of the point at t (0 <= t <= 1) along a Catmull-Rom curve defined by a set of control points. The features of this type of spline are the following :

  • the spline passes through all of the control points
  • the spline is C1 continuous, meaning that there are no discontinuities in the tangent direction and magnitude
  • the spline is not C2 continuous. The second derivative is linearly interpolated within each segment, causing the curvature to vary linearly over the length of the segment
Parameters:
  • controlPoints (list of tlp.Coord) – the control points of the Catmull Rom curve
  • t (float) – the curve parameter
  • closedCurve (boolean) – if True, the curve will be closed, meaning a Bezier segment will connect the last and first control point
  • alpha (float) – curve parameterization parameter (0 <= alpha <= 1), alpha = 0 -> uniform parameterization, alpha = 0.5 -> centripetal parameterization, alpha = 1.0 -> chord-length parameterization
Return type:

tlp.Coord

tlpogl.computeCatmullRomPoints(controlPoints[, closedCurve=False, nbCurvePoints=100, alpha=0.5])

Computes a set of points approximating a Catmull-Rom curve.

Parameters:
  • controlPoints (list of tlp.Coord) – the control points of the Catmull Rom curve
  • closedCurve (boolean) – if True, the curve will be closed, meaning a Bezier segment will connect the last and first control point
  • nbCurvePoints (integer) – the number of curve points to compute
  • alpha (floatts to compute) – curve parameterization parameter (0 <= alpha <= 1), alpha = 0 -> uniform parameterization, alpha = 0.5 -> centripetal parameterization, alpha = 1.0 -> chord-length parameterization
Return type:

list of tlp.Coord

tlpogl.computeOpenUniformBsplinePoint(controlPoints, t[, curveDegree=3])

Computes the position of the point at t (0 <= t <= 1) along an open uniform B-spline curve defined by a set of control points. An uniform B-spline is a piecewise collection of Bezier curves of the same degree, connected end to end. The features of this type of spline are the following :

  • the spline is C^2 continuous, meaning there is no discontinuities in curvature
  • the spline has local control : its parameters only affect a small part of the entire spline

A B-spline is qualified as open when it passes through its first and last control points.

Parameters:
  • controlPoints (list of tlp.Coord) – the control points of the B-spline curve
  • t (float) – the curve parameter
  • curveDegree (integer) – the B-spline degree
Return type:

tlp.Coord

tlpogl.computeOpenUniformBsplinePoints(controlPoints[, curveDegree=3, nbCurvePoints=100])

Computes a set of points approximating an open uniform B-spline curve.

Parameters:
  • controlPoints (list of tlp.Coord) – the control points of the Catmull Rom curve
  • curveDegree (integer) – the B-spline degree
  • nbCurvePoints (integer) – the number of curve points to compute
Return type:

list of tlp.Coord

tlpogl.GlGraphRenderingParameters

class tlpogl.GlGraphRenderingParameters

New in version 4.4.

That class holds all the rendering parameters for a Tulip OpenGL graph drawing. Use tulipgui.tlpgui.NodeLinkDiagramComponent.getRenderingParameters() to get an instance on a such object.

getDisplayFilteringProperty()

Returns the boolean property used to filter the rendering of graph elements.

Return type:tulip.tlp.BooleanProperty
getEdgesLabelStencil()

Returns the stencil value for edges labels.

Return type:integer
getEdgesStencil()

Returns the stencil value for edges.

Return type:integer
getElementOrderingProperty()

Returns the double property used for the ordered rendering of graph elements.

Return type:tulip.tlp.NumericProperty
getFontsPath()

Returns the absolute path used for fonts loading (.ttf files).

Return type:string
getLabelsAreBillboarded()

Returns the state of the labels billboarding (always facing the camera).

Return type:boolean
getLabelsDensity()

Returns the labels density value.

Return type:integer
getMaxSizeOfLabel()

Returns the maximum size of labels. That value is only used if the labels are not scaled to nodes sizes.

Return type:integer
getMetaNodesLabelStencil()

Returns the stencil value for meta-nodes labels.

Return type:integer
getMetaNodesStencil()

Returns the stencil value for meta-nodes.

Return type:integer
getMinSizeOfLabel()

Returns the minimum size of labels. That value is only used if the labels are not scaled to nodes sizes.

Return type:integer
getNodesLabelStencil()

Returns the stencil value for nodes labels.

Return type:integer
getNodesStencil()

Returns the stencil value for nodes.

Return type:integer
getSelectedEdgesStencil()

Returns the stencil value for selected edges.

Return type:integer
getSelectedMetaNodesStencil()

Returns the stencil value for selected meta-nodes.

Return type:integer
getSelectedNodesStencil()

Returns the stencil value for selected nodes.

Return type:integer
getSelectionColor()

Returns the color of selection.

Return type:tulip.tlp.Color
getTexturePath()

Returns the absolute path used for texture loading.

Return type:string
isAntialiased()

Returns if antialiasing rendering is activated.

Return type:boolean
isDisplayEdges()

Returns the state of the displaying of edges.

Return type:boolean
isDisplayMetaNodes()

Returns the state of the displaying of meta-nodes.

Return type:boolean
isDisplayNodes()

Returns the state of the displaying of nodes.

Return type:boolean
isEdge3D()

Returns the state of the 3d edge rendering.

Return type:boolean
isEdgeColorInterpolate()

Returns the state of the edge color interpolation.

Return type:boolean
isEdgeSizeInterpolate()

Returns the state of the edge size interpolation.

Return type:boolean
isElementOrdered()

Returns the state of the ordered rendering of graph elements.

Return type:boolean
isElementZOrdered()

Returns the state of the z-ordered rendering.

Return type:boolean
isLabelFixedFontSize()
Return type:boolean
isLabelScaled()

Returns the state of the scaling of labels to nodes sizes.

Return type:boolean
isViewArrow()

Returns the state of the displaying of arrows along the graph edges.

Return type:boolean
isViewEdgeLabel()

Returns the state of the displaying of edges labels.

Return type:boolean
isViewMetaLabel()

Returns the state of the displaying of labels inside meta-nodes.

Return type:boolean
isViewNodeLabel()

Returns the state of the displaying of nodes labels.

Return type:boolean
isViewOutScreenLabel()

Returns the state of the displaying of labels for elements outside the screen.

Return type:boolean
setAntialiasing()

Activates/desactivates antialiasing.

Parameters:antialiasing (boolean) – the antialiasing state
setDisplayEdges(displayEdges)

Activates / desactivates the displaying of edges.

Parameters:displayEdges (boolean) – the state of the displaying of edges.
setDisplayFilteringProperty(property)

Sets the boolean property used to filter the rendering of graph elements. If sets to None, the filtering is desactivated. If the value for a node / edge in that property is False, it will not be displayed.

Parameters:property (tulip.tlp.BooleanProperty) – the boolean property used to filter the rendering of graph elements
setDisplayMetaNodes(displayMetaNodes)

Activates / desactivates the displaying of nodes.

Parameters:displayMetaNodes (boolean) – the state of the displaying of meta-nodes.
setDisplayNodes(displayNodes)

Activates / desactivates the displaying of nodes.

Parameters:displayNodes (boolean) – the state of the displaying of nodes.
setEdge3D(edge3d)

Activates / desactivates the 3d displaying of edges instead of 2d lines.

Parameters:edge3d (boolean) – the state of the 3d edge rendering
setEdgeColorInterpolate(interpolate)

Activates / desactivates the interpolation of nodes colors along edges.

Parameters:interpolate (boolean) – the state of the edge color interpolation
setEdgeSizeInterpolate(interpolate)

Activates / desactivates the interpolation of nodes sizes along edges.

Parameters:interpolate (boolean) – the state of the edge size interpolation
setEdgesLabelStencil(stencil)

Sets the stencil value for edges labels. The lower the value is, the more the objects will be drawn on top of other ones. The default value is 255.

Parameters:stencil (integer) – a value in the range [0, 255]
setEdgesStencil(stencil)

Sets the stencil value for edges. The lower the value is, the more the objects will be drawn on top of other ones. The default value is 255.

Parameters:stencil (integer) – a value in the range [0, 255]
setElementOrdered(elementOrdered)

Activates / desactivates the ordered rendering of graph elements according to the values in the “viewMetric” double property.

Parameters:elementsOrdered – the state of the ordered rendering
setElementOrderingProperty(property)

Defines which property should be used for the ordered rendering of graph elements. Setting it to None will use the “viewMetric” property if the ordering is enabled.

Parameters:property (tulip.tlp.NumericProperty) – the property to use to order the rendering of graph elements
setElementZOrdered(zOrdering)

Activates / desactivates the ordered rendering of elements according to their distance to the camera.

Parameters:zOrdering (boolean) – the state of the z-ordered rendering
setFontsPath(path)

Sets the absolute path for fonts loading (.ttf files).

Parameters:path (string) – the absolute path of a directory for fonts loading.
setLabelFixedFontSize(fixedFontSize)
Parameters:fixedFontSize (boolean) – the state of using fixed font size with labels
setLabelScaled(labelScaled)

Activates / desactivates the scaling of labels to nodes sizes.

Parameters:labelScaled (boolean) – the state of the scaling of labels to nodes sizes.
setLabelsAreBillboarded(billboardLabels)

Activates / desactivates labels billboarding (always facing the camera).

Parameters:billboardLabels (boolean) – the state of labels billboarding
setLabelsDensity(density)

Sets the labels density value. It must be in the range [-100, 100]. The labels are displayed according to that value :

  • -100 : no labels are displayed
  • 0 : only non overlapping labels are displayed
  • 100 : all labels are displayed
Parameters:density (integer) – a value in the range [-100, 100]
setMaxSizeOfLabel(size)

Sets the maximum size of labels. That value is only used if the labels are not scaled to nodes sizes.

Parameters:size – the maximum size of labels
Type:integer
setMetaNodesLabelStencil()

Sets the stencil value for meta-nodes labels. The lower the value is, the more the objects will be drawn on top of other ones. The default value is 255.

Parameters:stencil (integer) – a value in the range [0, 255]
setMetaNodesStencil(stencil)

Sets the stencil value for meta-nodes. The lower the value is, the more the objects will be drawn on top of other ones. The default value is 255.

Parameters:stencil (integer) – a value in the range [0, 255]
setMinSizeOfLabel(size)

Sets the minimum size of labels. That value is only used if the labels are not scaled to nodes sizes.

Parameters:size – the minimum size of labels
Type:integer
setNodesLabelStencil(stencil)

Sets the stencil value for nodes labels. The lower the value is, the more the objects will be drawn on top of other ones. The default value is 255.

Parameters:stencil (integer) – a value in the range [0, 255]
setNodesStencil(stencil)

Sets the stencil value for nodes. The lower the value is, the more the objects will be drawn on top of other ones. The default value is 255.

Parameters:stencil (integer) – a value in the range [0, 255]
setSelectedEdgesStencil(stencil)

Sets the stencil value for selected edges. The lower the value is, the more the objects will be drawn on top of other ones. The default value is 2.

Parameters:stencil (integer) – a value in the range [0, 255]
setSelectedMetaNodesStencil(stencil)

Sets the stencil value for selected meta-nodes. The lower the value is, the more the objects will be drawn on top of other ones. The default value is 2.

Parameters:stencil (integer) – a value in the range [0, 255]
setSelectedNodesStencil(stencil)

Sets the stencil value for selected nodes. The lower the value is, the more the objects will be drawn on top of other ones. The default value is 2.

Parameters:stencil (integer) – a value in the range [0, 255]
setSelectionColor(color)

Sets the color of selected elements.

Parameters:color (tulip.tlp.Color) – the selection color
setTexturePath(path)

Sets the absolute path for textures loading.

Parameters:path (string) – the absolute path of a directory for textures loading.
setViewArrow(arrow)

Activates / desactivates the displaying of arrows along the graph edges.

Parameters:arrow (boolean) – the state of the arrows rendering
setViewEdgeLabel(edgeLabel)

Activates / desactivates the displaying of edges labels.

Parameters:edgeLabel (boolean) – the state of the edges labels rendering
setViewMetaLabel(metaLabel)

Activates / desactivates the displaying of labels inside meta-nodes.

Parameters:metaLabel – the state of the displaying of labels inside meta-nodes.
setViewNodeLabel(nodeLabel)

Activates / desactivates the displaying of nodes labels.

Parameters:nodeLabel (boolean) – the state of the nodes labels rendering
setViewOutScreenLabel(outScreenLabel)

Activates / desactivates the displaying of labels for elements outside the screen.

Parameters:outScreenLabel (boolean) – the state of the labels rendering for elements outside the screen.

tlpogl.GlGraphInputData

class tlpogl.GlGraphInputData

New in version 4=F. py py-clp>gass=>els. y py-cl>

Def00 :ower isual; the priDeferty usebels r ag the g( dient,nodes c,nodes , ...). By. The de, Tf="# theactiva pU tong> (guiipogguiitViewermDia thmCompes=nt.getGraphInpu()Color

Returns the c the prope s. l>

Defurns urpret bhe z- nodes coring of graph elem(setong> (creen.

Return type:tulipLdientmericProColor

Returns221; double prope s. l>

Defurns urpret bhe z- nwidurcoring of graph elem(setong> (creen.

Return type:tulipD21; dmericProColor

Returns the c the prope s. l>

Defurns urpret odes coring of graph elem(setong> (creen.

Return type:tulip.tlp.mericProColor

Returns(sc the prope s. l>

Defurns urpret ixed .ttf ferty usebels r e of the laring of graph elem(setong> (creen.

Return type:tulipSttOrderingProColor

Returns(inc the prope s. l>

Defurns urpret ixed imum ring the laring of graph elem(setong> (creen.

Return type:ineringPropolor">tulipIineringProColor

Returns(sc the prope s. l>

Defurns urpret the laring of graph elem(setong> (creen.

Return type:tulipSttOrderingProColor

Returns the c the prope s. l>

Defurns urpret e of labhe z-nodes coring of graph elem(setong> (creen.

Return type:tulip.tlp.mericProColor

Returns221; double prope s. l>

Defurns urpret e of labhe z- nwidurcoring of graph elem(setong> (creen.

Return type:tulipD21; dmericProColor

Returns the c the prope s. l>

Defurns urpret e of laodes coring of graph elem(setong> (creen.

Return type:tulip.tlp.mericProColor

Returns(inc the prope s. l>

Defurns urpret e of laposdefinlaring of graph elem(setong> (creen.

Return type:ineringPropolor">tulipIineringProColor

Returns dientc the prope s. l>

Defurns urpret e ientcring of graph elem(setong> (creen.

Return type:tulipLdientmericProColor

Returns221; double prope s. l>

Defurns urpret rotaefinlaring of g the n(setong> (creen.

Return type:tulipD21; dmericProColor

Returns(boouble prope s. l>

Defurns urpret the selecring of graph elem(setong> (creen.

Return type:tulipBbomericProColor

Returns(inc the prope s. l>

Defurns urpret shapnlaring of graph elem(setong> (creen.

Return type:ineringPropolor">tulipIineringProColor

Returnsimum the prope s. l>

Defurns urpret sdes aring of graph elem(setong> (creen.

Return type:tulipSdeseringProColor

Returns(inc the prope s. l>

Defurns urpret shapnlarinurnsiourcof the eextremiriDef(setong> (creen.

Return type:ineringPropolor">tulipIineringProColor

Returnsimum the prope s. l>

Defurns urpret sdes arinurnsiourcof the eextremiriDef(setong> (creen.

Return type:tulipSdeseringProColor

Returns(sc the prope s. l>

Defurns urpret image .ttf ferty use for teturns(hapnlaring of graph elem(setong> (creen.

Return type:tulipSttOrderingProColor

Returns(inc the prope s. l>

Defurns urpret shapnlarinurnstarget the eextremiriDef(setong> (creen.

Return type:ineringPropolor">tulipIineringProColor

Returnsimum the prope s. l>

Defurns urpret sdes arinurnstarget the eextremiriDef(setong> (creen.

Return type:tulipSdeseringProColor

Returnsg of g

Return type:tulipgl.Glenlor
storDef00 : The defg of g isual; the priDef(whosof desvalu"tuling fbye the “etric&#)falabels rendegraph inpucreen.

Sets the c the prope s. l>

Defurns urpret bhe z- nodes coring of graph elem(setong> (creen.

Parameters: (tulip.tlp.mericProColor) ̵ the c the propattachty use hesg of g

Sets221; double prope s. l>

Defurns urpret bhe z- nwidurcoring of graph elem(setong> (creen.

Parameters: (tulipD21; dmericProColor) 󈟥 double propattachty use hesg of g

Sets the c the prope s. l>

Defurns urpret odes coring of graph elem(setong> (creen.

Parameters: (tulip.tlp.mericProColor) ̵ the c the propattachty use hesg of g

Sets tem>sc the prope s. l>

Defurns urpret ixed .ttf ferty usebels r e of the laring of graph elem(setong> (creen.

Parameters: (tulipSttOrderingProColor) ̵ tem>sc the propattachty use hesg of g

Sets(inc the prope s. l>

Defurns urpret ixed imum ring the laring of graph elem(setong> (creen.

Parameters: (ineringPropolor">tulipIineringProColor) Rns(inc the propattachty use hesg of g

Sets tem>sc the prope s. l>

Defurns urpret the laring of graph elem(setong> (creen.

Parameters: (tulipSttOrderingProColor) ̵ tem>sc the propattachty use hesg of g

Sets the c the prope s. l>

Defurns urpret e of labhe z- nodes coring of graph elem(setong> (creen.

Parameters: (tulip.tlp.mericProColor) ̵ the c the propattachty use hesg of g

Sets221; double prope s. l>

Defurns urpret e of labhe z- nwidurcoring of graph elem(setong> (creen.

Parameters: (tulipD21; dmericProColor) 󈟥 double propattachty use hesg of g

Sets the c the prope s. l>

Defurns urpret e of laodes coring of graph elem(setong> (creen.

Parameters: (tulip.tlp.mericProColor) ̵ the c the propattachty use hesg of g

Sets(inc the prope s. l>

Defurns urpret e of laposdefinlaring of graph elem(setong> (creen.

Parameters: (ineringPropolor">tulipIineringProColor) Rns(inc the propattachty use hesg of g

Sets dientc the prope s. l>

Defurns urpret e ientcring of graph elem(setong> (creen.

Parameters: (tulipLdientmericProColor) ̵ dientc the propattachty use hesg of g

Sets221; double prope s. l>

Defurns urpret rotaefinlag of g the n(setong> (creen.

Parameters: (tulipD21; dmericProColor) 󈟥 double propattachty use hesg of g

Sets(boouble prope s. l>

Defurns urpret the selecring of graph elem(setong> (creen.

Parameters: (tulipBbomericProColor) ̵(boouble propattachty use hesg of g

Sets(inc the prope s. l>

Defurns urpret shapnlaring of graph elem(setong> (creen.

Parameters: (ineringPropolor">tulipIineringProColor) Rns(inc the propattachty use hesg of g

Setsimum the prope s. l>

Defurns urpret sdes aring of graph elem(setong> (creen.

Parameters: (tulipSdeseringProColor) ̵ mum the propattachty use hesg of g

Sets(inc the prope s. l>

Defurns urpret shapnlarinurnsiourcof the eextremiriDef(setong> (creen.

Parameters: (ineringPropolor">tulipIineringProColor) Rns(inc the propattachty use hesg of g

Setsimum the prope s. l>

Defurns urpret sdes arinurnsiourcof the eextremiriDef(setong> (creen.

Parameters: (tulipSdeseringProColor) ̵ mum the propattachty use hesg of g

Sets tem>sc the prope s. l>

Defurns urpret image .ttf ferty use for teturns(hapnlaring of graph elem(setong> (creen.

Parameters: (tulipSttOrderingProColor) ̵ tem>sc the propattachty use hesg of g

Sets(inc the prope s. l>

Defurns urpret shapnlarinurnstarget the eextremiriDef(setong> (creen.

Parameters: (ineringPropolor">tulipIineringProColor) Rns(inc the propattachty use hesg of g

Setsimum the prope s. l>

Defurns urpret sdes arinurnstarget the eextremiriDef(setong> (creen.

Parameters: (tulipSdeseringProColor) ̵ mum the propattachty use hesg of g
/dleiv>/ dleiv>/ dleiv>/ dleiv>/ dleiv>/ deivTp> l du> sstarttyrence">Gettm>s starttyn">¶ (Manualn">¶ (Writm>s Tre"> pluginsren Pys="nn">¶ (Color modid" APIn">¶l.tColor modid" APIn">¶ul"toli (Paric- urves-comaphaefinitPme">Paric urves comaphaefinn">¶ (Param="pogl.tlpogl.GlRels rendame">Paramn">¶ ( (guiColor modid" APIn">¶ (pluginsColor modid" APIn">¶archabh3>l dformarch" atSelecls>archrencep ass="m hgetCol dgraph turn hrext"f des="q-body dgraph turn hsubmir"tbodun hGo-body dgraph turn hhidden"f des="chtck_keywords"tbodun hyDetSody dgraph turn hhidden"f des="area"tbodun h The detSody archtip" sty" tiixed-sdes: 90%Col Ence s>arch ce m ninga modid",/ dleiv>/ deivarenCodleiv>/ dleiv>/ dleiv>/ deiv/ deivnal" href="tulipreferenceperty" tihtml# modid" API"l trrevioumn"> |l ng>nal" href="guitulipreferenceperty" tihtml#gui modid" API"l tnextn"> |l ng>nal" hgenils xrenceperty" tiGens li Ils x"l tils xn">y dbrody dg>nal" h_iourcos/pre">l.ttuliprefertxt"l rslrulefollow"ddhow Sourcon">y dleiv>/ deiv Team.y Creatty usm>s dg>nal" hhttp:/olo grx-las.org/"ddo grxn"> 1.2.2./ dleiv>/ dleiv>/ deivarenCodleiv>/ dleiv>/ dleiv>/ big