-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathobj.py
36 lines (29 loc) · 848 Bytes
/
obj.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env python
#-*- coding: utf-8 -*-
'''
Use: Simulator for Suzaku Quadrotor
Module: Simulator Object
Author: Legend Lee
Date: 2013-04-16
E-mail: [email protected]
'''
# try to import
try:
import pygame, ode
from OpenGL.GL import *
from objloader import *
except:
print '=====> import error! please check'
class OBJ(object):
"""
obj module to construct one object in a world
"""
def __init__(self, path, filename, world, space):
self.world = world
self.space = space
self.display_list = OBJloader(path, filename, swapyz=False).getGLlists()
print '=====> %s loaded successfully!' % filename
def callList(self):
glCallList(self.display_list)
if __name__ == '__main__':
objtest = OBJ('./model/','suzaku.obj',None,None)