Panda3D

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
DirectJoybox Class Reference
Inheritance diagram for DirectJoybox:

## Public Member Functions
| __init__ (self, device='CerealBox', nodePath=base.direct.camera, headingNP=base.direct.camera)
| acceptSwitchModeEvent (self, button=R_UPPER)
| acceptUprightCameraEvent (self, button=L_UPPER)
| addButtonEvents (self)
| basicMode (self)
| demoMode (self)
| destroy (self)
| disable (self)
| driveMode (self)
| enable (self)
| fpsMode (self)
| getEventName (self, index)
| getHprMultiplier (self)
| getNodePath (self)
| getRefCS (self)
| getXyzMultiplier (self)
| hprXyzMode (self)
| ignoreSwitchModeEvent (self, button=R_UPPER)
| ignoreUprightCameraEvent (self, button=L_UPPER)
| joeMode (self)
| joyboxFly (self)
| lookAroundMode (self)
| lookAtMode (self)
| lucMode (self)
| mopathMode (self)
| normalizeChannel (self, chan, minVal=-1, maxVal=1)
| nullFly (self)
| nullMode (self)
| orbitFly (self)
| orbitMode (self)
| orbitNode (self, h, p, r)
| planetFly (self)
| planetMode (self, auxData=[])
| setHeadingNodePath (self, np)
| setHprMultiplier (self, multiplier)
| setMode (self, func, name)
| setNodePath (self, nodePath)
| setRefCS (self, refCS)
| setRotateInPlace (self, enabled)
| setUseHeadingNP (self, enabled)
| setXyzMultiplier (self, multiplier)
| showMode (self, modeText)
| spaceFly (self)
| spaceMode (self)
| switchMode (self)
| tankFly (self)
| tankMode (self)
| updateTask (self, state)
| updateVals (self)
| updateValsUnrolled (self)
| walkthruMode (self)
Public Member Functions inherited from DirectObject
| __init__ (self)
| accept (self, event, method, extraArgs=[])
| acceptOnce (self, event, method, extraArgs=[])
| addTask (self, *args, **kwargs)
| detectLeaks (self)
| doMethodLater (self, *args, **kwargs)
| getAllAccepting (self)
| ignore (self, event)
| ignoreAll (self)
| isAccepting (self, event)
| isIgnoring (self, event)
| removeAllTasks (self)
| removeTask (self, taskOrName)

## Public Attributes
list | aList = [0, 0, 0, 0, 0, 0, 0, 0]
| analogs = base.direct.deviceManager.createAnalogs(self.device)
list | auxData = []
list | bList = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
| breg = ButtonRegistry.ptr()
| buttons = base.direct.deviceManager.createButtons(self.device)
| deltaTime = cTime - self.lastTime
| device = device
| eventThrower
| floatingNP = NodePath("floating")
| headingNP = headingNP
| joyboxFly = [1, 1, 1, -1, -1, 0]
| lastTime = globalClock.getFrameTime()
list | mapping
list | modeFunc = self.modeList[0]
list | modeList = [self.joeMode, self.driveMode, self.orbitMode]
str | modeName = 'Joe Mode'
list | modifier = [1, 1, 1, -1, -1, 0]
str | name = 'Joybox-' + repr(DirectJoybox.joyboxCount)
| nodePath = nodePath
| nullFly
| orbitFly
| planetFly = auxData
| readout
| refCS = base.direct.cameraControl.coaMarker
bool | rotateInPlace = False
| spaceFly
| switchMode
| tankFly
| tempCS = base.direct.group.attachNewNode('JoyboxTempCS')
| updateFunc = self.joyboxFly
| updateTask
bool | useHeadingNP = False

