woo.gl
¶
GlBoundFunctor¶
Object
→ Functor
→ GlBoundFunctor
-
class
woo.gl.
GlBoundFunctor
(*args, **kwargs)¶ Abstract functor for rendering
Bound
objects.Overloaded function.
Gl1_Aabb¶
Object
→ Functor
→ GlBoundFunctor
→ Gl1_Aabb
-
class
woo.gl.
Gl1_Aabb
(*args, **kwargs)¶ Render Axis-aligned bounding box (
woo.dem.Aabb
).Overloaded function.
Gl1_GridBound¶
TensorGlRep¶
Object
→ NodeVisRep
→ TensorGlRep
-
class
woo.gl.
TensorGlRep
(*args, **kwargs)¶ Render tensor (given as 3x3 matrix) as its principal components.
Overloaded function.
__init__(self: woo.gl.TensorGlRep) -> None
-
val
(= Matrix3(0, 0, 0, 0, 0, 0, 0, 0, 0))¶ Value to be rendered.
[type: Matrix3r]
-
eigVec
(= Matrix3(0, 0, 0, 0, 0, 0, 0, 0, 0))¶ eigenvectors as columns, updated in postLoad.
[type: Matrix3r, not saved, read-only in python]
-
eigVal
(= Vector3(0, 0, 0))¶ eigenvalues of corresponding eigenvectors, updated in postLoad.
[type: Vector3r, not saved, read-only in python]
-
skew
(= Vector3(0, 0, 0))¶ skew (asymmetric) components of the tensor
[type: Vector3r, not saved]
-
relSz
(= 0.1)¶ Size of maximum-length arrows, relative to scene radius
[type: Real]
-
skewRelSz
(= -1.0)¶ Size of maximum-length skew curved arrows; if negative, use relSz instead.
[type: Real]
-
scaleExp
(= 1.0)¶ Exponent for scaling arrow sizem kuje wutg VectorGlRep. NaN disables scaling, making all arrows the same size.
[type: Real]
-
range
(= None)¶ Extrema values for symmetric components.
[type: shared_ptr<
ScalarRange
>]
-
skewRange
(= None)¶ Extrema values for skew components
[type: shared_ptr<
ScalarRange
>]
GlData¶
-
class
woo.gl.
GlData
(*args, **kwargs)¶ Nodal data used for rendering.
Overloaded function.
-
refPos
(= Vector3(nan, nan, nan))¶ Reference position (for displacement scaling)
[type: Vector3r, unit: m]
-
refOri
(= Quaternion((nan, nan, nan), nan))¶ Reference orientation (for rotation scaling)
[type: Quaternionr]
-
dGlPos
(= Vector3(nan, nan, nan))¶ Difference from real spatial position when rendered. (when [0] is NaN, the node is clipped and should not be rendered at all)
[type: Vector3r, unit: m]
-
dGlOri
(= Quaternion((nan, nan, nan), nan))¶ Difference from real spatial orientation when rendered.
[type: Quaternionr]
-
dCellDist
(= Vector3i(0, 0, 0))¶ How much is canonicalized point from the real one.
[type: Vector3i]
-
GlCPhysFunctor¶
Object
→ Functor
→ GlCPhysFunctor
-
class
woo.gl.
GlCPhysFunctor
(*args, **kwargs)¶ Abstract functor for rendering
CPhys
objects.Overloaded function.
Gl1_CPhys¶
Object
→ Functor
→ GlCPhysFunctor
→ Gl1_CPhys
-
class
woo.gl.
Gl1_CPhys
(*args, **kwargs)¶ Renders
CPhys
objects as cylinders of which diameter and color depends onCPhys:force
normal (\(x\)) component.Overloaded function.
-
range
(= <ScalarRange @ 0x179fdc0>)¶ Range for normal force
[type: shared_ptr<
ScalarRange
>]
-
shearRange
(= <ScalarRange @ 0x179f120>)¶ Range for absolute value of shear force
[type: shared_ptr<
ScalarRange
>]
-
shearColor
(= False)¶ Set color by shear force rather than by normal force. (Radius still depends on normal force)
[type: bool]
-
signFilter
(= 0)¶ If non-zero, only display contacts with negative (-1) or positive (+1) normal forces; if zero, all contacts will be displayed.
[type: int]
-
relMaxRad
(= 0.01)¶ Relative radius for maximum forces
[type: Real]
-
slices
(= 6)¶ Number of cylinder slices
[type: int]
-
slices_range
(= Vector2i(4, 16))¶ Range for slices
[type: Vector2i, not shown in the UI]
-
Gl1_ConcretePhys¶
Object
→ Functor
→ GlCPhysFunctor
→ Gl1_CPhys
→ Gl1_ConcretePhys
-
class
woo.gl.
Gl1_ConcretePhys
(*args, **kwargs)¶ Renders
ConcretePhys
objects with discs representing damage.Gl1_CPhys
may be requested to do other rendering based ondoCPhys
.Overloaded function.
__init__(self: woo.gl.Gl1_ConcretePhys) -> None
__init__(self: woo.gl.Gl1_ConcretePhys, *args, **kwargs) -> None
-
doCPhys
(= 0)¶ Call
Gl1_CPhys
for rendering.[type: int, named enum, possible values are: ‘no’ (‘’; 0), ‘only’ (1), ‘also’ (2)]
-
dmgRange
(= <ScalarRange @ 0x17f4650>)¶ Range for disk damage coloring.
[type: shared_ptr<
ScalarRange
>]
-
dmgSlices
(= 6)¶ Number of slices to draw the damage disc
[type: int]
-
dmgPow
(= 2)¶ Raise
omega
to this power for disk radius scaling; 2 makes the disc area (rather than radius) proportional to omega.[type: int]
GlFieldDispatcher¶
Object
→ Engine
→ Dispatcher
→ GlFieldDispatcher
-
class
woo.gl.
GlFieldDispatcher
(*args, **kwargs)¶ Dispatcher calling
functors
based on received argument type(s).Overloaded function.
__init__(self: woo.gl.GlFieldDispatcher) -> None
__init__(self: woo.gl.GlFieldDispatcher, *args, **kwargs) -> None
-
functors
(= [])¶ Functors active in the dispatch mechanism [overridden below].
[type: vector<shared_ptr<GlFieldFunctor>>]
-
dispFunctor
(self: woo.gl.GlFieldDispatcher, arg0: woo.core.Field) → woo.gl.GlFieldFunctor¶ Return functor that would be dispatched for given argument(s); None if no dispatch; ambiguous dispatch throws.
-
dispMatrix
(self: woo.gl.GlFieldDispatcher, names: bool = True) → dict¶ Return dictionary with contents of the dispatch matrix.
GlSetup¶
-
class
woo.gl.
GlSetup
(*args, **kwargs)¶ Proxy object for accessing all GL-related settings uniformly from the scene.
Overloaded function.
-
objs
(= ObjectList[])¶ List of all objects used; their order is determined at run-time. Some of them may be None (unused indices) which indicate separator in list of those objects when presented in the UI.
[type: vector<shared_ptr<Object>>, not shown in the UI, read-only in python]
-
dirty
(= False)¶ Set after modifying functors, so that they can be regenerated.
[type: bool, not shown in the UI, not dumped, read-only in python]
-
qglviewerState
(= '')¶ XML representation of the view state – updated occasionally (once a second) from the current open view (if any).
[type: string, not shown in the UI, read-only in python]
-
__call__
(self: woo.gl.GlSetup, *args) → None¶ Replace all current functors by those passed as arguments.
-
GlNodeDispatcher¶
Object
→ Engine
→ Dispatcher
→ GlNodeDispatcher
-
class
woo.gl.
GlNodeDispatcher
(*args, **kwargs)¶ Dispatcher calling
functors
based on received argument type(s).Overloaded function.
__init__(self: woo.gl.GlNodeDispatcher) -> None
__init__(self: woo.gl.GlNodeDispatcher, *args, **kwargs) -> None
-
functors
(= [])¶ Functors active in the dispatch mechanism [overridden below].
[type: vector<shared_ptr<GlNodeFunctor>>]
-
dispFunctor
(self: woo.gl.GlNodeDispatcher, arg0: woo.core.Node) → woo.gl.GlNodeFunctor¶ Return functor that would be dispatched for given argument(s); None if no dispatch; ambiguous dispatch throws.
-
dispMatrix
(self: woo.gl.GlNodeDispatcher, names: bool = True) → dict¶ Return dictionary with contents of the dispatch matrix.
GlNodeFunctor¶
Object
→ Functor
→ GlNodeFunctor
-
class
woo.gl.
GlNodeFunctor
(*args, **kwargs)¶ Abstract functor for rendering
Node
objects.Overloaded function.
Gl1_Node¶
Object
→ Functor
→ GlNodeFunctor
→ Gl1_Node
-
class
woo.gl.
Gl1_Node
(*args, **kwargs)¶ Render generic
woo.dem.Node
.Overloaded function.
-
wd
(= 1)¶ Local axes line width in pixels
[type: int]
-
wd_range
(= Vector2i(0, 5))¶ Range for width
[type: Vector2i, not shown in the UI]
-
len
(= 0.05)¶ Relative local axes line length in pixels, relative to scene radius; if non-positive, only points are drawn
[type: Real]
-
len_range
(= Vector2(0, 0.1))¶ Range for len
[type: Vector2r, not shown in the UI]
-
CylGlRep¶
Object
→ NodeVisRep
→ CylGlRep
-
class
woo.gl.
CylGlRep
(*args, **kwargs)¶ Render cylinder aligned with local x-axis, with color and radius given by val (and optionally val2).
Overloaded function.
-
rad
(= nan)¶ Scalar determining radius; 1 if NaN
[type: Real]
-
col
(= nan)¶ Scalar determining color; rad is used if NaN.
[type: Real]
-
xx
(= Vector2(0, 0))¶ End positions on the local x-axis
[type: Vector2r]
-
relSz
(= 0.05)¶ Maximum cylinder radius, relative to scene radius
[type: Real]
-
rangeRad
(= None)¶ Range for rad (only used if rad is not NaN)
[type: shared_ptr<
ScalarRange
>]
-
rangeCol
(= None)¶ Range for col (or for rad, if col is NaN)
[type: shared_ptr<
ScalarRange
>]
-
LabelGlRep¶
Object
→ NodeVisRep
→ LabelGlRep
-
class
woo.gl.
LabelGlRep
(*args, **kwargs)¶ Render scalar value at associated node
Overloaded function.
__init__(self: woo.gl.LabelGlRep) -> None
-
text
(= '')¶ Text to be rendered at the node’s position
[type: string]
-
color
(= Vector3(1, 1, 1))¶ Color for rendering the text
[type: Vector3r]
-
center
(= False)¶ Whether the text should be centered around the node
[type: bool]
Renderer¶
-
class
woo.gl.
Renderer
(*args, **kwargs)¶ Class responsible for rendering scene on OpenGL devices.
Overloaded function.
-
initDone
(= False)¶ Track initialization (don’t save, since this initialized GLUT as well, which is needed at every run again).
[type: bool, not saved, not accessible from python]
► General
-
engines
(= True)¶ Call engine’s rendering functions (if defined)
[type: bool]
-
ranges
(= True)¶ Show color scales for
Scene.ranges
[type: bool]
-
cell
(= True)¶ Render periodic cell boundaries (periodic simulations only)
[type: bool]
-
ghosts
(= False)¶ Render objects crossing periodic cell edges by cloning them in multiple places (periodic simulations only).
[type: bool]
-
extraDrawers
(= [])¶ Additional rendering components (
GlExtraDrawer
).[type: vector<shared_ptr<GlExtraDrawer>>]
-
iniUp
(= Vector3(0, 0, 1))¶ Up vector of new views
[type: Vector3r]
-
iniViewDir
(= Vector3(-1, 0, 0))¶ View direction of new views
[type: Vector3r]
-
snapFmt
(= '/tmp/{id}.{#}.png')¶ Format for saving snapshots; {tag} sequences are expanded with Scene.tags; a special {#} tag is expanded with snapshot number (so that older ones are not overwritten), starting from 0 and zero-padded to 4 decimal palces. File format is auto-detected from extension. Supported formats are .png, .jpg, .pdf, .svg, xfig, ps, eps.
[type: string, filename]
-
fast
(= 1)¶ When to use fast rendering; unfocused means when manipulating camera or the 3d windows is not focused, and framerate drops below maxFps.
[type: int, named enum, possible values are: ‘always’ (0), ‘unfocused’ (1), ‘never’ (2)]
► Scaling
-
setRefNow
(= False)¶ Update reference positions/orientations the next time we run.
[type: bool, not shown in the UI]
-
dispScale
(= Vector3(10, 10, 10))¶ Artificially enlarge (scale) displacements from nodes’
reference positions
by this relative amount, so that they become better visible (independently in 3 dimensions); not enabled unlessscaleOn
isTrue
. When set to something else than(1,1,1)
,scaleOn
is set toTrue
automatically.[type: Vector3r]
-
rotScale
(= 1.0)¶ Artificially enlarge (scale) rotations of bodies relative to their
reference orientation
, so the they are better visible; no effect if 1.0 and unlessscaleOn
is set. If set to anything else than 1.0,scaleOn
is set automatically.[type: Real]
-
zClipCoeff
(= 4.0)¶ Z-clipping coefficient, relative to scene radius (see http://www.libqglviewer.com/refManual/classqglviewer_1_1Camera.html#acd07c1b9464b935ad21bb38b7c27afca for details)
[type: Real, range: 1.73205−10]
► Colors and lighting
-
bgColor
(= Vector3(0.2, 0.2, 0.2))¶ Color of the background canvas (RGB)
[type: Vector3r]
-
light1
(= True)¶ Turn light 1 on.
[type: bool]
-
lightPos
(= Vector3(75, 130, 0))¶ Position of OpenGL light source in the scene.
[type: Vector3r]
-
lightColor
(= Vector3(0.6, 0.6, 0.6))¶ Per-color intensity of primary light (RGB).
[type: Vector3r]
-
light2
(= True)¶ Turn light 2 on.
[type: bool]
-
light2Pos
(= Vector3(-130, 75, 30))¶ Position of secondary OpenGL light source in the scene.
[type: Vector3r]
-
light2Color
(= Vector3(0.5, 0.5, 0.1))¶ Per-color intensity of secondary light (RGB).
[type: Vector3r]
-
showTime
(= 5)¶ Control whether virtual time, real time and step number are displayed in the 3d view.
[type: int, bit accessors: virt, real, step]
-
showDate
(= False)¶ Show human date and clock time in the 3d view.
[type: bool]
-
dateColor
(= Vector3(0.6, 0.6, 0.6))¶ Date color
[type: Vector3r]
-
virtColor
(= Vector3(1, 1, 1))¶ Virtual time color
[type: Vector3r]
-
realColor
(= Vector3(0, 0.5, 0.5))¶ Real time color
[type: Vector3r]
-
stepColor
(= Vector3(0, 0.5, 0.5))¶ Step number color
[type: Vector3r]
-
grid
(= 0)¶ Show axes planes with grid
[type: int, bit accessors: yz, zx, xy]
-
oriAxes
(= True)¶ Show orientation axes in the 3d view (in the upper left corner)
[type: bool]
-
oriAxesPx
(= 50)¶ Maximum pixel size of orientation axes in the corner.
[type: int, range: 10−100]
-
colorX
(= Vector3(1, 0.1, 0))¶ X-axis color
[type: Vector3r]
-
colorY
(= Vector3(1, 1, 0))¶ Y-axis color
[type: Vector3r]
-
colorZ
(= Vector3(0.1, 1, 0))¶ Z-axis color
[type: Vector3r]
-
logoSize
(= 50)¶ Size of the bigger size of the logo, in pixels
[type: int]
-
logoPos
(= Vector2i(-64, -60))¶ Position of the logo; negative values count from the other side of the window.
[type: Vector2i]
-
logoColor
(= Vector3(1, 1, 1))¶ Logo color
[type: Vector3r]
-
logoWd
(= 1.8)¶ Width of the logo stroke; set to non-positive value to disable the logo.
[type: Real, range: 0−10]
► Selection & Clipping
-
clipPlanes
(= NodeList[])¶ Clipping plane definitions (local \(x\)-axis defines the clipping plane; activity of the plane is determined by whether
woo.core.Node.rep
is something (active; otherwise unused object) orNone
.)[type: vector<shared_ptr<Node>>]
-
selObj
(= None)¶ Object which was selected by the user (access only via woo.qt.selObj).
[type: shared_ptr<
Object
>]
-
selObjNode
(= None)¶ Node associated to the selected object (recenters scene on that object upon selection)
[type: shared_ptr<
Node
>, read-only in python]
-
selFunc
(= 'import woo.qt\nwoo.qt.onSelection')¶ Python expression to be called (by textually appending ‘(woo.gl.Renderer.selOBj)’ or ‘(None)’) at object selection/deselection. If empty, no function will be called. Any imports must be explicitly mentioned in the string.
[type: string]
-
selFollow
(= False)¶ Keep the scene centered at
selObjNode
.[type: bool]
► Performance
-
maxFps
(= 10)¶ Maximum frame rate for the OpenGL display
[type: int]
-
renderTime
(= nan)¶ Time for rendering one frame (smoothed)
[type: Real, unit: s, read-only in python]
-
fastRenderTime
(= nan)¶ Time for fast-rendering one frame (smoothed)
[type: Real, unit: s, read-only in python]
-
GlFieldFunctor¶
Object
→ Functor
→ GlFieldFunctor
-
class
woo.gl.
GlFieldFunctor
(*args, **kwargs)¶ Abstract functor for rendering
Field
objects.Overloaded function.
Gl1_DemField¶
Object
→ Functor
→ GlFieldFunctor
→ Gl1_DemField
-
class
woo.gl.
Gl1_DemField
(*args, **kwargs)¶ Render DEM field.
Overloaded function.
__init__(self: woo.gl.Gl1_DemField) -> None
__init__(self: woo.gl.Gl1_DemField, *args, **kwargs) -> None
► Shape
-
shape
(= 1)¶ Render only particles matching selected filter.
[type: int, named enum, possible values are: ‘none’ (‘’; 0), ‘all’ (1), ‘spheroids’ (‘sph’; 2), ‘non-spheroids’ (‘nsph’; 3), ‘mask’ (4)]
-
mask
(= 0)¶ Only shapes/bounds of particles with this group will be shown; 0 matches all particles.
[type: uint]
-
modulo
(= Vector2i(0, 0))¶ For particles matching
shape
, only show particles withParticle.id
such that(id+modulo[1])%modulo[0]==0
(similar towoo.dem.Tracer.modulo
). Only nodes of which first particle matches (or don’t have any particle attached) are shown (in case of nodes, regardless of itsshape
). Display of contacts is not affected by this value.[type: Vector2i]
-
wire
(= False)¶ Render all shapes with wire only
[type: bool]
-
colorBy
(= 1)¶ Color particles by
[type: int, named enum, possible values are: ‘solid’ (0), ‘Shape.color’ (‘shape’; 1), ‘radius’ (‘r’; 2), ‘diameter (mm)’ (‘diameter’, ‘diam’, ‘d’; 3), ‘velocity’ (‘vel’, ‘v’; 4), ‘angular velocity’ (‘angVel’; 5), ‘mass’ (‘m’; 6), ‘position’ (‘pos’; 7), ‘ref. displacement’ (‘disp’, ‘displacement’; 8), ‘ref. rotation’ (‘rot’, ‘rotation’; 9), ‘refpos coord’ (‘refpos’; 10), ‘material id’ (‘mat id’; 11), ‘Particle.matState’ (‘mat state’; 12), ‘normal stress’ (‘sigN’; 13), ‘shear stress’ (‘sigT’; 14), ‘mask’ (15), ‘number of contacts’ (‘num contacts’, ‘numCon’; 16), ‘flags’ (17), ‘invisible’ (‘-‘; 18)]
-
vecAxis
(= 6)¶ Axis for vector quantities.
[type: int, named enum, possible values are: ‘x’ (0), ‘y’ (1), ‘z’ (2), ‘yz’ (‘yz’; 3), ‘zx’ (‘xz’; 4), ‘xy’ (‘yx’; 5), ‘norm’ (‘magnitude’, ‘xyz’; 6)]
-
matStateIx
(= 0)¶ Index for getting
MatState
scalars.[type: int]
-
matStateSmooth
(= 0.001)¶ Smoothing coefficient for
MatState
scalars.[type: Real]
-
colorRange
(= None)¶ Range for particle colors (
colorBy
)[type: shared_ptr<
ScalarRange
>, read-only in python]
-
colorBy2
(= 0)¶ Color for particles with
shape2
.[type: int, named enum, possible values are: ‘solid’ (0), ‘Shape.color’ (‘shape’; 1), ‘radius’ (‘r’; 2), ‘diameter (mm)’ (‘diameter’, ‘diam’, ‘d’; 3), ‘velocity’ (‘vel’, ‘v’; 4), ‘angular velocity’ (‘angVel’; 5), ‘mass’ (‘m’; 6), ‘position’ (‘pos’; 7), ‘ref. displacement’ (‘disp’, ‘displacement’; 8), ‘ref. rotation’ (‘rot’, ‘rotation’; 9), ‘refpos coord’ (‘refpos’; 10), ‘material id’ (‘mat id’; 11), ‘Particle.matState’ (‘mat state’; 12), ‘normal stress’ (‘sigN’; 13), ‘shear stress’ (‘sigT’; 14), ‘mask’ (15), ‘number of contacts’ (‘num contacts’, ‘numCon’; 16), ‘flags’ (17), ‘invisible’ (‘-‘; 18)]
-
colorRange2
(= None)¶ Range for particle colors (
colorBy
)[type: shared_ptr<
ScalarRange
>, read-only in python]
-
solidColor
(= Vector3(0.3, 0.3, 0.3))¶ Solid color for particles.
[type: Vector3r]
-
colorRanges
(= [])¶ List of color ranges
[type: vector<shared_ptr<ScalarRange>>, not shown in the UI, read-only in python]
-
bound
(= False)¶ Render particle’s
Bound
[type: bool]
-
periodic
(= False)¶ Automatically shows whether the scene is periodic (to use in hideIf of
fluct
[type: bool, not shown in the UI]
-
fluct
(= False)¶ With periodic boundaries, show only fluctuation components of velocity.
[type: bool]
► Nodes
-
nodes
(= False)¶ Render DEM nodes
[type: bool]
-
glyph
(= 0)¶ Show glyphs on particles by setting
GlData
on their nodes.[type: int, named enum, possible values are: ‘keep’ (0), ‘none’ (‘’; 1), ‘force’ (‘f’; 2), ‘torque’ (‘t’; 3), ‘velocity’ (‘vel’, ‘v’; 4), ‘angular velocity’ (‘angVel’, ‘angvel’; 5)]
-
glyphRange
(= None)¶ Range for glyph colors
[type: shared_ptr<
ScalarRange
>, read-only in python]
-
glyphRelSz
(= 0.1)¶ Maximum glyph size relative to scene radius
[type: Real]
-
deadNodes
(= True)¶ Show
DemField.deadNodes
.[type: bool]
-
glyphRanges
(= [])¶ List of glyph ranges
[type: vector<shared_ptr<ScalarRange>>, not shown in the UI, read-only in python]
► Contact nodes
-
cNode
(= 0)¶ What should be shown for contact nodes
[type: int, bit accessors: glRep, line, node, potLine]
-
cPhys
(= False)¶ Render contact’s nodes
[type: bool]
-
guiEvery
(= 100)¶ Process GUI events once every guiEvery objects are painted, to keep the ui responsive. Set to 0 to make rendering blocking.
[type: int]
-
shapeDispatcher
(= <GlShapeDispatcher @ 0x178ec70>)¶ Dispatcher for rendering
shapes
. Set up automatically.[type: shared_ptr<
GlShapeDispatcher
>, not shown in the UI, read-only in python]
-
boundDispatcher
(= <GlBoundDispatcher @ 0x178eb90>)¶ Dispatcher for rendering
bounds
. Set up automatically.[type: shared_ptr<
GlBoundDispatcher
>, not shown in the UI, read-only in python]
-
cPhysDispatcher
(= <GlCPhysDispatcher @ 0x17c12d0>)¶ Dispatcher for rendering
CPhys
. Set up automatically.[type: shared_ptr<
GlCPhysDispatcher
>, not shown in the UI, read-only in python]
GlBoundDispatcher¶
Object
→ Engine
→ Dispatcher
→ GlBoundDispatcher
-
class
woo.gl.
GlBoundDispatcher
(*args, **kwargs)¶ Dispatcher calling
functors
based on received argument type(s).Overloaded function.
__init__(self: woo.gl.GlBoundDispatcher) -> None
__init__(self: woo.gl.GlBoundDispatcher, *args, **kwargs) -> None
-
functors
(= [])¶ Functors active in the dispatch mechanism [overridden below].
[type: vector<shared_ptr<GlBoundFunctor>>]
-
dispFunctor
(self: woo.gl.GlBoundDispatcher, arg0: woo.dem.Bound) → woo.gl.GlBoundFunctor¶ Return functor that would be dispatched for given argument(s); None if no dispatch; ambiguous dispatch throws.
-
dispMatrix
(self: woo.gl.GlBoundDispatcher, names: bool = True) → dict¶ Return dictionary with contents of the dispatch matrix.
ScalarGlRep¶
Object
→ NodeVisRep
→ ScalarGlRep
-
class
woo.gl.
ScalarGlRep
(*args, **kwargs)¶ Render scalar value at associated node
Overloaded function.
__init__(self: woo.gl.ScalarGlRep) -> None
-
val
(= 0.0)¶ Value to be rendered
[type: Real]
-
how
(= 0)¶ Different ways to render given value; 0=number, 1=colored point, 2=colored sphere
[type: int]
-
prec
(= 5)¶ Precision for rendering numbers
[type: int]
-
relSz
(= 0.05)¶ Size of rendered spheres (if selected), relative to scene radius
[type: Real]
-
range
(= None)¶ Extrema values for the scalar, to determine colors.
[type: shared_ptr<
ScalarRange
>]
GlShapeDispatcher¶
Object
→ Engine
→ Dispatcher
→ GlShapeDispatcher
-
class
woo.gl.
GlShapeDispatcher
(*args, **kwargs)¶ Dispatcher calling
functors
based on received argument type(s).Overloaded function.
__init__(self: woo.gl.GlShapeDispatcher) -> None
__init__(self: woo.gl.GlShapeDispatcher, *args, **kwargs) -> None
-
functors
(= [])¶ Functors active in the dispatch mechanism [overridden below].
[type: vector<shared_ptr<GlShapeFunctor>>]
-
dispFunctor
(self: woo.gl.GlShapeDispatcher, arg0: woo.dem.Shape) → woo.gl.GlShapeFunctor¶ Return functor that would be dispatched for given argument(s); None if no dispatch; ambiguous dispatch throws.
-
dispMatrix
(self: woo.gl.GlShapeDispatcher, names: bool = True) → dict¶ Return dictionary with contents of the dispatch matrix.
GlShapeFunctor¶
Object
→ Functor
→ GlShapeFunctor
-
class
woo.gl.
GlShapeFunctor
(*args, **kwargs)¶ Abstract functor for rendering
Shape
objects.Overloaded function.
Gl1_Sphere¶
Object
→ Functor
→ GlShapeFunctor
→ Gl1_Sphere
-
class
woo.gl.
Gl1_Sphere
(*args, **kwargs)¶ Renders
Sphere
objectOverloaded function.
__init__(self: woo.gl.Gl1_Sphere) -> None
-
quality
(= 1.0)¶ Change discretization level of spheres. quality>1 for better image quality, at the price of more cpu/gpu usage, 0<quality<1 for faster rendering. If mono-color sphres are displayed (
stripes
= False), quality mutipliesglutSlices
andglutStacks
. If striped spheres are displayed (stripes = `True
), only integer increments are meaningful: quality=1 and quality=1.9 will give the same result, quality=2 will give a finer result.[type: Real, range: 0−8]
-
wire
(= False)¶ Only show wireframe (controlled by
glutSlices
andglutStacks
.[type: bool]
-
smooth
(= False)¶ Render lines smooth (it makes them thicker and less clear if there are many spheres.)
[type: bool]
-
scale
(= 1.0)¶ Scale sphere radii
[type: Real, range: 0.1−2]
-
glutSlices
(= 12)¶ Base number of sphere slices, multiplied by
Gl1_Sphere.quality
before use); not used withstripes
(see glut{Solid,Wire}Sphere reference)[type: int, not saved, read-only in python]
-
glutStacks
(= 6)¶ Base number of sphere stacks, multiplied by
Gl1_Sphere.quality
before use; not used withstripes
(see glut{Solid,Wire}Sphere reference)[type: int, not saved, read-only in python]
Gl1_Ellipsoid¶
Object
→ Functor
→ GlShapeFunctor
→ Gl1_Sphere
→ Gl1_Ellipsoid
-
class
woo.gl.
Gl1_Ellipsoid
(*args, **kwargs)¶ Renders
woo.dem.Ellipsoid
objectOverloaded function.
Gl1_Capsule¶
Object
→ Functor
→ GlShapeFunctor
→ Gl1_Sphere
→ Gl1_Capsule
-
class
woo.gl.
Gl1_Capsule
(*args, **kwargs)¶ Renders
woo.dem.Capsule
objectOverloaded function.
Gl1_InfCylinder¶
Object
→ Functor
→ GlShapeFunctor
→ Gl1_InfCylinder
-
class
woo.gl.
Gl1_InfCylinder
(*args, **kwargs)¶ Renders
InfCylinder
objectOverloaded function.
__init__(self: woo.gl.Gl1_InfCylinder) -> None
__init__(self: woo.gl.Gl1_InfCylinder, *args, **kwargs) -> None
-
wire
(= False)¶ Render Cylinders with wireframe
[type: bool]
-
spokes
(= True)¶ Render spokes between the cylinder axis and edge, at the position of
InfCylinder.glAB
.[type: bool]
-
slices
(= 12)¶ Number of circumferential division of circular sections
[type: int]
-
stacks
(= 20)¶ Number of rings on the cylinder inside the visible scene part.
[type: int]
Gl1_Rod¶
Object
→ Functor
→ GlShapeFunctor
→ Gl1_Rod
-
class
woo.gl.
Gl1_Rod
(*args, **kwargs)¶ Render truss particles
Overloaded function.
-
slices
(= 12)¶ Number of slices, controls quality
[type: int]
-
stacks
(= 6)¶ Number of stacks, controls quality
[type: int]
-
wire
(= False)¶ Render all shapes with wireframe only
[type: bool]
-
colorStress
(= True)¶ Set color based on axial stress rather than
woo.dem.Shape.color
[type: bool]
-
stressRange
(= Vector2(-1, 1))¶ Stress range, to set color appropriately
[type: Vector2r]
-
Gl1_Cone¶
Object
→ Functor
→ GlShapeFunctor
→ Gl1_Cone
Gl1_Facet¶
Object
→ Functor
→ GlShapeFunctor
→ Gl1_Facet
-
class
woo.gl.
Gl1_Facet
(*args, **kwargs)¶ Renders
Facet
objectOverloaded function.
-
wire
(= False)¶ Only show wireframe.
[type: bool]
-
slices
(= 8)¶ Number of half-cylinder subdivision for rounded edges with halfThick>=0 (for whole circle); if smaller than 4, rounded edges are not drawn; if negative, only mid-plane is drawn.
[type: int, range: -1−16]
-
fastDrawLim
(= 0.001)¶ If performing fast draw (during camera manipulation) and the facet’s perimeter is smaller than fastDrawLim times scene radius, skip rendering of that facet.
[type: Real]
-
wd
(= 1)¶ Line width when drawing with wireframe (only applies to the triangle, not to rounded corners)
[type: int, range: 1−20]
-
Gl1_Membrane¶
Object
→ Functor
→ GlShapeFunctor
→ Gl1_Facet
→ Gl1_Membrane
-
class
woo.gl.
Gl1_Membrane
(*args, **kwargs)¶ Renders
Membrane
object;Facet
itself is rendered viaGl1_Facet
.Overloaded function.
__init__(self: woo.gl.Gl1_Membrane) -> None
__init__(self: woo.gl.Gl1_Membrane, *args, **kwargs) -> None
-
node
(= False)¶ Show local frame node
[type: bool]
-
refConf
(= True)¶ Show reference configuration, rotated to the current local frame
[type: bool]
-
refColor
(= Vector3(0, 0.5, 0))¶ Color for the reference shape
[type: Vector3r]
-
refWd
(= 1)¶ Line width for the reference shape
[type: int]
-
uScale
(= 1.0)¶ Scale of displacement lines (zero to disable)
[type: Real]
-
uWd
(= 2)¶ Width of displacement lines
[type: int]
-
uSplit
(= False)¶ Show x and y displacement components separately
[type: bool]
-
relPhi
(= 0.2)¶ Length of unit rotation (one radian), relative to scene radius (zero to disable)
[type: Real]
-
phiWd
(= 2)¶ Width of rotation lines
[type: int]
-
phiSplit
(= True)¶ Show x and y displacement components separately
[type: bool]
-
arrows
(= False)¶ Show displacements and rotations as arrows rather than lines
[type: bool]
-
uRange
(= <ScalarRange @ 0x17e71a0>)¶ Range for displacements (colors only)
[type: shared_ptr<
ScalarRange
>]
-
phiRange
(= <ScalarRange @ 0x17ec5f0>)¶ Range for rotations (colors only)
[type: shared_ptr<
ScalarRange
>]
Gl1_Wall¶
Object
→ Functor
→ GlShapeFunctor
→ Gl1_Wall
-
class
woo.gl.
Gl1_Wall
(*args, **kwargs)¶ Renders
woo.dem.Wall
objectOverloaded function.
-
div
(= 20)¶ Number of divisions of the wall inside visible scene part.
[type: int]
-
Gl1_Tetra¶
Object
→ Functor
→ GlShapeFunctor
→ Gl1_Tetra
-
class
woo.gl.
Gl1_Tetra
(*args, **kwargs)¶ Renders
Tetra
objectOverloaded function.
-
wire
(= False)¶ Only show wireframe.
[type: bool]
-
wd
(= 1)¶ Line width when drawing with wireframe (only applies to the triangle, not to rounded corners)
[type: int, range: 1−20]
-
fastDrawLim
(= 0.001)¶ If performing fast draw (during camera manipulation) and the distance of centroid to the first node is smaller than fastDrawLim times scene radius, skip rendering of that tetra.
[type: Real]
-
Gl1_Tet4¶
Object
→ Functor
→ GlShapeFunctor
→ Gl1_Tetra
→ Gl1_Tet4
-
class
woo.gl.
Gl1_Tet4
(*args, **kwargs)¶ Renders
Tet4
object;Tetra
itself is rendered viaGl1_Tetra
.Overloaded function.
-
node
(= False)¶ Show local frame node
[type: bool]
-
rep
(= True)¶ Show GlRep of the frame node (without showing the node itself)
[type: bool]
-
refConf
(= False)¶ Show reference configuration, rotated to the current local frame
[type: bool]
-
refColor
(= Vector3(0, 0.5, 0))¶ Color for the reference shape
[type: Vector3r]
-
refWd
(= 1)¶ Line width for the reference shape
[type: int]
-
uWd
(= 2)¶ Width of displacement lines
[type: int]
-
GlExtraDrawer¶
-
class
woo.gl.
GlExtraDrawer
(*args, **kwargs)¶ Performing arbitrary OpenGL drawing commands; called from
Renderer
(seeRenderer.extraDrawers
) once regular rendering routines will have finished.This class itself does not render anything, derived classes should override the render method.
Overloaded function.
__init__(self: woo.gl.GlExtraDrawer) -> None
__init__(self: woo.gl.GlExtraDrawer, *args, **kwargs) -> None
-
dead
(= False)¶ Deactivate the object (on error/exception).
[type: bool]
GlExtra_EnergyTrackerGrid¶
Object
→ GlExtraDrawer
→ GlExtra_EnergyTrackerGrid
-
class
woo.gl.
GlExtra_EnergyTrackerGrid
(*args, **kwargs)¶ Draw
S.energy.grid
, if used.Overloaded function.
__init__(self: woo.gl.GlExtra_EnergyTrackerGrid) -> None
__init__(self: woo.gl.GlExtra_EnergyTrackerGrid, *args, **kwargs) -> None
-
color
(= Vector3(1, 0.5, 0.5))¶ Color to render the box.
[type: Vector3r]
GlExtra_AnisoPorosityAnalyzer¶
Object
→ GlExtraDrawer
→ GlExtra_AnisoPorosityAnalyzer
-
class
woo.gl.
GlExtra_AnisoPorosityAnalyzer
(*args, **kwargs)¶ Find an instance of
LawTester
and show visually its data.Overloaded function.
__init__(self: woo.gl.GlExtra_AnisoPorosityAnalyzer) -> None
__init__(self: woo.gl.GlExtra_AnisoPorosityAnalyzer, *args, **kwargs) -> None
-
analyzer
(= None)¶ Associated
AnisoPorosityAnalyzer
object.[type: shared_ptr<
AnisoPorosityAnalyzer
>]
-
wd
(= 2)¶ Segment line width
[type: int]
-
wd_range
(= Vector2i(1, 10))¶ Range for wd
[type: Vector2i, not shown in the UI]
-
num
(= 2)¶ Number to show at the segment middle: 0 = nothing, 1 = particle id, 2 = intersected length
[type: int]
-
num_range
(= Vector2i(0, 2))¶ Range for num
[type: Vector2i, not shown in the UI]
-
idMod
(= 5)¶ Modulate particle id by this number to get segment color
[type: int]
DisplayParameters¶
-
class
woo.gl.
DisplayParameters
(*args, **kwargs)¶ Store display parameters.
Overloaded function.
__init__(self: woo.gl.DisplayParameters) -> None
__init__(self: woo.gl.DisplayParameters, *args, **kwargs) -> None
-
values
(= [])¶ [type: vector<string>, read-only in python]
-
displayTypes
(= [])¶ [type: vector<string>, read-only in python]
VectorGlRep¶
Object
→ NodeVisRep
→ VectorGlRep
-
class
woo.gl.
VectorGlRep
(*args, **kwargs)¶ Render vector value at associated node, as an arrow
Overloaded function.
__init__(self: woo.gl.VectorGlRep) -> None
-
val
(= Vector3(0, 0, 0))¶ Value to be rendered
[type: Vector3r]
-
relSz
(= 0.2)¶ Size of maximum-length arrows, relative to scene radius
[type: Real]
-
scaleExp
(= 1.0)¶ Exponent for scaling arrow size as
vector_norm^scaleExp
. NaN disables scaling (all arrows the same size).[type: Real]
-
range
(= None)¶ Extrema values for vector norm, to determine colors.
[type: shared_ptr<
ScalarRange
>]
ActReactGlRep¶
Object
→ NodeVisRep
→ VectorGlRep
→ ActReactGlRep
-
class
woo.gl.
ActReactGlRep
(*args, **kwargs)¶ Render action and reaction vectors as opposing arrows, with offset and optionally separate normal/shear components. The value is always given in node-local coordinates!
Overloaded function.
__init__(self: woo.gl.ActReactGlRep) -> None
__init__(self: woo.gl.ActReactGlRep, *args, **kwargs) -> None
-
comp
(= 3)¶ Which components of the force to show 0: x-only, 1: yz-only, 2: both as separate arrows, 3: both as one arrow.
[type: int]
-
comp_range
(= Vector2i(0, 3))¶ Range for comp
[type: Vector2i, not shown in the UI]
-
relOff
(= 0.01)¶ Offset from the node in the sense of local x-axis, relative to scene radius
[type: Real]
-
shearRange
(= None)¶ Optional range for shear foces; if not defined range (for normal force) is used instead.
[type: shared_ptr<
ScalarRange
>]
GlCPhysDispatcher¶
Object
→ Engine
→ Dispatcher
→ GlCPhysDispatcher
-
class
woo.gl.
GlCPhysDispatcher
(*args, **kwargs)¶ Dispatcher calling
functors
based on received argument type(s).Overloaded function.
__init__(self: woo.gl.GlCPhysDispatcher) -> None
__init__(self: woo.gl.GlCPhysDispatcher, *args, **kwargs) -> None
-
functors
(= [])¶ Functors active in the dispatch mechanism [overridden below].
[type: vector<shared_ptr<GlCPhysFunctor>>]
-
dispFunctor
(self: woo.gl.GlCPhysDispatcher, arg0: woo.dem.CPhys) → woo.gl.GlCPhysFunctor¶ Return functor that would be dispatched for given argument(s); None if no dispatch; ambiguous dispatch throws.
-
dispMatrix
(self: woo.gl.GlCPhysDispatcher, names: bool = True) → dict¶ Return dictionary with contents of the dispatch matrix.
Tip
Report issues or inclarities to github.