Panda3D

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

## Public Member Functions
| __init__ (self, gridSize=100.0, gridSpacing=5.0, planeColor=(0.5, 0.5, 0.5, 0.5), parent=None)
| computeSnapAngle (self, angle)
| computeSnapPoint (self, point)
| disable (self)
| enable (self, parent=None)
| getGridSize (self)
| getGridSpacing (self)
| getHprSnap (self)
| getSnapAngle (self)
| getXyzSnap (self)
| isEnabled (self)
| setGridSize (self, size)
| setGridSpacing (self, spacing)
| setHprSnap (self, fSnap)
| setSnapAngle (self, angle)
| setXyzSnap (self, fSnap)
| toggleGrid (self, parent=None)
| updateGrid (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
| centerLines = LineNodePath(self.lines)
int | fEnabled = 1
int | fHprSnap = 1
int | fXyzSnap = 1
| gridBack = loader.loadModel('models/misc/gridBack')
| gridSize = gridSize
| gridSpacing = gridSpacing
| lines = self.attachNewNode('gridLines')
| majorLines = LineNodePath(self.lines)
| minorLines = LineNodePath(self.lines)
float | snapAngle = 15.0
| snapMarker = loader.loadModel('models/misc/sphere')
| snapPos = Point3(0)

## Additional Inherited Members
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
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,
|  |  | gridSize = 100.0,
|  |  | gridSpacing = 5.0,
|  |  | planeColor = (0.5,0.5,0.5,0.5),
|  |  | parent = None )

## Member Function Documentation

## ◆ computeSnapAngle()

computeSnapAngle | ( |  | self,
|  |  | angle )

## ◆ computeSnapPoint()

computeSnapPoint | ( |  | self,
|  |  | point )

## ◆ disable()

disable | ( |  | self | ) |

## ◆ enable()

enable | ( |  | self,
|  |  | parent = None )

## ◆ getGridSize()

getGridSize | ( |  | self | ) |

## ◆ getGridSpacing()

getGridSpacing | ( |  | self | ) |

## ◆ getHprSnap()

getHprSnap | ( |  | self | ) |

## ◆ getSnapAngle()

getSnapAngle | ( |  | self | ) |

## ◆ getXyzSnap()

getXyzSnap | ( |  | self | ) |

## ◆ isEnabled()

isEnabled | ( |  | self | ) |

## ◆ setGridSize()

setGridSize | ( |  | self,
|  |  | size )

## ◆ setGridSpacing()

setGridSpacing | ( |  | self,
|  |  | spacing )

## ◆ setHprSnap()

setHprSnap | ( |  | self,
|  |  | fSnap )

## ◆ setSnapAngle()

setSnapAngle | ( |  | self,
|  |  | angle )

## ◆ setXyzSnap()

setXyzSnap | ( |  | self,
|  |  | fSnap )

## ◆ toggleGrid()

toggleGrid | ( |  | self,
|  |  | parent = None )

## ◆ updateGrid()

updateGrid | ( |  | self | ) |

## Member Data Documentation

## ◆ centerLines

centerLines = LineNodePath(self.lines)

## ◆ fEnabled

int fEnabled = 1

## ◆ fHprSnap

int fHprSnap = 1

## ◆ fXyzSnap

int fXyzSnap = 1

## ◆ gridBack

gridBack = loader.loadModel('models/misc/gridBack')

## ◆ gridSize

gridSize = gridSize

## ◆ gridSpacing

gridSpacing = gridSpacing

## ◆ lines

lines = self.attachNewNode('gridLines')

## ◆ majorLines

majorLines = LineNodePath(self.lines)

## ◆ minorLines

minorLines = LineNodePath(self.lines)

## ◆ snapAngle

snapAngle = 15.0

## ◆ snapMarker

snapMarker = loader.loadModel('models/misc/sphere')

## ◆ snapPos

snapPos = Point3(0)