void BOSApp::update(float dt) { normalizedPhase += dt * frequency; if (hasPixelsFromKinect) { objectDetector->update(*colorPixelsFromKinect, *depthPixelsFromKinect); } updateScaleParametersWithKinect(); updateHeights(); };
int Ocean::update(long elapsedTime) { oceanTime += elapsedTime; kConst = gridSize*2.0f*M_PI / lambda; //windDirection = glm::vec2(cos(oceanTime*0.0001f), sin(oceanTime*0.0001f)); updateH0Texture(); updateHtTexture(); updateHeights(); updateChoppyVectors(); return GameObject::update(elapsedTime); }
void Terrain::draw() { cam.begin(); ofPushMatrix(); updateHeights(); ofRotateY(-90); ofTranslate(-(meshResolution ), -20, -(meshResolution )); if (drawMode) { gridMesh.draw(); } else { gridMesh.drawWireframe(); } ofPopMatrix(); cam.end(); }