- Timestamp:
- Jan 10, 2006, 12:09:58 AM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/importer/vertex_array_model.cc
r6453 r6456 264 264 for (j = 0; j < resolutionX; j++) 265 265 { 266 this->addVertex(( float)i - (float)sizeY/2.0, 0.0, (float)j - (float)sizeX/2.0);266 this->addVertex(((float)i - (float)resolutionY/2.0)*sizeY, 0.0, ((float)j - (float)resolutionX/2.0)*sizeX); 267 267 this->addNormal(0.0, 1, 0.0); 268 268 this->addTexCoor((float)i/(float)resolutionY, (float)j/(float)resolutionY); -
trunk/src/world_entities/environments/water.cc
r6455 r6456 29 29 Water::Water(const TiXmlElement* root) 30 30 { 31 this->setClassID(CL_WATER, "Water"); 32 this->toList(OM_ENVIRON_NOTICK); 33 31 34 this->resX = this->resY = 10; 32 35 this->sizeX = this->sizeY = 1.0; … … 35 38 if (root != NULL) 36 39 this->loadParams(root); 40 41 this->rebuildGrid(); 37 42 } 38 43 39 44 Water::~Water() 40 45 { 46 delete this->grid; 41 47 42 48 } … … 61 67 this->grid = new Grid(this->sizeX, this->sizeY, this->resX, this->resY); 62 68 69 this->setModel(this->grid, 0); 63 70 } 64 71 … … 71 78 void Water::setSize(float sizeX, float sizeY) 72 79 { 80 printf("%f %f\n", sizeX, sizeY); 81 73 82 this->sizeX = sizeX; 74 83 this->sizeY = sizeY; 75 84 } 76 85 86 87 void Water::tick(float dt) 88 { 89 90 } -
trunk/src/world_entities/environments/water.h
r6455 r6456 30 30 void rebuildGrid(); 31 31 32 void tick(float dt); 33 32 34 private: 33 35 Grid* grid; //!< The water-surface-model to render with
Note: See TracChangeset
for help on using the changeset viewer.