Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
KennethVanhoey
CGoGN
Commits
6026763c
Commit
6026763c
authored
Dec 21, 2012
by
Pierre Kraemer
Browse files
missing files..
parent
4bbd6fba
Changes
2
Hide whitespace changes
Inline
Side-by-side
SCHNApps/Plugins/differentialProperties/include/computeNormalsDialog.h
0 → 100644
View file @
6026763c
#ifndef _COMPUTENORMALS_DIALOG_H_
#define _COMPUTENORMALS_DIALOG_H_
#include
"ui_computeNormalsDialog.h"
namespace
CGoGN
{
namespace
SCHNApps
{
class
Window
;
class
ComputeNormalsDialog
:
public
QDialog
,
public
Ui
::
ComputeNormalsDialog
{
Q_OBJECT
public:
ComputeNormalsDialog
(
Window
*
w
);
void
init
();
public
slots
:
void
cb_selectedMapChanged
();
private:
Window
*
m_window
;
};
}
// namespace SCHNApps
}
// namespace CGoGN
#endif
SCHNApps/Plugins/differentialProperties/src/computeNormalsDialog.cpp
0 → 100644
View file @
6026763c
#include
"computeNormalsDialog.h"
#include
"differentialProperties.h"
#include
"window.h"
#include
"mapHandler.h"
namespace
CGoGN
{
namespace
SCHNApps
{
ComputeNormalsDialog
::
ComputeNormalsDialog
(
Window
*
w
)
:
m_window
(
w
)
{
setupUi
(
this
);
connect
(
mapList
,
SIGNAL
(
itemSelectionChanged
()),
this
,
SLOT
(
cb_selectedMapChanged
()));
}
void
ComputeNormalsDialog
::
init
()
{
mapList
->
clear
();
combo_positionAttribute
->
clear
();
attributeName
->
setText
(
"normal"
);
const
QList
<
MapHandlerGen
*>&
maps
=
m_window
->
getMapsList
();
foreach
(
MapHandlerGen
*
map
,
maps
)
mapList
->
addItem
(
map
->
getName
());
}
void
ComputeNormalsDialog
::
cb_selectedMapChanged
()
{
QList
<
QListWidgetItem
*>
currentItems
=
mapList
->
selectedItems
();
if
(
!
currentItems
.
empty
())
{
combo_positionAttribute
->
clear
();
const
QString
&
mapname
=
currentItems
[
0
]
->
text
();
MapHandlerGen
*
mh
=
m_window
->
getMap
(
mapname
);
GenericMap
*
map
=
mh
->
getGenericMap
();
AttributeContainer
&
cont
=
map
->
getAttributeContainer
<
VERTEX
>
();
std
::
vector
<
std
::
string
>
names
;
std
::
vector
<
std
::
string
>
types
;
cont
.
getAttributesNames
(
names
);
cont
.
getAttributesTypes
(
types
);
std
::
string
vec3TypeName
=
VEC3
::
CGoGNnameOfType
();
for
(
unsigned
int
i
=
0
;
i
<
names
.
size
();
++
i
)
{
if
(
types
[
i
]
==
vec3TypeName
)
combo_positionAttribute
->
addItem
(
QString
::
fromStdString
(
names
[
i
]));
}
}
}
}
// namespace SCHNApps
}
// namespace CGoGN
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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