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__(self, nodePath, bboxColor=None)[source]
computeBounds(self)[source]
computeTightBounds(self)[source]
createBBoxLines(self, bboxColor=None)[source]
getBounds(self)[source]
getCenter(self)[source]
getMax(self)[source]
getMin(self)[source]
getRadius(self)[source]
hide(self)[source]
recompute(self)[source]
setBoxColorScale(self, r, g, b, a)[source]
show(self)[source]
updateBBoxLines(self)[source]
vecAsString(self, vec)[source]
class DirectNodePath(nodePath, bboxColor=None)[source]

Bases: NodePath

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

Bases: DirectObject

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

Deselect the specified node path

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

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

forEachSelectedNodePathDo(self, func)[source]

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

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

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

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

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

getSelectedDict(self, id)[source]

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

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

Select the specified node path. Multiselect as required

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

Bases: CollisionHandlerQueue

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

Bases: SelectionQueue

__init__(self, parentNP=None)[source]
pick(self, targetNodePath, xy=None)[source]
pick3D(self, targetNodePath, origin, dir)[source]
pickBitMask(self, bitMask= 0000 0000 0000 0000 0000 0000 0000 0000, targetNodePath=None, skipFlags=31)[source]
pickBitMask3D(self, 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(self, targetNodePath=None, skipFlags=31, xy=None)[source]
pickGeom3D(self, targetNodePath=None, origin=LPoint3f(0, 0, 0), dir=LVector3f(0, 0, -1), skipFlags=5)[source]
pickWidget(self, targetNodePath=None, skipFlags=0)[source]
class SelectionSegment(parentNP=None, numSegments=1)[source]

Bases: SelectionQueue

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

Bases: SelectionQueue

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