Panda3D
Classes | Functions | Variables
direct.directtools.DirectManipulation Namespace Reference

Classes

class  DirectManipulationControl
 
class  ObjectHandles
 

Functions

def addTag (self, tag)
 
def disableManipulation (self, allowSelectionOnly=False)
 
def disableWidgetMove (self)
 
def drawBox (lines, center, sideLength)
 
def drawMarquee (self, startX, startY)
 
def enableManipulation (self)
 
def enableWidgetMove (self)
 
def followSelectedNodePathTask (self, state)
 
def getEditTypes (self, objects)
 
def gridSnapping (self, nodePath, offset)
 
def manipulateObject (self)
 
def manipulateObjectCleanup (self)
 
def manipulateObjectTask (self, state)
 
def manipulationStart (self, modifiers)
 
def manipulationStop (self)
 
def plantSelectedNodePath (self)
 Utility functions ##. More...
 
def removeManipulateObjectTask (self)
 
def removeTag (self, tag)
 
def rotate1D (self, state)
 
def rotate2D (self, state)
 
def rotateAboutViewVector (self, state)
 
def scale1D (self, state)
 
def scale3D (self, state)
 
def scaleWidget (self, factor)
 
def spawnFollowSelectedNodePathTask (self)
 
def spawnManipulateObjectTask (self)
 
def supportMultiView (self)
 
def switchToLocalSpaceMode (self)
 
def switchToMoveMode (self, state)
 
def switchToWorldSpaceMode (self)
 
def toggleObjectHandlesMode (self)
 
def watchMarqueeTask (self, state)
 
def watchMouseTask (self, state)
 
def widgetCheck (self, type)
 
def xlate1D (self, state)
 WIDGET MANIPULATION METHODS ###. More...
 
def xlate2D (self, state)
 
def xlateCamXY (self, state)
 
def xlateCamXZ (self, state)
 FREE MANIPULATION METHODS ###. More...
 

