- Timestamp:
- Oct 26, 2005, 11:01:43 PM (19 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Makefile.in
r5428 r5437 39 39 $(srcdir)/doc/documentation.am $(top_srcdir)/configure AUTHORS \ 40 40 COPYING ChangeLog INSTALL NEWS config.guess config.sub depcomp \ 41 install-sh missing mkinstalldirs41 install-sh ltmain.sh missing mkinstalldirs 42 42 subdir = . 43 43 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -
trunk/configure
r5413 r5437 5429 5429 echo "${ECHO_T}$ac_cv_lib_ALut_main" >&6 5430 5430 if test $ac_cv_lib_ALut_main = yes; then 5431 FOUND_ALUT=yes; LIBS=" $LIBS -lALut"5431 FOUND_ALUT=yes; LIBS="-lALut $LIBS" 5432 5432 fi 5433 5433 -
trunk/src/lib/graphics/importer/material.cc
r5374 r5437 91 91 { 92 92 glEnable(GL_BLEND); 93 glBlendFunc(GL_SRC_ALPHA, GL_ONE); 93 94 glColor4f(*(this->diffuse), *(this->diffuse+1), *(this->diffuse+2), this->transparency); 94 glBlendFunc(GL_SRC_ALPHA, GL_ONE);95 95 } 96 96 else -
trunk/src/lib/graphics/importer/primitive_model.cc
r4836 r5437 84 84 { 85 85 float vj = j/df *PI; 86 this->addVertexNormal(cos(vi) * cos(vj), 87 sin(vj), 88 sin(vi) * cos(vj)); 89 86 90 this->addVertex(size * cos(vi) * cos(vj), 87 91 size * sin(vj), 88 92 size * sin(vi) * cos(vj)); 93 89 94 this->addVertexTexture(i / (df *2.0), (j-1.0)/(df)+.5); 90 95 } 91 96 } 92 97 this->addVertex(0, -size, 0); 98 this->addVertexNormal(0, -1, 0); 93 99 this->addVertexTexture(0,0); 94 100 this->addVertex(0, size, 0); 101 this->addVertexNormal(0, 1, 0); 95 102 this->addVertexTexture(0 ,1); 96 103 … … 119 126 { 120 127 v1 = this->getVertexCount() - 2; 121 this->addFace(3, VERTEX_TEXCOORD , v1, v1, v3, v3, v4, v4);128 this->addFace(3, VERTEX_TEXCOORD_NORMAL, v1, v1, v1, v3, v3, v3, v4, v4, v4); 122 129 } 123 130 else if (j == detail) 124 131 { 125 132 v3 = this->getVertexCount()-1; 126 this->addFace(3, VERTEX_TEXCOORD , v1, v1, v2, v2, v3, v3);133 this->addFace(3, VERTEX_TEXCOORD_NORMAL, v1, v1, v1, v2, v2, v2, v3, v3, v3); 127 134 } 128 135 else 129 this->addFace(4, VERTEX_TEXCOORD , v1, v1, v2, v2, v3, v3, v4, v4);136 this->addFace(4, VERTEX_TEXCOORD_NORMAL, v1, v1, v1, v2, v2, v2, v3, v3, v3, v4, v4, v4); 130 137 } 131 138 } -
trunk/src/world_entities/power_ups/turret_power_up.cc
r5435 r5437 20 20 #include "list.h" 21 21 22 #include "primitive_model.h" 23 22 24 using namespace std; 23 25 24 26 CREATE_FACTORY(TurretPowerUp); 25 26 GLUquadricObj* TurretPowerUp_sphereObj = NULL;27 Material* TurretPowerUp_sphereMat = NULL;28 29 27 30 28 TurretPowerUp::TurretPowerUp () … … 41 39 42 40 43 TurretPowerUp::~TurretPowerUp () { 44 41 TurretPowerUp::~TurretPowerUp () 42 { 43 delete this->sphereModel; 44 delete this->sphereMaterial; 45 45 } 46 46 … … 51 51 this->loadModelWithScale("models/guns/turret1.obj", 2.0); 52 52 53 if (TurretPowerUp_sphereObj == NULL) 54 TurretPowerUp_sphereObj = gluNewQuadric(); 55 if(TurretPowerUp_sphereMat == NULL) 56 { 57 TurretPowerUp_sphereMat = new Material("TurretPowerUp_Sphere"); 58 TurretPowerUp_sphereMat->setTransparency(.1); 59 } 53 this->sphereModel = new PrimitiveModel(PRIM_SPHERE, 7, 5); 54 this->sphereMaterial = new Material; 55 this->sphereMaterial->setTransparency(.0001); 56 this->sphereMaterial->setDiffuse(.1, .1, .8); 57 60 58 this->rotation = Vector(0,1,0); 61 this->cycle = 0; 59 this->cycle = (float)rand()/RAND_MAX*M_2_PI; 60 this->shiftDir(Quaternion((float)rand()/RAND_MAX*M_2_PI, this->rotation)); 62 61 } 63 62 … … 112 111 Vector tmpRot = this->getAbsDir().getSpacialAxis(); 113 112 glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z ); 114 TurretPowerUp_sphereMat->select();115 // gluSphere(TurretPowerUp_sphereObj, 3, 5, 5);116 113 this->model->draw(); 114 115 this->sphereMaterial->select(); 116 this->sphereModel->draw(); 117 117 glPopMatrix(); 118 119 118 } 120 119 -
trunk/src/world_entities/power_ups/turret_power_up.h
r5435 r5437 27 27 Vector rotation; 28 28 float cycle; 29 30 Model* sphereModel; 31 Material* sphereMaterial; 29 32 }; 30 33
Note: See TracChangeset
for help on using the changeset viewer.