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
c6a8bd65
Commit
c6a8bd65
authored
Jul 11, 2013
by
Anatoly Baksheev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed some warnings for windows
minor buitification
parent
ea8d485d
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
32 additions
and
34 deletions
+32
-34
widgets.hpp
modules/viz/include/opencv2/viz/widgets.hpp
+3
-3
interactor_style.cpp
modules/viz/src/interactor_style.cpp
+1
-1
precomp.hpp
modules/viz/src/precomp.hpp
+21
-0
interactor_style.h
modules/viz/src/q/interactor_style.h
+1
-1
viz3d_impl.hpp
modules/viz/src/q/viz3d_impl.hpp
+5
-1
simple_widgets.cpp
modules/viz/src/simple_widgets.cpp
+0
-5
viz3d_impl.cpp
modules/viz/src/viz3d_impl.cpp
+1
-23
No files found.
modules/viz/include/opencv2/viz/widgets.hpp
View file @
c6a8bd65
...
...
@@ -142,8 +142,8 @@ namespace temp_viz
class
CV_EXPORTS
CloudWidget
:
public
Widget3D
{
public
:
CloudWidget
(
InputArray
_cloud
,
InputArray
_
colors
);
CloudWidget
(
InputArray
_
cloud
,
const
Color
&
color
=
Color
::
white
());
CloudWidget
(
InputArray
cloud
,
InputArray
colors
);
CloudWidget
(
InputArray
cloud
,
const
Color
&
color
=
Color
::
white
());
private
:
struct
CreateCloudWidget
;
...
...
@@ -152,7 +152,7 @@ namespace temp_viz
class
CV_EXPORTS
CloudNormalsWidget
:
public
Widget3D
{
public
:
CloudNormalsWidget
(
InputArray
_cloud
,
InputArray
_
normals
,
int
level
=
100
,
float
scale
=
0.02
f
,
const
Color
&
color
=
Color
::
white
());
CloudNormalsWidget
(
InputArray
cloud
,
InputArray
normals
,
int
level
=
100
,
float
scale
=
0.02
f
,
const
Color
&
color
=
Color
::
white
());
private
:
struct
ApplyCloudNormals
;
...
...
modules/viz/src/interactor_style.cpp
View file @
c6a8bd65
...
...
@@ -78,7 +78,7 @@ void temp_viz::InteractorStyle::OnChar ()
else
if
(
key
.
find
(
"XF86ZoomOut"
)
!=
std
::
string
::
npos
)
zoomOut
();
bool
keymod
=
false
;
int
keymod
=
false
;
switch
(
modifier_
)
{
case
KB_MOD_ALT
:
...
...
modules/viz/src/precomp.hpp
View file @
c6a8bd65
...
...
@@ -157,3 +157,24 @@
#include "opencv2/viz/widget_accessor.hpp"
#include <opencv2/viz/widgets.hpp>
#include <opencv2/calib3d.hpp>
namespace
temp_viz
{
template
<
typename
_Tp
>
Vec
<
_Tp
,
3
>*
vtkpoints_data
(
vtkSmartPointer
<
vtkPoints
>&
points
);
template
<>
static
inline
Vec3f
*
vtkpoints_data
<
float
>
(
vtkSmartPointer
<
vtkPoints
>&
points
)
{
CV_Assert
(
points
->
GetDataType
()
==
VTK_FLOAT
);
vtkDataArray
*
data
=
points
->
GetData
();
float
*
pointer
=
static_cast
<
vtkFloatArray
*>
(
data
)
->
GetPointer
(
0
);
return
reinterpret_cast
<
Vec3f
*>
(
pointer
);
}
template
<>
static
inline
Vec3d
*
vtkpoints_data
<
double
>
(
vtkSmartPointer
<
vtkPoints
>&
points
)
{
CV_Assert
(
points
->
GetDataType
()
==
VTK_DOUBLE
);
vtkDataArray
*
data
=
points
->
GetData
();
double
*
pointer
=
static_cast
<
vtkDoubleArray
*>
(
data
)
->
GetPointer
(
0
);
return
reinterpret_cast
<
Vec3d
*>
(
pointer
);
}
}
modules/viz/src/q/interactor_style.h
View file @
c6a8bd65
...
...
@@ -28,7 +28,7 @@ namespace temp_viz
* \author Radu B. Rusu
* \ingroup visualization
*/
class
CV_EXPORTS
InteractorStyle
:
public
vtkInteractorStyleTrackballCamera
class
InteractorStyle
:
public
vtkInteractorStyleTrackballCamera
{
public
:
...
...
modules/viz/src/q/viz3d_impl.hpp
View file @
c6a8bd65
...
...
@@ -12,7 +12,7 @@
namespace
temp_viz
{
class
CV_EXPORTS
Viz3d
::
VizImpl
struct
Viz3d
::
VizImpl
{
public
:
typedef
cv
::
Ptr
<
VizImpl
>
Ptr
;
...
...
@@ -366,6 +366,10 @@ struct ApplyAffine
result
[
2
]
=
(
_Tp
)(
m
[
8
]
*
v
[
0
]
+
m
[
9
]
*
v
[
1
]
+
m
[
10
]
*
v
[
2
]
+
m
[
11
]);
return
result
;
}
private
:
ApplyAffine
(
const
ApplyAffine
&
);
ApplyAffine
&
operator
=
(
const
ApplyAffine
&
);
};
}
...
...
modules/viz/src/simple_widgets.cpp
View file @
c6a8bd65
#include "precomp.hpp"
namespace
temp_viz
{
template
<
typename
_Tp
>
Vec
<
_Tp
,
3
>*
vtkpoints_data
(
vtkSmartPointer
<
vtkPoints
>&
points
);
}
///////////////////////////////////////////////////////////////////////////////////////////////
/// line widget implementation
temp_viz
::
LineWidget
::
LineWidget
(
const
Point3f
&
pt1
,
const
Point3f
&
pt2
,
const
Color
&
color
)
...
...
modules/viz/src/viz3d_impl.cpp
View file @
c6a8bd65
#include "precomp.hpp"
namespace
temp_viz
{
template
<
typename
_Tp
>
Vec
<
_Tp
,
3
>*
vtkpoints_data
(
vtkSmartPointer
<
vtkPoints
>&
points
);
template
<>
Vec3f
*
vtkpoints_data
<
float
>
(
vtkSmartPointer
<
vtkPoints
>&
points
)
{
CV_Assert
(
points
->
GetDataType
()
==
VTK_FLOAT
);
vtkDataArray
*
data
=
points
->
GetData
();
float
*
pointer
=
static_cast
<
vtkFloatArray
*>
(
data
)
->
GetPointer
(
0
);
return
reinterpret_cast
<
Vec3f
*>
(
pointer
);
}
template
<>
Vec3d
*
vtkpoints_data
<
double
>
(
vtkSmartPointer
<
vtkPoints
>&
points
)
{
CV_Assert
(
points
->
GetDataType
()
==
VTK_DOUBLE
);
vtkDataArray
*
data
=
points
->
GetData
();
double
*
pointer
=
static_cast
<
vtkDoubleArray
*>
(
data
)
->
GetPointer
(
0
);
return
reinterpret_cast
<
Vec3d
*>
(
pointer
);
}
}
void
temp_viz
::
Viz3d
::
VizImpl
::
setFullScreen
(
bool
mode
)
{
if
(
window_
)
...
...
@@ -577,4 +556,4 @@ temp_viz::Affine3f temp_viz::Viz3d::VizImpl::getWidgetPose(const String &id) con
vtkSmartPointer
<
vtkMatrix4x4
>
matrix
=
actor
->
GetUserMatrix
();
Matx44f
matrix_cv
=
convertToMatx
(
matrix
);
return
Affine3f
(
matrix_cv
);
}
\ No newline at end of file
}
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