Variables

 bb = geom.getBounds()
 
 bbc = bb.makeCopy()
 
 boundingSphereTest = marqueeFrustum.contains(bbc)
 
 constraint
 
 currEditTypes
 
 defaultSkipFlags
 ['. More...
 
 deltaNearX
 
 entry = base.direct.iRay.pickGeom(skipFlags = skipFlags)
 
 fAllowMarquee
 
 fAllowSelectionOnly
 
 fGridSnap
 
 fHitInit
 
 fll = Point3(min[0], max[1], min[2])
 
 flr = Point3(max[0], max[1], min[2])
 
 fManip
 
 fMovable
 
 fMultiView
 
 frontViewWidget
 
 fScaleInit
 
 fScaleInit1
 
 fScaling1D
 
 fScaling3D
 
 fSetCoa
 
 ful = Point3(min[0], max[1], max[2])
 
 fur = max
 
 fWidgetTop
 
 hitPtDist
 
 hitPtScale
 
 initScale
 
 initScaleMag
 
 lastCrankAngle
 
 leftViewWidget
 
 marquee
 
 marqueeInfo
 
 max = Point3(0)
 
 min = Point3(0)
 
 mode
 
 moveDir
 
 nll = min
 
 nlr = Point3(max[0], min[1], min[2])
 
 nodePath = findTaggedNodePath(geom)
 elif (skipFlags & SKIP_BACKFACE) and base.direct.iRay.isEntryBackfacing(): More...
 
 nul = Point3(min[0], min[1], max[2])
 
 nur = Point3(max[0], min[1], max[2])
 
 optionalSkipFlags
 
 origScale
 
 rotateAxis
 
 rotationCenter
 
 tbb = BoundingHexahedron(fll, flr, fur, ful, nll, nlr, nur, nul)
 
 tightBoundTest = marqueeFrustum.contains(tbb)
 
 tMat = Mat4(geom.getMat())
 
 topViewWidget
 
 unmovableTagList
 
 widgetList
 
 worldSpaceManip
 
 xlateSF
 

Function Documentation

◆ addTag()

def direct.directtools.DirectManipulation.addTag (   self,
  tag 
)

◆ disableManipulation()

def direct.directtools.DirectManipulation.disableManipulation (   self,
  allowSelectionOnly = False 
)

◆ disableWidgetMove()

def direct.directtools.DirectManipulation.disableWidgetMove (   self)

◆ drawBox()

def direct.directtools.DirectManipulation.drawBox (   lines,
  center,
  sideLength 
)

◆ drawMarquee()

def direct.directtools.DirectManipulation.drawMarquee (   self,
  startX,
  startY 
)

◆ enableManipulation()

def direct.directtools.DirectManipulation.enableManipulation (   self)

◆ enableWidgetMove()

def direct.directtools.DirectManipulation.enableWidgetMove (   self)

◆ followSelectedNodePathTask()

def direct.directtools.DirectManipulation.followSelectedNodePathTask (   self,
  state 
)

◆ getEditTypes()

def direct.directtools.DirectManipulation.getEditTypes (   self,
  objects 
)

◆ gridSnapping()

def direct.directtools.DirectManipulation.gridSnapping (   self,
  nodePath,
  offset 
)

◆ manipulateObject()

def direct.directtools.DirectManipulation.manipulateObject (   self)

◆ manipulateObjectCleanup()

def direct.directtools.DirectManipulation.manipulateObjectCleanup (   self)

◆ manipulateObjectTask()

def direct.directtools.DirectManipulation.manipulateObjectTask (   self,
  state 
)

◆ manipulationStart()

def direct.directtools.DirectManipulation.manipulationStart (   self,
  modifiers 
)

◆ manipulationStop()

def direct.directtools.DirectManipulation.manipulationStop (   self)

◆ plantSelectedNodePath()

def direct.directtools.DirectManipulation.plantSelectedNodePath (   self)

Utility functions ##.

Move selected object to intersection point of cursor on scene 

◆ removeManipulateObjectTask()

def direct.directtools.DirectManipulation.removeManipulateObjectTask (   self)

◆ removeTag()

def direct.directtools.DirectManipulation.removeTag (   self,
  tag 
)

◆ rotate1D()

def direct.directtools.DirectManipulation.rotate1D (   self,
  state 
)

◆ rotate2D()

def direct.directtools.DirectManipulation.rotate2D (   self,
  state 
)
Virtual trackball rotation of widget 

◆ rotateAboutViewVector()

def direct.directtools.DirectManipulation.rotateAboutViewVector (   self,
  state 
)

◆ scale1D()

def direct.directtools.DirectManipulation.scale1D (   self,
  state 
)

◆ scale3D()

def direct.directtools.DirectManipulation.scale3D (   self,
  state 
)

◆ scaleWidget()

def direct.directtools.DirectManipulation.scaleWidget (   self,
  factor 
)

◆ spawnFollowSelectedNodePathTask()

def direct.directtools.DirectManipulation.spawnFollowSelectedNodePathTask (   self)

◆ spawnManipulateObjectTask()

def direct.directtools.DirectManipulation.spawnManipulateObjectTask (   self)

◆ supportMultiView()

def direct.directtools.DirectManipulation.supportMultiView (   self)

◆ switchToLocalSpaceMode()

def direct.directtools.DirectManipulation.switchToLocalSpaceMode (   self)

◆ switchToMoveMode()

def direct.directtools.DirectManipulation.switchToMoveMode (   self,
  state 
)

◆ switchToWorldSpaceMode()

def direct.directtools.DirectManipulation.switchToWorldSpaceMode (   self)

◆ toggleObjectHandlesMode()

def direct.directtools.DirectManipulation.toggleObjectHandlesMode (   self)

◆ watchMarqueeTask()

def direct.directtools.DirectManipulation.watchMarqueeTask (   self,
  state 
)

◆ watchMouseTask()

def direct.directtools.DirectManipulation.watchMouseTask (   self,
  state 
)

◆ widgetCheck()

def direct.directtools.DirectManipulation.widgetCheck (   self,
  type 
)

◆ xlate1D()

def direct.directtools.DirectManipulation.xlate1D (   self,
  state 
)

WIDGET MANIPULATION METHODS ###.

◆ xlate2D()

def direct.directtools.DirectManipulation.xlate2D (   self,
  state 
)

◆ xlateCamXY()

def direct.directtools.DirectManipulation.xlateCamXY (   self,
  state 
)
Constrained 2D motion perpendicular to camera's image plane
This moves the object in the camera's XY plane if shift is held
Moves object toward camera if control is held

◆ xlateCamXZ()

def direct.directtools.DirectManipulation.xlateCamXZ (   self,
  state 
)

FREE MANIPULATION METHODS ###.

Constrained 2D motion parallel to the camera's image plane
This moves the object in the camera's XZ plane

Variable Documentation

◆ bb

bb = geom.getBounds()

◆ bbc

bbc = bb.makeCopy()

◆ boundingSphereTest

boundingSphereTest = marqueeFrustum.contains(bbc)

◆ constraint

constraint

◆ currEditTypes

currEditTypes

◆ defaultSkipFlags

defaultSkipFlags

['.

', self.objectHandles.multiplyScalingFactorBy, 2.0], ['>', self.objectHandles.multiplyScalingFactorBy, 2.0], [',', self.objectHandles.multiplyScalingFactorBy, 0.5], ['<', self.objectHandles.multiplyScalingFactorBy, 0.5],

◆ deltaNearX

deltaNearX

◆ entry

entry = base.direct.iRay.pickGeom(skipFlags = skipFlags)

◆ fAllowMarquee

fAllowMarquee

◆ fAllowSelectionOnly

fAllowSelectionOnly

◆ fGridSnap

fGridSnap

◆ fHitInit

fHitInit

◆ fll

fll = Point3(min[0], max[1], min[2])

◆ flr

flr = Point3(max[0], max[1], min[2])

◆ fManip

fManip

◆ fMovable

fMovable

◆ fMultiView

fMultiView

◆ frontViewWidget

frontViewWidget

◆ fScaleInit

fScaleInit

◆ fScaleInit1

fScaleInit1

◆ fScaling1D

fScaling1D

◆ fScaling3D

fScaling3D

◆ fSetCoa

fSetCoa

◆ ful

ful = Point3(min[0], max[1], max[2])

◆ fur

fur = max

◆ fWidgetTop

fWidgetTop

◆ hitPtDist

hitPtDist

◆ hitPtScale

hitPtScale

◆ initScale

initScale

◆ initScaleMag

initScaleMag

◆ lastCrankAngle

lastCrankAngle

◆ leftViewWidget

leftViewWidget

◆ marquee

marquee

◆ marqueeInfo

marqueeInfo

◆ max

max = Point3(0)

◆ min

min = Point3(0)

◆ mode

mode

◆ moveDir

moveDir

◆ nll

nll = min

◆ nlr

nlr = Point3(max[0], min[1], min[2])

◆ nodePath

nodePath = findTaggedNodePath(geom)

elif (skipFlags & SKIP_BACKFACE) and base.direct.iRay.isEntryBackfacing():

Skip, if backfacing poly

pass

◆ nul

nul = Point3(min[0], min[1], max[2])

◆ nur

nur = Point3(max[0], min[1], max[2])

◆ optionalSkipFlags

optionalSkipFlags

◆ origScale

origScale

◆ rotateAxis

rotateAxis

◆ rotationCenter

rotationCenter

◆ tbb

◆ tightBoundTest

tightBoundTest = marqueeFrustum.contains(tbb)

◆ tMat

tMat = Mat4(geom.getMat())

◆ topViewWidget

topViewWidget

◆ unmovableTagList

unmovableTagList

◆ widgetList

widgetList

◆ worldSpaceManip

worldSpaceManip

◆ xlateSF

xlateSF