Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
909c45f1
Commit
909c45f1
authored
Jun 10, 2013
by
Anatoly Baksheev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
little refactoring
parent
01e99db6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
13 deletions
+25
-13
precomp.hpp
modules/viz/src/precomp.hpp
+10
-0
viz3d_impl.cpp
modules/viz/src/viz3d_impl.cpp
+0
-0
test_viz3d.cpp
modules/viz/test/test_viz3d.cpp
+15
-13
No files found.
modules/viz/src/precomp.hpp
View file @
909c45f1
...
...
@@ -56,6 +56,7 @@
#include <vtkCubeSource.h>
#include <vtkAxes.h>
#include <vtkFloatArray.h>
#include <vtkDoubleArray.h>
#include <vtkPointData.h>
#include <vtkPolyData.h>
#include <vtkPolyDataReader.h>
...
...
@@ -153,6 +154,15 @@
#include <vtkMapper2D.h>
#include <vtkLeaderActor2D.h>
#include <vtkAlgorithmOutput.h>
#if defined __GNUC__ && defined __DEPRECATED_DISABLED__
#define __DEPRECATED
#undef __DEPRECATED_DISABLED__
...
...
modules/viz/src/viz3d_impl.cpp
View file @
909c45f1
This diff is collapsed.
Click to expand it.
modules/viz/test/test_viz3d.cpp
View file @
909c45f1
...
...
@@ -88,20 +88,22 @@ TEST(Viz_viz3d, accuracy)
float
pos_z
=
0.0
f
;
temp_viz
::
Mesh3d
::
Ptr
mesh
=
temp_viz
::
mesh_load
(
"d:/horse.ply"
);
v
.
addPolygonMesh
(
*
mesh
,
"pq"
);
while
(
1
)
while
(
1
)
//TODO implement and replace with !viz.wasStopped()
{
// Creating new point cloud with id cloud1
cv
::
Affine3f
cloudPosition
(
angle_x
,
angle_y
,
angle_z
,
cv
::
Vec3f
(
pos_x
,
pos_y
,
pos_z
));
v
.
showPointCloud
(
"cloud1"
,
cloud
,
colors
,
cloudPosition
);
angle_x
+=
0.1
;
angle_y
-=
0.1
;
angle_z
+=
0.1
;
pos_x
=
std
::
sin
(
angle_x
);
pos_y
=
std
::
sin
(
angle_x
);
pos_z
=
std
::
sin
(
angle_x
);
v
.
spinOnce
(
1
,
true
);
// Creating new point cloud with id cloud1
cv
::
Affine3f
cloudPosition
(
angle_x
,
angle_y
,
angle_z
,
cv
::
Vec3f
(
pos_x
,
pos_y
,
pos_z
));
v
.
showPointCloud
(
"cloud1"
,
cloud
,
colors
,
cloudPosition
);
angle_x
+=
0.1
f
;
angle_y
-=
0.1
f
;
angle_z
+=
0.1
f
;
pos_x
=
std
::
sin
(
angle_x
);
pos_y
=
std
::
sin
(
angle_x
);
pos_z
=
std
::
sin
(
angle_x
);
v
.
spinOnce
(
10
);
}
// cv::Mat normals(cloud.size(), CV_32FC3, cv::Scalar(0, 10, 0));
...
...
Write
Preview
Markdown
is supported
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