Panda3D
Loading...
Searching...
No Matches
OnscreenGeom Class Reference
Inheritance diagram for OnscreenGeom:
DirectObject

Public Member Functions

 __init__ (self, geom=None, pos=None, hpr=None, scale=None, color=None, parent=None, sort=0)
 
 __setitem__ (self, key, value)
 
 cget (self, option)
 
 configure (self, option=None, **kw)
 
 destroy (self)
 
 getGeom (self)
 
 setGeom (self, geom, parent=NodePath(), transform=None, sort=0, color=None)
 
- 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)
 

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,
geom = None,
pos = None,
hpr = None,
scale = None,
color = None,
parent = None,
sort = 0 )
Make a geom node from string or a node path,
put it into the 2d sg and set it up with all the indicated parameters.

The parameters are as follows:

  geom: the actual geometry to display or a file name.
        This may be omitted and specified later via setGeom()
        if you don't have it available.

  pos: the x, y, z position of the geometry on the screen.
       This maybe a 3-tuple of floats or a vector.
       y should be zero

  hpr: the h, p, r of the geometry on the screen.
       This maybe a 3-tuple of floats or a vector.

  scale: the size of the geometry.  This may either be a single
         float, a 3-tuple of floats, or a vector, specifying a
         different x, y, z scale.  y should be 1

  color: the (r, g, b, a) color of the geometry.  This is
         normally a 4-tuple of floats or ints.

  parent: the NodePath to parent the geometry to initially.

Member Function Documentation

◆ __setitem__()

__setitem__ ( self,
key,
value )

◆ cget()

cget ( self,
option )

◆ configure()

configure ( self,
option = None,
** kw )

◆ destroy()

destroy ( self)

◆ getGeom()

getGeom ( self)

◆ setGeom()

setGeom ( self,
geom,
parent = NodePath(),
transform = None,
sort = 0,
color = None )