TGeoPainter

TGeoPainter

(private) new TGeoPainter(dom, obj)

Painter class for geometries drawing

Source:
Parameters:
Name Type Description
dom object | string

DOM element for drawing or element id

obj object

supported TGeo object

Methods

(private) accessObjectWireFrame()

either change mesh wireframe or return current value

Source:
Returns:

undefined when wireframe cannot be accessed

activateInBrowser()

Activate specified items in the browser

Source:

addExtra()

Register extra objects like tracks or hits

Description:
  • Rendered after main geometry volumes are created Check if object already exists to prevent duplication

Source:

addHighlightHandler()

Add handler which will be called when element is highlighted in geometry drawing

Description:
  • Handler should have highlightMesh function with same arguments as TGeoPainter

Source:

addOrbitControls()

Add orbit control

Source:

addToExtrasContainer()

add object to extras container.

Description:
  • If fail, dispose object

Source:

adjustCameraPosition(arg, keep_zoom)

Place camera to default position,

Source:
Parameters:
Name Type Description
arg

true forces camera readjustment, 'first' is called when suppose to be first after complete drawing

keep_zoom

tries to keep zomming factor of the camera

appendMoreNodes()

used by geometry viewer to show more nodes

Description:
  • These nodes excluded from selection logic and always inserted into the model Shape already should be created and assigned to the node

Source:

assignClones()

Assign clones, created outside.

Description:
  • Used by geometry painter, where clones are handled by the server

Source:

autorotate()

actiavte auto rotate

Source:

calculateZoom()

Calculates current zoom factor

Source:

canRotateCamera()

Returns if camera can rotated

Source:

(private) canSubmitToWorker()

check if one can submit request to worker

Source:

changeCamera()

Handle change of camera kind

Source:

changeCanRotate()

Handle change of can rotate

Source:

(private) changeDarkMode()

Function callled by framework when dark mode is changed

Source:

changeMaterialProperty()

Change for all materials that property

Source:

(private) changeStage()

Change drawing stage

Source:

changedAutoRotate()

Should be called when autorotate property changed

Source:

changedAxes()

Method should be called when changing axes drawing

Source:

changedBackground()

Method should be called to change background color

Source:

changedClipping()

Should be called when configuration of particular axis is changed

Source:

changedDepthMethod()

Should be called when depth method is changed

Source:

changedDepthTest()

Should be called when depth test flag is changed

Source:

changedGlobalTransparency(transparency, skip_renderopt)

Method used to set transparency for all geometrical shapes

Source:
Parameters:
Name Type Attributes Description
transparency number | function

one could provide function

skip_render boolean <optional>

if specified, do not perform rendering

changedHighlight()

Should be called when configuration of highlight is changed

Source:

changedLight()

Should be invoked when light configuration changed

Source:

changedMaterial()

Method used to interactively change material kinds

Source:

changedTransformation()

Method should be called when transformation parameters were changed

Source:

changedUseFog()

Change use fog property

Source:

(private) changedWireFrame()

handle wireframe flag change in GUI

Source:

checkResize()

Check if HTML element was resized and drawing need to be adjusted

Source:

cleanup()

Cleanup geometry painter

Source:

clearDrawings()

Cleanup TGeo drawings

Source:

clearExtras()

clear extra drawn objects like tracks or hits

Source:

(async) completeDraw() → {Promise}

Completes drawing procedure

Source:
Returns:

for ready

Type
Promise

completeScene()

called at the end of scene drawing

Source:

continueDraw()

Reentrant method to perform geometry drawing step by step

Source:

createCamera()

Create configured camera

Source:

createEntryMesh()

Insert appropriate mesh for given entry

Source:

(async) createScene()

Initial scene creation

Source:

createSnapshot()

Create png image with drawing snapshot.

Source:

createSpecialEffects()

Create special effects

Source:

createToolbar()

Create toolbar

Source:

decodeOptions()

Decode drawing options

Source:

doProjection()

Create geometry projection

Source:

drawAxes()

Draw axes if configured, otherwise just remove completely

Source:

drawAxesAndOverlay()

Draw axes and camera overlay

Source:

(async) drawCount() → {Promise}

Drawing with 'count' option

Description:
  • Scans hieararchy and check for unique nodes

Source:
Returns:

with object drawing ready

Type
Promise

drawEveTrack()

Drawing TEveTrack

Source:

drawExtraShape()

Draw extra shape on the geometry

Source:

(async) drawExtras() → {Promise}

Draw extra object like tracks

Source:
Returns:

for ready

Type
Promise

drawGeoTrack()

drawing TGeoTrack

Source:

(async) drawHit()

Drawing different hits types like TPolyMarker3D

Source:

drawOverlay()

Draw overlay for the orthographic cameras

Source:

drawPolyLine()

drawing TPolyLine3D

Source:

ensureBloom()

create bloom effect

Source:

(private) exitVRMode()

Exit VR mode

Source:

extendCustomBoundingBox()

Extend custom geometry bounding box

Source:

(private) extraObjectVisible()

manipulate visisbility of extra objects, used for HierarchyPainter

Source:

extractRawShapes()

Extract shapes from draw message of geometry painter

Description:
  • For the moment used in batch production

Source:

fillContextMenu()

Fill context menu

Source:

filterIntersects()

Filter some objects from three.js intersects array

Source:

(private) findNodeWithVolume()

Serach for specified node

