Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CGoGN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
CGoGN
CGoGN
Commits
d11304b9
Commit
d11304b9
authored
Mar 04, 2015
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SCHNApps: select dynamically the vertex attribute to use to compute the map bounding box
parent
ba254fb4
Changes
36
Hide whitespace changes
Inline
Side-by-side
Showing
36 changed files
with
635 additions
and
846 deletions
+635
-846
CGoGN/include/Container/attributeContainer.h
CGoGN/include/Container/attributeContainer.h
+5
-19
CGoGN/include/Container/attributeContainer.hpp
CGoGN/include/Container/attributeContainer.hpp
+1
-14
CGoGN/include/Geometry/bounding_box.hpp
CGoGN/include/Geometry/bounding_box.hpp
+0
-2
CGoGN/include/Topology/generic/genericmap.h
CGoGN/include/Topology/generic/genericmap.h
+0
-1
CGoGN/src/Container/attributeContainer.cpp
CGoGN/src/Container/attributeContainer.cpp
+2
-6
SCHNApps/Plugins/surface_deformation/src/surface_deformation.cpp
...s/Plugins/surface_deformation/src/surface_deformation.cpp
+10
-12
SCHNApps/Plugins/surface_differentialProperties/include/surface_differentialProperties.h
...entialProperties/include/surface_differentialProperties.h
+1
-1
SCHNApps/Plugins/surface_differentialProperties/src/surface_differentialProperties.cpp
...erentialProperties/src/surface_differentialProperties.cpp
+3
-3
SCHNApps/Plugins/surface_distance/include/surface_distance.h
SCHNApps/Plugins/surface_distance/include/surface_distance.h
+1
-1
SCHNApps/Plugins/surface_distance/src/dialog_computeDistance.cpp
...s/Plugins/surface_distance/src/dialog_computeDistance.cpp
+4
-4
SCHNApps/Plugins/surface_distance/src/surface_distance.cpp
SCHNApps/Plugins/surface_distance/src/surface_distance.cpp
+3
-3
SCHNApps/Plugins/surface_import/src/surface_import.cpp
SCHNApps/Plugins/surface_import/src/surface_import.cpp
+7
-9
SCHNApps/Plugins/surface_modelisation/src/surface_modelisation.cpp
...Plugins/surface_modelisation/src/surface_modelisation.cpp
+5
-12
SCHNApps/Plugins/surface_radiance/src/surface_radiance.cpp
SCHNApps/Plugins/surface_radiance/src/surface_radiance.cpp
+0
-6
SCHNApps/Plugins/surface_render/include/surface_render.h
SCHNApps/Plugins/surface_render/include/surface_render.h
+1
-1
SCHNApps/Plugins/surface_render/src/surface_render.cpp
SCHNApps/Plugins/surface_render/src/surface_render.cpp
+4
-10
SCHNApps/Plugins/surface_render/src/surface_render_dockTab.cpp
...pps/Plugins/surface_render/src/surface_render_dockTab.cpp
+27
-27
SCHNApps/Plugins/surface_subdivision/include/surface_subdivision.h
...Plugins/surface_subdivision/include/surface_subdivision.h
+1
-1
SCHNApps/Plugins/surface_subdivision/src/surface_subdivision.cpp
...s/Plugins/surface_subdivision/src/surface_subdivision.cpp
+5
-1
SCHNApps/Plugins/volume_import/src/volume_import.cpp
SCHNApps/Plugins/volume_import/src/volume_import.cpp
+8
-8
SCHNApps/forms/controlDock_CameraTabWidget.ui
SCHNApps/forms/controlDock_CameraTabWidget.ui
+1
-1
SCHNApps/forms/controlDock_MapTabWidget.ui
SCHNApps/forms/controlDock_MapTabWidget.ui
+21
-0
SCHNApps/include/camera.h
SCHNApps/include/camera.h
+4
-19
SCHNApps/include/controlDock_cameraTab.h
SCHNApps/include/controlDock_cameraTab.h
+7
-13
SCHNApps/include/controlDock_mapTab.h
SCHNApps/include/controlDock_mapTab.h
+2
-6
SCHNApps/include/mapHandler.h
SCHNApps/include/mapHandler.h
+33
-16
SCHNApps/include/mapHandler.hpp
SCHNApps/include/mapHandler.hpp
+99
-100
SCHNApps/include/schnapps.h
SCHNApps/include/schnapps.h
+1
-1
SCHNApps/include/view.h
SCHNApps/include/view.h
+17
-11
SCHNApps/src/camera.cpp
SCHNApps/src/camera.cpp
+24
-118
SCHNApps/src/controlDock_cameraTab.cpp
SCHNApps/src/controlDock_cameraTab.cpp
+78
-46
SCHNApps/src/controlDock_mapTab.cpp
SCHNApps/src/controlDock_mapTab.cpp
+157
-239
SCHNApps/src/controlDock_pluginTab.cpp
SCHNApps/src/controlDock_pluginTab.cpp
+2
-9
SCHNApps/src/mapHandler.cpp
SCHNApps/src/mapHandler.cpp
+8
-3
SCHNApps/src/schnapps.cpp
SCHNApps/src/schnapps.cpp
+1
-37
SCHNApps/src/view.cpp
SCHNApps/src/view.cpp
+92
-86
No files found.
CGoGN/include/Container/attributeContainer.h
View file @
d11304b9
...
@@ -64,7 +64,7 @@ public:
...
@@ -64,7 +64,7 @@ public:
* the management of holes is shared by all attributes
* the management of holes is shared by all attributes
*/
*/
class
CGoGN_CONTAINER_API
AttributeContainer
class
CGoGN_CONTAINER_API
AttributeContainer
{
{
public:
public:
/**
/**
...
@@ -156,7 +156,7 @@ public:
...
@@ -156,7 +156,7 @@ public:
void
setRegistry
(
std
::
map
<
std
::
string
,
RegisteredBaseAttribute
*>*
re
);
void
setRegistry
(
std
::
map
<
std
::
string
,
RegisteredBaseAttribute
*>*
re
);
void
setContainerBrowser
(
ContainerBrowser
*
bro
)
{
m_currentBrowser
=
bro
;}
void
setContainerBrowser
(
ContainerBrowser
*
bro
)
{
m_currentBrowser
=
bro
;
}
bool
hasBrowser
()
{
return
m_currentBrowser
!=
NULL
;
}
bool
hasBrowser
()
{
return
m_currentBrowser
!=
NULL
;
}
...
@@ -176,7 +176,6 @@ public:
...
@@ -176,7 +176,6 @@ public:
/// special version for marker
/// special version for marker
AttributeMultiVector
<
MarkerBool
>*
addMarkerAttribute
(
const
std
::
string
&
attribName
);
AttributeMultiVector
<
MarkerBool
>*
addMarkerAttribute
(
const
std
::
string
&
attribName
);
/**
/**
* add a new attribute to the container
* add a new attribute to the container
* @param typeName type of the new attribute in a string
* @param typeName type of the new attribute in a string
...
@@ -185,7 +184,6 @@ public:
...
@@ -185,7 +184,6 @@ public:
*/
*/
AttributeMultiVectorGen
*
addAttribute
(
const
std
::
string
&
typeName
,
const
std
::
string
&
attribName
);
AttributeMultiVectorGen
*
addAttribute
(
const
std
::
string
&
typeName
,
const
std
::
string
&
attribName
);
protected:
protected:
/**
/**
* add a new attribute with a given index (for load only)
* add a new attribute with a given index (for load only)
...
@@ -275,8 +273,6 @@ public:
...
@@ -275,8 +273,6 @@ public:
*/
*/
void
next
(
unsigned
int
&
it
)
const
;
void
next
(
unsigned
int
&
it
)
const
;
/**
/**
* return the index of the first line of the container
* return the index of the first line of the container
*/
*/
...
@@ -293,7 +289,6 @@ public:
...
@@ -293,7 +289,6 @@ public:
*/
*/
void
realNext
(
unsigned
int
&
it
)
const
;
void
realNext
(
unsigned
int
&
it
)
const
;
/**
/**
* return the index of the last line of the container
* return the index of the last line of the container
*/
*/
...
@@ -334,7 +329,7 @@ public:
...
@@ -334,7 +329,7 @@ public:
* @return number of blocks
* @return number of blocks
*/
*/
template
<
typename
T
>
template
<
typename
T
>
unsigned
int
getAttributeBlocksPointers
(
unsigned
int
attrIndex
,
std
::
vector
<
T
*>&
vect_ptr
,
unsigned
int
&
byteBlockSize
);
unsigned
int
getAttributeBlocksPointers
(
unsigned
int
attrIndex
,
std
::
vector
<
T
*>&
vect_ptr
,
unsigned
int
&
byteBlockSize
)
const
;
/**
/**
* fill a vector with attributes names
* fill a vector with attributes names
...
@@ -343,13 +338,12 @@ public:
...
@@ -343,13 +338,12 @@ public:
*/
*/
unsigned
int
getAttributesNames
(
std
::
vector
<
std
::
string
>&
names
)
const
;
unsigned
int
getAttributesNames
(
std
::
vector
<
std
::
string
>&
names
)
const
;
/**
/**
* fill a vector with attribute type names
* fill a vector with attribute type names
* @param types vector of type names
* @param types vector of type names
* @return number of attributes
* @return number of attributes
*/
*/
unsigned
int
getAttributesTypes
(
std
::
vector
<
std
::
string
>&
types
);
unsigned
int
getAttributesTypes
(
std
::
vector
<
std
::
string
>&
types
)
const
;
std
::
vector
<
AttributeMultiVector
<
MarkerBool
>*>&
getMarkerAttributes
();
std
::
vector
<
AttributeMultiVector
<
MarkerBool
>*>&
getMarkerAttributes
();
...
@@ -468,7 +462,6 @@ public:
...
@@ -468,7 +462,6 @@ public:
inline
AttributeMultiVectorGen
*
getVirtualDataVector
(
unsigned
int
attrIndex
);
inline
AttributeMultiVectorGen
*
getVirtualDataVector
(
unsigned
int
attrIndex
);
/**
/**
* get an AttributeMultiVector
* get an AttributeMultiVector
* @param attribName name of the attribute
* @param attribName name of the attribute
...
@@ -508,8 +501,6 @@ public:
...
@@ -508,8 +501,6 @@ public:
template
<
typename
T
>
template
<
typename
T
>
void
setData
(
unsigned
int
attrIndex
,
unsigned
int
eltIndex
,
const
T
&
data
);
void
setData
(
unsigned
int
attrIndex
,
unsigned
int
eltIndex
,
const
T
&
data
);
/**************************************
/**************************************
* SAVE & LOAD *
* SAVE & LOAD *
**************************************/
**************************************/
...
@@ -548,19 +539,14 @@ public:
...
@@ -548,19 +539,14 @@ public:
void
dumpCSV
()
const
;
void
dumpCSV
()
const
;
void
dumpByLines
()
const
;
void
dumpByLines
()
const
;
};
};
}
// namespace CGoGN
}
// namespace CGoGN
#include "attributeContainer.hpp"
#include "
Container/
attributeContainer.hpp"
#endif
#endif
///**
///**
//* Container for AttributeMultiVectors
//* Container for AttributeMultiVectors
//* All the attributes always have the same size and
//* All the attributes always have the same size and
...
...
CGoGN/include/Container/attributeContainer.hpp
View file @
d11304b9
...
@@ -198,7 +198,7 @@ bool AttributeContainer::removeAttribute(unsigned int index)
...
@@ -198,7 +198,7 @@ bool AttributeContainer::removeAttribute(unsigned int index)
}
}
template
<
typename
T
>
template
<
typename
T
>
unsigned
int
AttributeContainer
::
getAttributeBlocksPointers
(
unsigned
int
attrIndex
,
std
::
vector
<
T
*>&
vect_ptr
,
unsigned
int
&
byteBlockSize
)
unsigned
int
AttributeContainer
::
getAttributeBlocksPointers
(
unsigned
int
attrIndex
,
std
::
vector
<
T
*>&
vect_ptr
,
unsigned
int
&
byteBlockSize
)
const
{
{
assert
(
attrIndex
<
m_tableAttribs
.
size
()
||
!
"getAttributeBlocksPointers: attribute index out of bounds"
);
assert
(
attrIndex
<
m_tableAttribs
.
size
()
||
!
"getAttributeBlocksPointers: attribute index out of bounds"
);
assert
(
m_tableAttribs
[
attrIndex
]
!=
NULL
||
!
"getAttributeBlocksPointers: attribute does not exist"
);
assert
(
m_tableAttribs
[
attrIndex
]
!=
NULL
||
!
"getAttributeBlocksPointers: attribute does not exist"
);
...
@@ -208,7 +208,6 @@ unsigned int AttributeContainer::getAttributeBlocksPointers(unsigned int attrInd
...
@@ -208,7 +208,6 @@ unsigned int AttributeContainer::getAttributeBlocksPointers(unsigned int attrInd
return
atm
->
getBlocksPointers
(
vect_ptr
,
byteBlockSize
);
return
atm
->
getBlocksPointers
(
vect_ptr
,
byteBlockSize
);
}
}
/**************************************
/**************************************
* INFO ABOUT THE CONTAINER *
* INFO ABOUT THE CONTAINER *
**************************************/
**************************************/
...
@@ -316,7 +315,6 @@ inline void AttributeContainer::realNext(unsigned int &it) const
...
@@ -316,7 +315,6 @@ inline void AttributeContainer::realNext(unsigned int &it) const
}
while
((
it
<
m_maxSize
)
&&
(
!
used
(
it
)));
}
while
((
it
<
m_maxSize
)
&&
(
!
used
(
it
)));
}
}
inline
unsigned
int
AttributeContainer
::
realRBegin
()
const
inline
unsigned
int
AttributeContainer
::
realRBegin
()
const
{
{
unsigned
int
it
=
m_maxSize
-
1
;
unsigned
int
it
=
m_maxSize
-
1
;
...
@@ -338,9 +336,6 @@ inline void AttributeContainer::realRNext(unsigned int &it) const
...
@@ -338,9 +336,6 @@ inline void AttributeContainer::realRNext(unsigned int &it) const
}
while
((
it
!=
0xffffffff
)
&&
(
!
used
(
it
)));
}
while
((
it
!=
0xffffffff
)
&&
(
!
used
(
it
)));
}
}
/**************************************
/**************************************
* LINES MANAGEMENT *
* LINES MANAGEMENT *
**************************************/
**************************************/
...
@@ -362,7 +357,6 @@ inline void AttributeContainer::initMarkersOfLine(unsigned int index)
...
@@ -362,7 +357,6 @@ inline void AttributeContainer::initMarkersOfLine(unsigned int index)
}
}
}
}
inline
void
AttributeContainer
::
copyLine
(
unsigned
int
dstIndex
,
unsigned
int
srcIndex
)
inline
void
AttributeContainer
::
copyLine
(
unsigned
int
dstIndex
,
unsigned
int
srcIndex
)
{
{
for
(
unsigned
int
i
=
0
;
i
<
m_tableAttribs
.
size
();
++
i
)
for
(
unsigned
int
i
=
0
;
i
<
m_tableAttribs
.
size
();
++
i
)
...
@@ -375,7 +369,6 @@ inline void AttributeContainer::copyLine(unsigned int dstIndex, unsigned int src
...
@@ -375,7 +369,6 @@ inline void AttributeContainer::copyLine(unsigned int dstIndex, unsigned int src
{
{
m_tableMarkerAttribs
[
i
]
->
copyElt
(
dstIndex
,
srcIndex
);
m_tableMarkerAttribs
[
i
]
->
copyElt
(
dstIndex
,
srcIndex
);
}
}
}
}
inline
void
AttributeContainer
::
refLine
(
unsigned
int
index
)
inline
void
AttributeContainer
::
refLine
(
unsigned
int
index
)
...
@@ -452,7 +445,6 @@ AttributeMultiVector<T>* AttributeContainer::getDataVector(const std::string& at
...
@@ -452,7 +445,6 @@ AttributeMultiVector<T>* AttributeContainer::getDataVector(const std::string& at
return
atm
;
return
atm
;
}
}
inline
CGoGNCodeType
AttributeContainer
::
getTypeCode
(
const
std
::
string
&
attribName
)
const
inline
CGoGNCodeType
AttributeContainer
::
getTypeCode
(
const
std
::
string
&
attribName
)
const
{
{
unsigned
int
index
=
getAttributeIndex
(
attribName
)
;
unsigned
int
index
=
getAttributeIndex
(
attribName
)
;
...
@@ -461,8 +453,6 @@ inline CGoGNCodeType AttributeContainer::getTypeCode(const std::string& attribNa
...
@@ -461,8 +453,6 @@ inline CGoGNCodeType AttributeContainer::getTypeCode(const std::string& attribNa
return
m_tableAttribs
[
index
]
->
getTypeCode
();
return
m_tableAttribs
[
index
]
->
getTypeCode
();
}
}
inline
AttributeMultiVectorGen
*
AttributeContainer
::
getVirtualDataVector
(
const
std
::
string
&
attribName
)
inline
AttributeMultiVectorGen
*
AttributeContainer
::
getVirtualDataVector
(
const
std
::
string
&
attribName
)
{
{
unsigned
int
index
=
getAttributeIndex
(
attribName
)
;
unsigned
int
index
=
getAttributeIndex
(
attribName
)
;
...
@@ -511,12 +501,9 @@ inline void AttributeContainer::setData(unsigned int attrIndex, unsigned int elt
...
@@ -511,12 +501,9 @@ inline void AttributeContainer::setData(unsigned int attrIndex, unsigned int elt
atm
->
operator
[](
eltIndex
)
=
data
;
atm
->
operator
[](
eltIndex
)
=
data
;
}
}
inline
std
::
vector
<
AttributeMultiVector
<
MarkerBool
>*>&
AttributeContainer
::
getMarkerAttributes
()
inline
std
::
vector
<
AttributeMultiVector
<
MarkerBool
>*>&
AttributeContainer
::
getMarkerAttributes
()
{
{
return
m_tableMarkerAttribs
;
return
m_tableMarkerAttribs
;
}
}
}
// namespace CGoGN
}
// namespace CGoGN
CGoGN/include/Geometry/bounding_box.hpp
View file @
d11304b9
...
@@ -81,7 +81,6 @@ template <typename VEC>
...
@@ -81,7 +81,6 @@ template <typename VEC>
typename
VEC
::
DATA_TYPE
BoundingBox
<
VEC
>::
maxSize
()
const
typename
VEC
::
DATA_TYPE
BoundingBox
<
VEC
>::
maxSize
()
const
{
{
assert
(
m_initialized
||
!
"Bounding box not initialized"
);
assert
(
m_initialized
||
!
"Bounding box not initialized"
);
typename
VEC
::
DATA_TYPE
max
=
m_pMax
[
0
]
-
m_pMin
[
0
]
;
typename
VEC
::
DATA_TYPE
max
=
m_pMax
[
0
]
-
m_pMin
[
0
]
;
for
(
unsigned
int
i
=
1
;
i
<
m_pMax
.
dimension
();
++
i
)
for
(
unsigned
int
i
=
1
;
i
<
m_pMax
.
dimension
();
++
i
)
{
{
...
@@ -96,7 +95,6 @@ template <typename VEC>
...
@@ -96,7 +95,6 @@ template <typename VEC>
typename
VEC
::
DATA_TYPE
BoundingBox
<
VEC
>::
minSize
()
const
typename
VEC
::
DATA_TYPE
BoundingBox
<
VEC
>::
minSize
()
const
{
{
assert
(
m_initialized
||
!
"Bounding box not initialized"
);
assert
(
m_initialized
||
!
"Bounding box not initialized"
);
typename
VEC
::
DATA_TYPE
min
=
m_pMax
[
0
]
-
m_pMin
[
0
]
;
typename
VEC
::
DATA_TYPE
min
=
m_pMax
[
0
]
-
m_pMin
[
0
]
;
for
(
unsigned
int
i
=
1
;
i
<
m_pMax
.
dimension
();
++
i
)
for
(
unsigned
int
i
=
1
;
i
<
m_pMax
.
dimension
();
++
i
)
{
{
...
...
CGoGN/include/Topology/generic/genericmap.h
View file @
d11304b9
...
@@ -47,7 +47,6 @@
...
@@ -47,7 +47,6 @@
#include "Topology/dll.h"
#include "Topology/dll.h"
namespace
CGoGN
namespace
CGoGN
{
{
...
...
CGoGN/src/Container/attributeContainer.cpp
View file @
d11304b9
...
@@ -92,7 +92,6 @@ namespace CGoGN
...
@@ -92,7 +92,6 @@ namespace CGoGN
return
m_tableAttribs
[
index
]
->
getName
()
;
return
m_tableAttribs
[
index
]
->
getName
()
;
}
}
unsigned
int
AttributeContainer
::
getAttributesNames
(
std
::
vector
<
std
::
string
>&
names
)
const
unsigned
int
AttributeContainer
::
getAttributesNames
(
std
::
vector
<
std
::
string
>&
names
)
const
{
{
names
.
clear
()
;
names
.
clear
()
;
...
@@ -107,23 +106,20 @@ namespace CGoGN
...
@@ -107,23 +106,20 @@ namespace CGoGN
return
m_nbAttributes
;
return
m_nbAttributes
;
}
}
unsigned
int
AttributeContainer
::
getAttributesTypes
(
std
::
vector
<
std
::
string
>&
types
)
const
unsigned
int
AttributeContainer
::
getAttributesTypes
(
std
::
vector
<
std
::
string
>&
types
)
{
{
types
.
clear
()
;
types
.
clear
()
;
types
.
reserve
(
m_nbAttributes
)
;
types
.
reserve
(
m_nbAttributes
)
;
for
(
unsigned
int
i
=
0
;
i
<
m_tableAttribs
.
size
();
++
i
)
for
(
unsigned
int
i
=
0
;
i
<
m_tableAttribs
.
size
();
++
i
)
{
{
if
(
m_tableAttribs
[
i
]
!=
NULL
)
if
(
m_tableAttribs
[
i
]
!=
NULL
)
types
.
push_back
(
m_tableAttribs
[
i
]
->
getTypeName
())
;
types
.
push_back
(
m_tableAttribs
[
i
]
->
getTypeName
())
;
}
}
return
m_nbAttributes
;
return
m_nbAttributes
;
}
}
/**************************************
/**************************************
* CONTAINER MANAGEMENT *
* CONTAINER MANAGEMENT *
**************************************/
**************************************/
...
...
SCHNApps/Plugins/surface_deformation/src/surface_deformation.cpp
View file @
d11304b9
...
@@ -35,25 +35,25 @@ void MapParameters::start(MapHandlerGen* mhg)
...
@@ -35,25 +35,25 @@ void MapParameters::start(MapHandlerGen* mhg)
{
{
MapHandler
<
PFP2
>*
mh
=
static_cast
<
MapHandler
<
PFP2
>*>
(
mhg
);
MapHandler
<
PFP2
>*
mh
=
static_cast
<
MapHandler
<
PFP2
>*>
(
mhg
);
positionInit
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
"positionInit"
,
false
);
positionInit
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
"positionInit"
);
if
(
!
positionInit
.
isValid
())
if
(
!
positionInit
.
isValid
())
positionInit
=
mh
->
addAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
"positionInit"
,
false
);
positionInit
=
mh
->
addAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
"positionInit"
);
diffCoord
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
"diffCoord"
,
false
);
diffCoord
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
"diffCoord"
);
if
(
!
diffCoord
.
isValid
())
if
(
!
diffCoord
.
isValid
())
diffCoord
=
mh
->
addAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
"diffCoord"
,
false
);
diffCoord
=
mh
->
addAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
"diffCoord"
);
vertexRotationMatrix
=
mh
->
getAttribute
<
Eigen_Matrix3f
,
VERTEX
>
(
"vertexRotationMatrix"
,
false
);
vertexRotationMatrix
=
mh
->
getAttribute
<
Eigen_Matrix3f
,
VERTEX
>
(
"vertexRotationMatrix"
);
if
(
!
vertexRotationMatrix
.
isValid
())
if
(
!
vertexRotationMatrix
.
isValid
())
vertexRotationMatrix
=
mh
->
addAttribute
<
Eigen_Matrix3f
,
VERTEX
>
(
"vertexRotationMatrix"
,
false
);
vertexRotationMatrix
=
mh
->
addAttribute
<
Eigen_Matrix3f
,
VERTEX
>
(
"vertexRotationMatrix"
);
rotatedDiffCoord
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
"rotatedDiffCoord"
,
false
);
rotatedDiffCoord
=
mh
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
"rotatedDiffCoord"
);
if
(
!
rotatedDiffCoord
.
isValid
())
if
(
!
rotatedDiffCoord
.
isValid
())
rotatedDiffCoord
=
mh
->
addAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
"rotatedDiffCoord"
,
false
);
rotatedDiffCoord
=
mh
->
addAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
"rotatedDiffCoord"
);
vIndex
=
mh
->
getAttribute
<
unsigned
int
,
VERTEX
>
(
"vIndex"
,
false
);
vIndex
=
mh
->
getAttribute
<
unsigned
int
,
VERTEX
>
(
"vIndex"
);
if
(
!
vIndex
.
isValid
())
if
(
!
vIndex
.
isValid
())
vIndex
=
mh
->
addAttribute
<
unsigned
int
,
VERTEX
>
(
"vIndex"
,
false
);
vIndex
=
mh
->
addAttribute
<
unsigned
int
,
VERTEX
>
(
"vIndex"
);
PFP2
::
MAP
*
map
=
static_cast
<
MapHandler
<
PFP2
>*>
(
mh
)
->
getMap
();
PFP2
::
MAP
*
map
=
static_cast
<
MapHandler
<
PFP2
>*>
(
mh
)
->
getMap
();
...
@@ -174,7 +174,6 @@ void Surface_Deformation_Plugin::keyPress(View* view, QKeyEvent* event)
...
@@ -174,7 +174,6 @@ void Surface_Deformation_Plugin::keyPress(View* view, QKeyEvent* event)
{
{
asRigidAsPossible
(
mh
);
asRigidAsPossible
(
mh
);
mh
->
notifyAttributeModification
(
p
.
positionAttribute
);
mh
->
notifyAttributeModification
(
p
.
positionAttribute
);
static_cast
<
MapHandler
<
PFP2
>*>
(
mh
)
->
updateBB
(
p
.
positionAttribute
);
view
->
updateGL
();
view
->
updateGL
();
}
}
}
}
...
@@ -225,7 +224,6 @@ void Surface_Deformation_Plugin::mouseMove(View* view, QMouseEvent* event)
...
@@ -225,7 +224,6 @@ void Surface_Deformation_Plugin::mouseMove(View* view, QMouseEvent* event)
{
{
asRigidAsPossible
(
mh
);
asRigidAsPossible
(
mh
);
mh
->
notifyAttributeModification
(
p
.
positionAttribute
);
mh
->
notifyAttributeModification
(
p
.
positionAttribute
);
static_cast
<
MapHandler
<
PFP2
>*>
(
mh
)
->
updateBB
(
p
.
positionAttribute
);
}
}
}
}
...
...
SCHNApps/Plugins/surface_differentialProperties/include/surface_differentialProperties.h
View file @
d11304b9
...
@@ -38,7 +38,7 @@ private slots:
...
@@ -38,7 +38,7 @@ private slots:
void
computeNormalFromDialog
();
void
computeNormalFromDialog
();
void
computeCurvatureFromDialog
();
void
computeCurvatureFromDialog
();
void
appsFinished
();
void
schnappsClosing
();
public
slots
:
public
slots
:
void
computeNormal
(
const
QString
&
mapName
,
void
computeNormal
(
const
QString
&
mapName
,
...
...
SCHNApps/Plugins/surface_differentialProperties/src/surface_differentialProperties.cpp
View file @
d11304b9
...
@@ -37,7 +37,7 @@ bool Surface_DifferentialProperties_Plugin::enable()
...
@@ -37,7 +37,7 @@ bool Surface_DifferentialProperties_Plugin::enable()
connect
(
m_schnapps
,
SIGNAL
(
mapAdded
(
MapHandlerGen
*
)),
this
,
SLOT
(
mapAdded
(
MapHandlerGen
*
)));
connect
(
m_schnapps
,
SIGNAL
(
mapAdded
(
MapHandlerGen
*
)),
this
,
SLOT
(
mapAdded
(
MapHandlerGen
*
)));
connect
(
m_schnapps
,
SIGNAL
(
mapRemoved
(
MapHandlerGen
*
)),
this
,
SLOT
(
mapRemoved
(
MapHandlerGen
*
)));
connect
(
m_schnapps
,
SIGNAL
(
mapRemoved
(
MapHandlerGen
*
)),
this
,
SLOT
(
mapRemoved
(
MapHandlerGen
*
)));
connect
(
m_schnapps
,
SIGNAL
(
appsFinished
()),
this
,
SLOT
(
appsFinished
()));
connect
(
m_schnapps
,
SIGNAL
(
schnappsClosing
()),
this
,
SLOT
(
schnappsClosing
()));
foreach
(
MapHandlerGen
*
map
,
m_schnapps
->
getMapSet
().
values
())
foreach
(
MapHandlerGen
*
map
,
m_schnapps
->
getMapSet
().
values
())
...
@@ -60,7 +60,7 @@ void Surface_DifferentialProperties_Plugin::disable()
...
@@ -60,7 +60,7 @@ void Surface_DifferentialProperties_Plugin::disable()
disconnect
(
m_schnapps
,
SIGNAL
(
mapAdded
(
MapHandlerGen
*
)),
this
,
SLOT
(
mapAdded
(
MapHandlerGen
*
)));
disconnect
(
m_schnapps
,
SIGNAL
(
mapAdded
(
MapHandlerGen
*
)),
this
,
SLOT
(
mapAdded
(
MapHandlerGen
*
)));
disconnect
(
m_schnapps
,
SIGNAL
(
mapRemoved
(
MapHandlerGen
*
)),
this
,
SLOT
(
mapRemoved
(
MapHandlerGen
*
)));
disconnect
(
m_schnapps
,
SIGNAL
(
mapRemoved
(
MapHandlerGen
*
)),
this
,
SLOT
(
mapRemoved
(
MapHandlerGen
*
)));
disconnect
(
m_schnapps
,
SIGNAL
(
appsFinished
()),
this
,
SLOT
(
appsFinished
()));
disconnect
(
m_schnapps
,
SIGNAL
(
schnappsClosing
()),
this
,
SLOT
(
schnappsClosing
()));
}
}
void
Surface_DifferentialProperties_Plugin
::
mapAdded
(
MapHandlerGen
*
map
)
void
Surface_DifferentialProperties_Plugin
::
mapAdded
(
MapHandlerGen
*
map
)
...
@@ -309,7 +309,7 @@ void Surface_DifferentialProperties_Plugin::computeCurvature(
...
@@ -309,7 +309,7 @@ void Surface_DifferentialProperties_Plugin::computeCurvature(
}
}
}
}
void
Surface_DifferentialProperties_Plugin
::
appsFinished
()
void
Surface_DifferentialProperties_Plugin
::
schnappsClosing
()
{
{
m_computeNormalDialog
->
close
();
m_computeNormalDialog
->
close
();
m_computeCurvatureDialog
->
close
();
m_computeCurvatureDialog
->
close
();
...
...
SCHNApps/Plugins/surface_distance/include/surface_distance.h
View file @
d11304b9
...
@@ -30,7 +30,7 @@ private slots:
...
@@ -30,7 +30,7 @@ private slots:
void
openComputeDistanceDialog
();
void
openComputeDistanceDialog
();
void
computeDistanceFromDialog
();
void
computeDistanceFromDialog
();
void
appsFinished
();
void
schnappsClosing
();
public
slots
:
public
slots
:
void
computeDistance
(
void
computeDistance
(
...
...
SCHNApps/Plugins/surface_distance/src/dialog_computeDistance.cpp
View file @
d11304b9
...
@@ -28,8 +28,8 @@ Dialog_ComputeDistance::Dialog_ComputeDistance(SCHNApps* s) :
...
@@ -28,8 +28,8 @@ Dialog_ComputeDistance::Dialog_ComputeDistance(SCHNApps* s) :
foreach
(
MapHandlerGen
*
map
,
m_schnapps
->
getMapSet
().
values
())
foreach
(
MapHandlerGen
*
map
,
m_schnapps
->
getMapSet
().
values
())
{
{
QListWidgetItem
*
item1
=
new
QListWidgetItem
(
map
->
getName
(),
list_maps_1
);
list_maps_1
->
addItem
(
map
->
getName
()
);
QListWidgetItem
*
item2
=
new
QListWidgetItem
(
map
->
getName
(),
list_maps_2
);
list_maps_2
->
addItem
(
map
->
getName
()
);
}
}
}
}
...
@@ -109,8 +109,8 @@ void Dialog_ComputeDistance::selectedMap2Changed()
...
@@ -109,8 +109,8 @@ void Dialog_ComputeDistance::selectedMap2Changed()
void
Dialog_ComputeDistance
::
addMapToList
(
MapHandlerGen
*
map
)
void
Dialog_ComputeDistance
::
addMapToList
(
MapHandlerGen
*
map
)
{
{
QListWidgetItem
*
item1
=
new
QListWidgetItem
(
map
->
getName
(),
list_maps_1
);
list_maps_1
->
addItem
(
map
->
getName
()
);
QListWidgetItem
*
item2
=
new
QListWidgetItem
(
map
->
getName
(),
list_maps_2
);
list_maps_2
->
addItem
(
map
->
getName
()
);
}
}
void
Dialog_ComputeDistance
::
removeMapFromList
(
MapHandlerGen
*
map
)
void
Dialog_ComputeDistance
::
removeMapFromList
(
MapHandlerGen
*
map
)
...
...
SCHNApps/Plugins/surface_distance/src/surface_distance.cpp
View file @
d11304b9
...
@@ -26,7 +26,7 @@ bool Surface_Distance_Plugin::enable()
...
@@ -26,7 +26,7 @@ bool Surface_Distance_Plugin::enable()
connect
(
m_computeDistanceDialog
,
SIGNAL
(
accepted
()),
this
,
SLOT
(
computeDistanceFromDialog
()));
connect
(
m_computeDistanceDialog
,
SIGNAL
(
accepted
()),
this
,
SLOT
(
computeDistanceFromDialog
()));
connect
(
m_computeDistanceDialog
->
button_apply
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
computeDistanceFromDialog
()));
connect
(
m_computeDistanceDialog
->
button_apply
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
computeDistanceFromDialog
()));
connect
(
m_schnapps
,
SIGNAL
(
appsFinished
()),
this
,
SLOT
(
appsFinished
()));
connect
(
m_schnapps
,
SIGNAL
(
schnappsClosing
()),
this
,
SLOT
(
schnappsClosing
()));
return
true
;
return
true
;
}
}
...
@@ -38,7 +38,7 @@ void Surface_Distance_Plugin::disable()
...
@@ -38,7 +38,7 @@ void Surface_Distance_Plugin::disable()
disconnect
(
m_computeDistanceDialog
,
SIGNAL
(
accepted
()),
this
,
SLOT
(
computeDistanceFromDialog
()));
disconnect
(
m_computeDistanceDialog
,
SIGNAL
(
accepted
()),
this
,
SLOT
(
computeDistanceFromDialog
()));
disconnect
(
m_computeDistanceDialog
->
button_apply
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
computeDistanceFromDialog
()));
disconnect
(
m_computeDistanceDialog
->
button_apply
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
computeDistanceFromDialog
()));
disconnect
(
m_schnapps
,
SIGNAL
(
appsFinished
()),
this
,
SLOT
(
appsFinished
()));
disconnect
(
m_schnapps
,
SIGNAL
(