Commit 98b4c26f authored by gllm's avatar gllm
Browse files

example_client et CloudLib: ajustement au dessin et representation des scenes et marqueurs

parent ff7520d8
......@@ -47,7 +47,7 @@ void ofApp::setup() {
kinect_.setRegistration(true);
kinect_.init();
kinect_.open(); // opens first available kinect
kinect_.setDepthClipping(50, 10000);
kinect_.setDepthClipping(50, 9000);
client_announcer_.start("artificiel CloudClient", CLOUDCLIENT_SERVIRCESTRING,
tcp_server_->getPort());
......@@ -328,9 +328,10 @@ void ofApp::draw() {
filtered_mesh_.drawVertices();
ofSetColor(255, 255, 0, 100);
crop_hull_draw();
// crop_hull_draw();
models_manager_.draw();
ofPushMatrix();
ofTranslate(parameters_.world_offset_->x,
parameters_.world_offset_->z,
......@@ -408,6 +409,9 @@ void ofApp::draw() {
ofPopMatrix();
}
}
ofPopMatrix();
models_manager_.draw();
}
ofDisableDepthTest();
}
......
......@@ -29,7 +29,7 @@ class Cropper
{
ofSetColor(0, 255, 0, 100);
ofNoFill();
ofSetBoxResolution(2);
ofSetBoxResolution(1);
ofDrawBox(0, 0 + crop_dimensions_.get().z / 2, 0, crop_dimensions_.get().x, crop_dimensions_.get().z, -crop_dimensions_.get().y);
ofDrawArrow(ofVec3f(0, 0, 0), ofVec3f(crop_dimensions_.get().x / 2 + .1, 0, 0), .1);
ofFill();
......
......@@ -20,9 +20,9 @@ public:
scene_path_ = scene_path;
marqueurs_path_ = marqueurs_path;
model_material_.setAmbientColor(ofFloatColor(1.0, 1.0, 1.0, 1.0));
model_material_.setDiffuseColor(ofFloatColor(0.8, 0.8, 0.8, 1.0));
model_material_.setSpecularColor(ofFloatColor(0.8, 0.8, 0.8, 1.0));
model_material_.setAmbientColor(ofFloatColor(1.0, 1.0, 1.0, .1));
model_material_.setDiffuseColor(ofFloatColor(0.8, 0.8, 0.8, .1));
model_material_.setSpecularColor(ofFloatColor(0.8, 0.8, 0.8, .1));
model_material_.setShininess(10);
light_jardin_.setAreaLight(600, 400);
......@@ -94,7 +94,7 @@ public:
// cloud ??
// ofRotateXDeg(180); // ceci aligne le modele sketchup avec le cloud
ofRotateDeg(180, 1, 0, 0);
ofScale(2);
ofScale(10);
if (wireframe_models_) {
......@@ -102,18 +102,18 @@ public:
} else {
ofPushStyle();
ofEnableLighting();
light_jardin_.enable();
light_court_.enable();
// ofPushStyle();
// ofEnableLighting();
// light_jardin_.enable();
// light_court_.enable();
model_material_.begin();
// scene_model_.drawFaces();
model_material_.end();
// model_material_.begin();
// // scene_model_.drawFaces();
// model_material_.end();
light_jardin_.disable();
light_court_.disable();
ofDisableLighting();
// light_jardin_.disable();
// light_court_.disable();
// ofDisableLighting();
// ofSetColor(model_color_);
ofEnableBlendMode(OF_BLENDMODE_ADD);
......@@ -126,26 +126,27 @@ public:
if (draw_marqueurs_) {
ofPushMatrix();
// ofSetColor(80, 80, 80, 80);
ofRotateDeg(-90, 1, 0, 0);
ofScale(.01);
if (wireframe_models_) {
ofSetColor(255, 255, 255, 40);
ofRotateDeg(180, 1, 0, 0);
ofScale(10);
if (wireframe_models_) {
marqueurs_model_.drawWireframe();
} else {
ofPushStyle();
ofEnableLighting();
light_jardin_.enable();
light_court_.enable();
model_material_.begin();
marqueurs_model_.drawFaces();
model_material_.end();
light_jardin_.disable();
light_court_.disable();
ofDisableLighting();
ofPopStyle();
// ofPushStyle();
// ofEnableLighting();
// light_jardin_.enable();
// light_court_.enable();
// model_material_.begin();
ofEnableBlendMode(OF_BLENDMODE_ALPHA);
marqueurs_model_.drawFaces();
// model_material_.end();
// light_jardin_.disable();
// light_court_.disable();
// ofDisableLighting();
// ofPopStyle();
// ofSetColor(255, 255, 255, 128);
ofSetColor(model_color_);
ofEnableBlendMode(OF_BLENDMODE_ADD);
marqueurs_model_.drawWireframe();
}
......
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