Changeset 10387 in orxonox.OLD for trunk/src/world_entities
- Timestamp:
- Jan 26, 2007, 6:22:33 PM (18 years ago)
- Location:
- trunk/src/world_entities
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/camera.cc
r10379 r10387 68 68 this->setAspectRatio(1.33f); 69 69 this->setClipRegion(.1, 10000); 70 70 71 71 this->viewTopFovy = 60; 72 72 this->viewNormalFovy = 90; -
trunk/src/world_entities/npcs/npc.cc
r10376 r10387 64 64 65 65 this->getWeaponManager().changeWeaponConfig(1); 66 Weapon* wpRight = new TestGun(0);67 wpRight->setName("testGun Right");68 Weapon* wpLeft = new TestGun(1);69 wpLeft->setName("testGun Left");70 71 wpRight->toList( this->getOMListNumber());72 wpLeft->toList( this->getOMListNumber());73 74 75 this->addWeapon(wpLeft, 1, 0);76 this->addWeapon(wpRight,1 ,1);77 78 wpLeft->increaseEnergy( 100);79 wpRight->increaseEnergy( 100);66 // Weapon* wpRight = new TestGun(0); 67 // wpRight->setName("testGun Right"); 68 // Weapon* wpLeft = new TestGun(1); 69 // wpLeft->setName("testGun Left"); 70 // 71 // wpRight->toList( this->getOMListNumber()); 72 // wpLeft->toList( this->getOMListNumber()); 73 // 74 // 75 // this->addWeapon(wpLeft, 1, 0); 76 // this->addWeapon(wpRight,1 ,1); 77 // 78 // wpLeft->increaseEnergy( 100); 79 // wpRight->increaseEnergy( 100); 80 80 81 81 this->setHealthMax(100); 82 82 this->setHealth(80); 83 83 84 this->getWeaponManager().setSlotCount(7);85 86 this->getWeaponManager().setSlotPosition(0, Vector(-2.6, .1, -3.0));87 this->getWeaponManager().setSlotCapability(0, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);88 89 this->getWeaponManager().setSlotPosition(1, Vector(-2.6, .1, 3.0));90 this->getWeaponManager().setSlotCapability(1, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);91 92 this->getWeaponManager().setSlotPosition(2, Vector(-1.5, .5, -.5));93 this->getWeaponManager().setSlotDirection(2, Quaternion(-M_PI_4*.5, Vector(1,0,0)));94 95 this->getWeaponManager().setSlotPosition(3, Vector(-1.5, .5, .5));96 this->getWeaponManager().setSlotDirection(3, Quaternion(M_PI_4*.5, Vector(1,0,0)));97 98 this->getWeaponManager().setSlotPosition(4, Vector(-1.5, -.5, .5));99 this->getWeaponManager().setSlotDirection(4, Quaternion(-M_PI_4*.5+M_PI, Vector(1,0,0)));100 101 this->getWeaponManager().setSlotPosition(5, Vector(-1.5, -.5, -.5));102 this->getWeaponManager().setSlotDirection(5, Quaternion(+M_PI_4*.5-M_PI, Vector(1,0,0)));103 104 this->getWeaponManager().setSlotPosition(6, Vector(-1, 0.0, 0));105 this->getWeaponManager().setSlotCapability(6, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);106 107 this->getWeaponManager().getFixedTarget()->setParent(this);108 this->getWeaponManager().getFixedTarget()->setRelCoor(100000,0,0);84 // this->getWeaponManager().setSlotCount(7); 85 // 86 // this->getWeaponManager().setSlotPosition(0, Vector(-2.6, .1, -3.0)); 87 // this->getWeaponManager().setSlotCapability(0, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL); 88 // 89 // this->getWeaponManager().setSlotPosition(1, Vector(-2.6, .1, 3.0)); 90 // this->getWeaponManager().setSlotCapability(1, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL); 91 // 92 // this->getWeaponManager().setSlotPosition(2, Vector(-1.5, .5, -.5)); 93 // this->getWeaponManager().setSlotDirection(2, Quaternion(-M_PI_4*.5, Vector(1,0,0))); 94 // 95 // this->getWeaponManager().setSlotPosition(3, Vector(-1.5, .5, .5)); 96 // this->getWeaponManager().setSlotDirection(3, Quaternion(M_PI_4*.5, Vector(1,0,0))); 97 // 98 // this->getWeaponManager().setSlotPosition(4, Vector(-1.5, -.5, .5)); 99 // this->getWeaponManager().setSlotDirection(4, Quaternion(-M_PI_4*.5+M_PI, Vector(1,0,0))); 100 // 101 // this->getWeaponManager().setSlotPosition(5, Vector(-1.5, -.5, -.5)); 102 // this->getWeaponManager().setSlotDirection(5, Quaternion(+M_PI_4*.5-M_PI, Vector(1,0,0))); 103 // 104 // this->getWeaponManager().setSlotPosition(6, Vector(-1, 0.0, 0)); 105 // this->getWeaponManager().setSlotCapability(6, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL); 106 // 107 // this->getWeaponManager().getFixedTarget()->setParent(this); 108 // this->getWeaponManager().getFixedTarget()->setRelCoor(100000,0,0); 109 109 110 110 } -
trunk/src/world_entities/planet.cc
r10114 r10387 45 45 this->toList(OM_GROUP_01); 46 46 47 //this->material->setIllum(20); 48 //this->material->setAmbient(0.1, 0.1, 0.1); 47 //this->materialPlanet->setIllum(20); 48 //this->materialPlanet->setAmbient(0.1, 0.1, 0.1); 49 50 if( root != NULL) 51 this->loadParams(root); 52 53 PrimitiveModel* model = new PrimitiveModel(PRIM_SPHERE, this->size, 50); 54 this->setModel(model); 49 55 50 56 51 57 52 //st float radius, const unsigned int loops, const unsigned int segmentsPerLoop53 54 this->loadParams(root);55 56 // VertexArrayModel* model = new VertexArrayModel();57 // model->spiralSphere(this->size, 10, 10);58 // this->setModel(model);59 // model->debug();60 //61 PrimitiveModel* model = new PrimitiveModel(PRIM_SPHERE, this->size, 50);62 this->setModel(model);63 58 } 64 59 … … 78 73 79 74 LoadParam(root, "texture", this, Planet, setTexture) 80 .describe("Sets the material on the Planet. The string must be the path relative to the data-dir, and without a trailing .jpg"); 75 .describe("Sets the materialPlanet on the Planet. The string must be the path relative to the data-dir, and without a trailing .jpg"); 76 77 LoadParam(root, "cloud-texture", this, Planet, setCloudTexture) 78 .describe("Sets the cloud texture of the planet"); 81 79 82 80 LoadParam(root, "size", this, Planet, setSize) … … 91 89 void Planet::setTexture(const std::string& textureName) 92 90 { 93 this->material.setDiffuseMap(textureName); 91 this->materialPlanet.setDiffuseMap(textureName); 92 } 93 94 95 /** 96 * Defines which textures should be loaded onto the Planet. 97 * @param textureName the top texture. 98 */ 99 void Planet::setCloudTexture(const std::string& textureName) 100 { 101 this->materialCloud.setDiffuseMap(textureName); 94 102 } 95 103 … … 109 117 void Planet::draw() const 110 118 { 111 this->material .select();119 this->materialPlanet.select(); 112 120 113 121 WorldEntity::draw(); -
trunk/src/world_entities/planet.h
r9869 r10387 28 28 /** assumes jpg as input-format */ 29 29 void setTexture(const std::string& textureName); 30 void setCloudTexture(const std::string& textureName); 31 30 32 31 33 … … 35 37 36 38 private: 37 Material material; //!< Materials for the Planet. sorted by number (0-5) top, bottom, left, right, front, back 38 Texture* texture; //!< Textures for the CubeMap. 39 Material materialPlanet; //!< Materials for the Planet. sorted by number (0-5) top, bottom, left, right, front, back 40 Material materialCloud; //!< the material for the cloud surrounding the planet 41 42 Model* cloudModel; //!< the model for the cloud 43 39 44 40 45 float size; //!< Size of the Planet. This should match the frustum maximum range.
Note: See TracChangeset
for help on using the changeset viewer.