Changeset 5057 in orxonox.OLD for orxonox/trunk/src
- Timestamp:
- Aug 16, 2005, 11:46:55 PM (19 years ago)
- Location:
- orxonox/trunk/src/world_entities
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/world_entities/weapons/test_bullet.cc
r5055 r5057 38 38 39 39 float modelSize = .3; 40 this->loadModel ("models/projectiles/orx-rocket.obj");40 this->loadModelWithScale("models/projectiles/orx-rocket.obj", .3); 41 41 42 42 this->energyMin = 1; -
orxonox/trunk/src/world_entities/world_entity.cc
r5046 r5057 64 64 * loads a Model onto a WorldEntity 65 65 * @param fileName the name of the model to load 66 */ 67 void WorldEntity::loadModel(const char* fileName) 66 * @param scaling the Scaling of the model 67 */ 68 void WorldEntity::loadModelWithScale(const char* fileName, float scaling) 68 69 { 69 70 if (this->model) … … 72 73 { 73 74 PRINTF(4)("loading %s\n", fileName); 74 this->model = (Model*)ResourceManager::getInstance()->load(fileName, OBJ, RP_CAMPAIGN); 75 if (scaling == 1.0) 76 this->model = (Model*)ResourceManager::getInstance()->load(fileName, OBJ, RP_CAMPAIGN); 77 else 78 this->model = (Model*)ResourceManager::getInstance()->load(fileName, OBJ, RP_CAMPAIGN, &scaling); 79 75 80 PRINTF(4)("creating obb tree\n"); 76 81 this->obbTree = new OBBTree(4, (sVec3D*)this->model->getVertexArray(), this->model->getVertexCount()); … … 79 84 this->model = NULL; 80 85 } 86 87 81 88 82 89 /** -
orxonox/trunk/src/world_entities/world_entity.h
r5046 r5057 30 30 31 31 void loadParams(const TiXmlElement* root); 32 void loadModel(const char* fileName); 32 33 /** @see loadModelWithScale(const char*, float) @param fileName the File to load */ 34 void loadModel(const char* fileName) { this->loadModelWithScale(fileName, 1.0); }; 35 void loadModelWithScale(const char* fileName, float scaling); 33 36 34 37
Note: See TracChangeset
for help on using the changeset viewer.