WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Old 01-11-2005, 12:36 PM
Johannes Johannes is offline
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.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?

Reply With Quote
Old 01-11-2005, 12:50 PM
farshizzo farshizzo is offline
WorldViz Team Member
Join Date: Mar 2003
Posts: 2,849

The following link describes how to create subclasses of Vizard objects. I believe this will answer your question:
Reply With Quote
Old 01-11-2005, 02:56 PM
Johannes Johannes is offline
Join Date: Jan 2005
Posts: 143
Thank you!
Reply With Quote

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 02:02 PM.

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