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
David Cazier
CGoGN
Commits
333c45d8
Commit
333c45d8
authored
Jan 26, 2012
by
Sylvain Thery
Browse files
resolve some problems in marching-cube
parent
4f6dd032
Changes
13
Hide whitespace changes
Inline
Side-by-side
include/Algo/MC/buffer.h
View file @
333c45d8
...
...
@@ -121,17 +121,17 @@ protected:
/**
* position of the first slice in image
*/
int
32
m_lZpos
;
int
m_lZpos
;
/**
* width of slice
*/
int
32
m_lWidth
;
int
m_lWidth
;
/**
* heigth of slice
*/
int
32
m_lHeight
;
int
m_lHeight
;
public:
...
...
@@ -142,15 +142,15 @@ public:
* @param _lWidth the width of image to buffer
* @param _lHeight the height of image to buffer
*/
Buffer
(
int
32
_lWidth
,
int
32
_lHeight
);
Buffer
(
int
_lWidth
,
int
_lHeight
);
~
Buffer
();
/**
* @name Function to store the index of a point on edge O..11 of a cube
* @param int
32
_lX coordinate of the cube
* @param int
32
_lY coordinate of the cube
* @param int
32
_lPoint the index of the point
* @param int _lX coordinate of the cube
* @param int _lY coordinate of the cube
* @param int _lPoint the index of the point
*/
//@{
/**
...
...
@@ -159,26 +159,26 @@ public:
* @param _lY coordinate of the cube
* @param _lPoint the embedding
*/
void
setPointEdge0
(
int
32
_lX
,
int
32
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge1
(
int
32
_lX
,
int
32
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge2
(
int
32
_lX
,
int
32
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge3
(
int
32
_lX
,
int
32
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge4
(
int
32
_lX
,
int
32
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge5
(
int
32
_lX
,
int
32
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge6
(
int
32
_lX
,
int
32
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge7
(
int
32
_lX
,
int
32
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge8
(
int
32
_lX
,
int
32
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge9
(
int
32
_lX
,
int
32
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge10
(
int
32
_lX
,
int
32
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge11
(
int
32
_lX
,
int
32
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge0
(
int
_lX
,
int
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge1
(
int
_lX
,
int
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge2
(
int
_lX
,
int
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge3
(
int
_lX
,
int
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge4
(
int
_lX
,
int
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge5
(
int
_lX
,
int
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge6
(
int
_lX
,
int
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge7
(
int
_lX
,
int
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge8
(
int
_lX
,
int
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge9
(
int
_lX
,
int
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge10
(
int
_lX
,
int
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge11
(
int
_lX
,
int
_lY
,
unsigned
int
_lPoint
);
//@}
/**
* @name Function to get the index of point store on edge O..11 of a cube
****************************************************
* @param int
32
_lX coordinate of the cube
* @param int
32
_lY coordinate of the cube
* @param int
32
_lPoint the index of the point
* @param int _lX coordinate of the cube
* @param int _lY coordinate of the cube
* @param int _lPoint the index of the point
*/
//@{
/**
...
...
@@ -188,18 +188,18 @@ public:
* @param _lY coordinate of the cube
* @return the index of the point
*/
unsigned
int
getPointEdge0
(
int
32
_lX
,
int
32
_lY
);
unsigned
int
getPointEdge1
(
int
32
_lX
,
int
32
_lY
);
unsigned
int
getPointEdge2
(
int
32
_lX
,
int
32
_lY
);
unsigned
int
getPointEdge3
(
int
32
_lX
,
int
32
_lY
);
unsigned
int
getPointEdge4
(
int
32
_lX
,
int
32
_lY
);
unsigned
int
getPointEdge5
(
int
32
_lX
,
int
32
_lY
);
unsigned
int
getPointEdge6
(
int
32
_lX
,
int
32
_lY
);
unsigned
int
getPointEdge7
(
int
32
_lX
,
int
32
_lY
);
unsigned
int
getPointEdge8
(
int
32
_lX
,
int
32
_lY
);
unsigned
int
getPointEdge9
(
int
32
_lX
,
int
32
_lY
);
unsigned
int
getPointEdge10
(
int
32
_lX
,
int
32
_lY
);
unsigned
int
getPointEdge11
(
int
32
_lX
,
int
32
_lY
);
unsigned
int
getPointEdge0
(
int
_lX
,
int
_lY
);
unsigned
int
getPointEdge1
(
int
_lX
,
int
_lY
);
unsigned
int
getPointEdge2
(
int
_lX
,
int
_lY
);
unsigned
int
getPointEdge3
(
int
_lX
,
int
_lY
);
unsigned
int
getPointEdge4
(
int
_lX
,
int
_lY
);
unsigned
int
getPointEdge5
(
int
_lX
,
int
_lY
);
unsigned
int
getPointEdge6
(
int
_lX
,
int
_lY
);
unsigned
int
getPointEdge7
(
int
_lX
,
int
_lY
);
unsigned
int
getPointEdge8
(
int
_lX
,
int
_lY
);
unsigned
int
getPointEdge9
(
int
_lX
,
int
_lY
);
unsigned
int
getPointEdge10
(
int
_lX
,
int
_lY
);
unsigned
int
getPointEdge11
(
int
_lX
,
int
_lY
);
//@}
/**
...
...
@@ -209,7 +209,7 @@ public:
* @param _lY y coordinate of cube
* @return table of faces
*/
DART
*
getFacesCubeTableAdr
(
int
32
_lX
,
int
32
_lY
);
DART
*
getFacesCubeTableAdr
(
int
_lX
,
int
_lY
);
/**
* get dart table of faces stored on edge O..11 of a cube
...
...
@@ -219,7 +219,7 @@ public:
* @param _lZ z coordinate of the cube
* @return table of faces
*/
const
DART
*
getFacesCube
(
int
32
_lX
,
int
32
_lY
,
int
32
_lZ
)
const
;
const
DART
*
getFacesCube
(
int
_lX
,
int
_lY
,
int
_lZ
)
const
;
/**
...
...
@@ -229,7 +229,7 @@ public:
* @param _lY y coordinate of the cube
* @param _lFace table of faces index
*/
void
setFacesCube
(
int
32
_lX
,
int
32
_lY
,
const
DART
*
const
_lFace
);
void
setFacesCube
(
int
_lX
,
int
_lY
,
const
DART
*
const
_lFace
);
/**
...
...
@@ -246,7 +246,7 @@ public:
* @param _lNeighbour neighbour to store
*/
void
setExternalNeighbour
(
int8
_cEdge
,
int
32
_lX
,
int
32
_lY
,
DART
_lNeighbour
);
void
setExternalNeighbour
(
char
_cEdge
,
int
_lX
,
int
_lY
,
DART
_lNeighbour
);
/**
* get neighbour stored on edge O..11 of a cube
...
...
@@ -256,7 +256,7 @@ public:
* @param _lY y coordinate of the cube
* @return the neighbour
*/
DART
getExternalNeighbour
(
int8
_cEdge
,
int
32
_lX
,
int
32
_lY
)
const
;
DART
getExternalNeighbour
(
char
_cEdge
,
int
_lX
,
int
_lY
)
const
;
};
...
...
include/Algo/MC/buffer.hpp
View file @
333c45d8
...
...
@@ -35,7 +35,7 @@ namespace MC
* constructor
*/
template
<
typename
DART
>
Buffer
<
DART
>::
Buffer
(
int
32
_lWidth
,
int
32
_lHeight
)
Buffer
<
DART
>::
Buffer
(
int
_lWidth
,
int
_lHeight
)
{
m_lWidth
=
_lWidth
+
1
;
m_lHeight
=
_lHeight
+
1
;
...
...
@@ -62,7 +62,7 @@ Buffer<DART>::~Buffer()
* get the face inside a cube of the buffer
*/
// template <typename DART>
// const DART* Buffer<DART>::getFacesCube(int
32
_lX, int
32
_lY, int
32
_lZ) const
// const DART* Buffer<DART>::getFacesCube(int _lX, int _lY, int _lZ) const
// {
//
// if (_lZ == m_lZpos) // if current slice ..
...
...
@@ -83,7 +83,7 @@ Buffer<DART>::~Buffer()
* set the face inside a cube of the buffer
*/
template
<
typename
DART
>
void
Buffer
<
DART
>::
setFacesCube
(
int
32
_lX
,
int
32
_lY
,
const
DART
*
const
_lFace
)
void
Buffer
<
DART
>::
setFacesCube
(
int
_lX
,
int
_lY
,
const
DART
*
const
_lFace
)
{
// get the address of cube's table
DART
*
lLocFaces
=
m_hcSlice1
[
_lX
+
_lY
*
m_lWidth
].
m_lFaceEdges
;
...
...
@@ -114,7 +114,7 @@ void Buffer<DART>::nextSlice()
* get address of face table for direct access
*/
template
<
typename
DART
>
DART
*
Buffer
<
DART
>::
getFacesCubeTableAdr
(
int
32
_lX
,
int
32
_lY
)
DART
*
Buffer
<
DART
>::
getFacesCubeTableAdr
(
int
_lX
,
int
_lY
)
{
return
m_hcSlice0
[
_lX
+
_lY
*
m_lWidth
].
m_lFaceEdges
;
}
...
...
@@ -125,84 +125,84 @@ DART* Buffer<DART>::getFacesCubeTableAdr(int32 _lX,int32 _lY)
*/
template
<
typename
DART
>
void
Buffer
<
DART
>::
setPointEdge0
(
int
32
_lX
,
int
32
_lY
,
unsigned
int
_lPoint
)
void
Buffer
<
DART
>::
setPointEdge0
(
int
_lX
,
int
_lY
,
unsigned
int
_lPoint
)
{
m_hcSlice0
[
_lX
+
_lY
*
m_lWidth
].
m_lX
=
_lPoint
;
}
template
<
typename
DART
>
void
Buffer
<
DART
>::
setPointEdge3
(
int
32
_lX
,
int
32
_lY
,
unsigned
int
_lPoint
)
void
Buffer
<
DART
>::
setPointEdge3
(
int
_lX
,
int
_lY
,
unsigned
int
_lPoint
)
{
m_hcSlice0
[
_lX
+
(
_lY
-
1
)
*
m_lWidth
].
m_lY
=
_lPoint
;
}
template
<
typename
DART
>
void
Buffer
<
DART
>::
setPointEdge8
(
int
32
_lX
,
int
32
_lY
,
unsigned
int
_lPoint
)
void
Buffer
<
DART
>::
setPointEdge8
(
int
_lX
,
int
_lY
,
unsigned
int
_lPoint
)
{
m_hcSlice0
[
_lX
+
_lY
*
m_lWidth
].
m_lZ
=
_lPoint
;
}
template
<
typename
DART
>
void
Buffer
<
DART
>::
setPointEdge2
(
int
32
_lX
,
int
32
_lY
,
unsigned
int
_lPoint
)
void
Buffer
<
DART
>::
setPointEdge2
(
int
_lX
,
int
_lY
,
unsigned
int
_lPoint
)
{
m_hcSlice0
[(
_lX
-
1
)
+
_lY
*
m_lWidth
].
m_lX
=
_lPoint
;
}
template
<
typename
DART
>
void
Buffer
<
DART
>::
setPointEdge11
(
int
32
_lX
,
int
32
_lY
,
unsigned
int
_lPoint
)
void
Buffer
<
DART
>::
setPointEdge11
(
int
_lX
,
int
_lY
,
unsigned
int
_lPoint
)
{
m_hcSlice0
[
_lX
+
_lY
*
m_lWidth
].
m_lZ
=
_lPoint
;
}
template
<
typename
DART
>
void
Buffer
<
DART
>::
setPointEdge1
(
int
32
_lX
,
int
32
_lY
,
unsigned
int
_lPoint
)
void
Buffer
<
DART
>::
setPointEdge1
(
int
_lX
,
int
_lY
,
unsigned
int
_lPoint
)
{
m_hcSlice0
[
_lX
+
_lY
*
m_lWidth
].
m_lY
=
_lPoint
;
}
template
<
typename
DART
>
void
Buffer
<
DART
>::
setPointEdge9
(
int
32
_lX
,
int
32
_lY
,
unsigned
int
_lPoint
)
void
Buffer
<
DART
>::
setPointEdge9
(
int
_lX
,
int
_lY
,
unsigned
int
_lPoint
)
{
m_hcSlice0
[
_lX
+
_lY
*
m_lWidth
].
m_lZ
=
_lPoint
;
}
template
<
typename
DART
>
void
Buffer
<
DART
>::
setPointEdge10
(
int
32
_lX
,
int
32
_lY
,
unsigned
int
_lPoint
)
void
Buffer
<
DART
>::
setPointEdge10
(
int
_lX
,
int
_lY
,
unsigned
int
_lPoint
)
{
m_hcSlice0
[
_lX
+
_lY
*
m_lWidth
].
m_lZ
=
_lPoint
;
}
template
<
typename
DART
>
void
Buffer
<
DART
>::
setPointEdge7
(
int
32
_lX
,
int
32
_lY
,
unsigned
int
_lPoint
)
void
Buffer
<
DART
>::
setPointEdge7
(
int
_lX
,
int
_lY
,
unsigned
int
_lPoint
)
{
m_hcSlice1
[
_lX
+
(
_lY
-
1
)
*
m_lWidth
].
m_lY
=
_lPoint
;
}
template
<
typename
DART
>
void
Buffer
<
DART
>::
setPointEdge4
(
int
32
_lX
,
int
32
_lY
,
unsigned
int
_lPoint
)
void
Buffer
<
DART
>::
setPointEdge4
(
int
_lX
,
int
_lY
,
unsigned
int
_lPoint
)
{
m_hcSlice1
[
_lX
+
_lY
*
m_lWidth
].
m_lX
=
_lPoint
;
}
template
<
typename
DART
>
void
Buffer
<
DART
>::
setPointEdge6
(
int
32
_lX
,
int
32
_lY
,
unsigned
int
_lPoint
)
void
Buffer
<
DART
>::
setPointEdge6
(
int
_lX
,
int
_lY
,
unsigned
int
_lPoint
)
{
m_hcSlice1
[(
_lX
-
1
)
+
_lY
*
m_lWidth
].
m_lX
=
_lPoint
;
}
template
<
typename
DART
>
void
Buffer
<
DART
>::
setPointEdge5
(
int
32
_lX
,
int
32
_lY
,
unsigned
int
_lPoint
)
void
Buffer
<
DART
>::
setPointEdge5
(
int
_lX
,
int
_lY
,
unsigned
int
_lPoint
)
{
m_hcSlice1
[
_lX
+
_lY
*
m_lWidth
].
m_lY
=
_lPoint
;
}
...
...
@@ -213,91 +213,91 @@ void Buffer<DART>::setPointEdge5(int32 _lX,int32 _lY, unsigned int _lPoint)
*/
template
<
typename
DART
>
unsigned
int
Buffer
<
DART
>::
getPointEdge0
(
int
32
_lX
,
int
32
_lY
)
unsigned
int
Buffer
<
DART
>::
getPointEdge0
(
int
_lX
,
int
_lY
)
{
return
m_hcSlice0
[
_lX
+
_lY
*
m_lWidth
].
m_lX
;
}
template
<
typename
DART
>
unsigned
int
Buffer
<
DART
>::
getPointEdge3
(
int
32
_lX
,
int
32
_lY
)
unsigned
int
Buffer
<
DART
>::
getPointEdge3
(
int
_lX
,
int
_lY
)
{
return
m_hcSlice0
[
_lX
+
_lY
*
m_lWidth
].
m_lY
;
}
template
<
typename
DART
>
unsigned
int
Buffer
<
DART
>::
getPointEdge8
(
int
32
_lX
,
int
32
_lY
)
unsigned
int
Buffer
<
DART
>::
getPointEdge8
(
int
_lX
,
int
_lY
)
{
return
m_hcSlice0
[
_lX
+
_lY
*
m_lWidth
].
m_lZ
;
}
template
<
typename
DART
>
unsigned
int
Buffer
<
DART
>::
getPointEdge2
(
int
32
_lX
,
int
32
_lY
)
unsigned
int
Buffer
<
DART
>::
getPointEdge2
(
int
_lX
,
int
_lY
)
{
return
m_hcSlice0
[
_lX
+
(
_lY
+
1
)
*
m_lWidth
].
m_lX
;
}
template
<
typename
DART
>
unsigned
int
Buffer
<
DART
>::
getPointEdge11
(
int
32
_lX
,
int
32
_lY
)
unsigned
int
Buffer
<
DART
>::
getPointEdge11
(
int
_lX
,
int
_lY
)
{
return
m_hcSlice0
[
_lX
+
(
_lY
+
1
)
*
m_lWidth
].
m_lZ
;
}
template
<
typename
DART
>
unsigned
int
Buffer
<
DART
>::
getPointEdge1
(
int
32
_lX
,
int
32
_lY
)
unsigned
int
Buffer
<
DART
>::
getPointEdge1
(
int
_lX
,
int
_lY
)
{
return
m_hcSlice0
[(
_lX
+
1
)
+
_lY
*
m_lWidth
].
m_lY
;
}
template
<
typename
DART
>
unsigned
int
Buffer
<
DART
>::
getPointEdge9
(
int
32
_lX
,
int
32
_lY
)
unsigned
int
Buffer
<
DART
>::
getPointEdge9
(
int
_lX
,
int
_lY
)
{
return
m_hcSlice0
[(
_lX
+
1
)
+
_lY
*
m_lWidth
].
m_lZ
;
}
template
<
typename
DART
>
unsigned
int
Buffer
<
DART
>::
getPointEdge10
(
int
32
_lX
,
int
32
_lY
)
unsigned
int
Buffer
<
DART
>::
getPointEdge10
(
int
_lX
,
int
_lY
)
{
return
m_hcSlice0
[(
_lX
+
1
)
+
(
_lY
+
1
)
*
m_lWidth
].
m_lZ
;
}
template
<
typename
DART
>
unsigned
int
Buffer
<
DART
>::
getPointEdge7
(
int
32
_lX
,
int
32
_lY
)
unsigned
int
Buffer
<
DART
>::
getPointEdge7
(
int
_lX
,
int
_lY
)
{
return
m_hcSlice1
[
_lX
+
_lY
*
m_lWidth
].
m_lY
;
}
template
<
typename
DART
>
unsigned
int
Buffer
<
DART
>::
getPointEdge4
(
int
32
_lX
,
int
32
_lY
)
unsigned
int
Buffer
<
DART
>::
getPointEdge4
(
int
_lX
,
int
_lY
)
{
return
m_hcSlice1
[
_lX
+
_lY
*
m_lWidth
].
m_lX
;
}
template
<
typename
DART
>
unsigned
int
Buffer
<
DART
>::
getPointEdge6
(
int
32
_lX
,
int
32
_lY
)
unsigned
int
Buffer
<
DART
>::
getPointEdge6
(
int
_lX
,
int
_lY
)
{
return
m_hcSlice1
[
_lX
+
(
_lY
+
1
)
*
m_lWidth
].
m_lX
;
}
template
<
typename
DART
>
unsigned
int
Buffer
<
DART
>::
getPointEdge5
(
int
32
_lX
,
int
32
_lY
)
unsigned
int
Buffer
<
DART
>::
getPointEdge5
(
int
_lX
,
int
_lY
)
{
return
m_hcSlice1
[(
_lX
+
1
)
+
_lY
*
m_lWidth
].
m_lY
;
}
template
<
typename
DART
>
DART
Buffer
<
DART
>::
getExternalNeighbour
(
int8
_cEdge
,
int
32
_lX
,
int
32
_lY
)
const
DART
Buffer
<
DART
>::
getExternalNeighbour
(
char
_cEdge
,
int
_lX
,
int
_lY
)
const
{
switch
(
_cEdge
)
...
...
@@ -362,7 +362,7 @@ CGoGNerr << "ERROR"<<CGoGNendl;
template
<
typename
DART
>
void
Buffer
<
DART
>::
setExternalNeighbour
(
int8
_cEdge
,
int
32
_lX
,
int
32
_lY
,
DART
_lNeighbour
)
void
Buffer
<
DART
>::
setExternalNeighbour
(
char
_cEdge
,
int
_lX
,
int
_lY
,
DART
_lNeighbour
)
{
switch
(
_cEdge
)
{
...
...
include/Algo/MC/bufferGen.h
View file @
333c45d8
...
...
@@ -128,17 +128,17 @@ protected:
/**
* position of the first slice in image
*/
int
32
m_lZpos
;
int
m_lZpos
;
/**
* width of slice
*/
int
32
m_lWidth
;
int
m_lWidth
;
/**
* heigth of slice
*/
int
32
m_lHeight
;
int
m_lHeight
;
public:
...
...
@@ -149,7 +149,7 @@ public:
* @param _lWidth the width of image to buffer
* @param _lHeight the height of image to buffer
*/
BufferGen
(
int
32
_lWidth
,
int
32
_lHeight
);
BufferGen
(
int
_lWidth
,
int
_lHeight
);
~
BufferGen
();
...
...
@@ -159,9 +159,9 @@ public:
/**
* @name Function to store the index of a point on edge O..11 of a cube
* @param int
32
_lX coordinate of the cube
* @param int
32
_lY coordinate of the cube
* @param int
32
_lPoint the index of the point
* @param int _lX coordinate of the cube
* @param int _lY coordinate of the cube
* @param int _lPoint the index of the point
*/
//@{
/**
...
...
@@ -170,26 +170,26 @@ public:
* @param _lY coordinate of the cube
* @param _lPoint the embedding
*/
void
setPointEdge0
(
int
32
_lX
,
int
32
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge1
(
int
32
_lX
,
int
32
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge2
(
int
32
_lX
,
int
32
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge3
(
int
32
_lX
,
int
32
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge4
(
int
32
_lX
,
int
32
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge5
(
int
32
_lX
,
int
32
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge6
(
int
32
_lX
,
int
32
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge7
(
int
32
_lX
,
int
32
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge8
(
int
32
_lX
,
int
32
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge9
(
int
32
_lX
,
int
32
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge10
(
int
32
_lX
,
int
32
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge11
(
int
32
_lX
,
int
32
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge0
(
int
_lX
,
int
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge1
(
int
_lX
,
int
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge2
(
int
_lX
,
int
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge3
(
int
_lX
,
int
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge4
(
int
_lX
,
int
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge5
(
int
_lX
,
int
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge6
(
int
_lX
,
int
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge7
(
int
_lX
,
int
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge8
(
int
_lX
,
int
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge9
(
int
_lX
,
int
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge10
(
int
_lX
,
int
_lY
,
unsigned
int
_lPoint
);
void
setPointEdge11
(
int
_lX
,
int
_lY
,
unsigned
int
_lPoint
);
//@}
/**
* @name Function to get the index of point store on edge O..11 of a cube
****************************************************
* @param int
32
_lX coordinate of the cube
* @param int
32
_lY coordinate of the cube
* @param int
32
_lPoint the index of the point
* @param int _lX coordinate of the cube
* @param int _lY coordinate of the cube
* @param int _lPoint the index of the point
*/
//@{
/**
...
...
@@ -199,18 +199,18 @@ public:
* @param _lY coordinate of the cube
* @return the index of the point
*/
unsigned
int
getPointEdge0
(
int
32
_lX
,
int
32
_lY
);
unsigned
int
getPointEdge1
(
int
32
_lX
,
int
32
_lY
);
unsigned
int
getPointEdge2
(
int
32
_lX
,
int
32
_lY
);
unsigned
int
getPointEdge3
(
int
32
_lX
,
int
32
_lY
);
unsigned
int
getPointEdge4
(
int
32
_lX
,
int
32
_lY
);
unsigned
int
getPointEdge5
(
int
32
_lX
,
int
32
_lY
);
unsigned
int
getPointEdge6
(
int
32
_lX
,
int
32
_lY
);
unsigned
int
getPointEdge7
(
int
32
_lX
,
int
32
_lY
);
unsigned
int
getPointEdge8
(
int
32
_lX
,
int
32
_lY
);
unsigned
int
getPointEdge9
(
int
32
_lX
,
int
32
_lY
);
unsigned
int
getPointEdge10
(
int
32
_lX
,
int
32
_lY
);
unsigned
int
getPointEdge11
(
int
32
_lX
,
int
32
_lY
);
unsigned
int
getPointEdge0
(
int
_lX
,
int
_lY
);
unsigned
int
getPointEdge1
(
int
_lX
,
int
_lY
);
unsigned
int
getPointEdge2
(
int
_lX
,
int
_lY
);
unsigned
int
getPointEdge3
(
int
_lX
,
int
_lY
);
unsigned
int
getPointEdge4
(
int
_lX
,
int
_lY
);
unsigned
int
getPointEdge5
(
int
_lX
,
int
_lY
);
unsigned
int
getPointEdge6
(
int
_lX
,
int
_lY
);
unsigned
int
getPointEdge7
(
int
_lX
,
int
_lY
);
unsigned
int
getPointEdge8
(
int
_lX
,
int
_lY
);
unsigned
int
getPointEdge9
(
int
_lX
,
int
_lY
);
unsigned
int
getPointEdge10
(
int
_lX
,
int
_lY
);
unsigned
int
getPointEdge11
(
int
_lX
,
int
_lY
);
//@}
/**
...
...
@@ -220,7 +220,7 @@ public:
* @param _lY y coordinate of cube
* @return table of faces
*/
DART
*
getFacesCubeTableAdr
(
int
32
_lX
,
int
32
_lY
);
DART
*
getFacesCubeTableAdr
(
int
_lX
,
int
_lY
);
/**
* get dart table of faces stored on edge O..11 of a cube
...
...
@@ -230,7 +230,7 @@ public:
* @param _lZ z coordinate of the cube
* @return table of faces
*/
const
DART
*
getFacesCube
(
int
32
_lX
,
int
32
_lY
,
int
32
_lZ
)
const
;
const
DART
*
getFacesCube
(
int
_lX
,
int
_lY
,
int
_lZ
)
const
;
/**
...
...
@@ -240,7 +240,7 @@ public:
* @param _lY y coordinate of the cube
* @param _lFace table of faces index
*/
void
setFacesCube
(
int
32
_lX
,
int
32
_lY
,
const
DART
*
const
_lFace
);
void
setFacesCube
(
int
_lX
,
int
_lY
,
const
DART
*
const
_lFace
);
/**
...
...
@@ -257,7 +257,7 @@ public:
* @param _lNeighbour neighbour to store
*/
void
setExternalNeighbour
(
int8
_cEdge
,
int
32
_lX
,
int
32
_lY
,
DART
_lNeighbour
);
void
setExternalNeighbour
(
char
_cEdge
,
int
_lX
,
int
_lY
,
DART
_lNeighbour
);
/**
* get neighbour stored on edge O..11 of a cube
...
...
@@ -267,16 +267,16 @@ public:
* @param _lY y coordinate of the cube
* @return the neighbour
*/
DART
getExternalNeighbour
(
int8
_cEdge
,
int
32
_lX
,
int
32
_lY
)
const
;
DART
getExternalNeighbour
(
char
_cEdge
,
int
_lX
,
int
_lY
)
const
;
void
setData
(
int
32
_lX
,
int
32
_lY
,
DATATYPE
data
);
void
setData
(
int
_lX
,
int
_lY
,
DATATYPE
data
);
DATATYPE
getData
(
int
32
_lX
,
int
32
_lY
);
DATATYPE
getData
(
int
_lX
,
int
_lY
);
void
setData2
(
int
32
_lX
,
int
32
_lY
,
DATATYPE
data
);
void
setData2
(
int
_lX
,
int
_lY
,
DATATYPE
data
);
DATATYPE
getData2
(
int
32
_lX
,
int
32
_lY
);
DATATYPE
getData2
(
int
_lX
,
int
_lY
);
DATATYPE
*
getDataPtr
()
{
return
m_dataSl0
;}
DATATYPE
*
getData2Ptr
()
{
return
m_dataSl1
;}
...
...
include/Algo/MC/bufferGen.hpp
View file @
333c45d8
...
...
@@ -35,7 +35,7 @@ namespace MC
* constructor
*/
template
<
typename
DART
,
typename
DATATYPE
>
BufferGen
<
DART
,
DATATYPE
>::
BufferGen
(
int
32
_lWidth
,
int
32
_lHeight
)
BufferGen
<
DART
,
DATATYPE
>::
BufferGen
(
int
_lWidth
,
int
_lHeight
)
{
m_lWidth
=
_lWidth
+
1
;
m_lHeight
=
_lHeight
+
1
;
...
...
@@ -69,7 +69,7 @@ BufferGen<DART,DATATYPE>::~BufferGen()
* get the face inside a cube of the buffer
*/
// template <typename DART, typename DATATYPE>
// const DART* BufferGen<DART,DATATYPE>::getFacesCube(int
32
_lX, int
32
_lY, int
32
_lZ) const
// const DART* BufferGen<DART,DATATYPE>::getFacesCube(int _lX, int _lY, int _lZ) const
// {
//
// if (_lZ == m_lZpos) // if current slice ..
...
...
@@ -90,7 +90,7 @@ BufferGen<DART,DATATYPE>::~BufferGen()
* set the face inside a cube of the buffer
*/
template
<
typename
DART
,
typename
DATATYPE
>
void
BufferGen
<
DART
,
DATATYPE
>::
setFacesCube
(
int
32
_lX
,
int
32
_lY
,
const
DART
*
const
_lFace
)
void
BufferGen
<
DART
,
DATATYPE
>::
setFacesCube
(
int
_lX
,
int
_lY
,
const
DART
*
const
_lFace
)
{
// get the address of cube's table
DART
*
lLocFaces
=
m_hcSlice1
[
_lX
+
_lY
*
m_lWidth
].
m_lFaceEdges
;
...
...
@@ -125,7 +125,7 @@ void BufferGen<DART,DATATYPE>::nextSlice()
* get address of face table for direct access
*/
template
<
typename
DART
,
typename
DATATYPE
>
DART
*
BufferGen
<
DART
,
DATATYPE
>::
getFacesCubeTableAdr
(
int
32
_lX
,
int
32
_lY
)
DART
*
BufferGen
<
DART
,
DATATYPE
>::
getFacesCubeTableAdr
(
int
_lX
,
int
_lY
)
{
return
m_hcSlice0
[
_lX
+
_lY
*
m_lWidth
].
m_lFaceEdges
;
}
...
...
@@ -136,84 +136,84 @@ DART* BufferGen<DART,DATATYPE>::getFacesCubeTableAdr(int32 _lX,int32 _lY)
*/
template
<
typename
DART
,
typename
DATATYPE
>
void
BufferGen
<
DART
,
DATATYPE
>::
setPointEdge0
(
int
32
_lX
,
int
32
_lY
,
unsigned
int
_lPoint
)