Source:

focusCamera()

focus camera on speicifed position

Source:

focusOnItem()

focus on item

Source:

getExtrasContainer()

returns container for extra objects

Source:

getGeomBoundingBox()

Calculate geometry bounding box

Source:

getGeometry()

Returns main geometry object

Source:

getOverallSize()

returns maximal dimension

Source:

getProjectionSource()

Returns hierarchy of 3D objects used to produce projection.

Description:
  • Typically external master painter is used, but also internal data can be used

Source:

getStackFullName()

Returns stack full name

Description:
  • Includes item name of top geo object

Source:

highlightMesh()

perform mesh highlight

Source:

(private) initVRControllersGeometry()

Init VR controllers geometry

Source:

initVRMode()

Initialize VR mode

Source:

isDrawingReady()

Returns true if geometry drawing is completed

Source:

isOrthoCamera()

Returns true if orthogarphic camera is used

Source:

isStage()

Check drawing stage

Source:

(async) loadMacro()

Process script option - load and execute some gGeoManager-related calls

Source:

modifyVisisbility()

Modify visibility of provided node by name

Source:

mouseOverHierarchy()

function called when mouse is going over the item in the browser

Source:

nextDrawAction()

Main function in geometry creation loop

Description:
  • Returns:

    • false when nothing todo
    • true if one could perform next action immediately
    • 1 when call after short timeout required
    • 2 when call must be done from processWorkerReply
Source:

(private) orbitContext()

Show context menu for orbit control

Source:

(async) performDrop() → {Promise}

Handle drop operation

Description:
  • opt parameter can include function name like opt$func_name Such function should be possible to find via findFunction Function has to return Promise with objects to draw on geometry By default function with name 'extract_geo_tracks' is checked

Source:
Returns:

handling of drop operation

Type
Promise

performResize()

perform resize

Source:

(async) prepareObjectDraw()

Prepare drawings

Description:
  • Return value used as promise for painter

Source:

processMouseClick()

handle mouse click event

Source:

(private) processVRControllerIntersections()

Process VR controller intersection

Source:

(private) processWorkerReply()

process reply from worker

Source:

produceCameraUrl()

Returns url parameters defining camera position.

Description:
  • Either absolute position are provided (arg === true) or zoom, roty, rotz parameters

Source:

redraw()

Redraw TGeo object inside TPad

Source:

redrawObject()

Redraw TGeo object

Source:

removeDrawnNode()

Remove already drawn node. Used by geom viewer

Source:

render3D(tmout, measureopt) → {Promise}

Call 3D rendering of the geometry

Description:
  • Timeout used to avoid multiple rendering of the picture when several 3D drawings superimposed with each other. If tmeout <= 0, rendering performed immediately Several special values are used: -1 - force recheck of rendering order based on camera position

Source:
Parameters:
Name Type Attributes Description
tmout

specifies delay, after which actual rendering will be invoked

measure <optional>

when true, for the first time printout rendering time

Returns:

when tmout bigger than 0 is specified

Type
Promise

resetAdvanced()

reset all kind of advanced features like depth test

Source:

resetTransformation()

Reset transformation

Source:

resolveStack()

Resolve stack

Source:

setAutoRotate()

Set auto rotate mode

Source:

setAxesDraw()

Set axes visibility 0 - off, 1 - on, 2 - centered

Source:

setCameraPosition()

Specifies camera position as rotation around geometry center

Source:

setCameraPositionAndLook()

Specifies camera position and point to which it looks to

Description:
  • Both specified in absolute coordinates

Source:

(private) setCompleteHandler()

Assign callback, invoked every time when drawing is completed

Description:
  • Used together with web-based geometry viewer

Source:

setDepthMethod(method)

Configure depth method, used for render order production.

Source:
Parameters:
Name Type Description
method string

Allowed values: 'ray', 'box','pnt', 'size', 'dflt'

setMouseTmout()

Configure mouse delay, required for complex geometries

Source:

setShowTop()

Specify showtop draw options, relevant only for TGeoManager

Source:

setWireFrame()

Specify wireframe mode

Source:

showControlGui()

Display control GUI

Source:

showDrawInfo()

methods show info when first geometry drawing is performed

Source:

showMaterialDocu()

show material docu

Source:

startDrawGeometry()

Start geometry drawing

Source:

startRedraw()

Start geometry redraw

Source:

startWorker()

Start geo worker

Source:

(private) submitToWorker()

submit request to worker

Source:

testCameraPosition(force)

Checks camera position and recalculate rendering order if needed

Source:
Parameters:
Name Type Description
force

if specified, forces calculations of render order

testCameraPositionChange()

test camera position

Description:
  • function analyzes camera position and start redraw of geometry if objects in view may be changed

Source:

(private) testGeomChanges()

start draw geometries on master and all slaves

Source:

testMatrixes()

method used to check matrix calculations performance with current three.js model

Source:

toggleEnlarge()

Toggle enlarge state

Source:

(private) toggleVRMode()

Toggle VR mode

Source:

toggleWireFrame()

Toggle wireframe mode

Source:

updateClipping()

Assign clipping attributes to the meshes - supported only for webgl

Source:

updateObject()

Update object in geo painter

Source:

(private) updateVRControllers()

Update VR controllers

Source:

(private) updateVRControllersList()

Update VR controllers list

Source:

(async, static) draw()

draw TGeo object

Source: