Add Matlab and CS examples

fixes-turtlebasket
Mattia Montanari 2020-04-18 13:29:35 +01:00
parent 81a073fc86
commit 72cd5f3617
3 changed files with 5 additions and 8 deletions

1
.gitignore vendored
View File

@ -2,6 +2,7 @@
build*/*
*.so
public/
*.exe
# Eclispe setting --- do not ignore *.cproject and *.project
*/**/.settings

View File

@ -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)

View File

@ -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