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
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
458f2d21
Commit
458f2d21
authored
Apr 12, 2013
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
fix coompile
parent
42a826c7
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
Common/Context.h
+0
-2
0 additions, 2 deletions
Common/Context.h
Common/GamePad.cpp
+38
-53
38 additions, 53 deletions
Common/GamePad.cpp
Common/GamePad.h
+10
-13
10 additions, 13 deletions
Common/GamePad.h
Mesh/meshGRegionDelaunayInsertion.cpp
+28
-28
28 additions, 28 deletions
Mesh/meshGRegionDelaunayInsertion.cpp
with
76 additions
and
96 deletions
Common/Context.h
+
0
−
2
View file @
458f2d21
...
...
@@ -11,9 +11,7 @@
#include
<string>
#include
"CGNSOptions.h"
#include
"meshPartitionOptions.h"
///
#include
"GamePad.h"
///
// The interface-independent context.
...
...
This diff is collapsed.
Click to expand it.
Common/GamePad.cpp
+
38
−
53
View file @
458f2d21
...
...
@@ -48,17 +48,16 @@
// .... ...
//
#include
<math.h>
#include
<cstring>
#include
<string>
#include
<iostream>
#include
<stdio.h>
#include
"GamePad.h"
#include
"Context.h"
#include
<unistd.h>
#if defined(WIN32)
#include
<
math
.h>
#if
!
defined(WIN32)
#include
<
unistd
.h>
#endif
GamePad
::
GamePad
()
:
active
(
false
),
frequency
(
.01
),
gamepad_fd
(
0
)
{
...
...
@@ -109,8 +108,7 @@ GamePad::GamePad() : active(false), frequency(.01), gamepad_fd(0) {
joyGetPosEx
(
gamepad_fd
,
&
infoex
)
;
infoex
.
dwFlags
=
JOY_RETURNALL
;
#else
#if defined(__APPLE__)
#elif defined(__APPLE__)
// ??
...
...
@@ -128,8 +126,7 @@ GamePad::GamePad() : active(false), frequency(.01), gamepad_fd(0) {
std
::
cout
<<
(
int
)
buttons
<<
" buttons)"
<<
std
::
endl
;
active
=
true
;
}
#endif //(__APPLE__)
#endif //(WIN32)
#endif
for
(
int
i
=
0
;
i
<
std
::
min
(
9
,(
int
)
buttons
);
i
++
)
button_map
[
i
]
=
i
;
for
(
int
i
=
0
;
i
<
std
::
min
(
7
,(
int
)
axes
);
i
++
)
axe_map
[
i
]
=
i
;
...
...
@@ -144,22 +141,17 @@ GamePad::GamePad() : active(false), frequency(.01), gamepad_fd(0) {
}
}
GamePad
::~
GamePad
()
{
active
=
false
;
gamepad_fd
=
0
;
#if !defined(WIN32)
#if !defined(__APPLE__)
#if !defined(WIN32) && !defined(__APPLE__)
close
(
gamepad_fd
);
#endif //!(__APPLE__)
#endif //!(WIN32)
#endif
}
bool
GamePad
::
toggle
(
const
int
_nbut
)
{
bool
res
;
if
(
toggle_status
[
_nbut
]
){
res
=
true
;
toggle_status
[
_nbut
]
=
false
;}
...
...
@@ -167,8 +159,6 @@ bool GamePad::toggle(const int _nbut) {
return
res
;
}
int
GamePad
::
read_event
()
{
#if defined(WIN32)
...
...
@@ -216,8 +206,7 @@ int GamePad::read_event() {
std::cout<< infoex.dwButtonNumber << std::endl;
std::cout<< infoex.dwPOV << std::endl;
*/
#else
#if defined(__APPLE__)
#elif defined(__APPLE__)
// ??
...
...
@@ -250,14 +239,11 @@ int GamePad::read_event() {
}
}
#endif //(__APPLE__)
#endif //(WIN32)
#endif
return
1
;
}
void
GamePad
::
affiche
()
{
for
(
int
i
=
0
;
i
<
6
;
i
++
)
std
::
cout
<<
(
"_________"
);
std
::
cout
<<
std
::
endl
;
std
::
cout
<<
" axis "
;
...
...
@@ -275,4 +261,3 @@ void GamePad::affiche() {
std
::
cout
<<
std
::
endl
;
}
This diff is collapsed.
Click to expand it.
Common/GamePad.h
+
10
−
13
View file @
458f2d21
...
...
@@ -13,19 +13,16 @@
#define GP_BUTTONS 32
#define GP_AXES 6
#if defined(WIN32)
#include
<windows.h>
#include
<mmsystem.h>
#else
#if defined(__APPLE__)
#elif defined(__APPLE__)
// ??
#else // LINUX
#include
<linux/joystick.h>
#include
<fcntl.h>
#define GAMEPAD_DEV "/dev/input/js0"
#endif
#endif
class
GamePad
{
public:
...
...
@@ -56,10 +53,11 @@ class GamePad {
int
axes
;
int
buttons
;
#else
#if defined(__APPLE__)
#elif defined(__APPLE__)
// ??
int
axes
;
int
buttons
;
#else // LINUX
...
...
@@ -68,8 +66,7 @@ class GamePad {
__u8
axes
;
__u8
buttons
;
#endif
#endif
};
#endif
// _GAMEPAD_H_
#endif
This diff is collapsed.
Click to expand it.
Mesh/meshGRegionDelaunayInsertion.cpp
+
28
−
28
View file @
458f2d21
...
...
@@ -1177,7 +1177,7 @@ void insertVerticesInRegion (GRegion *gr)
int
COUNT_MISS_1
=
0
;
int
COUNT_MISS_2
=
0
;
clock_t
t1
=
clock
();
double
t1
=
Cpu
();
while
(
1
){
if
(
allTets
.
empty
()){
Msg
::
Error
(
"No tetrahedra in region %d %d"
,
gr
->
tag
(),
allTets
.
size
());
...
...
@@ -1287,8 +1287,8 @@ void insertVerticesInRegion (GRegion *gr)
}
memoryCleanup
(
myFactory
,
allTets
);
clock_t
t2
=
clock
();
double
dt
=
(
double
)(
t2
-
t1
)
/
CLOCKS_PER_SEC
;
double
t2
=
Cpu
();
double
dt
=
(
t2
-
t1
)
;
int
COUNT_MISS
=
COUNT_MISS_1
+
COUNT_MISS_2
;
Msg
::
Info
(
"3D Point Insertion Terminated : %9d Delaunay cavities modified for star shapeness"
,
NB_CORRECTION_OF_CAVITY
);
Msg
::
Info
(
" : %9d points could not be inserted among %d"
,
COUNT_MISS
,
vSizes
.
size
()
-
COUNT_MISS
);
...
...
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