39 |
#include "GameEngine/HgPlayer.h" |
#include "GameEngine/HgPlayer.h" |
40 |
|
|
41 |
#include "Common/Camera.h" |
#include "Common/Camera.h" |
|
#include "Common/Frustum.h" |
|
42 |
|
|
43 |
#include "GameWidget.h" |
#include "GameWidget.h" |
44 |
|
|
122 |
glLightfv (GL_LIGHT0, GL_DIFFUSE, lightDiffuse); |
glLightfv (GL_LIGHT0, GL_DIFFUSE, lightDiffuse); |
123 |
|
|
124 |
glShadeModel (GL_SMOOTH); |
glShadeModel (GL_SMOOTH); |
|
|
|
|
// glPolygonMode (GL_FRONT_AND_BACK, GL_LINE); |
|
125 |
} |
} |
126 |
|
|
127 |
- (id) init |
- (id) init |
159 |
|
|
160 |
/* Model */ |
/* Model */ |
161 |
MdlModel *model |
MdlModel *model |
162 |
= [[MdlModel alloc] initWithName: @"Resources/Model/bateau.md3" |
= [[MdlModel alloc] initWithContentsOfFile: @"Resources/Model/bateau.mdl"] |
|
withTexName: nil |
|
|
withConfigName: @"Resources/Model/bateau.cfg"]; |
|
163 |
_anim = [[MdlAnimatedModel alloc] initWithModel: model |
_anim = [[MdlAnimatedModel alloc] initWithModel: model |
164 |
animation: @"DEFAULT"]; |
animation: @"DEFAULT"]; |
165 |
RELEASE (model); |
RELEASE (model); |
166 |
|
|
167 |
/* map */ |
/* map */ |
206 |
numberOfRay: 80 |
numberOfRay: 80 |
207 |
lastStep: 5.0]; |
lastStep: 5.0]; |
208 |
|
|
|
Frustum * _frustum = [[Frustum alloc] initWithCurrentGlState]; |
|
|
|
|
209 |
glPushMatrix(); |
glPushMatrix(); |
210 |
// glTranslatef(15.0,15.0,50.0); |
// glTranslatef(15.0,15.0,50.0); |
211 |
glRotatef (-90.0f, 1.0f, 0.0f, 0.0f); |
glRotatef (-90.0f, 1.0f, 0.0f, 0.0f); |