LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-10-2008, 02:14 PM   #1
gvp87
Member
 
Registered: Mar 2007
Location: Boston
Distribution: Ubuntu Gutsy
Posts: 50

Rep: Reputation: 15
Soya3D - problems animating rotation


I've been finding it very difficult to use Soya, due to it's lack of current documentation. I've been looking at the examples that are provided and not many of them work.

I'm trying to write a very simple program - a spinning cube.

I can't get it to spin!!

Here's my code so far:

import sys, os, os.path, soya, soya.cube
soya.init()

#loads the scene
scene = soya.World()

#Initializes the color of the cube
color = soya.Material()
color.emissive = (0.0, 1.0, 0.0, 0.0)

CUBE = soya.cube.Cube(scene, color)

class RotatingBody(soya.cube):

def advance_time(self, proportion):
soya.cube.Cube.advance_time(self, proportion)
self.rotate_y(proportion * 5.0)

spin = RotatingBody(CUBE)

camera = soya.Camera(scene)
camera.z = 3.0
soya.set_root_widget(camera)

soya.MainLoop(scene).main_loop()


This is the error message that I'm getting:
class RotatingBody(soya.cube):
TypeError: Error when calling the metaclass bases
module.__init__() takes at most 2 arguments (3 given)
* Soya3D * Quit...

This program is modelled [almost exactly] after one of the examples on the Soya3D homepage - the actual example loads a 3D sword and spins it.


giuseppe

also, the proper indentation is present, just not really showing up in this forum

Last edited by gvp87; 04-10-2008 at 02:16 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to install flash animating software in linux soumalya Linux - Software 1 01-04-2007 05:44 AM
X Server Animating Everything Too Quickly RAdams Ubuntu 2 08-30-2006 02:23 AM
wallpaper rotation RedRaven Fedora 2 01-05-2005 09:20 AM
Animating Software for linux ZingSter Linux - Software 1 10-15-2004 01:46 PM
animating jpgs to mpg? sk8guitar Linux - General 2 07-15-2004 07:16 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration