Crystal Space
Welcome, Guest. Please login or register.
April 18, 2014, 05:09:50 am

Login with username, password and session length
Search:     Advanced search
8990 Posts in 2037 Topics by 7594 Members
Latest Member: Wandagarcia
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  Support
| | |-+  Help a newbie please!
« previous next »
Pages: [1] Print
Author Topic: Help a newbie please!  (Read 1412 times)
didu
Newbie
*
Posts: 5


View Profile Email
« on: November 17, 2007, 01:06:18 pm »

Hi guys,

I'm reasonably familiar with computer graphics technology, but totally new to crystal space (CS).
I've been trying to do something very simple with CS but have been totally unsuccessful.

I'm a python lover, so I will be accessing the CS library only through its python bindings. All I want
to do for now is display a single mesh loaded from the HD on the screen, and I haven't been able to do so.

I have successfully followed the code from scripts/python/pyceguitest.py, and my code can do exactly what
the the example script does, but no more.

In my code, I use iThing to load my mesh, I can load the mesh, I can query the mesh from the iSector object it's
displayed in, I can get the radius and center of the mesh, but I just cannot see the mesh because as soon as
the mesh gets into the view of the camera, the program would segfault!!

There really isn't that many python examples around. So, could you guys please have a look at my code and let
me know what I'm doing wrong?

The main python script is called Monopoly.py.

The customized mesh file is called cube.mesh.

The data and code can be downloaded from: http://www.csse.unimelb.edu.au/~jingy/download/Monopoly.tar

Once you untarred the file, it will create a directory called Monopoly, you need to go into that directory to run the code. If you have the python bindings installed, you can run the script using the command:

python Monopoly.py

The functions that I use to load and display my own customized mesh are:

createMeshModelFromFile
createIMeshFactory
initialiseWorld

The custom mesh is a python pickled object and it's just a cube with 12 triangles.

I'm running linux, and built CS from the source v1.2.

Any help would be greatly appreciated.

Thanks a lot.

-D

« Last Edit: November 17, 2007, 02:18:25 pm by didu » Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 4.109 seconds with 15 queries.