WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 01-11-2005, 12:36 PM
Johannes Johannes is offline
Member
 
Join Date: Jan 2005
Posts: 143
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
Reply With Quote
  #2  
Old 01-11-2005, 12:50 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
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
Reply With Quote
  #3  
Old 01-11-2005, 02:56 PM
Johannes Johannes is offline
Member
 
Join Date: Jan 2005
Posts: 143
Thank you!
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 04:13 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC