Add Matlab and CS examples
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,6 +2,7 @@
|
|||||||
build*/*
|
build*/*
|
||||||
*.so
|
*.so
|
||||||
public/
|
public/
|
||||||
|
*.exe
|
||||||
|
|
||||||
# Eclispe setting --- do not ignore *.cproject and *.project
|
# Eclispe setting --- do not ignore *.cproject and *.project
|
||||||
*/**/.settings
|
*/**/.settings
|
||||||
|
|||||||
@@ -35,12 +35,8 @@ using System.Runtime.InteropServices;
|
|||||||
public class Tester
|
public class Tester
|
||||||
{
|
{
|
||||||
|
|
||||||
|
[DllImport("libopenGJKlib", EntryPoint="csFunction", CallingConvention = CallingConvention.StdCall)]
|
||||||
|
|
||||||
#if UNIX
|
|
||||||
[DllImport("libopenGJKlib.so", EntryPoint="csFunction", CallingConvention = CallingConvention.StdCall)]
|
|
||||||
#else
|
|
||||||
[DllImport("openGJKlib", EntryPoint = "csFunction", CallingConvention = CallingConvention.StdCall)]
|
|
||||||
#endif
|
|
||||||
static extern double gjk(int na, double [,] ia, int nb, double [,] ib);
|
static extern double gjk(int na, double [,] ia, int nb, double [,] ib);
|
||||||
|
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
|
|||||||
@@ -52,10 +52,10 @@ end
|
|||||||
% TRY COMPILING MEX FILE
|
% TRY COMPILING MEX FILE
|
||||||
fprintf('Compiling mex function... ')
|
fprintf('Compiling mex function... ')
|
||||||
try
|
try
|
||||||
mex(fullfile('..','..','lib','src','openGJK.c'),... % Source of openGJK
|
mex(fullfile('..','..','src','openGJK.c'),... % Source of openGJK
|
||||||
'-largeArrayDims', ... % Support large arrays
|
'-largeArrayDims', ... % Support large arrays
|
||||||
optflug, ... % Compiler flag for debug/optimisation
|
optflug, ... % Compiler flag for debug/optimisation
|
||||||
fullfile('-I..','..','lib','include'),... % Folder to header files
|
fullfile('-I..','..','include'),... % Folder to header files
|
||||||
'-outdir', pwd,... % Ouput directory for writing mex function
|
'-outdir', pwd,... % Ouput directory for writing mex function
|
||||||
'-output', 'openGJK',... % Name of ouput mex file
|
'-output', 'openGJK',... % Name of ouput mex file
|
||||||
'-DMATLABDOESMEXSTUFF',... % Define variable for mex function in source files
|
'-DMATLABDOESMEXSTUFF',... % Define variable for mex function in source files
|
||||||
|
|||||||
Reference in New Issue
Block a user