Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Romin Tomasetti
gmsh
Commits
226762b5
Commit
226762b5
authored
8 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
fix c++11 warnings
parent
e15f947f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Graphics/Trackball.cpp
+9
-9
9 additions, 9 deletions
Graphics/Trackball.cpp
contrib/bamg/bamglib/Mesh2.h
+17
-23
17 additions, 23 deletions
contrib/bamg/bamglib/Mesh2.h
with
26 additions
and
32 deletions
Graphics/Trackball.cpp
+
9
−
9
View file @
226762b5
...
...
@@ -100,7 +100,7 @@ vsub(const double *src1, const double *src2, double *dst)
void
vcopy
(
const
double
*
v1
,
double
*
v2
)
{
register
int
i
;
int
i
;
for
(
i
=
0
;
i
<
3
;
i
++
)
v2
[
i
]
=
v1
[
i
];
}
...
...
@@ -187,7 +187,7 @@ trackball(double q[4], double p1x, double p1y, double p2x, double p2y)
* Now, we want the cross product of P1 and P2
*/
vcross
(
p2
,
p1
,
a
);
/*
* Figure out how much to rotate around that axis.
*/
...
...
@@ -196,7 +196,7 @@ trackball(double q[4], double p1x, double p1y, double p2x, double p2y)
t
=
vlength
(
d
)
/
(
2.0
*
TRACKBALLSIZE
);
else
t
=
vlength
(
d
);
/*
* Avoid problems with out-of-control values...
*/
...
...
@@ -230,20 +230,20 @@ tb_project_to_sphere(double r, double x, double y)
d
=
sqrt
(
x
*
x
+
y
*
y
);
if
(
CTX
::
instance
()
->
trackballHyperbolicSheet
)
{
if
(
d
<
r
*
0.70710678118654752440
)
{
// Inside sphere
if
(
d
<
r
*
0.70710678118654752440
)
{
// Inside sphere
z
=
sqrt
(
r
*
r
-
d
*
d
);
}
else
{
// On hyperbola
else
{
// On hyperbola
t
=
r
/
1.41421356237309504880
;
z
=
t
*
t
/
d
;
}
}
else
{
if
(
d
<
r
)
{
if
(
d
<
r
)
{
z
=
sqrt
(
r
*
r
-
d
*
d
);
}
else
{
}
else
{
z
=
0.
;
}
}
...
...
This diff is collapsed.
Click to expand it.
contrib/bamg/bamglib/Mesh2.h
+
17
−
23
View file @
226762b5
...
...
@@ -97,8 +97,8 @@ extern Real8 Grafh;
Icoor2
inline
det
(
const
I2
&
a
,
const
I2
&
b
,
const
I2
&
c
)
{
register
Icoor2
bax
=
b
.
x
-
a
.
x
,
bay
=
b
.
y
-
a
.
y
;
register
Icoor2
cax
=
c
.
x
-
a
.
x
,
cay
=
c
.
y
-
a
.
y
;
Icoor2
bax
=
b
.
x
-
a
.
x
,
bay
=
b
.
y
-
a
.
y
;
Icoor2
cax
=
c
.
x
-
a
.
x
,
cay
=
c
.
y
-
a
.
y
;
return
bax
*
cay
-
bay
*
cax
;}
...
...
@@ -429,9 +429,9 @@ class Triangle {
void
SetAdjAdj
(
Int1
a
)
{
a
&=
3
;
register
Triangle
*
tt
=
at
[
a
];
Triangle
*
tt
=
at
[
a
];
aa
[
a
]
&=
55
;
// remove MarkUnSwap
register
Int1
aatt
=
aa
[
a
]
&
3
;
Int1
aatt
=
aa
[
a
]
&
3
;
if
(
tt
){
tt
->
at
[
aatt
]
=
this
;
tt
->
aa
[
aatt
]
=
a
+
(
aa
[
a
]
&
60
)
;}
// Copy all the mark
...
...
@@ -460,11 +460,11 @@ class Triangle {
void
SetAllFlag
(
int
a
,
int
f
){
aa
[
a
]
=
(
aa
[
a
]
&
3
)
+
(
1020
&
f
);}
void
SetHidden
(
int
a
){
register
Triangle
*
t
=
at
[
a
];
Triangle
*
t
=
at
[
a
];
if
(
t
)
t
->
aa
[
aa
[
a
]
&
3
]
|=
16
;
aa
[
a
]
|=
16
;}
void
SetCracked
(
int
a
){
register
Triangle
*
t
=
at
[
a
];
Triangle
*
t
=
at
[
a
];
if
(
t
)
t
->
aa
[
aa
[
a
]
&
3
]
|=
32
;
aa
[
a
]
|=
32
;}
...
...
@@ -472,18 +472,18 @@ class Triangle {
Triangle
*
Quadrangle
(
Vertex
*
&
v0
,
Vertex
*
&
v1
,
Vertex
*
&
v2
,
Vertex
*
&
v3
)
const
;
void
SetLocked
(
int
a
){
register
Triangle
*
t
=
at
[
a
];
Triangle
*
t
=
at
[
a
];
t
->
aa
[
aa
[
a
]
&
3
]
|=
4
;
aa
[
a
]
|=
4
;}
void
SetMarkUnSwap
(
int
a
){
register
Triangle
*
t
=
at
[
a
];
Triangle
*
t
=
at
[
a
];
t
->
aa
[
aa
[
a
]
&
3
]
|=
8
;
aa
[
a
]
|=
8
;}
void
SetUnMarkUnSwap
(
int
a
){
register
Triangle
*
t
=
at
[
a
];
Triangle
*
t
=
at
[
a
];
t
->
aa
[
aa
[
a
]
&
3
]
&=
55
;
// 23 + 32
aa
[
a
]
&=
55
;}
...
...
@@ -581,7 +581,7 @@ class SegInterpolation {
// void CopyMetric(const Metric & mm,int j){ lIntTria[j].m=mm;}
void
ReShape
()
{
register
int
newsize
=
MaxSize
*
2
;
int
newsize
=
MaxSize
*
2
;
IntersectionTriangles
*
nw
=
new
IntersectionTriangles
[
newsize
];
assert
(
nw
);
for
(
int
i
=
0
;
i
<
MaxSize
;
i
++
)
// recopy
...
...
@@ -630,8 +630,8 @@ class VertexOnGeom { public:
GeometricalEdge
*
ge
;
// if abscisse in [0..1]
};
inline
void
Set
(
const
VertexOnGeom
&
,
const
Triangles
&
,
Triangles
&
);
int
OnGeomVertex
()
const
{
return
this
?
abscisse
<
0
:
0
;}
int
OnGeomEdge
()
const
{
return
this
?
abscisse
>=
0
:
0
;}
int
OnGeomVertex
()
const
{
return
abscisse
<
0
;}
int
OnGeomEdge
()
const
{
return
abscisse
>=
0
;}
VertexOnGeom
()
:
mv
(
0
),
abscisse
(
0
){
gv
=
0
;}
VertexOnGeom
(
Vertex
&
m
,
GeometricalVertex
&
g
)
:
mv
(
&
m
),
abscisse
(
-
1
){
gv
=&
g
;}
// cout << " mv = " <<mv << " gv = " << gv << endl;}
...
...
@@ -642,7 +642,7 @@ class VertexOnGeom { public:
operator
GeometricalEdge
*
()
const
{
return
ge
;}
// operator Real8 & () {return abscisse;}
operator
const
Real8
&
()
const
{
return
abscisse
;}
int
IsRequiredVertex
(){
return
this
?
((
abscisse
<
0
?
(
gv
?
gv
->
Required
()
:
0
)
:
0
))
:
0
;}
int
IsRequiredVertex
(){
return
((
abscisse
<
0
?
(
gv
?
gv
->
Required
()
:
0
)
:
0
));}
void
SetOn
(){
mv
->
on
=
this
;
mv
->
vint
=
IsVertexOnGeom
;}
friend
ostream
&
operator
<<
(
ostream
&
f
,
const
VertexOnGeom
&
vog
){
f
<<
vog
.
abscisse
<<
" "
<<
vog
.
mv
<<
" "
<<
vog
.
gv
<<
" ; "
;
...
...
@@ -1160,7 +1160,7 @@ inline Real8 Edge::MetricLength() const
inline
void
Triangles
::
ReMakeTriangleContainingTheVertex
()
{
register
Int4
i
;
Int4
i
;
for
(
i
=
0
;
i
<
nbv
;
i
++
)
{
vertices
[
i
].
vint
=
0
;
...
...
@@ -1172,7 +1172,7 @@ inline void Triangles::ReMakeTriangleContainingTheVertex()
inline
void
Triangles
::
UnMarkUnSwapTriangle
()
{
register
Int4
i
;
Int4
i
;
for
(
i
=
0
;
i
<
nbt
;
i
++
)
for
(
int
j
=
0
;
j
<
3
;
j
++
)
triangles
[
i
].
SetUnMarkUnSwap
(
j
);
...
...
@@ -1308,8 +1308,8 @@ Int4 inline Vertex::Optim(int i,int koption)
Icoor2
inline
det
(
const
Vertex
&
a
,
const
Vertex
&
b
,
const
Vertex
&
c
)
{
register
Icoor2
bax
=
b
.
i
.
x
-
a
.
i
.
x
,
bay
=
b
.
i
.
y
-
a
.
i
.
y
;
register
Icoor2
cax
=
c
.
i
.
x
-
a
.
i
.
x
,
cay
=
c
.
i
.
y
-
a
.
i
.
y
;
Icoor2
bax
=
b
.
i
.
x
-
a
.
i
.
x
,
bay
=
b
.
i
.
y
-
a
.
i
.
y
;
Icoor2
cax
=
c
.
i
.
x
-
a
.
i
.
x
,
cay
=
c
.
i
.
y
-
a
.
i
.
y
;
return
bax
*
cay
-
bay
*
cax
;}
...
...
@@ -1485,9 +1485,3 @@ inline void Line(R2 x) {rlineto(x.x,x.y);}
#endif
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment