forked from bminortx/Buckshot
-
Notifications
You must be signed in to change notification settings - Fork 1
/
BuckshotCreator.m
32 lines (28 loc) · 1.06 KB
/
BuckshotCreator.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
function [ new_class_ptr ] = BuckshotCreator(boolCreatePtr)
%Includes all of the libraries necessary for the Sim bullet wrapper to
%function in MATLAB. The boolCreatePtr that SETUP takes as an argument lets the
%user choose whether or not they want to create a bullet class object (true), or
%merely link the libraries to MATLAB for ease of coding (false).
disp('> Linking directories');
disp('> ...');
% Link all of our directories
addpath(genpath('bulletComponents'));
addpath('bulletComponents');
addpath(genpath('matlabComponents'));
addpath('matlabComponents');
addpath(genpath('Demos'));
addpath('Demos');
disp('> Linking complete!');
if boolCreatePtr == true,
disp('> CreatePtr == true: Attempting to compile Buckshot Interface');
system('chmod +x createMexFiles.sh');
result = system('./createMexFiles.sh false');
if (result ~= 0),
disp('Buckshot failed to compile');
return;
end
new_class_ptr = bullet_interface();
disp('> ...');
disp('> Buckshot successfully compiled! Way to go, champ.');
disp('------------------');
end