SDL2 plugin for Vrep
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


SDL2 plugin for Vrep v1.0

Implementation of the following SDL functions:

General functions:

bool init_sdl(bool USE_HAPTIC);
bool quit_sdl();
bool refresh();
bool isPressed(int button);
int numButtons();
int hatPosition();

Haptic functions:

bool createDirectionalEffect(int dir_deg, int level);
bool createGroovesEffect(int dir_deg, int level, int length);
bool createRumbleEffect();
bool playRumbleEffect(int strength, int duration);
bool updateDirEffect(int dir_deg, int level);
bool updateGroovesEffect(int dir_deg, int level, int length);
bool playDirEffect();
bool playGroovesEffect();
bool destroyDirEffect();
bool destroyGroovesEffect();
bool stopDirEffect();
bool stopGroovesEffect();

Note: it is important to keep track of the effect state and not to start it every simulation loop in a non-threaded childscript (see example scene)

Easy to extend and supposed to be cross-platfrom.

It is imporant to have link SDL2 and put SDL.dll into VRep folder.

Agenda: implement the possibility to choose a device index