![]() |
#1
|
|||
|
|||
use vizard object oriented
If I want to create Ball-Objects e.g.
class Ball: def __init__(self,ballName): self.speed = 0 self._name=ballName self.x0=0 self.y0=2 self.z0=1 self.alpha=0 self.ball = viz.add('../resources/models/ball.wrl') def translate1 (self): self.ball.translate(self.x0, self.y0, self.z0) def collidingwith (self, object, eins=1): self.ball.collidingwith(object, eins) Do I have to define all vizard-built-in-functions again (as in the code example translate or collidingwith - or is there an easier way to do it? Johannes |
#2
|
|||
|
|||
Hi,
The following link describes how to create subclasses of Vizard objects. I believe this will answer your question: http://www.worldviz.com/forum/showth...=&threadid=241 |
#3
|
|||
|
|||
Thank you!
|
![]() |
|
|