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
8a7389f2
Commit
8a7389f2
authored
Feb 23, 2015
by
Sylvain Thery
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove last 64bits & float/double warnings
parent
6fc2e3cb
Changes
35
Hide whitespace changes
Inline
Side-by-side
Showing
35 changed files
with
129 additions
and
101 deletions
+129
-101
Apps/Examples/clipping.cpp
Apps/Examples/clipping.cpp
+3
-3
Apps/Examples/volumeExplorer.cpp
Apps/Examples/volumeExplorer.cpp
+1
-1
CGoGN/include/Algo/Export/exportVol.hpp
CGoGN/include/Algo/Export/exportVol.hpp
+11
-11
CGoGN/include/Algo/Filtering/bilateral.h
CGoGN/include/Algo/Filtering/bilateral.h
+1
-1
CGoGN/include/Algo/Histogram/histogram.h
CGoGN/include/Algo/Histogram/histogram.h
+0
-1
CGoGN/include/Algo/Import/importObjTex.h
CGoGN/include/Algo/Import/importObjTex.h
+1
-1
CGoGN/include/Algo/Import/importObjTex.hpp
CGoGN/include/Algo/Import/importObjTex.hpp
+10
-10
CGoGN/include/Algo/Import/importPlyData.h
CGoGN/include/Algo/Import/importPlyData.h
+1
-1
CGoGN/include/Algo/MC/image.hpp
CGoGN/include/Algo/MC/image.hpp
+3
-3
CGoGN/include/Algo/Modelisation/extrusion.h
CGoGN/include/Algo/Modelisation/extrusion.h
+1
-1
CGoGN/include/Algo/Modelisation/extrusion.hpp
CGoGN/include/Algo/Modelisation/extrusion.hpp
+5
-5
CGoGN/include/Algo/Modelisation/planeCutting.h
CGoGN/include/Algo/Modelisation/planeCutting.h
+1
-1
CGoGN/include/Algo/Modelisation/subdivision.h
CGoGN/include/Algo/Modelisation/subdivision.h
+2
-1
CGoGN/include/Algo/Modelisation/subdivision.hpp
CGoGN/include/Algo/Modelisation/subdivision.hpp
+0
-2
CGoGN/include/Algo/Modelisation/subdivision3.h
CGoGN/include/Algo/Modelisation/subdivision3.h
+1
-1
CGoGN/include/Algo/Modelisation/triangulation.h
CGoGN/include/Algo/Modelisation/triangulation.h
+1
-1
CGoGN/include/Algo/Render/GL1/topo_render.hpp
CGoGN/include/Algo/Render/GL1/topo_render.hpp
+1
-1
CGoGN/include/Algo/Render/GL2/explodeVolumeRender.hpp
CGoGN/include/Algo/Render/GL2/explodeVolumeRender.hpp
+13
-13
CGoGN/include/Algo/Render/GL2/mapRender.h
CGoGN/include/Algo/Render/GL2/mapRender.h
+0
-1
CGoGN/include/Algo/Render/GL2/topo3PrimalRender.hpp
CGoGN/include/Algo/Render/GL2/topo3PrimalRender.hpp
+1
-1
CGoGN/include/Algo/Render/GL2/topo3Render.hpp
CGoGN/include/Algo/Render/GL2/topo3Render.hpp
+1
-1
CGoGN/include/Container/convert.h
CGoGN/include/Container/convert.h
+1
-1
CGoGN/include/Geometry/vector_gen.h
CGoGN/include/Geometry/vector_gen.h
+8
-7
CGoGN/include/Geometry/vector_gen.hpp
CGoGN/include/Geometry/vector_gen.hpp
+36
-10
CGoGN/include/Utils/os_spec.h
CGoGN/include/Utils/os_spec.h
+0
-1
CGoGN/src/Algo/ImplicitHierarchicalMesh/ihm3.cpp
CGoGN/src/Algo/ImplicitHierarchicalMesh/ihm3.cpp
+2
-1
CGoGN/src/Topology/ihmap/ihm2.cpp
CGoGN/src/Topology/ihmap/ihm2.cpp
+2
-1
CGoGN/src/Topology/ihmap/ihm3.cpp
CGoGN/src/Topology/ihmap/ihm3.cpp
+2
-1
CGoGN/src/Utils/GLSLShader.cpp
CGoGN/src/Utils/GLSLShader.cpp
+10
-9
CGoGN/src/Utils/clippingPresets.cpp
CGoGN/src/Utils/clippingPresets.cpp
+1
-2
CGoGN/src/Utils/clippingPresetsAnimated.cpp
CGoGN/src/Utils/clippingPresetsAnimated.cpp
+2
-2
CGoGN/src/Utils/frameManipulator.cpp
CGoGN/src/Utils/frameManipulator.cpp
+1
-2
CGoGN/src/Utils/pickables.cpp
CGoGN/src/Utils/pickables.cpp
+1
-2
CGoGN/src/Utils/trackball.cpp
CGoGN/src/Utils/trackball.cpp
+1
-1
CMakeLists.txt
CMakeLists.txt
+4
-0
No files found.
Apps/Examples/clipping.cpp
View file @
8a7389f2
...
...
@@ -692,7 +692,7 @@ Clipping::Clipping():
m_timer
(
NULL
),
m_lastAnimatedClippingPreset
(
NULL
)
{
m_coeffTopoExplod
=
Geom
::
Vec3f
(
0.9
,
0.9
,
0.9
);
m_coeffTopoExplod
=
Geom
::
Vec3f
(
0.9
f
,
0.9
f
,
0.9
f
);
}
void
Clipping
::
initGUI
()
...
...
@@ -856,10 +856,10 @@ void Clipping::cb_initGL()
// setup clipping shapes
m_planeDrawable
=
new
Utils
::
Grid
;
m_planeDrawable
->
setColor
(
Geom
::
Vec4f
(
1.0
,
0.0
,
0.0
,
1.0
));
m_planeDrawable
->
setColor
(
Geom
::
Vec4f
(
1.0
f
,
0.0
f
,
0.0
f
,
1.0
f
));
m_planeDrawable
->
updatePrecisionDrawing
(
5
);
m_sphereDrawable
=
new
Utils
::
IcoSphere
;
m_sphereDrawable
->
setColor
(
Geom
::
Vec4f
(
0.0
,
0.4
,
1.0
,
1.0
));
m_sphereDrawable
->
setColor
(
Geom
::
Vec4f
(
0.0
f
,
0.4
f
,
1.0
f
,
1.0
f
));
m_sphereDrawable
->
updatePrecisionDrawing
(
1
);
// setup clipping picking frame
...
...
Apps/Examples/volumeExplorer.cpp
View file @
8a7389f2
...
...
@@ -177,7 +177,7 @@ void MyQT::cb_Open()
// maxV=v;
if
(
myMap
.
isVolumeIncidentToBoundary
(
d
))
color
[
d
]
=
VEC3
(
1
,
0.41
,
0.706
);
color
[
d
]
=
VEC3
(
1
.0
f
,
0.41
f
,
0.706
f
);
}
// for (unsigned int i = color.begin(); i != color.end(); color.next(i))
// {
...
...
CGoGN/include/Algo/Export/exportVol.hpp
View file @
8a7389f2
...
...
@@ -150,8 +150,8 @@ bool exportNAS(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3,
}
unsigned
int
countCell
=
1
;
unsigned
int
nbhexa
=
hexa
.
size
()
/
8
;
unsigned
int
nbtetra
=
tetra
.
size
()
/
4
;
unsigned
int
nbhexa
=
uint32
(
hexa
.
size
()
/
8
)
;
unsigned
int
nbtetra
=
uint32
(
tetra
.
size
()
/
4
)
;
fout
<<
std
::
right
;
if
(
nbhexa
!=
0
)
...
...
@@ -263,8 +263,8 @@ bool exportVTU(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3,
}
}
unsigned
int
nbhexa
=
hexa
.
size
()
/
8
;
unsigned
int
nbtetra
=
tetra
.
size
()
/
4
;
unsigned
int
nbhexa
=
uint32
(
hexa
.
size
()
/
8
)
;
unsigned
int
nbtetra
=
uint32
(
tetra
.
size
()
/
4
)
;
fout
<<
"<?xml version=
\"
1.0
\"
?>"
<<
std
::
endl
;
fout
<<
"<VTKFile type=
\"
UnstructuredGrid
\"
version=
\"
0.1
\"
byte_order=
\"
BigEndian
\"
>"
<<
std
::
endl
;
...
...
@@ -424,8 +424,8 @@ bool exportMSH(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3,
fout
<<
"$ELM"
<<
std
::
endl
;
unsigned
int
countCell
=
1
;
unsigned
int
nbhexa
=
hexa
.
size
()
/
8
;
unsigned
int
nbtetra
=
tetra
.
size
()
/
4
;
unsigned
int
nbhexa
=
uint32
(
hexa
.
size
()
/
8
)
;
unsigned
int
nbtetra
=
uint32
(
tetra
.
size
()
/
4
)
;
fout
<<
(
nbhexa
+
nbtetra
)
<<
std
::
endl
;
if
(
nbhexa
!=
0
)
...
...
@@ -508,7 +508,7 @@ bool exportTet(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3,
}
}
unsigned
int
nbtetra
=
tetra
.
size
()
/
4
;
unsigned
int
nbtetra
=
uint32
(
tetra
.
size
()
/
4
)
;
fout
<<
nbtetra
<<
" tets"
<<
std
::
endl
;
for
(
unsigned
int
i
=
position
.
begin
();
i
!=
position
.
end
();
position
.
next
(
i
))
...
...
@@ -603,7 +603,7 @@ bool exportNodeEle(typename PFP::MAP& map, const VertexAttribute<typename PFP::V
}
unsigned
int
countCell
=
0
;
unsigned
int
nbtetra
=
tetra
.
size
()
/
4
;
unsigned
int
nbtetra
=
uint32
(
tetra
.
size
()
/
4
)
;
foutEle
<<
nbtetra
<<
" 4 0"
<<
std
::
endl
;
...
...
@@ -709,8 +709,8 @@ bool exportVolBinGz(typename PFP::MAP& map, const VertexAttribute<typename PFP::
}
}
unsigned
int
nbhexa
=
hexa
.
size
()
/
8
;
unsigned
int
nbtetra
=
tetra
.
size
()
/
4
;
unsigned
int
nbhexa
=
uint32
(
hexa
.
size
()
/
8
)
;
unsigned
int
nbtetra
=
uint32
(
tetra
.
size
()
/
4
)
;
unsigned
int
buffer
[
3
];
buffer
[
0
]
=
position
.
nbElements
();
...
...
@@ -805,7 +805,7 @@ bool exportTetmesh(typename PFP::MAP& map, const VertexAttribute<typename PFP::V
}
}
unsigned
int
nbtetra
=
tetra
.
size
()
/
4
;
unsigned
int
nbtetra
=
uint32
(
tetra
.
size
()
/
4
)
;
fout
<<
"Tetrahedra"
<<
std
::
endl
<<
nbtetra
<<
std
::
endl
;
for
(
unsigned
int
i
=
0
;
i
<
nbtetra
;
++
i
)
...
...
CGoGN/include/Algo/Filtering/bilateral.h
View file @
8a7389f2
...
...
@@ -22,7 +22,7 @@
* *
*******************************************************************************/
#include <
math.
h>
#include <
cmat
h>
#include "Topology/generic/traversor/traversorCell.h"
namespace
CGoGN
...
...
CGoGN/include/Algo/Histogram/histogram.h
View file @
8a7389f2
...
...
@@ -25,7 +25,6 @@
#ifndef __HISTOGRAM__
#define __HISTOGRAM__
#define _USE_MATH_DEFINES
#include <cmath>
#include "Topology/generic/attributeHandler.h"
...
...
CGoGN/include/Algo/Import/importObjTex.h
View file @
8a7389f2
...
...
@@ -309,7 +309,7 @@ public:
* @brief get the number of groups in OBJ file
* @return number of groups
*/
unsigned
int
nbObjGroups
()
{
return
m_groupFirstSub
.
size
(
);
}
unsigned
int
nbObjGroups
()
{
return
uint32
(
m_groupFirstSub
.
size
()
);
}
/**
* @brief get the index of first group mat of obj
...
...
CGoGN/include/Algo/Import/importObjTex.hpp
View file @
8a7389f2
...
...
@@ -581,19 +581,19 @@ unsigned int OBJModel<PFP>::createSimpleVBO_PTN(Utils::VBO* positionVBO, Utils::
}
positionVBO
->
setDataSize
(
3
);
positionVBO->allocate(
posBuff.size(
));
positionVBO
->
allocate
(
uint32
(
posBuff
.
size
()
));
Geom
::
Vec3f
*
ptrPos
=
reinterpret_cast
<
Geom
::
Vec3f
*>
(
positionVBO
->
lockPtr
());
memcpy
(
ptrPos
,
&
posBuff
[
0
],
posBuff
.
size
()
*
sizeof
(
Geom
::
Vec3f
));
positionVBO
->
releasePtr
();
texcoordVBO
->
setDataSize
(
2
);
texcoordVBO->allocate(
TCBuff.size(
));
texcoordVBO
->
allocate
(
uint32
(
TCBuff
.
size
()
));
Geom
::
Vec2f
*
ptrTC
=
reinterpret_cast
<
Geom
::
Vec2f
*>
(
texcoordVBO
->
lockPtr
());
memcpy
(
ptrTC
,
&
TCBuff
[
0
],
TCBuff
.
size
()
*
sizeof
(
Geom
::
Vec2f
));
texcoordVBO
->
releasePtr
();
normalVBO
->
setDataSize
(
3
);
normalVBO->allocate(
normalBuff.size(
));
normalVBO
->
allocate
(
uint32
(
normalBuff
.
size
()
));
Geom
::
Vec3f
*
ptrNormal
=
reinterpret_cast
<
Geom
::
Vec3f
*>
(
normalVBO
->
lockPtr
());
memcpy
(
ptrNormal
,
&
normalBuff
[
0
],
normalBuff
.
size
()
*
sizeof
(
Geom
::
Vec3f
));
normalVBO
->
releasePtr
();
...
...
@@ -1394,7 +1394,7 @@ bool OBJModel<PFP>::createGroupMatVBO_PTN(
m_groupFirstSub
[
outGr
]
=
inSg
;
}
}
m_groupNbSub[outGr+1] =
m_sgMat.size(
) - m_groupNbSub[outGr];
m_groupNbSub
[
outGr
+
1
]
=
uint32
(
m_sgMat
.
size
()
)
-
m_groupNbSub
[
outGr
];
// now create VBOs
...
...
@@ -1407,7 +1407,7 @@ bool OBJModel<PFP>::createGroupMatVBO_PTN(
unsigned
int
firstIndex
=
0
;
unsigned int sz =
group_faces.size(
);
unsigned
int
sz
=
uint32
(
group_faces
.
size
()
);
m_beginIndices
.
resize
(
sz
);
m_nbIndices
.
resize
(
sz
);
m_groupIdx
.
resize
(
sz
);
...
...
@@ -1478,19 +1478,19 @@ bool OBJModel<PFP>::createGroupMatVBO_PTN(
}
positionVBO
->
setDataSize
(
3
);
positionVBO->allocate(
posBuff.size(
));
positionVBO
->
allocate
(
uint32
(
posBuff
.
size
()
));
Geom
::
Vec3f
*
ptrPos
=
reinterpret_cast
<
Geom
::
Vec3f
*>
(
positionVBO
->
lockPtr
());
memcpy
(
ptrPos
,
&
posBuff
[
0
],
posBuff
.
size
()
*
sizeof
(
Geom
::
Vec3f
));
positionVBO
->
releasePtr
();
texcoordVBO
->
setDataSize
(
2
);
texcoordVBO->allocate(
TCBuff.size(
));
texcoordVBO
->
allocate
(
uint32
(
TCBuff
.
size
()
));
Geom
::
Vec2f
*
ptrTC
=
reinterpret_cast
<
Geom
::
Vec2f
*>
(
texcoordVBO
->
lockPtr
());
memcpy
(
ptrTC
,
&
TCBuff
[
0
],
TCBuff
.
size
()
*
sizeof
(
Geom
::
Vec2f
));
texcoordVBO
->
releasePtr
();
normalVBO
->
setDataSize
(
3
);
normalVBO->allocate(
normalBuff.size(
));
normalVBO
->
allocate
(
uint32
(
normalBuff
.
size
()
));
Geom
::
Vec3f
*
ptrNormal
=
reinterpret_cast
<
Geom
::
Vec3f
*>
(
normalVBO
->
lockPtr
());
memcpy
(
ptrNormal
,
&
normalBuff
[
0
],
normalBuff
.
size
()
*
sizeof
(
Geom
::
Vec3f
));
normalVBO
->
releasePtr
();
...
...
@@ -1556,7 +1556,7 @@ bool OBJModel<PFP>::import( const std::string& filename, std::vector<std::string
if
(
tag
==
"mtllib"
)
{
unsigned
found = filename.find_last_of("/\\");
size_t
found
=
filename
.
find_last_of
(
"/
\\
"
);
std
::
string
mtfn
;
oss
>>
mtfn
;
m_matPath
=
filename
.
substr
(
0
,
found
)
+
"/"
;
...
...
@@ -1795,7 +1795,7 @@ bool OBJModel<PFP>::import( const std::string& filename, std::vector<std::string
std
::
vector
<
unsigned
int
>&
vn
=
vecNormIndPerVertex
[
d
];
// test if normal vertex or multi-attrib vertex
unsigned int nb =
vtc.size(
);
unsigned
int
nb
=
uint32
(
vtc
.
size
()
);
bool
same
=
true
;
for
(
unsigned
int
j
=
1
;
(
j
<
nb
)
&&
(
same
);
++
j
)
{
...
...
CGoGN/include/Algo/Import/importPlyData.h
View file @
8a7389f2
...
...
@@ -26,7 +26,7 @@
#define _IMPORT_PLY_DATA_H
#include <stdio.h>
#include <
math.
h>
#include <
cmat
h>
#include <string>
#include "Algo/Import/ply.h"
...
...
CGoGN/include/Algo/MC/image.hpp
View file @
8a7389f2
...
...
@@ -26,7 +26,7 @@
#include <fstream>
#include <string.h>
#include <vector>
#include <
math.
h>
#include <
cmat
h>
#include <typeinfo>
namespace
CGoGN
...
...
@@ -196,10 +196,10 @@ void Image<DataType>::loadVox(const char *filename)
m_Data
=
new
DataType
[
total
];
int
filename_s
=
strlen
(
filename
)
;
int
filename_s
=
int
(
strlen
(
filename
))
+
1
;
// char datafile[filename_s] ;
char
*
datafile
=
new
char
[
filename_s
]
;
strcpy
(
datafile
,
filename
)
;
memcpy
(
datafile
,
filename
,
filename_s
)
;
datafile
[
filename_s
-
3
]
=
'r'
;
datafile
[
filename_s
-
2
]
=
'a'
;
datafile
[
filename_s
-
1
]
=
'w'
;
...
...
CGoGN/include/Algo/Modelisation/extrusion.h
View file @
8a7389f2
...
...
@@ -25,7 +25,7 @@
#ifndef EXTRUSION_H
#define EXTRUSION_H
#include <
math.
h>
#include <
cmat
h>
#include <vector>
#include "Algo/Tiling/Surface/square.h"
...
...
CGoGN/include/Algo/Modelisation/extrusion.hpp
View file @
8a7389f2
...
...
@@ -160,18 +160,18 @@ Algo::Surface::Tilings::Tiling<PFP>* extrusion_scale_prim(
if
(
profile_closed
)
{
if
(
path_closed
)
prim
=
new
Algo
::
Surface
::
Tilings
::
Square
::
Tore
<
PFP
>
(
the_map
,
profile
.
size
(),
path
.
size
(
));
prim
=
new
Algo
::
Surface
::
Tilings
::
Square
::
Tore
<
PFP
>
(
the_map
,
uint32
(
profile
.
size
()),
uint32
(
path
.
size
()
));
else
prim
=
new
Algo
::
Surface
::
Tilings
::
Square
::
Cylinder
<
PFP
>
(
the_map
,
profile
.
size
(),
path
.
size
()
-
1
,
false
,
false
);
prim
=
new
Algo
::
Surface
::
Tilings
::
Square
::
Cylinder
<
PFP
>
(
the_map
,
uint32
(
profile
.
size
()),
uint32
(
path
.
size
()
-
1
)
,
false
,
false
);
}
else
{
if
(
path_closed
)
{
prim
=
new
Algo
::
Surface
::
Tilings
::
Square
::
Grid
<
PFP
>
(
the_map
,
profile
.
size
()
-
1
,
path
.
size
(
),
true
);
prim
=
new
Algo
::
Surface
::
Tilings
::
Square
::
Grid
<
PFP
>
(
the_map
,
uint32
(
profile
.
size
()
-
1
),
uint32
(
path
.
size
()
),
true
);
// sewing boundaries correponding to path boundaries
std
::
vector
<
Dart
>&
darts
=
prim
->
getVertexDarts
();
int
index
=
profile
.
size
()
*
path
.
size
(
);
int
index
=
int
(
profile
.
size
()
*
path
.
size
()
);
for
(
unsigned
int
i
=
0
;
i
<
profile
.
size
()
-
1
;
++
i
)
{
Dart
d
=
the_map
.
phi_1
(
darts
[
index
++
]);
...
...
@@ -182,7 +182,7 @@ Algo::Surface::Tilings::Tiling<PFP>* extrusion_scale_prim(
}
else
prim
=
new
Algo
::
Surface
::
Tilings
::
Square
::
Grid
<
PFP
>
(
the_map
,
profile
.
size
()
-
1
,
path
.
size
()
-
1
,
true
);
prim
=
new
Algo
::
Surface
::
Tilings
::
Square
::
Grid
<
PFP
>
(
the_map
,
uint32
(
profile
.
size
()
-
1
),
uint32
(
path
.
size
()
-
1
)
,
true
);
}
glPushMatrix
();
...
...
CGoGN/include/Algo/Modelisation/planeCutting.h
View file @
8a7389f2
...
...
@@ -25,7 +25,7 @@
#ifndef __PLANE_CUTTING_H__
#define __PLANE_CUTTING_H__
#include <
math.
h>
#include <
cmat
h>
#include <vector>
#include "Geometry/plane_3d.h"
#include "Topology/generic/cellmarker.h"
...
...
CGoGN/include/Algo/Modelisation/subdivision.h
View file @
8a7389f2
...
...
@@ -25,7 +25,8 @@
#ifndef __SUBDIVISION_H__
#define __SUBDIVISION_H__
#include <math.h>
#include <cmath>
#include <vector>
#include "Algo/Geometry/centroid.h"
...
...
CGoGN/include/Algo/Modelisation/subdivision.hpp
View file @
8a7389f2
...
...
@@ -26,8 +26,6 @@
#include "Algo/Geometry/centroid.h"
#include "Topology/generic/autoAttributeHandler.h"
#define _USE_MATH_DEFINES
#include <math.h>
namespace
CGoGN
{
...
...
CGoGN/include/Algo/Modelisation/subdivision3.h
View file @
8a7389f2
...
...
@@ -25,7 +25,7 @@
#ifndef __SUBDIVISION3_H__
#define __SUBDIVISION3_H__
#include <
math.
h>
#include <
cmat
h>
#include <vector>
#include "Geometry/plane_3d.h"
#include "Algo/Modelisation/tetrahedralization.h"
...
...
CGoGN/include/Algo/Modelisation/triangulation.h
View file @
8a7389f2
...
...
@@ -25,7 +25,7 @@
#ifndef _CGOGN_TRIANGULATION_H_
#define _CGOGN_TRIANGULATION_H_
#include <
math.
h>
#include <
cmat
h>
#include <vector>
#include <list>
#include <set>
...
...
CGoGN/include/Algo/Render/GL1/topo_render.hpp
View file @
8a7389f2
...
...
@@ -345,7 +345,7 @@ void renderTopoGMD2(typename PFP::MAP& map, const VertexAttribute<typename PFP::
center
/=
REAL
(
vecPos
.
size
());
//shrink the face
unsigned
int
nb
=
vecPos
.
size
(
);
unsigned
int
nb
=
uint32
(
vecPos
.
size
()
);
float
k
=
1.0
f
-
kf
;
for
(
unsigned
int
i
=
0
;
i
<
nb
;
++
i
)
vecPos
[
i
]
=
center
*
k
+
vecPos
[
i
]
*
kf
;
...
...
CGoGN/include/Algo/Render/GL2/explodeVolumeRender.hpp
View file @
8a7389f2
...
...
@@ -125,7 +125,7 @@ void ExplodeVolumeRender::computeFace(typename PFP::MAP& map, Dart d, const EMBV
a
=
e
;
}
while
(
a
!=
d
);
unsigned
int
nb
=
normals
.
size
(
);
unsigned
int
nb
=
uint32
(
normals
.
size
()
);
VEC3
Ntemp
=
normals
[
0
];
normals
[
0
]
+=
normals
[
nb
-
1
];
normals
[
0
].
normalize
();
...
...
@@ -180,7 +180,7 @@ void ExplodeVolumeRender::updateSmooth(typename PFP::MAP& map, const V_ATT& posi
VEC3F
volCol
=
PFP
::
toVec3f
(
colorPerXXX
[
d
.
dart
]);
unsigned
int
nbs
=
vertices
.
size
(
);
unsigned
int
nbs
=
uint32
(
vertices
.
size
()
);
// just to have more easy algo further
vertices
.
push_back
(
vertices
.
front
());
normals
.
push_back
(
normals
.
front
());
...
...
@@ -230,21 +230,21 @@ void ExplodeVolumeRender::updateSmooth(typename PFP::MAP& map, const V_ATT& posi
});
// ,false); ????
m_nbTris
=
buffer
.
size
()
/
4
;
m_nbTris
=
GLuint
(
buffer
.
size
()
/
4
)
;
m_vboPos
->
allocate
(
buffer
.
size
(
));
m_vboPos
->
allocate
(
uint32
(
buffer
.
size
()
));
VEC3F
*
ptrPos
=
reinterpret_cast
<
VEC3F
*>
(
m_vboPos
->
lockPtr
());
memcpy
(
ptrPos
,
&
buffer
[
0
],
buffer
.
size
()
*
sizeof
(
VEC3F
));
m_vboPos
->
releasePtr
();
m_shaderS
->
setAttributePosition
(
m_vboPos
);
m_vboColors
->
allocate
(
bufferColors
.
size
(
));
m_vboColors
->
allocate
(
uint32
(
bufferColors
.
size
()
));
VEC3F
*
ptrCol
=
reinterpret_cast
<
VEC3F
*>
(
m_vboColors
->
lockPtr
());
memcpy
(
ptrCol
,
&
bufferColors
[
0
],
bufferColors
.
size
()
*
sizeof
(
VEC3F
));
m_vboColors
->
releasePtr
();
m_shaderS
->
setAttributeColor
(
m_vboColors
);
m_vboNormals
->
allocate
(
bufferNormals
.
size
(
));
m_vboNormals
->
allocate
(
uint32
(
bufferNormals
.
size
()
));
VEC3F
*
ptrNorm
=
reinterpret_cast
<
VEC3F
*>
(
m_vboNormals
->
lockPtr
());
memcpy
(
ptrNorm
,
&
bufferNormals
[
0
],
bufferNormals
.
size
()
*
sizeof
(
VEC3F
));
m_vboNormals
->
releasePtr
();
...
...
@@ -261,9 +261,9 @@ void ExplodeVolumeRender::updateSmooth(typename PFP::MAP& map, const V_ATT& posi
});
// ,false); ????
m_nbLines
=
buffer
.
size
()
/
3
;
m_nbLines
=
GLuint
(
buffer
.
size
()
/
3
)
;
m_vboPosLine
->
allocate
(
buffer
.
size
(
));
m_vboPosLine
->
allocate
(
uint32
(
buffer
.
size
()
));
ptrPos
=
reinterpret_cast
<
VEC3F
*>
(
m_vboPosLine
->
lockPtr
());
memcpy
(
ptrPos
,
&
buffer
[
0
],
buffer
.
size
()
*
sizeof
(
VEC3F
));
...
...
@@ -488,15 +488,15 @@ void ExplodeVolumeRender::updateData(typename PFP::MAP& map, const V_ATT& positi
}
});
m_nbTris
=
buffer
.
size
()
/
4
;
m_nbTris
=
GLuint
(
buffer
.
size
()
/
4
)
;
m_vboPos
->
allocate
(
buffer
.
size
(
));
m_vboPos
->
allocate
(
uint32
(
buffer
.
size
()
));
VEC3F
*
ptrPos
=
reinterpret_cast
<
VEC3F
*>
(
m_vboPos
->
lockPtr
());
memcpy
(
ptrPos
,
&
buffer
[
0
],
buffer
.
size
()
*
sizeof
(
VEC3F
));
m_vboPos
->
releasePtr
();
m_shader
->
setAttributePosition
(
m_vboPos
);
m_vboColors
->
allocate
(
bufferColors
.
size
(
));
m_vboColors
->
allocate
(
uint32
(
bufferColors
.
size
()
));
VEC3F
*
ptrCol
=
reinterpret_cast
<
VEC3F
*>
(
m_vboColors
->
lockPtr
());
memcpy
(
ptrCol
,
&
bufferColors
[
0
],
bufferColors
.
size
()
*
sizeof
(
VEC3F
));
m_vboColors
->
releasePtr
();
...
...
@@ -512,9 +512,9 @@ void ExplodeVolumeRender::updateData(typename PFP::MAP& map, const V_ATT& positi
buffer
.
push_back
(
PFP
::
toVec3f
(
positions
[
map
.
phi1
(
c
)]));
});
// false ???
m_nbLines
=
buffer
.
size
()
/
3
;
m_nbLines
=
GLuint
(
buffer
.
size
()
/
3
)
;
m_vboPosLine
->
allocate
(
buffer
.
size
(
));
m_vboPosLine
->
allocate
(
uint32
(
buffer
.
size
()
));
ptrPos
=
reinterpret_cast
<
VEC3F
*>
(
m_vboPosLine
->
lockPtr
());
memcpy
(
ptrPos
,
&
buffer
[
0
],
buffer
.
size
()
*
sizeof
(
VEC3F
));
...
...
CGoGN/include/Algo/Render/GL2/mapRender.h
View file @
8a7389f2
...
...
@@ -25,7 +25,6 @@
#ifndef _GL2_MAP_RENDER_
#define _GL2_MAP_RENDER_
#define _USE_MATH_DEFINES
#include <cmath>
#include <vector>
...
...
CGoGN/include/Algo/Render/GL2/topo3PrimalRender.hpp
View file @
8a7389f2
...
...
@@ -482,7 +482,7 @@ void Topo3PrimalRender<PFP>::updateData(MAP& mapx, const VertexAttribute<VEC3, M
dd
=
mapx
.
phi1
(
dd
);
}
while
(
dd
!=
d
);
unsigned
int
nb
=
vecPos
.
size
(
);
unsigned
int
nb
=
uint32
(
vecPos
.
size
()
);
vecPos
.
push_back
(
vecPos
.
front
());
// copy the first for easy computation on next loop
...
...
CGoGN/include/Algo/Render/GL2/topo3Render.hpp
View file @
8a7389f2
...
...
@@ -820,7 +820,7 @@ void Topo3RenderGMap<PFP>::updateData(MAP& mapx, const VertexAttribute<VEC3, MAP
dd
=
mapx
.
phi1
(
dd
);
}
while
(
dd
!=
d
);
unsigned
int
nb
=
vecPos
.
size
(
);
unsigned
int
nb
=
uint32
(
vecPos
.
size
()
);
vecPos
.
push_back
(
vecPos
.
front
());
// copy the first for easy computation on next loop
...
...
CGoGN/include/Container/convert.h
View file @
8a7389f2
...
...
@@ -2,7 +2,7 @@
#define _CONVERT_H_
#include <limits>
#include <
math.
h>
#include <
cmat
h>
#include <iostream>
#include "Geometry/vector_gen.h"
...
...
CGoGN/include/Geometry/vector_gen.h
View file @
8a7389f2
...
...
@@ -109,9 +109,11 @@ public:
Vector
<
DIM
,
T
>&
operator
-=
(
const
Vector
<
DIM
,
T
>&
v
)
;
Vector
<
DIM
,
T
>&
operator
*=
(
T
a
)
;
template
<
typename
T2
>
Vector
<
DIM
,
T
>&
operator
*=
(
T2
a
)
;
Vector
<
DIM
,
T
>&
operator
/=
(
T
a
)
;
template
<
typename
T2
>
Vector
<
DIM
,
T
>&
operator
/=
(
T2
a
)
;
/**********************************************/
/* ARITHMETIC OPERATORS */
...
...
@@ -123,12 +125,11 @@ public:
Vector
<
DIM
,
T
>
operator
-
()
const
;
Vector
<
DIM
,
T
>
operator
*
(
T
a
)
const
;
// template <typename T2>
// Vector<DIM, T> operator*(T2 a) const ;
template
<
typename
T2
>
Vector
<
DIM
,
T
>
operator
*
(
T2
a
)
const
;
Vector
<
DIM
,
T
>
operator
/
(
T
a
)
const
;
template
<
typename
T2
>
Vector
<
DIM
,
T
>
operator
/
(
T2
a
)
const
;
/**********************************************/
/* UTILITY FUNCTIONS */
...
...
CGoGN/include/Geometry/vector_gen.hpp
View file @
8a7389f2
...
...
@@ -185,22 +185,44 @@ inline Vector<DIM, T>& Vector<DIM, T>::operator-=(const Vector<DIM, T>& v)
return
*
this
;
}
//template <unsigned int DIM, typename T>
//inline Vector<DIM, T>& Vector<DIM, T>::operator*=(T a)
//{
// for (unsigned int i = 0; i < DIM; ++i)
// m_data[i] *= a ;
// return *this ;
//}
//
//template <unsigned int DIM, typename T>
//inline Vector<DIM, T>& Vector<DIM, T>::operator/=(T a)
//{
// for (unsigned int i = 0; i < DIM; ++i)
// m_data[i] /= a ;
// return *this ;
//}
template
<
unsigned
int
DIM
,
typename
T
>
inline
Vector
<
DIM
,
T
>&
Vector
<
DIM
,
T
>::
operator
*=
(
T
a
)
template
<
typename
T2
>
inline
Vector
<
DIM
,
T
>&
Vector
<
DIM
,
T
>::
operator
*=
(
T2
a
)
{
T
aa
=
T
(
a
);
for
(
unsigned
int
i
=
0
;
i
<
DIM
;
++
i
)
m_data
[
i
]
*=
a
;
return
*
this
;
m_data
[
i
]
*=
a
a
;
return
*
this
;
}
template
<
unsigned
int
DIM
,
typename
T
>
inline
Vector
<
DIM
,
T
>&
Vector
<
DIM
,
T
>::
operator
/=
(
T
a
)
template
<
typename
T2
>
inline
Vector
<
DIM
,
T
>&
Vector
<
DIM
,
T
>::
operator
/=
(
T2
a
)
{
T
aa
=
T
(
a
);
for
(
unsigned
int
i
=
0
;
i
<
DIM
;
++
i
)
m_data
[
i
]
/=
a
;
return
*
this
;
m_data
[
i
]
/=
a
a
;
return
*
this
;
}
/**********************************************/
/* ARITHMETIC OPERATORS */
/**********************************************/
...
...
@@ -234,20 +256,24 @@ inline Vector<DIM, T> Vector<DIM, T>::operator-() const
template
<
unsigned
int
DIM
,
typename
T
>
inline
Vector
<
DIM
,
T
>
Vector
<
DIM
,
T
>::
operator
*
(
T
a
)
const
template
<
typename
T2
>
inline
Vector
<
DIM
,
T
>
Vector
<
DIM
,
T
>::
operator
*
(
T2
a
)
const
{
Vector
<
DIM
,
T
>
res
;
T
aa
=
T
(
a
);
for
(
unsigned
int
i
=
0
;
i
<
DIM
;
++
i
)
res
[
i
]
=
m_data
[
i
]
*
a
;
res
[
i
]
=
m_data
[
i
]
*
a
a
;
return
res
;
}
template
<
unsigned
int
DIM
,
typename
T
>
inline
Vector
<
DIM
,
T
>
Vector
<
DIM
,
T
>::
operator
/
(
T
a
)
const
template
<
typename
T2
>
inline
Vector
<
DIM
,
T
>
Vector
<
DIM
,
T
>::
operator
/
(
T2
a
)
const
{
Vector
<
DIM
,
T
>
res
;
T
aa
=
T
(
a
);
for
(
unsigned
int
i
=
0
;
i
<
DIM
;
++
i
)
res
[
i
]
=
m_data
[
i
]
/
a
;
res
[
i
]
=
m_data
[
i
]
/
T
(
a
)
;
return
res
;