## Static Public Attributes
float | hprMultiplier = 1.0
int | joyboxCount = 0
float | xyzMultiplier = 1.0
Static Public Attributes inherited from DirectObject
| accept_once = acceptOnce
| add_task = addTask
| detect_leaks = detectLeaks
| do_method_later = doMethodLater
| get_all_accepting = getAllAccepting
| ignore_all = ignoreAll
| is_accepting = isAccepting
| is_ignoring = isIgnoring
| remove_all_tasks = removeAllTasks
| remove_task = removeTask

## Additional Inherited Members
Protected Member Functions inherited from DirectObject
| _addTask (self, task)
| _clearTask (self, task)
Protected Attributes inherited from DirectObject
dict | _taskList = {}

## Constructor & Destructor Documentation

## ◆ __init__()

__init__ | ( |  | self,
|  |  | device = 'CerealBox',
|  |  | nodePath = base.direct.camera,
|  |  | headingNP = base.direct.camera )

## Member Function Documentation

## ◆ acceptSwitchModeEvent()

acceptSwitchModeEvent | ( |  | self,
|  |  | button = R_UPPER )

## ◆ acceptUprightCameraEvent()

acceptUprightCameraEvent | ( |  | self,
|  |  | button = L_UPPER )

## ◆ addButtonEvents()

addButtonEvents | ( |  | self | ) |

## ◆ basicMode()

basicMode | ( |  | self | ) |

## ◆ demoMode()

demoMode | ( |  | self | ) |

## ◆ destroy()

destroy | ( |  | self | ) |

## ◆ disable()

disable | ( |  | self | ) |

## ◆ driveMode()

driveMode | ( |  | self | ) |

## ◆ enable()

enable | ( |  | self | ) |

## ◆ fpsMode()

fpsMode | ( |  | self | ) |

## ◆ getEventName()

getEventName | ( |  | self,
|  |  | index )

## ◆ getHprMultiplier()

getHprMultiplier | ( |  | self | ) |

## ◆ getNodePath()

getNodePath | ( |  | self | ) |

## ◆ getRefCS()

getRefCS | ( |  | self | ) |

## ◆ getXyzMultiplier()

getXyzMultiplier | ( |  | self | ) |

## ◆ hprXyzMode()

hprXyzMode | ( |  | self | ) |

## ◆ ignoreSwitchModeEvent()

ignoreSwitchModeEvent | ( |  | self,
|  |  | button = R_UPPER )

## ◆ ignoreUprightCameraEvent()

ignoreUprightCameraEvent | ( |  | self,
|  |  | button = L_UPPER )

## ◆ joeMode()

joeMode | ( |  | self | ) |

## ◆ joyboxFly()

joyboxFly | ( |  | self | ) |

## ◆ lookAroundMode()

lookAroundMode | ( |  | self | ) |

## ◆ lookAtMode()

lookAtMode | ( |  | self | ) |

## ◆ lucMode()

lucMode | ( |  | self | ) |

## ◆ mopathMode()

mopathMode | ( |  | self | ) |

## ◆ normalizeChannel()

normalizeChannel | ( |  | self,
|  |  | chan,
|  |  | minVal = -1,
|  |  | maxVal = 1 )

## ◆ nullFly()

nullFly | ( |  | self | ) |

## ◆ nullMode()

nullMode | ( |  | self | ) |

## ◆ orbitFly()

orbitFly | ( |  | self | ) |

## ◆ orbitMode()

orbitMode | ( |  | self | ) |

## ◆ orbitNode()

orbitNode | ( |  | self,
|  |  | h,
|  |  | p,
|  |  | r )

## ◆ planetFly()

planetFly | ( |  | self | ) |

## ◆ planetMode()

planetMode | ( |  | self,
|  |  | auxData = [] )

## ◆ setHeadingNodePath()

setHeadingNodePath | ( |  | self,
|  |  | np )

## ◆ setHprMultiplier()

setHprMultiplier | ( |  | self,
|  |  | multiplier )

## ◆ setMode()

setMode | ( |  | self,
|  |  | func,
|  |  | name )

## ◆ setNodePath()

