direct.directtools.DirectSelection

from direct.directtools.DirectSelection import DirectBoundingBox, DirectNodePath, SelectedNodePaths, SelectionQueue, SelectionRay, SelectionSegment, SelectionSphere

Inheritance diagram

Inheritance diagram of direct.directtools.DirectSelection

class DirectBoundingBox(nodePath, bboxColor=None)[source]

Bases: object

__init__(nodePath, bboxColor=None)[source]
computeBounds()[source]
computeTightBounds()[source]
createBBoxLines(bboxColor=None)[source]
getBounds()[source]
getCenter()[source]
getMax()[source]
getMin()[source]
getRadius()[source]
hide()[source]
recompute()[source]
setBoxColorScale(r, g, b, a)[source]
show()[source]
updateBBoxLines()[source]
vecAsString(vec)[source]
class DirectNodePath(nodePath, bboxColor=None)[source]

Bases: NodePath

__init__(nodePath, bboxColor=None)[source]
dehighlight()[source]
getCenter()[source]
getMax()[source]
getMin()[source]
getRadius()[source]
highlight(fRecompute=1)[source]
class SelectedNodePaths[source]

Bases: DirectObject

__init__()[source]
addTag(tag)[source]
dehighlightAll()[source]
deselect(nodePath)[source]

Deselect the specified node path

deselectAll()[source]
forEachDeselectedNodePathDo(func)[source]

Perform given func on deselected node paths. No node path connectivity verification performed

forEachSelectedNodePathDo(func)[source]

Perform given func on selected node paths. No node path connectivity verification performed

getDeselectedAsList()[source]
getDeselectedDict(id)[source]

Search deselectedDict for node path, try to repair broken node paths.

getDirectNodePath(nodePath)[source]
getNumSelected()[source]
getSelectedAsList()[source]

Return a list of all selected node paths. No verification of connectivity is performed on the members of the list

getSelectedDict(id)[source]

Search selectedDict for node path, try to repair broken node paths.

getWrt(nodePath)[source]
getWrtAll()[source]
highlightAll()[source]
isolateSelected()[source]
moveWrtWidget(nodePath)[source]
moveWrtWidgetAll()[source]
removeAll()[source]
removeSelected()[source]
removeTag(tag)[source]
reset()[source]
select(nodePath, fMultiSelect=0, fSelectTag=1)[source]

Select the specified node path. Multiselect as required

toggleVisAll()[source]
toggleVisSelected()[source]
class SelectionQueue(parentNP=None)[source]

Bases: CollisionHandlerQueue

__init__(parentNP=None)[source]
addCollider(collider)[source]
addUnpickable(item)[source]
collideWithBitMask(bitMask)[source]
collideWithGeom()[source]
collideWithWidget()[source]
findCollisionEntry(skipFlags=0, startIndex=0)[source]
findNextCollisionEntry(skipFlags=0)[source]
getCurrentEntry()[source]
isEntryBackfacing(entry)[source]
removeUnpickable(item)[source]
setCurrentEntry(entry)[source]
setCurrentIndex(index)[source]
setParentNP(parentNP)[source]
class SelectionRay(parentNP=None)[source]

Bases: SelectionQueue

__init__(parentNP=None)[source]
pick(targetNodePath, xy=None)[source]
pick3D(targetNodePath, origin, dir)[source]
pickBitMask(bitMask=0000 0000 0000 0000 0000 0000 0000 0000, targetNodePath=None, skipFlags=31)[source]
pickBitMask3D(bitMask=0000 0000 0000 0000 0000 0000 0000 0000, targetNodePath=None, origin=LPoint3f(0, 0, 0), dir=LVector3f(0, 0, -1), skipFlags=31)[source]
pickGeom(targetNodePath=None, skipFlags=31, xy=None)[source]
pickGeom3D(targetNodePath=None, origin=LPoint3f(0, 0, 0), dir=LVector3f(0, 0, -1), skipFlags=5)[source]
pickWidget(targetNodePath=None, skipFlags=0)[source]
class SelectionSegment(parentNP=None, numSegments=1)[source]

Bases: SelectionQueue

__init__(parentNP=None, numSegments=1)[source]
addCollider(collider)[source]
pickBitMask(bitMask=0000 0000 0000 0000 0000 0000 0000 0000, targetNodePath=None, endPointList=[], skipFlags=5)[source]
pickGeom(targetNodePath=None, endPointList=[], skipFlags=5)[source]
class SelectionSphere(parentNP=None, numSpheres=1)[source]

Bases: SelectionQueue

__init__(parentNP=None, numSpheres=1)[source]
addCollider(collider)[source]
isEntryBackfacing(entry)[source]
pick(targetNodePath, skipFlags)[source]
pickBitMask(bitMask=0000 0000 0000 0000 0000 0000 0000 0000, targetNodePath=None, skipFlags=5)[source]
pickGeom(targetNodePath=None, skipFlags=5)[source]
setCenter(i, center)[source]
setCenterRadius(i, center, radius)[source]
setRadius(i, radius)[source]