Changes

Jump to: navigation, search

DPS905 Kaitlyn ParticleEffects

1,744 bytes added, 19:16, 11 April 2011
no edit summary
6)Modify Configuration.h * Adding into the existing typedef enum Category (line 375) a new type of:  PARTICLES   7) Modify Object.cpp * Updating the Object::Object(category, colour, iGraphic*, int, int) method.. Change from.. // store reflectivity, shininess, and texture pointers material = new Colour[nSubsets]; shine = new float[nSubsets]; texture = new iTexture**[nSubsets]; for (int i = 0; i < nSubsets; i++) { material[i] = c[i]; if (p && p[i]) shine[i] = p[i]; else shine[i] = DEFAULT_SHININESS; if (material[i].a != 1.0f) category = TRANSLUCENT_OBJECT; texture[i] = new iTexture*[nStages]; for (int j = 0; j < nStages; j++) texture[i][j] = NULL; } And change it to..: // store reflectivity, shininess, and texture pointers material = new Colour[nSubsets]; shine = new float[nSubsets]; texture = new iTexture**[nSubsets]; for (int i = 0; i < nSubsets; i++) { material[i] = c[i]; if (p && p[i]) shine[i] = p[i]; else shine[i] = DEFAULT_SHININESS; if (material[i].a != 1.0f '''&& category != PARTICLES''') category = TRANSLUCENT_OBJECT; texture[i] = new iTexture*[nStages]; for (int j = 0; j < nStages; j++) texture[i][j] = NULL; }   8) Modify DeviceTexture.cpp Inside the method ( void DeviceTexture::create(iScene* scene, const Matrix& view, const Matrix& projection, const Vector& viewpoint) )Near line 190... Change from: d3dd->BeginScene(); scene->draw(SKYBOX); scene->draw(OPAQUE_OBJECT); scene->draw(TRANSLUCENT_OBJECT); d3dd->EndScene(); And change it to..: d3dd->BeginScene(); scene->draw(SKYBOX); scene->draw(OPAQUE_OBJECT); scene->draw(TRANSLUCENT_OBJECT); '''scene->draw(PARTICLES);''' d3dd->EndScene();
7
edits

Navigation menu