Changeset 5499 in orxonox.OLD for trunk/src/world_entities
- Timestamp:
- Nov 7, 2005, 10:56:58 PM (19 years ago)
- Location:
- trunk/src/world_entities
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/npc.cc
r5458 r5499 34 34 this->setClassID(CL_NPC, "NPC"); 35 35 36 this->loadModel WithScale("models/ships/bolido.obj", 2);36 this->loadModel("models/ships/bolido.obj", 2); 37 37 38 38 this->randomRotAxis = VECTOR_RAND(1); -
trunk/src/world_entities/npc2.cc
r5427 r5499 33 33 this->setClassID(CL_NPC, "NPC"); 34 34 35 this->loadModel WithScale("models/ships/bolido.obj", 3);35 this->loadModel("models/ships/bolido.obj", 3); 36 36 this->shader = NULL; 37 37 if (likely(Shader::checkShaderAbility())) -
trunk/src/world_entities/power_ups/laser_power_up.cc
r5458 r5499 50 50 { 51 51 this->setClassID(CL_LASER_POWER_UP, "LaserPowerUp"); 52 this->loadModel WithScale("models/guns/test_gun.obj", 2.0);52 this->loadModel("models/guns/test_gun.obj", 2.0); 53 53 54 54 this->sphereModel = new PrimitiveModel(PRIM_SPHERE, 7, 5); -
trunk/src/world_entities/power_ups/turret_power_up.cc
r5439 r5499 50 50 { 51 51 this->setClassID(CL_TURRET_POWER_UP, "TurretPowerUp"); 52 this->loadModel WithScale("models/guns/turret1.obj", 2.0);52 this->loadModel("models/guns/turret1.obj", 2.0); 53 53 54 54 this->sphereModel = new PrimitiveModel(PRIM_SPHERE, 7, 5); -
trunk/src/world_entities/weapons/rocket.cc
r5497 r5499 41 41 42 42 float modelSize = .3; 43 this->loadModel WithScale("models/projectiles/orx-rocket.obj", .3);43 this->loadModel("models/projectiles/orx-rocket.obj", .3); 44 44 45 45 this->energyMin = 1; -
trunk/src/world_entities/weapons/test_bullet.cc
r5451 r5499 41 41 42 42 float modelSize = .3; 43 this->loadModel WithScale("models/projectiles/orx-rocket.obj", .3);43 this->loadModel("models/projectiles/orx-rocket.obj", .3); 44 44 45 45 this->energyMin = 1; -
trunk/src/world_entities/world_entity.cc
r5498 r5499 75 75 76 76 // Model Loading 77 LoadParam<WorldEntity>(root, "model", this, &WorldEntity::loadModel )77 LoadParam<WorldEntity>(root, "model", this, &WorldEntity::loadModel, false, NULL, 1.0f) 78 78 .describe("the fileName of the model, that should be loaded onto this world-entity. (must be relative to the data-dir)") ; 79 79 80 // HACK81 LoadParam<WorldEntity>(root, "scaled-model", this, &WorldEntity::loadModelWithScale)82 .describe("the fileName of the model, that should be loaded onto this world-entity. (must be relative to the data-dir)") ;83 80 } 84 81 … … 90 87 * @todo fix this, so it only has one loadModel-Function. 91 88 */ 92 void WorldEntity::loadModel WithScale(const char* fileName, float scaling)89 void WorldEntity::loadModel(const char* fileName, float scaling) 93 90 { 94 91 if (this->model) -
trunk/src/world_entities/world_entity.h
r5498 r5499 28 28 29 29 /** @see loadModelWithScale(const char*, float) @param fileName the File to load */ 30 void loadModel(const char* fileName) { this->loadModelWithScale(fileName, 1.0f); }; 31 32 void loadModelWithScale(const char* fileName, float scaling); 30 void loadModel(const char* fileName, float scaling = 1.0f); 33 31 34 32 bool buildObbTree(unsigned int depth);
Note: See TracChangeset
for help on using the changeset viewer.