Esempio n. 1
0
void BOSApp::update(float dt) {
    normalizedPhase += dt * frequency;

    if (hasPixelsFromKinect) {
        objectDetector->update(*colorPixelsFromKinect, *depthPixelsFromKinect);
    }

    updateScaleParametersWithKinect();
    updateHeights();
};
Esempio n. 2
0
File: Ocean.cpp Progetto: BSkin/Boat
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);
}
Esempio n. 3
0
void Terrain::draw() {
  cam.begin();
  ofPushMatrix();
  updateHeights();
  ofRotateY(-90);
  ofTranslate(-(meshResolution ), -20, -(meshResolution ));
  
  if (drawMode) {
    gridMesh.draw();
  } else {
    gridMesh.drawWireframe();
  }
  
  ofPopMatrix();
  cam.end();
}