Add Matlab and CS examples
parent
81a073fc86
commit
72cd5f3617
|
@ -2,6 +2,7 @@
|
|||
build*/*
|
||||
*.so
|
||||
public/
|
||||
*.exe
|
||||
|
||||
# Eclispe setting --- do not ignore *.cproject and *.project
|
||||
*/**/.settings
|
||||
|
|
|
@ -35,12 +35,8 @@ using System.Runtime.InteropServices;
|
|||
public class Tester
|
||||
{
|
||||
|
||||
|
||||
#if UNIX
|
||||
[DllImport("libopenGJKlib.so", EntryPoint="csFunction", CallingConvention = CallingConvention.StdCall)]
|
||||
#else
|
||||
[DllImport("openGJKlib", EntryPoint = "csFunction", CallingConvention = CallingConvention.StdCall)]
|
||||
#endif
|
||||
[DllImport("libopenGJKlib", EntryPoint="csFunction", CallingConvention = CallingConvention.StdCall)]
|
||||
|
||||
static extern double gjk(int na, double [,] ia, int nb, double [,] ib);
|
||||
|
||||
public static void Main(string[] args)
|
||||
|
|
|
@ -52,10 +52,10 @@ end
|
|||
% TRY COMPILING MEX FILE
|
||||
fprintf('Compiling mex function... ')
|
||||
try
|
||||
mex(fullfile('..','..','lib','src','openGJK.c'),... % Source of openGJK
|
||||
mex(fullfile('..','..','src','openGJK.c'),... % Source of openGJK
|
||||
'-largeArrayDims', ... % Support large arrays
|
||||
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
|
||||
'-output', 'openGJK',... % Name of ouput mex file
|
||||
'-DMATLABDOESMEXSTUFF',... % Define variable for mex function in source files
|
||||
|
|
Loading…
Reference in New Issue