Commit 7cc6cb13 authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

Adapted regression testing to new camera API.

refs #141
parent 51316d5c
......@@ -37,6 +37,7 @@
#include "modules/pipelinefactory.h"
#include "modules/devil/processors/devilimagewriter.h"
#include "modules/base/processors/trackballcameraprovider.h"
using namespace campvis;
......@@ -180,13 +181,13 @@ TEST_F(PipelineWriteResultImageTest, DVRVis) {
init();
execute();
AbstractProperty* p = _pipeline->getProperty("Camera");
if (CameraProperty* tester = dynamic_cast<CameraProperty*>(p)) {
cgt::Camera c = tester->getValue();
c.setPosition(cgt::vec3(417.f, 44.5f, -112.5f));
c.setFocus(cgt::vec3(91.f, 91.f, 80.f));
c.setUpVector(cgt::vec3(-0.487f, 0.142f, -0.861f));
tester->setValue(c);
auto properties = _pipeline->getProcessors();
for (auto it = properties.begin(); it != properties.end(); ++it) {
if (TrackballCameraProvider* tcp = dynamic_cast<TrackballCameraProvider*>(*it)) {
tcp->p_position.setValue(cgt::vec3(417.f, 44.5f, -112.5f));
tcp->p_focus.setValue(cgt::vec3(91.f, 91.f, 80.f));
tcp->p_upVector.setValue(cgt::vec3(-0.487f, 0.142f, -0.861f));
}
}
execute();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment