Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed the problem in signed distance for the geometry shape. When sha…
…pes are in collision, the distance call with signed distance enabled will return a pair of nearest points on the surface of objects
- Loading branch information
1 parent
06d48b3
commit cd2c6a1
Showing
13 changed files
with
1,392 additions
and
18 deletions.
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
include/fcl/narrowphase/detail/convexity_based_algorithm/alloc.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/*** | ||
* 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_ALLOC_H__ | ||
#define __CCD_ALLOC_H__ | ||
|
||
#include <stdlib.h> | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif /* __cplusplus */ | ||
|
||
/** | ||
* Functions and macros required for memory allocation. | ||
*/ | ||
|
||
/* Memory allocation: */ | ||
#define __CCD_ALLOC_MEMORY(type, ptr_old, size) \ | ||
(type *)realloc((void *)ptr_old, (size)) | ||
|
||
/** Allocate memory for one element of type. */ | ||
#define CCD_ALLOC(type) \ | ||
__CCD_ALLOC_MEMORY(type, NULL, sizeof(type)) | ||
|
||
/** Allocate memory for array of elements of type type. */ | ||
#define CCD_ALLOC_ARR(type, num_elements) \ | ||
__CCD_ALLOC_MEMORY(type, NULL, sizeof(type) * (num_elements)) | ||
|
||
#define CCD_REALLOC_ARR(ptr, type, num_elements) \ | ||
__CCD_ALLOC_MEMORY(type, ptr, sizeof(type) * (num_elements)) | ||
|
||
#ifdef __cplusplus | ||
} /* extern "C" */ | ||
#endif /* __cplusplus */ | ||
|
||
#endif /* __CCD_ALLOC_H__ */ |
Oops, something went wrong.