Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hpp-fcl
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
Container Registry
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Guilhem Saurel
hpp-fcl
Commits
bfc62b9b
Commit
bfc62b9b
authored
10 years ago
by
panjia1983
Browse files
Options
Downloads
Patches
Plain Diff
adding headers file hidden in libccd version 2
parent
5c9aa3d4
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
include/fcl/ccd/simplex.h
+104
-0
104 additions, 0 deletions
include/fcl/ccd/simplex.h
include/fcl/ccd/support.h
+55
-0
55 additions, 0 deletions
include/fcl/ccd/support.h
with
159 additions
and
0 deletions
include/fcl/ccd/simplex.h
0 → 100644
+
104
−
0
View file @
bfc62b9b
/***
* libccd
* ---------------------------------
* Copyright (c)2010 Daniel Fiser <danfis@danfis.cz>
*
*
* This file is part of libccd.
*
* Distributed under the OSI-approved BSD License (the "License");
* see accompanying file BDS-LICENSE for details or see
* <http://www.opensource.org/licenses/bsd-license.php>.
*
* This software is distributed WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the License for more information.
*/
#ifndef __CCD_SIMPLEX_H__
#define __CCD_SIMPLEX_H__
#include
<ccd/compiler.h>
#include
"support.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/* __cplusplus */
struct
_ccd_simplex_t
{
ccd_support_t
ps
[
4
];
int
last
;
//!< index of last added point
};
typedef
struct
_ccd_simplex_t
ccd_simplex_t
;
_ccd_inline
void
ccdSimplexInit
(
ccd_simplex_t
*
s
);
_ccd_inline
int
ccdSimplexSize
(
const
ccd_simplex_t
*
s
);
_ccd_inline
const
ccd_support_t
*
ccdSimplexLast
(
const
ccd_simplex_t
*
s
);
_ccd_inline
const
ccd_support_t
*
ccdSimplexPoint
(
const
ccd_simplex_t
*
s
,
int
idx
);
_ccd_inline
ccd_support_t
*
ccdSimplexPointW
(
ccd_simplex_t
*
s
,
int
idx
);
_ccd_inline
void
ccdSimplexAdd
(
ccd_simplex_t
*
s
,
const
ccd_support_t
*
v
);
_ccd_inline
void
ccdSimplexSet
(
ccd_simplex_t
*
s
,
size_t
pos
,
const
ccd_support_t
*
a
);
_ccd_inline
void
ccdSimplexSetSize
(
ccd_simplex_t
*
s
,
int
size
);
_ccd_inline
void
ccdSimplexSwap
(
ccd_simplex_t
*
s
,
size_t
pos1
,
size_t
pos2
);
/**** INLINES ****/
_ccd_inline
void
ccdSimplexInit
(
ccd_simplex_t
*
s
)
{
s
->
last
=
-
1
;
}
_ccd_inline
int
ccdSimplexSize
(
const
ccd_simplex_t
*
s
)
{
return
s
->
last
+
1
;
}
_ccd_inline
const
ccd_support_t
*
ccdSimplexLast
(
const
ccd_simplex_t
*
s
)
{
return
ccdSimplexPoint
(
s
,
s
->
last
);
}
_ccd_inline
const
ccd_support_t
*
ccdSimplexPoint
(
const
ccd_simplex_t
*
s
,
int
idx
)
{
// here is no check on boundaries
return
&
s
->
ps
[
idx
];
}
_ccd_inline
ccd_support_t
*
ccdSimplexPointW
(
ccd_simplex_t
*
s
,
int
idx
)
{
return
&
s
->
ps
[
idx
];
}
_ccd_inline
void
ccdSimplexAdd
(
ccd_simplex_t
*
s
,
const
ccd_support_t
*
v
)
{
// here is no check on boundaries in sake of speed
++
s
->
last
;
ccdSupportCopy
(
s
->
ps
+
s
->
last
,
v
);
}
_ccd_inline
void
ccdSimplexSet
(
ccd_simplex_t
*
s
,
size_t
pos
,
const
ccd_support_t
*
a
)
{
ccdSupportCopy
(
s
->
ps
+
pos
,
a
);
}
_ccd_inline
void
ccdSimplexSetSize
(
ccd_simplex_t
*
s
,
int
size
)
{
s
->
last
=
size
-
1
;
}
_ccd_inline
void
ccdSimplexSwap
(
ccd_simplex_t
*
s
,
size_t
pos1
,
size_t
pos2
)
{
ccd_support_t
supp
;
ccdSupportCopy
(
&
supp
,
&
s
->
ps
[
pos1
]);
ccdSupportCopy
(
&
s
->
ps
[
pos1
],
&
s
->
ps
[
pos2
]);
ccdSupportCopy
(
&
s
->
ps
[
pos2
],
&
supp
);
}
#ifdef __cplusplus
}
/* extern "C" */
#endif
/* __cplusplus */
#endif
/* __CCD_SIMPLEX_H__ */
This diff is collapsed.
Click to expand it.
include/fcl/ccd/support.h
0 → 100644
+
55
−
0
View file @
bfc62b9b
/***
* libccd
* ---------------------------------
* Copyright (c)2010 Daniel Fiser <danfis@danfis.cz>
*
*
* This file is part of libccd.
*
* Distributed under the OSI-approved BSD License (the "License");
* see accompanying file BDS-LICENSE for details or see
* <http://www.opensource.org/licenses/bsd-license.php>.
*
* This software is distributed WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the License for more information.
*/
#ifndef __CCD_SUPPORT_H__
#define __CCD_SUPPORT_H__
#include
<ccd/ccd.h>
#ifdef __cplusplus
extern
"C"
{
#endif
/* __cplusplus */
struct
_ccd_support_t
{
ccd_vec3_t
v
;
//!< Support point in minkowski sum
ccd_vec3_t
v1
;
//!< Support point in obj1
ccd_vec3_t
v2
;
//!< Support point in obj2
};
typedef
struct
_ccd_support_t
ccd_support_t
;
_ccd_inline
void
ccdSupportCopy
(
ccd_support_t
*
,
const
ccd_support_t
*
s
);
/**
* Computes support point of obj1 and obj2 in direction dir.
* Support point is returned via supp.
*/
void
__ccdSupport
(
const
void
*
obj1
,
const
void
*
obj2
,
const
ccd_vec3_t
*
dir
,
const
ccd_t
*
ccd
,
ccd_support_t
*
supp
);
/**** INLINES ****/
_ccd_inline
void
ccdSupportCopy
(
ccd_support_t
*
d
,
const
ccd_support_t
*
s
)
{
*
d
=
*
s
;
}
#ifdef __cplusplus
}
/* extern "C" */
#endif
/* __cplusplus */
#endif
/* __CCD_SUPPORT_H__ */
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