setNodePath | ( |  | self,
|  |  | nodePath )

## ◆ setRefCS()

setRefCS | ( |  | self,
|  |  | refCS )

## ◆ setRotateInPlace()

setRotateInPlace | ( |  | self,
|  |  | enabled )

## ◆ setUseHeadingNP()

setUseHeadingNP | ( |  | self,
|  |  | enabled )

## ◆ setXyzMultiplier()

setXyzMultiplier | ( |  | self,
|  |  | multiplier )

## ◆ showMode()

showMode | ( |  | self,
|  |  | modeText )

## ◆ spaceFly()

spaceFly | ( |  | self | ) |

## ◆ spaceMode()

spaceMode | ( |  | self | ) |

## ◆ switchMode()

switchMode | ( |  | self | ) |

## ◆ tankFly()

tankFly | ( |  | self | ) |

## ◆ tankMode()

tankMode | ( |  | self | ) |

## ◆ updateTask()

updateTask | ( |  | self,
|  |  | state )

## ◆ updateVals()

updateVals | ( |  | self | ) |

## ◆ updateValsUnrolled()

updateValsUnrolled | ( |  | self | ) |

## ◆ walkthruMode()

walkthruMode | ( |  | self | ) |

## Member Data Documentation

## ◆ aList

list aList = [0, 0, 0, 0, 0, 0, 0, 0]

## ◆ analogs

analogs = base.direct.deviceManager.createAnalogs(self.device)

## ◆ auxData

list auxData = []

## ◆ bList

list bList = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

## ◆ breg

breg = ButtonRegistry.ptr()

## ◆ buttons

buttons = base.direct.deviceManager.createButtons(self.device)

## ◆ deltaTime

deltaTime = cTime - self.lastTime

## ◆ device

device = device

## ◆ eventThrower

eventThrower

Initial value:
= self.buttons.getNodePath().attachNewNode(
ButtonThrower('JB Button Thrower'))

## ◆ floatingNP

floatingNP = NodePath("floating")

## ◆ headingNP

headingNP = headingNP

## ◆ hprMultiplier

float hprMultiplier = 1.0
| static

## ◆ joyboxCount

int joyboxCount = 0
| static

## ◆ joyboxFly

joyboxFly = [1, 1, 1, -1, -1, 0]

## ◆ lastTime

lastTime = globalClock.getFrameTime()

## ◆ mapping

list mapping

Initial value:
= [R_LEFT_RIGHT, R_FWD_BACK, L_FWD_BACK,
R_TWIST, L_TWIST, NULL_AXIS]

## ◆ modeFunc

list modeFunc = self.modeList[0]

## ◆ modeList

list modeList = [self.joeMode, self.driveMode, self.orbitMode]

## ◆ modeName

modeName = 'Joe Mode'

## ◆ modifier

list modifier = [1, 1, 1, -1, -1, 0]

## ◆ name

str name = 'Joybox-' + repr(DirectJoybox.joyboxCount)

## ◆ nodePath

nodePath = nodePath

## ◆ nullFly

nullFly

## ◆ orbitFly

orbitFly

## ◆ planetFly

planetFly = auxData

## ◆ readout

readout

Initial value:
= OnscreenText.OnscreenText(
pos = (-0.9, 0.95),
font = base.direct.font,
mayChange = 1)

## ◆ refCS

refCS = base.direct.cameraControl.coaMarker

## ◆ rotateInPlace

rotateInPlace = False

## ◆ spaceFly

spaceFly

## ◆ switchMode

switchMode

## ◆ tankFly

tankFly

## ◆ tempCS

tempCS = base.direct.group.attachNewNode('JoyboxTempCS')

## ◆ updateFunc

updateFunc = self.joyboxFly

## ◆ updateTask

updateTask

## ◆ useHeadingNP

bool useHeadingNP = False

## ◆ xyzMultiplier

float xyzMultiplier = 1.0
| static