Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ofxaddons
ofxCloudLib
Commits
98b4c26f
Commit
98b4c26f
authored
Sep 17, 2017
by
gllm
Browse files
example_client et CloudLib: ajustement au dessin et representation des scenes et marqueurs
parent
ff7520d8
Changes
3
Hide whitespace changes
Inline
Side-by-side
example_client/src/ofApp.cpp
View file @
98b4c26f
...
...
@@ -47,7 +47,7 @@ void ofApp::setup() {
kinect_
.
setRegistration
(
true
);
kinect_
.
init
();
kinect_
.
open
();
// opens first available kinect
kinect_
.
setDepthClipping
(
50
,
10
000
);
kinect_
.
setDepthClipping
(
50
,
9
000
);
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
();
}
...
...
src/ofxCloudLib/Cropper.hpp
View file @
98b4c26f
...
...
@@ -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
();
...
...
src/ofxCloudLib/ModelsManager.hpp
View file @
98b4c26f
...
...
@@ -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
,
8
0);
ofRotateDeg
(
-
9
0
,
1
,
0
,
0
);
ofScale
(
.0
1
);
if
(
wireframe_models_
)
{
ofSetColor
(
255
,
255
,
255
,
4
0
);
ofRotateDeg
(
18
0
,
1
,
0
,
0
);
ofScale
(
1
0
);
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
();
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment