142 #ifdef VOXIEBOXCPP_EXPORTS
143 #define EXTEND_API __declspec(dllexport)
145 #define EXTEND_API __declspec(dllimport)
156 #define PI 3.14159265358979323
158 #define min(a, b) (((a) < (b)) ? (a) : (b))
161 #define max(a, b) (((a) < (b)) ? (a) : (b))
206 virtual void setBorder(
bool option,
int color = 0xffffff) = 0;
268 virtual void setView(
float xMin,
float yMin,
float zMin,
float xMax,
float yMax,
float zMax) = 0;
272 virtual void setMaskPlane(
float x0,
float y0,
float z0,
float normVx,
float normVy,
float normVz) = 0;
274 virtual void setGlobalShader(
float horizontalAngle,
float verticalAngle,
float amplitude) = 0;
278 virtual void freeGfx(
const char* fileName) = 0;
280 virtual void setProject(
int dispNum,
int dir,
float x,
float y,
int z,
float* xo,
float* yo) = 0;
282 virtual void setLeds(
int dispNum,
int r,
int g,
int b) = 0;
292 virtual void debugText(
int posX,
int posY,
int forgroundCol,
int backgroundCol,
const char* fmt, ...) = 0;
294 virtual double debugBar(
int posX,
int posY,
double currentVal,
double maxVal,
double minVal,
const char* text,
int type) = 0;
296 virtual double showVPS(
int posX = 15,
int posY = 525) = 0;
306 virtual void debugDrawLine(
float xStartPos,
float yStartPos,
float xEndPos,
float yEndPos,
int col) = 0;
308 virtual void debugDrawCircle(
int xCenterPos,
int yCenterPos,
int radius,
int col) = 0;
310 virtual void debugDrawBoxFill(
int xStartPos,
int yStartPos,
int xEndPos,
int yEndPos,
int col) = 0;
319 virtual void debugCustomFont(
int xpos,
int ypos,
int customFontIndex,
const char* fmt, ...) = 0;
325 virtual void drawVox(
float x,
float y,
float z,
int col) = 0;
329 virtual void drawBox(
float x0,
float y0,
float z0,
float x1,
float y1,
float z1,
int fillmode,
int col) = 0;
337 virtual void drawSphere(
float x,
float y,
float z,
float radius,
int fillmode,
int col) = 0;
339 virtual void drawLine(
float xStartPos,
float yStartPos,
float zStartPos,
float xEndPos,
float yEndPos,
float zEndPos,
int col) = 0;
345 virtual void drawMesh(
const char* fileName,
poltex_t* verticeList,
int verticeNum,
int* meshList,
int meshNum,
int flags,
int col) = 0;
347 virtual void drawMeshExt(
const char* fileNam,
point3d* VerticeXYZArray,
int verticeXYZNum,
uvcol_t* verticcUVCArray,
int verticeUVCNum,
inds_t* indiceArray,
int indiceNum,
int flags,
int col) = 0;
349 virtual void drawCone(
float xStartPos,
float yStartPos,
float zStartPos,
float startRadius,
float xEndPos,
float yEndPos,
float zEndPos,
float endRadius,
int fillmode,
int col) = 0;
359 virtual void drawQuad(
const char* filename,
point3d* pos,
float width,
float height,
float hAng,
float vAng,
float twist,
int col,
float uValue,
float vValue) = 0;
368 virtual void drawTextSimp(
point3d* pos,
float textWidth,
float textHeight,
float hang,
float vang,
float tilt,
int col,
const char* fmt, ...) = 0;
434 virtual void reportMouse(
int posX,
int posY,
bool showCursor =
true) = 0;
452 virtual int touchManualRead(
int* touchIndex,
int* xVal,
int* yVal,
int* packetState) = 0;
501 virtual int updateJoyStateRaw(
int controllerID,
voxie_xbox_t* vx) = 0;
505 virtual void setJoyVibrate(
int controllerID,
float leftMotorSpeed,
float rightMotorSpeed) = 0;
543 virtual void reportNav(
int posX,
int posY,
bool showCursor =
true) = 0;
545 virtual int getNavButtonState(
int spaceNavID) = 0;
547 virtual int getNavPrevButtonState(
int spaceNavID) = 0;
589 virtual void menuReset(
int(*menu_update)(
int id,
char* st,
double val,
int how,
void* userdata),
void* userdata,
char* bgImageFileName) = 0;
591 virtual void menuAddTab(
const char* st,
int x,
int y,
int xs,
int ys) = 0;
593 virtual void menuAddItem(
const char* st,
int x,
int y,
int xSize,
int ySize,
int id,
int type,
int state,
int col,
double startingVal,
double minVal,
double maxVal1,
double minStepVal,
double majStepVal) = 0;
595 virtual void updateMenu(
int id,
const char* st,
int state,
double v) = 0;
601 virtual int playSound(
const char* fileName,
int sourceChannel,
int volumeLeft,
int volumeRight,
float playBackSpeed) = 0;
603 virtual void updateSound(
int handleID,
int sourceChannel,
int volumeLeft,
int volumeRight,
float playBackSpeed) = 0;
621 virtual void captureVolume(
const char* filnam,
int volcap_mode,
int target_vps) = 0;
643 virtual int tweenCol(
int color,
int speed,
int destcolor) = 0;
645 virtual int brightenCol(
int color,
int amount) = 0;
707 virtual kzfile_t*
_kzopen_ext(
const char*,
const char*,
const char*) = 0;
709 virtual unsigned int _kzread(kzfile_t* kzfile,
void* buffer,
unsigned int leng) = 0;
713 virtual unsigned int _kztell(kzfile_t* kzfile) = 0;
715 virtual int _kzseek(kzfile_t* kzfile,
int offset,
int whence) = 0;
719 virtual int _kzeof(kzfile_t* kzfile) = 0;
723 virtual int _kpgetdim(
const char* buffer,
int nby,
int* xsiz,
int* ysiz) = 0;
725 virtual int _kprender(
const char* buffer,
int nby, INT_PTR fptr,
int bpl,
int xsiz,
int ysiz,
int xoff,
int yoff) = 0;
727 virtual int _kpzload(
const char* fileName, INT_PTR* fptr, INT_PTR* bpl, INT_PTR* xsiz, INT_PTR* ysiz) = 0;
743 bool success =
false;
764 void setBorder(
bool option,
int color = 0xffffff);
796 void setView(
float xMin,
float yMin,
float zMin,
float xMax,
float yMax,
float zMax);
798 void setMaskPlane(
float x0,
float y0,
float z0,
float nx,
float ny,
float nz);
799 void setGlobalShader(
float horizontalAngle,
float verticalAngle,
float amplitude);
801 void freeGfx(
const char* fileName);
802 void setProject(
int dispNum,
int dir,
float x,
float y,
int z,
float* xo,
float* yo);
803 void setLeds(
int dispNum,
int r,
int g,
int b);
810 void debugText(
int x,
int y,
int fcol,
int bcol,
const char* fmt, ...);
811 double debugBar(
int posX,
int posY,
double currentVal,
double maxVal,
double minVal,
const char* text,
int type);
812 double showVPS(
int posX,
int posY);
818 void debugDrawLine(
float xStartPos,
float yStartPos,
float xEndPos,
float yEndPos,
int col);
819 void debugDrawCircle(
int xCenterPos,
int yCenterPos,
int radius,
int col);
820 void debugDrawBoxFill(
int xStartPos,
int yStartPos,
int xEndPos,
int yEndPos,
int col);
824 void debugCustomFont(
int xpos,
int ypos,
int customFontIndex,
const char* fmt, ...);
828 void drawVox(
float x,
float y,
float z,
int col);
830 void drawBox(
float x0,
float y0,
float z0,
float x1,
float y1,
float z1,
int fillmode,
int col);
833 void drawSphere(
float x,
float y,
float z,
float radius,
int fillmode,
int col);
835 void drawLine(
float xStartPos,
float yStartPos,
float zStartPos,
float xEndPos,
float yEndPos,
float zEndPos,
int col);
837 void drawMesh(
const char* fileNam,
poltex_t* verticeList,
int verticeNum,
int* meshList,
int meshNum,
int flags,
int col);
838 void drawMeshExt(
const char* fileNam,
point3d* VerticeXYZArray,
int verticeXYZNum,
uvcol_t* verticcUVCArray,
int verticeUVCNum,
inds_t* indiceArray,
int indiceNum,
int flags,
int col);
841 void drawCone(
float xStartPos,
float yStartPos,
float zStartPos,
float startRadius,
float xEndPos,
float yEndPos,
float zEndPos,
float endRadius,
int fillmode,
int col);
842 void drawCone(
point3d startPos,
float startRadius,
point3d endPos,
float endRadius,
int fillmode,
int col);
846 void drawQuad(
const char* filename,
point3d* pos,
float width,
float height,
float hang,
float vang,
float tilt,
int col = 0x404040,
float uValue = 1,
float vValue = 1);
851 void drawTextSimp(
point3d* pos,
float textWidth,
float textHeight,
float hang,
float vang,
float tilt,
int col,
const char* fmt, ...);
887 void reportMouse(
int posX,
int posY,
bool showCursor =
true);
897 int touchManualRead(
int* touchIndex,
int* xVal,
int* yVal,
int* packetState);
935 void setJoyVibrate(
int controllerID,
float leftMotorSpeed,
float rightMotorSpeed);
950 void reportNav(
int posX,
int posY,
bool showCursor =
true);
974 void menuReset(
int(*menu_update)(
int id,
char* st,
double val,
int how,
void* userdata),
void* userdata,
char* bgImageFileName);
975 void menuAddTab(
const char* st,
int x,
int y,
int xs,
int ys);
976 void menuAddItem(
const char* st,
int x,
int y,
int xSize,
int ySize,
int id,
int type,
int state,
int col,
double startingVal,
double minVal,
double maxVal1,
double minStepVal,
double majStepVal);
977 void updateMenu(
int id,
const char* st,
int state,
double v);
981 int playSound(
const char* fileName,
int sourceChannel,
int volumeLeft,
int volumeRight,
float playBackSpeed);
982 void updateSound(
int handleID,
int sourceChannel,
int volumeLeft,
int volumeRight,
float playBackSpeed);
989 void mountZip(
const char* fileName);
992 void captureVolume(
const char* fileName,
int volCapMode,
int targetVPS);
1004 int tweenCol(
int color,
int speed,
int destcolor);
1041 kzfile_t*
_kzopen(
const char* st);
1042 kzfile_t*
_kzopen_ext(
const char*,
const char*,
const char*);
1043 unsigned int _kzread(kzfile_t* kzfile,
void* buffer,
unsigned int leng);
1045 unsigned int _kztell(kzfile_t* kzfile);
1046 int _kzseek(kzfile_t* kzfile,
int offset,
int whence);
1047 int _kzgetc(kzfile_t* kzfile);
1048 int _kzeof(kzfile_t* kzfile);
1052 int _kpgetdim(
const char* buffer,
int nby,
int* xsiz,
int* ysiz);
1053 int _kprender(
const char* buffer,
int nby, INT_PTR fptr,
int bpl,
int xsiz,
int ysiz,
int xoff,
int yoff);
1055 int _kpzload(
const char* fileName, INT_PTR* fptr, INT_PTR* bpl, INT_PTR* xsiz, INT_PTR* ysiz);
1064 bool customFontInit[20] = { 0 };
1065 int customFontLastIndex = 0;
1067 static HINSTANCE hvoxie;
1073 double mouseXYSensitivity = 0.001;
1074 double mouseZSensitivity = 0.0005;
1075 double mouseClickThreshold = 0.5;
1076 double startLastPressedMouse[3] = { -100, -100, -100 };
1077 double durationLastPressedMouse[3] = { 0 };
1079 double navSensitivity[4] = { 0.0025, 0.0025, 0.0025, 0.0025 };
1080 int onavbut[4] = { 0 };
1082 int joyOri[4] = { 0,0,0,0 };
1083 int navOri[4] = { 0,0,0,0 };
1086 bool invertZAxis =
false;
1090 double navClickThreshold = 0.5;
1091 void updateNavInput();
1096 void updateKeyboardHistory();
1098 int colScrollcolor = PALETTE_COLOR[rainbowCounter];
1099 double colScrollSpeed = 0.1;
1100 double rainbowTim = 0;
1101 int rainbowCounter = 0;
1103 double joyDeadZone = 0.3;
1104 double navDeadZone = 0.1;
1107 void updateJoyInput();
1108 int joyDeadZoneCheck(
float value);
1120 bool touchUpdate =
false;
1121 bool touchIsDrawing =
true;
1122 int currentActiveTouches = 0;
1124 bool drawBorder =
false;
1125 int drawBorderCol = 0xffffff;
1126 bool enableEscQuit =
true;
1127 bool enableMouseClip =
false;
1128 bool enableNavClip =
false;
1129 bool enableCleanExit =
true;
1130 bool manualJoyManage =
false;
1131 bool manualNavManage =
false;
1132 bool manualKeyManage =
false;
1133 bool manualTouchManage =
false;
1135 bool enableJoyDeadZone =
true;
1136 bool enableNavDeadZone =
true;
1138 float normaliseAnaStickToFloat(
short input);
1139 float normaliseNavToFloat(
int input);
1141 point2d oriCorrection(
int oriType,
float xValue,
float yValue);
1142 void updateMousePosition();
1145 void touchClear(
touchInput_t* touchInputPtr,
int index);
1149 #pragma region InternalFunctions
1151 void voxie_uninit(
int mode);
1154 #pragma region DLL_Functions
1158 void(__cdecl* voxie_uninit_int)(int);
1159 void(__cdecl* voxie_mountzip)(
const char* fnam);
1160 void(__cdecl* voxie_free)(
const char* fnam);
1161 __int64(__cdecl* voxie_getversion)(void);
1162 HWND(__cdecl* voxie_gethwnd)(void);
1164 void(__cdecl* voxie_quitloop)(void);
1165 double(__cdecl* voxie_klock)(void);
1166 int(__cdecl* voxie_keystat)(int);
1167 int(__cdecl* voxie_keyread)(void);
1168 int(__cdecl* voxie_xbox_read)(
int id,
voxie_xbox_t* vx);
1169 void(__cdecl* voxie_xbox_write)(
int id,
float lmot,
float rmot);
1170 int(__cdecl* voxie_nav_read)(
int id,
voxie_nav_t* nav);
1171 int(__cdecl* voxie_touch_read)(
int* id,
int* xVal,
int* yVal,
int* packetState);
1172 void(__cdecl* voxie_menu_reset)(int(*menu_update)(
int id,
char* st,
double val,
int how,
void* userdata),
void* userdata,
char* bkfilnam);
1173 void(__cdecl* voxie_menu_addtab)(
const char* st,
int x,
int y,
int xs,
int ys);
1174 void(__cdecl* voxie_menu_additem)(
const char* st,
int x,
int y,
int xs,
int ys,
int id,
int type,
int down,
int col,
double v,
double v0,
double v1,
double vstp0,
double vstp1);
1175 void(__cdecl* voxie_menu_updateitem)(
int id,
const char* st,
int down,
double v);
1176 void(__cdecl* voxie_touch_custom)(
const touchkey_t* touchkey,
int num);
1177 void(__cdecl* voxie_volcap)(
const char* fileName,
int volcap_mode,
int targetVps);
1178 void(__cdecl* voxie_setview)(
voxie_frame_t* vf,
float x0,
float y0,
float z0,
float x1,
float y1,
float z1);
1179 void(__cdecl* voxie_setmaskplane)(
voxie_frame_t* vf,
float x0,
float y0,
float z0,
float nx,
float ny,
float nz);
1180 void(__cdecl* voxie_setnorm)(
float nx,
float ny,
float nz);
1182 void(__cdecl* voxie_flush)(void);
1183 void(__cdecl* voxie_frame_end)(void);
1184 void(__cdecl* voxie_setleds)(
int id,
int r,
int g,
int b);
1185 void(__cdecl* voxie_project)(int, int, float, float, int,
float*,
float*);
1186 void(__cdecl* voxie_drawvox)(
voxie_frame_t* vf,
float fx,
float fy,
float fz,
int col);
1187 void(__cdecl* voxie_drawbox)(
voxie_frame_t* vf,
float x0,
float y0,
float z0,
float x1,
float y1,
float z1,
int fillmode,
int col);
1188 void(__cdecl* voxie_drawlin)(
voxie_frame_t* vf,
float x0,
float y0,
float z0,
float x1,
float y1,
float z1,
int col);
1190 void(__cdecl* voxie_drawmeshtex)(
voxie_frame_t* vf,
const char* fnam,
poltex_t* vt,
int vtn,
int* mesh,
int meshn,
int flags,
int col);
1191 void(__cdecl* voxie_drawmeshtex_ext)(
voxie_frame_t* vf,
const char* texnam,
point3d* xyz,
int xyzn,
uvcol_t* uvc,
int uvcn,
inds_t* inds,
int ninds,
int flags,
int col);
1192 void(__cdecl* voxie_drawsph)(
voxie_frame_t* vf,
float fx,
float fy,
float fz,
float rad,
int issol,
int col);
1193 void(__cdecl* voxie_drawcone)(
voxie_frame_t* vf,
float x0,
float y0,
float z0,
float r0,
float x1,
float y1,
float z1,
float r1,
int fillmode,
int col);
1194 int(__cdecl* voxie_drawspr_getextents)(
const char*,
extents_t*, int);
1202 void(__cdecl* voxie_debug_print6x8)(
int x,
int y,
int fcol,
int bcol,
const char* st);
1203 void(__cdecl* voxie_debug_drawpix)(
int x,
int y,
int col);
1204 void(__cdecl* voxie_debug_drawhlin)(
int x0,
int x1,
int y,
int col);
1205 void(__cdecl* voxie_debug_drawline)(
float x0,
float y0,
float x1,
float y1,
int col);
1206 void(__cdecl* voxie_debug_drawcirc)(
int xc,
int yc,
int r,
int col);
1207 void(__cdecl* voxie_debug_drawrectfill)(
int x0,
int y0,
int x1,
int y1,
int col);
1208 void(__cdecl* voxie_debug_drawcircfill)(
int x,
int y,
int r,
int col);
1209 void(__cdecl* voxie_debug_drawtile)(
tiletype* src,
int x0,
int y0);
1210 int(__cdecl* voxie_playsound)(
const char* fileName,
int sourceChannel,
int volumeLeft,
int volumeRight,
float playBackSpeed);
1211 void(__cdecl* voxie_playsound_update)(
int handle,
int sourceChannel,
int volumeLeft,
int volumeRight,
float playBackSpeed);
1212 void(__cdecl* voxie_playsound_seek)(
int handle,
double secs,
int seekType);
1215 void(__cdecl* voxie_setaudplaycb)(void (*userplayfunc)(
int* samps,
int nframes));
1216 void(__cdecl* voxie_setaudreccb)(void(*userrecfunc)(
int* samps,
int nframes));
1217 int(__cdecl* voxie_rec_open)(
voxie_rec_t* vr,
char* fnam,
char* port,
int flags);
1218 int(__cdecl* voxie_rec_play)(
voxie_rec_t* vr,
int domode);
1222 int(__cdecl* kpzload)(
const char* fileName, INT_PTR* fptr, INT_PTR* bpl, INT_PTR* xsiz, INT_PTR* ysiz);
1224 int(__cdecl* kpgetdim)(
const char* buffer,
int nby,
int* xsiz,
int* ysiz);
1225 int(__cdecl* kprender)(
const char* buffer,
int nby, INT_PTR fptr,
int bpl,
int xsiz,
int ysiz,
int xoff,
int yoff);
1227 int(__cdecl* kzaddstack)(
const char* fileName);
1228 void(__cdecl* kzuninit)();
1229 kzfile_t* (__cdecl* kzsetfil)(FILE* fileName);
1230 kzfile_t* (__cdecl* kzopen)(
const char*);
1231 kzfile_t* (__cdecl* kzopen_ext)(
const char*,
const char*,
const char*);
1232 kzfind_t* (__cdecl* kzfindfilestart)(
const char* st);
1233 int(__cdecl* kzfindfile)(kzfind_t* find,
kzfileinfo_t* fileinfo);
1234 int(__cdecl* kzread)(kzfile_t* kzfile,
void* buffer,
unsigned int leng);
1235 int(__cdecl* kzfilelength)(kzfile_t* kzfile);
1236 int(__cdecl* kzseek)(kzfile_t* kzfile,
int offset,
int whence);
1237 int(__cdecl* kztell)(kzfile_t* kzfile);
1238 int(__cdecl* kzgetc)(kzfile_t* kzfile);
1239 int(__cdecl* kzeof)(kzfile_t* kzfile);
1240 void(__cdecl* kzclose)(kzfile_t* kzfile);
Interface for VoxieBox class.
Definition: vxCPP.h:171
virtual int getKeyStreamScanCode()=0
Similar to getKeyStream() but returns only the scancode of the keystate of a streaming state....
virtual int getJoyNum()=0
Returns the number of USB game controllers detected by the system.
virtual int getMouseOrientation()=0
Returns the orientation set for the mouse.
virtual void drawBox(point3d posLeftUpTop, point3d posRightDownBottom, int fillmode, int col)=0
Renders a rectangle / box on the volumetric display using 2 point3ds for coordinates....
virtual voxie_frame_t * getVoxieFrame()=0
returns a pointer to the internal voxie_frame_t struct
virtual void setMousePosition(point3d newPos)=0
Overrides internal mouse position with a new point3d position.
virtual kzfile_t * _kzsetfil(FILE *fileName)=0
Internal zip file management function. All 'kz...' functions are to do with Ken's zip file access.
virtual void setColScrollSpeed(double speed)=0
Set the speed of the internal color scroller default is 0.1. Value is how long in seconds before a co...
virtual int colorHexDivide(int color, float divideAmount)=0
Divides (dims) a RGB hexadecimal color value by a division number (use this as when using drawModel()...
virtual int getJoyButtonState(int controllerID)=0
returns the game controllers button state. See vxInputTypes::JoyButtonCodes for details.
virtual int getTouchPosY(int index)=0
Returns the touch Y position by index register. Run using a for loop with TOUCH_MAX_INPUT to check al...
virtual int getNavNum()=0
Returns the number of SpaceNavs detected by the system. Note : SpaceNavs are only detected after firs...
virtual int getMouseButtonOnDown(int buttonCode)=0
Returns the state of mouse's buttonCode. returns 1 if button has been pressed during this update fram...
virtual void reportNav(int posX, int posY, bool showCursor=true)=0
Reports all SpaceNav input state onto the secondary (touch screen)
virtual int getTouchPressIndex(point2d TLpos, point2d BRpos, bool drawCollision=false)=0
Returns the touch point index if a touch event happens within the collision box.
virtual void reportVoxieWind(int posX, int posY)=0
Exposes all the variables from the internal vw voxie_wind_t onto the secondary (touch) screen....
virtual void setNavSensitivity(int spaceNavID, double newAmount)=0
Set the Space Nav's sensitivity. Used to manage the Space Nav being used as a cursor....
virtual void _kzuninit()=0
Internal zip file management function - global function (these not multi-thread safe!...
virtual void setProject(int dispNum, int dir, float x, float y, int z, float *xo, float *yo)=0
Advanced utility function for keystone calibration (used by graphcalc and keystone calibration in vox...
virtual void setJoyVibrate(int controllerID, float leftMotorSpeed, float rightMotorSpeed)=0
Activates vibration motors in XBox controller. XInput controllers only. To stop Be sure to call again...
virtual void setMouseDoubleClickThreshold(double timeThreshold)=0
Set the time between mouse clicks to register a 'double click' (which triggers a true setting for get...
virtual void setEnableLegacyNavInput(bool option)=0
Set to true to handle Nav input manually. Disables many of the nav input functions....
virtual void updateSound(int handleID, int sourceChannel, int volumeLeft, int volumeRight, float playBackSpeed)=0
Updates or adjusts a currently playing sound. Used for muting a current sound or adjusting settings.
virtual void setEnableNavDeadZone(bool option)=0
Toggles a dead zone for Space Navigator. Set to true by default.
virtual void setJoyDeadZone(double deadZoneValue)=0
Sets the internal dead zone value for game controllers. (dead zone is the area where not input is det...
virtual void setAspectX(float newAspectX)=0
set the internal voxie_wind_t's aspect X ratio
virtual void debugDrawLine(float xStartPos, float yStartPos, float xEndPos, float yEndPos, int col)=0
Draws a line on the secondary (touch) screen. Must be called between startFrame() & endFrame() functi...
virtual void reportTouch(int posX, int posY)=0
Reports the state of the touch input on to the secondary (touch) screen.
virtual int getTouchPressIndexCir(point2d CirPos, float radius, bool drawCollision=false)=0
Returns the touch point index if a touch event happens within the collision circle.
virtual int ciricle2DChk(point2d *circlePos, float radius, point2d *collisionPos, int showCollisionBox=0)=0
Within circle collision check. Check if a position is inside a collision circle.
virtual void setAspectY(float newAspectY)=0
set the internal voxie_wind_t's aspect Y ratio
virtual point3d getNavPosition(int spaceNavID)=0
Returns a point3d of the Nav's tracked position. Used primary when the Space Nav is being used as a c...
virtual double getNavDeadZone()=0
returns the internal dead one value for the Space Navigator
virtual int getNavButtonIsDown(int spaceNavID, int buttonCode)=0
Returns 1 if particular Space Nav's button is being pressed. Button codes are based on vxInputTypes....
virtual void drawCone(point3d startPos, float startRadius, point3d endPos, float endRadius, int fillmode, int col)=0
Renders a cone shape on the volumetric display with rounded ends (also capable of rendering a cylinde...
virtual void menuAddTab(const char *st, int x, int y, int xs, int ys)=0
Add a custom menu tab on secondary (touch) screen menu (NOTE: there's only space for 2 more tabs on t...
virtual double getNavSensitivity(int spaceNavID)=0
virtual void drawBox(float x0, float y0, float z0, float x1, float y1, float z1, int fillmode, int col)=0
Renders a rectangle / box on the volumetric display using 3 floats for coordinates....
virtual int touchManualRead(int *touchIndex, int *xVal, int *yVal, int *packetState)=0
Read touch inputs - This function should be called in a while loop until 0 is returned.
virtual double getDeltaTime()=0
Returns in seconds the delta time(time between volumes) delta time is CPU speed dependent and can be ...
virtual point3d getNavDirectionDelta(int spaceNavID)=0
Returns the Space Nav's direction input delta as a point3d. Range between -1 and 1....
virtual double getNavDoubleClickThreshold()=0
Returns the internal Space Nav double click threshold value. (Used to determine if a 'double click' h...
virtual int drawModel(const char *fileName, point3d *pos, point3d *rVector, point3d *dVector, point3d *fVector, int col)=0
Renders 3D model (.obj, .ply, .stl, .kv6). Displays a filename mesh onto the volumetric display.
virtual touchInput_t * getTouchInputStruct()=0
Returns a the internal touchInput_t pointer
virtual int pointSame(point2d *a, point2d *b, point2d accuracy)=0
Compare two point2d with a degree of accuracy. returns true if the two points are the same within the...
virtual int _kprender(const char *buffer, int nby, INT_PTR fptr, int bpl, int xsiz, int ysiz, int xoff, int yoff)=0
Internal image decoder function. All 'kp...' functions are to do with Ken's picture library (Low-leve...
virtual float drawHeightMap(char *fileName, point3d *pos, point3d *rVector, point3d *dVector, point3d *fVector, int colorKey, int reserved, int flags)=0
Renders a heightmap (.jpg, .png or tiletype data) onto the volumetric display.
virtual void drawLine(float xStartPos, float yStartPos, float zStartPos, float xEndPos, float yEndPos, float zEndPos, int col)=0
Renders a line on the volumetric display using 6 floats for coordinates. Must be called between start...
virtual int getJoyButtonOnUp(int controllerID, int joyButtonCode)=0
Returns 1 if controller's button is just released. See vxInputTypes::JoyButtonCodes for reference on ...
virtual float getMouseXYSensitivity()=0
Returns the current mouse XY sensitivity.
virtual void setView(float xMin, float yMin, float zMin, float xMax, float yMax, float zMax)=0
Sets the 'view' for the volumetric display by default it is the aspect ratio of the voxie window but ...
virtual void rotVexD(float angInDegrees, point3d *a, point3d *b)=0
Rotate two point3d vectors a & b around their common plane, by angle expressed in degrees.
virtual void drawQuad(const char *filename, point3d *pos, float width, float height, float hAng, float vAng, float twist, int col, float uValue, float vValue)=0
Renders a 2D textured (.png, .jpg... most image formats) quad (plane) onto the volumetric display....
virtual void drawVox(point3d pos, int col)=0
Renders a single voxel onto the volumetric using a single point3d for coordinates....
virtual int pointSame(point3d *a, point3d *b, point3d accuracy)=0
Compare two point3d with a degree of accuracy. returns true if the two points are the same within the...
virtual int getJoyOrientation(int controllerID)=0
Returns the orientation set for a specific game controller.
virtual void setEnableLegacyJoyInput(bool option)=0
Set to true to handle Joy input manually. Disables many of the joy input functions....
virtual unsigned int _kzfilelength(kzfile_t *kzfile)=0
Internal zip file management function. All 'kz...' functions are to do with Ken's zip file access.
virtual void reportKeyboard(int posX, int posY)=0
Reports the state of the keyboard on to the secondary (touch) screen. Used to help with debugging.
virtual void setEnableMouseClipping(bool option)=0
Toggles mouse clipping (cursor / position is always inside the volume) when using the VoxieBox::getMo...
virtual void drawTextSimp(point3d *pos, float textWidth, float textHeight, float hang, float vang, float tilt, int col, const char *fmt,...)=0
Simple version to render a string (printf-style) unto the volumetric display. Must be called between ...
virtual void AddTouchKeyboardLayout(const touchkey_t *touchkey, int sizeOfArray)=0
Add custom touch keys. (enable touch keyboard under 'Misc' menu tab)
virtual int getTouchState(int index)=0
Returns the touch state requires the touch point index number. (0 = no touch, 1 = touch is down,...
virtual void shutdown()=0
Frees the VoxieBox.DLL from memory and allows the file to be accessed by other processes.
virtual void drawSphere(float x, float y, float z, float radius, int fillmode, int col)=0
Renders a sphere on the volumetric display using 3 floats. fillmode = 0 surface, 1 filled....
virtual void setEnableLegacyKeyInput(bool option)=0
Set to false to disable the VoxieBox class / VxCpp.dll to from managing gamepad / joy input handling....
virtual int moveToPos(point3d *currentPos, point3d destinationPos, float speed, float accuracy)=0
Updates/"moves" a point from the current position towards the destination point. Returns 1 if current...
virtual HINSTANCE getVoxieBoxDLLHandle()=0
Returns the handle HINSTANCE of the VoxieBox.DLL which might be need access by other DLLs (such as De...
virtual void _kzclose(kzfile_t *kzfile)=0
Internal zip file management function. All 'kz...' functions are to do with Ken's zip file access.
virtual float getNavAngleDeltaAxis(int spaceNavID, int axis)=0
Returns a single axis of a spaceNav's angle delta (range is -1 to 1, 0 is centered)....
virtual int getMouseYDelta()=0
Returns the internal mouse's Y delta movement. Reads from the internal (in) voxie_input_t.
virtual voxie_inputs_t getMouseState()=0
returns the internal (in) voxie_inputs_t struct.
virtual float getNavDirectionDeltaAxis(int spaceNavID, int axis)=0
Returns a single axis of a Space Nav's direction delta (range is -1 to 1, 0 is centered)....
virtual int getMouseButtonIsDown(int buttonCode)=0
Returns the state of mouse's buttonCode. 1 if currently pressed down and 0 if not being pressed....
virtual void drawText(point3d *pos, point3d *rVector, point3d *dVector, int col, const char *fmt,...)=0
Renders a string (printf-style) unto the volumetric display. Must be called between startFrame() & en...
virtual float getTouchSensitivity()=0
Returns the touch sensitivity setting/.
virtual int getMouseXDelta()=0
Returns the internal mouse's X delta movement. Reads from internal (in) voxie_input_t.
virtual int _kzgetc(kzfile_t *kzfile)=0
Internal zip file management function. All 'kz...' functions are to do with Ken's zip file access.
virtual void enableTouchFocusPinch(bool choice)=0
Disables / enables the touches focus pinch.
virtual void setEnableNavClipping(bool option)=0
Toggles nav clipping (cursor / position is always inside the volume) when using the VoxieBox::getNavP...
virtual point3d getAspect()=0
returns the internal voxie_wind_t's aspect ratio values data as a point3d
virtual double getVPS()=0
Returns the system's current VPS (volumes per second) - need to be +15 VPS for a up/down display to r...
virtual void setMouseOrientation(int orientation)=0
Change the orientation of the users intended position when using the mouse. At what side are they fac...
virtual void setEnableLegacyTouchInput(bool option)=0
Set to true to handle Touch input manually. Disables many of the touch input functions....
virtual void setNavDeadZone(double deadZoneValue)=0
Set the internal deadZone for Space Navigators.
virtual int _kpzload(const char *fileName, INT_PTR *fptr, INT_PTR *bpl, INT_PTR *xsiz, INT_PTR *ysiz)=0
Internal image decoder function. All 'kp...' functions are to do with Ken's picture library (High-lev...
virtual int getTouchPressStateCir(point2d CirPos, float radius, bool drawCollision=false)=0
Returns a positive number if a touch event happens within the collision circle (0 = no touch,...
virtual void setEnableTouchInput(bool option)=0
Enables the touch screen to be used as a input device. Set this to true if you want to use the touch ...
virtual int _kzfindfile(kzfind_t *find, kzfileinfo_t *fileinfo)=0
Internal zip file management function. All 'kz...' functions are to do with Ken's zip file access.
virtual int boxCollideChk(point3d *LUTpos1, point3d *RDBpos1, point3d *LUTpos2, point3d *RDBpos2, bool showCollisionBox=false)=0
Box collision check. Check if two boxes are touching. Returns 1 if collision is found otherwise retur...
virtual int getMouseButtonState()=0
Returns the internal mouse button state. Reads from the internal (in) voxie_input_t.
virtual void setJoyOrientation(int controllerID, int orientation)=0
Change the orientation of the users intended position when using a game controller....
virtual double getMouseButtonDownTime(int buttonCode)=0
Returns the mount of time (in seconds) a mouse's button has been pressed. (buttonCodes are 0 for left...
virtual float getAspectX()=0
Returns the internal voxie_wind_t's aspect X ratio.
virtual void setJoyInputToDirectInput()=0
Set VoxieBox class to use the DirectInput API to read joystick inputs (for older game controllers)....
virtual void setInvertZAxis(bool option)=0
Inverts the Z axis. (by default - values are at the top of the screen and + values are below)....
virtual void debugDrawBoxFill(int xStartPos, int yStartPos, int xEndPos, int yEndPos, int col)=0
Draw filled rectangle on the secondary (touch) screen. Must be called between startFrame() & endFrame...
virtual float getJoyAnalogAxisValue(int controllerID, int axis)=0
Returns a single analog axis (control stick) from a game controller. Value as an float range between ...
virtual int getTouchCurrentNoPress()=0
Returns the number of current touch presses / points.
virtual int getTouchDeltaY(int index)=0
Returns the touch movement delta of the Y position by index register. Use index register -1 for globa...
virtual void debugText(int posX, int posY, int forgroundCol, int backgroundCol, const char *fmt,...)=0
Display text unto the secondary (touch) screen. Must be called within start and end frame functions....
virtual void debugDrawPix(int x, int y, int col)=0
Draws single pixel on the secondary (touch) screen. Must be called between startFrame() endFrame() fu...
virtual void drawCone(float xStartPos, float yStartPos, float zStartPos, float startRadius, float xEndPos, float yEndPos, float zEndPos, float endRadius, int fillmode, int col)=0
Renders a cone shape on the volumetric display with rounded ends (also capable of rendering a cylinde...
virtual int boxInsideCollideChk(point3d *LUTpos, point3d *RDBpos, point3d collisionPos, bool showCollisionBox=false)=0
Within box collision check. Check if a position is inside a collision box. boxTLU = Top,...
virtual void drawSphere(point3d pos, float radius, int fillmode, int col)=0
Renders a sphere on the volumetric display using 3 floats. fillmode = 0 surface, 1 filled....
virtual void setAudioRecordCallBack(void(*userrecfunc)(int *sampleBuffer, int sampleRate))=0
Define a custom audio callback function to record PCM audio data - see VXBeeper demo (under modules) ...
virtual int getTouchDeltaX(int index)=0
Returns the touch movement delta of the X position by index register. Use index register -1 for globa...
virtual int getNavButtonOnUp(int spaceNavID, int buttonCode)=0
Returns 1 if particular Space Nav's button has been just released from being held ('on up').
virtual int _kpgetdim(const char *buffer, int nby, int *xsiz, int *ysiz)=0
Internal image decoder function. All 'kp...' functions are to do with Ken's picture library (Low-leve...
virtual voxie_keyboard_history_t getKeyHistory()=0
returns internal voxie_keyboard_history_t struct which holds the keyboard input history.
virtual point3d randomPos()=0
Returns a random position within the VX display.
virtual void drawLine(point3d startPos, point3d endPos, int col)=0
Renders a line on the volumetric display using point3d for coordinates. Must be called between startF...
virtual void setEnableJoyDeadZone(bool option)=0
Set to true to give access to the touch screen (if disabled touching the screen will always bring up ...
virtual int boxInsideCollideChk2D(point2d *TLpos, point2d *BRpos, point2d *collisionPos, bool showCollisionBox=false)=0
Within box collision check 2D. Checks if a X Y position is within a collision box....
virtual voxie_xbox_t getJoyStateRaw(int controllerID)=0
Returns theg ame controller's input state as voxie_xbox_t structure. Use the controllerID to determin...
virtual void drawCube(point3d *pos, point3d *rVector, point3d *dVector, point3d *fVector, int fillmode, int col)=0
Renders a cube onto the volumetric display using specified vectors. fillmode = 0 dots,...
virtual int _kzseek(kzfile_t *kzfile, int offset, int whence)=0
Internal zip file management function. All 'kz...' functions are to do with Ken's zip file access.
virtual void drawCursor(point3d *pos, int inputType, int inputID, int col)=0
Draws a cursor unto the volumetric display at the position specified.
virtual void drawVox(float x, float y, float z, int col)=0
Renders a single voxel onto the volumetric using a 3 floats for coordinates. Must be called between s...
virtual void reportVoxieFrame(int posX, int posY)=0
Exposes all the variables from the internal vf voxie_frame_t onto the secondary (touch) screen....
virtual double getMouseDoubleClickThreshold()=0
Returns the mouse double click threshold. (how quickly 2 mouse clicks signify a 'double click')....
virtual double debugBar(int posX, int posY, double currentVal, double maxVal, double minVal, const char *text, int type)=0
Draws a vertical bar for help tracking variables onto the secondary (touch) screen....
virtual float getJoyTriggerValue(int controllerID, int joyTriggerCode)=0
Returns a controllers analog trigger value. 0 = 0% pressed ... 1 = 100% pressed. Presented as a float...
virtual voxie_nav_t getNavStateRaw(int spaceNavID)=0
Returns the 3DConnexion Space Navigator controller state as voxie_nav_t structure....
virtual kzfile_t * _kzopen_ext(const char *, const char *, const char *)=0
Internal zip file management function. All 'kz...' functions are to do with Ken's zip file access.
virtual int getMousePrevButtonState()=0
Returns the internal mouse previous button state. Reads from the internal (in) voxie_input_t.
virtual void captureVolumeAsPly()=0
Causes a screen capture of the volumetric buffer to occur on the next frame. Captured as a PLY file.
virtual voxie_wind_t * getVoxieWindow()=0
returns a pointer to the internal voxie_wind_t struct
virtual void setMaskPlane(float x0, float y0, float z0, float normVx, float normVy, float normVz)=0
Call after each setView() to mask off a plane of a specified thickness. Used for viewing a 'slice' of...
virtual void debugCustomFont(int xpos, int ypos, int customFontIndex, const char *fmt,...)=0
Prints the custom bitmap font to the secondary (touch) screen. Must be called between startFrame() & ...
virtual void indicesCpyXYZ_2_UVC(inds_t *indiceArray, int indiceCount)=0
Helper function for VoxieBox::DrawMeshExt copies indices.xyz values to indices.uvc values.
virtual int init()=0
First time it is called it initialise the voxie_wind_t. Subsequent calls updates the VoxieBox....
virtual int getKeyState(int scancode)=0
Returns a key's input state (0 = no press, 1 = just pressed, 3 = held down) see vxInputTypes....
virtual float getTouchRotationDelta()=0
Returns in radians the touch rotation delta when a pinch is active range is usually 0....
virtual void setAspectZ(float newAspectZ)=0
set the internal voxie_wind_t's aspect Z ratio
virtual int clipInsideVolume(point3d *pos, float radius=0)=0
Clips a point to ensures it is within the volumes display's bounds.
virtual void captureVolumeAsPng()=0
Causes a screen capture of the volumetric buffer to occur on the next frame. Captured as a PNG file.
virtual void drawMesh(const char *fileName, poltex_t *verticeList, int verticeNum, int *meshList, int meshNum, int flags, int col)=0
Draws a mesh from a list of vertices can render in as dots, lines, polygons, or filled mesh.
virtual int getMouseZDelta()=0
Returns the internal mouse's Z delta movement. Reads from the internal (in) voxie_input_t.
virtual void rotVex(float angInRadians, point3d *a, point3d *b)=0
Rotate two point3d vectors a & b around their common plane, by angle expressed in radians.
virtual void debugDrawCircFill(int xCenterPos, int yCenterPos, int radius, int col)=0
Draw filled circle on the secondary (touch) screen. Must be called between startFrame() & endFrame() ...
virtual int getTouchPressState(point2d TLpos, point2d BRpos, bool drawCollision=false)=0
Returns a positive number if a touch event happens within the collision box (0 = no touch,...
virtual float getTouchDistanceDelta()=0
Returns the touch rotation delta when a pinch is active range is usually 0.2 and 0....
virtual void setNavOrientation(int spaceNavID, int orientation)=0
set the orientation of the user's intended position when using a Space Nav
virtual void mountZip(const char *fileName)=0
Extracts and loads a .zip file into memory.
virtual void setMouseState(voxie_inputs_t newMouse)=0
Override the internal voxie_input_t mouse state.
virtual int getJoyButtonOnDown(int controllerID, int joyButtonCode)=0
Returns 1 if controller's button is just pressed. See vxInputTypes::JoyButtonCodes for reference on J...
virtual void drawPoly(pol_t *polArray, int ptCount, int col)=0
Renders a filled polygon. Assumes points are in loop order and coplanar. Must be called between start...
virtual double showVPS(int posX=15, int posY=525)=0
Displays volumes per second (volumetric equivalent of 'FPS') and version info on the secondary (touch...
virtual void drawTextExt(point3d *pos, point3d *rVector, point3d *dVector, float size, int col, const char *fmt,...)=0
Renders a string (printf-style) unto the volumetric display additional parameter for font width....
virtual int scrollCol(int offSet=0)=0
Returns a scrolling color as an RGB hexadecimal value.
virtual int getTouchPosX(int index)=0
Returns the touch X position by index register. Run using a for loop with TOUCH_MAX_INPUT to check al...
virtual int getJoyButtonIsDown(int controllerID, int joyButtonCode)=0
Returns 1 if controller's button is pressed down. See vxInputTypes::JoyButtonCodes for reference on J...
virtual point2d getJoyAnalogAxisValueP2D(int controllerID, int stick)=0
Returns the analog axis (control stick) from a game controller. Value as an Point2d range between -1 ...
virtual double getJoyButtonDownTime(int controllerID, int joyButtonCode)=0
Returns a value in seconds of how long a controller's button has been held down for....
virtual void setDisplay2D()=0
Turns off the reciprocating screen and effectively makes the display a '2D' screen....
virtual bool debugCustomFontSet(const char *fileName, int index=-1)=0
Sets a custom font to be used as an internal tile type to be written to the secondary (touch) screen.
virtual point3d getMouseDelta()=0
Returns the internal mouse's X,Y and Z delta movements as a point3d. Reads from the internal (in) vox...
virtual void captureVolume(const char *filnam, int volcap_mode, int target_vps)=0
Allows capture and recording of volumetric screen. a screen capture of the volumetric buffer to occur...
virtual unsigned int _kztell(kzfile_t *kzfile)=0
Internal zip file management function. All 'kz...' functions are to do with Ken's zip file access.
virtual void setGlobalShader(float horizontalAngle, float verticalAngle, float amplitude)=0
Changes the global normal vector (vw.normhax) for shading. Pass in three 0's to disable.
virtual int sphereCollideChk(point3d *sphereAPos, double sphereARadius, point3d *sphereBPos, double sphereBRadius, bool showCollisionBox=false)=0
Sphere collision check. Check if two spheres are touching. Returns 1 if collision is found otherwise ...
virtual void menuAddItem(const char *st, int x, int y, int xSize, int ySize, int id, int type, int state, int col, double startingVal, double minVal, double maxVal1, double minStepVal, double majStepVal)=0
Add an item to a menu tab.
virtual int breath(voxie_inputs_t *input)=0
Breath() function which can be used with custom input struct.
virtual double getJoyDeadZone()=0
Returns the internal gamepad's dead zone value.
virtual int getMouseButtonOnUp(int buttonCode)=0
checks to see if desired MoustButton has been just released ('on up'). (buttonCodes are 0 for left,...
virtual double getKeyDownTime(int scancode)=0
Return the time (in seconds) The scancode's key has been held down for requires VoxieBox::setEnableLe...
virtual __int64 getVxCppVersion()=0
returns a time stamp of the compile date of VxCpp.dll expressed as an __int64. (format: YYYYMMDDHHmms...
virtual void reportMouse(int posX, int posY, bool showCursor=true)=0
Reports mouse input state information onto secondary (touch) screen.
virtual kzfile_t * _kzopen(const char *)=0
Internal zip file management function. All 'kz...' functions are to do with Ken's zip file access.
virtual kzfind_t * _kzfindfilestart(const char *st)=0
Internal zip file management function. All 'kz...' functions are to do with Ken's zip file access.
virtual int updateNavStateRaw(int spaceNavID, voxie_nav_t *nav)=0
Copies 3DConnexion Space Navigator controller state to voxie_nav_t structure. Used to updated SpaceNa...
virtual void reportJoy(int posX, int posY)=0
Reports the state of the game controllers on to the secondary (touch) screen.
virtual void setNavDoubleClickThreshold(double timeThreshold)=0
Set the time between Space Nav clicks to register a 'double click' (which triggers a true setting for...
virtual int drawModelExt(const char *fileName, point3d *pos, point3d *rVector, point3d *dVector, point3d *fVector, int col, float forcescale, float fdrawratio, int flags)=0
Renders 3D model (.obj, .ply, .stl, .kv6) Displays a filename mesh onto the volumetric display....
virtual int _kzeof(kzfile_t *kzfile)=0
Internal zip file management function. All 'kz...' functions are to do with Ken's zip file access.
virtual int _kzaddstack(const char *fileName)=0
Internal zip file management function - global function (these not multi-thread safe!...
virtual void setTouchSensitivity(float newSensitivityValue)=0
Sets the touch sensitivity value 1 is default. the higher the value the more sensitive.
virtual void drawDicom(voxie_dicom_t *vd, const char *gfilnam, point3d *gp, point3d *gr, point3d *gd, point3d *gf, int *animn, int *loaddone)=0
Renders a DICOM file unto the volumetric display.
virtual int getKeyStream()=0
Returns buffered ASCII keyboard input. Requires setEnableLegacyKeyInput is set to true.
virtual void setEnableExitOnEsc(bool option)=0
Toggles the use of the 'esc' key to escape a Voxon program (by calling VoxieBox::quitLoop())....
virtual void startFrame()=0
Signifies the start of the volumetric frame. Call this once before all draw calls....
virtual int getNavOrientation(int spaceNavID)=0
returns the orientation set for a specific Space Nav
virtual void quitLoop()=0
Forces VoxieBox::breath() to return non-zero on its next call. Usually called when you want the progr...
virtual int getNavDoubleClick(int spaceNavID, int buttonCode)=0
Returns 1 if particular Space Nav's buttonCode has been clicked twice within the double click thresho...
virtual void freeGfx(const char *fileName)=0
Frees a filename from VoxieBox.dll internal cache (any filename passed to voxie_draweshtex(),...
virtual void debugDrawTile(tiletype *source, int xpos, int ypos)=0
Draw a 2D texture to the secondary (touch) screen. Must be called between startFrame() & endFrame() f...
virtual int getNavButtonOnDown(int spaceNavID, int buttonCode)=0
Returns 1 if particular Space Nav's button has just been pressed. Button codes are based on vxInputTy...
virtual double getNavButtonDownTime(int spaceNavID, int buttonCode)=0
Returns in seconds how long a Space Nav's button has been held down, otherwise returns a 0.
virtual void setMouseZSensitivity(float newAmount)=0
Set the Mouse's Z sensitivity. 0.0005 is default. (0.0001 = low sensitive, 0.9 = extremely sensitive)...
virtual void setBorder(bool option, int color=0xffffff)=0
Toggles a colored border around the perimeter of the volumetric display. Set to false by default....
virtual void setCleanExitOnQuitLoop(bool option)=0
Toggles when enabled and VoxieBox::quitLoop() is called the Voxiebox library is freed from memory....
virtual int randomCol()=0
Returns a random color based on the RANDOM_COLOR defined in vxDataTypes.h.
virtual unsigned int _kzread(kzfile_t *kzfile, void *buffer, unsigned int leng)=0
Internal zip file management function. All 'kz...' functions are to do with Ken's zip file access.
virtual int drawModelGetExtents(const char *charbuff, extents_t *extentsPtr, int flags)=0
Returns the extents of a 3D model (.obj, .kv6, .stl etc...)
virtual int tweenCol(int color, int speed, int destcolor)=0
Tweens a color to the destination color. good for fade outs or tweens.
virtual int getKeyOnUp(int scancode)=0
Returns 1 if the scancode's key is just released. Requires VoxieBox::setEnableLegacyKeyInput() set to...
virtual void setDisplay3D()=0
Turns on the reciprocating screen / activates the volumetric display. (Works on Voxon hardware only)
virtual void debugDrawHLine(int xStartPos, int xEndPos, int y, int col)=0
Draws horizontal line on the secondary (touch) screen. Must be called between startFrame() endFrame()...
virtual void flushGfx(void)=0
Flush all graphics commands on internal buffer, causing all graphics commands execute and complete.
virtual void drawMeshExt(const char *fileNam, point3d *VerticeXYZArray, int verticeXYZNum, uvcol_t *verticcUVCArray, int verticeUVCNum, inds_t *indiceArray, int indiceNum, int flags, int col)=0
Extended version of drawMesh draw by separately passing in the XYZ, UVC and Indices to render in as d...
virtual void updateSoundPosition(int handleID, double second, int seekType=SEEK_SET)=0
Updates or currently playing sound. to a new position. Seek types are SEEK_SET (0),...
virtual void menuReset(int(*menu_update)(int id, char *st, double val, int how, void *userdata), void *userdata, char *bgImageFileName)=0
Function used to reset the voxie menu and set a new custom menu update function (the menu which is on...
virtual void setTouchInputStruct(touchInput_t *newTouchInput)=0
Updates the internal touchInput_t struct.
virtual void endFrame()=0
Signifies the end of a volumetric frame. Call this once after all draw calls. Sends the voxel buffer ...
virtual void setAudioPlayCallBack(void(*userplayfunc)(int *sampleBuffer, int sampleRate))=0
Define a custom audio callback function to play PCM raw audio data.
virtual int getKeyOnDown(int scancode)=0
Returns 1 if the scancode's key is just pressed. Requires VoxieBox::setEnableLegacyKeyInput() set to ...
virtual int playSound(const char *fileName, int sourceChannel, int volumeLeft, int volumeRight, float playBackSpeed)=0
Plays a sound (can be WAV, FLAC, MP3, M4A)
virtual double getTime()=0
Returns the time (in seconds) from program execution till present.
virtual void rotVexD(float angInDegrees, point2d *a, point2d *b)=0
Rotate two point2d vectors a & b around their common plane, by angle expressed in degrees.
virtual point3d getNavAngleDelta(int spaceNavID)=0
Returns the Space Nav's angle input delta as a point3d. Range between -1 and 1. 0 being no change.
virtual int breath()=0
A 'breath' is the 'update loop' for a VX application. A single breath is a single volume....
virtual void debugDrawCircle(int xCenterPos, int yCenterPos, int radius, int col)=0
Draw circle on the secondary (touch) screen. Must be called between startFrame() & endFrame() functio...
virtual void setAspect(point3d newAspect)=0
set the internal voxie_wind_t's aspect ratio values data as a point3d
virtual void setLeds(int dispNum, int r, int g, int b)=0
Set LEDs values on projector hardware. WARNING: Be careful not to overheat projector!...
virtual void rotVex(float angInRadians, point2d *a, point2d *b)=0
Rotate two point2d vectors a & b around their common plane, by angle expressed in radians.
virtual float getAspectZ()=0
returns the internal voxie_wind_t's aspect Z ratio
virtual int getKeyIsDown(int scancode)=0
Returns 1 if the scancode's key is held down (pressed). For scancodes see vxInputTypes....
virtual void setView(point3d LUT, point3d RDB)=0
Same as setView() but using two point3d for coordinates instead of 6 floats. (LUT = left,...
virtual void setJoyInputToXInput()=0
Sets VoxieBox class to use the XInput API to read joystick inputs (for modern game controllers).
virtual float getAspectY()=0
returns the internal voxie_wind_t's aspect Y ratio
virtual float getMouseZSensitivity()=0
Returns the current mouse Z sensitivity.
virtual void updateMenu(int id, const char *st, int state, double v)=0
Once the menu is created, use this function to update a string, button status, or slider value.
virtual int getMouseDoubleClick(int buttonCode)=0
Returns true if particular buttonCode has been clicked twice within the double click threshold.
virtual void setMouseXYSensitivity(float newAmount)=0
Set the Mouse's X and Y sensitivity. 0.001 is default. (0.0001 = low sensitive, 0....
virtual point3d getMousePosition()=0
Returns the internal mouse's X,Y and Z position as a point3d.
VoxieBox class.
Definition: vxCPP.h:742
void setColScrollSpeed(double speed)
Set the speed of the internal color scroller default is 0.1. Value is how long in seconds before a co...
Definition: VoxieBox.cpp:4282
void endBreath()
same as VoxieBox::quitLoop() just with an alternative name - exits out the breath() loop.
Definition: VoxieBox.cpp:4047
void captureVolume(const char *fileName, int volCapMode, int targetVPS)
Causes a capture of the volumetric buffer to occur on the next frame, or video capture to start /stop...
Definition: VoxieBox.cpp:4221
int updateJoyStateRaw(int controllerID, voxie_xbox_t *vx)
Updates the game controller's input state. Used to manage game controller inputs when setEnableLegacy...
Definition: VoxieBox.cpp:2282
double getNavDoubleClickThreshold()
Definition: VoxieBox.cpp:4769
point3d getMouseDelta()
Returns the internal mouse's X,Y and Z delta movements as a point3d. Reads from the internal (in) vox...
Definition: VoxieBox.cpp:2784
void drawLine(point3d startPos, point3d endPos, int col)
Renders a line on the volumetric display using point3d for coordinates.
Definition: VoxieBox.cpp:2940
void updateSound(int handleID, int sourceChannel, int volumeLeft, int volumeRight, float playBackSpeed)
Update a currently playing sound.
Definition: VoxieBox.cpp:4109
int getMouseXDelta()
Returns the internal mouse's X delta movement. Reads from internal (in) voxie_input_t.
Definition: VoxieBox.cpp:2760
VoxieBox()
VoxieBox constructor checks to see if another instance of VoxieBox has been created.
Definition: VoxieBox.cpp:16
int getNavButtonOnDown(int spaceNavID, int buttonCode)
Returns 1 if particular Space Nav's button has just been pressed. Button codes are based on vxInputTy...
Definition: VoxieBox.cpp:4707
int getJoyNum()
Returns the number of USB game controllers detected by the system.
Definition: VoxieBox.cpp:2303
int getJoyButtonOnUp(int controllerID, int joyButtonCode)
Returns 1 if controller's button is just released. See vxInputTypes::JoyButtonCodes for reference on ...
Definition: VoxieBox.cpp:2261
int getMouseButtonOnUp(int buttonCode)
Checks to see if desired MoustButton has been just released ('on up')
Definition: VoxieBox.cpp:2829
int breath()
The 'update loop' for a VX application also updates voxie_input_t struct.
Definition: VoxieBox.cpp:538
void enableTouchFocusPinch(bool choice)
Toggles focus pinch (off by default) if set to true if a pinch has been registered all other touch in...
Definition: VoxieBox.cpp:2045
int _kpgetdim(const char *buffer, int nby, int *xsiz, int *ysiz)
Internal function for managing image files.
Definition: VoxieBox.cpp:5093
int getTouchPressIndex(point2d TLpos, point2d BRpos, bool drawCollision=false)
checks if a touch input has been registered within a 2D box returns a positive number if touch has be...
Definition: VoxieBox.cpp:1957
void setJoyDeadZone(double deadZoneValue)
Sets the internal dead zone value for game controllers. (dead zone is the area where not input is det...
Definition: VoxieBox.cpp:3683
void captureVolumeStop()
If volumetric recording is happening. call this function to stop.
Definition: VoxieBox.cpp:4229
void setDisplay2D()
Turns off the reciprocating screen and effectively makes the display a '2D' screen....
Definition: VoxieBox.cpp:1004
void setEnableNavClipping(bool option)
Toggles nav clipping (cursor / position is always inside the volume) when using the VoxieBox::getNavP...
Definition: VoxieBox.cpp:2153
void _kzclose(kzfile_t *kzfile)
Internal function for managing zip files.
Definition: VoxieBox.cpp:5087
void setTouchInputStruct(touchInput_t *newTouchInput)
Replaces the internal touchInput_t struct with a new one could be to make your own touch I/O.
Definition: VoxieBox.cpp:2020
void rotVex(float angInRaidans, point3d *a, point3d *b)
Rotate two point3d vectors a & b around their common plane, by angle expressed in radians.
Definition: VoxieBox.cpp:135
void setMouseState(voxie_inputs_t newMouse)
Override the internal voxie_input_t mouse state.
Definition: VoxieBox.cpp:1534
void indicesCpyXYZ_2_UVC(inds_t *indiceArray, int indiceCount)
Helper function for VoxieBox::DrawMeshExt copies indices.xyz values to indices.uvc values and removes...
Definition: VoxieBox.cpp:207
int _kzaddstack(const char *fileName)
Internal function for managing zip files.
Definition: VoxieBox.cpp:5009
void setJoyVibrate(int controllerID, float leftMotorSpeed, float rightMotorSpeed)
Activates vibration motors in XBox controller. XInput controllers only. To stop Be sure to call again...
Definition: VoxieBox.cpp:2294
void setAudioRecordCallBack(void(*userrecfunc)(int *sampleBuffer, int sampleRate))
Define a custom audio callback function to record PCM audio data (not a file)
Definition: VoxieBox.cpp:4177
void setCleanExitOnQuitLoop(bool option)
when enabled and VoxieBox::quitLoop is called the Voxiebox library is freed from memory
Definition: VoxieBox.cpp:2105
int drawModel(const char *filename, point3d *pos, point3d *rVector, point3d *dVector, point3d *fVector, int col)
Renders 3D model (.obj, .ply, .stl, .kv6). Displays a filename mesh onto the volumetric display.
Definition: VoxieBox.cpp:3225
void setEnableNavDeadZone(bool option)
Toggles a dead zone for Space Navigator. Set to true by default.
Definition: VoxieBox.cpp:2141
void drawQuad(const char *filename, point3d *pos, float width, float height, float hang, float vang, float tilt, int col=0x404040, float uValue=1, float vValue=1)
Renders a 2D textured (.png, .jpg... most image formats) quad (plane) onto the volumetric display....
Definition: VoxieBox.cpp:228
void setInvertZAxis(bool option)
Inverts the Z axis. (by default - values are at the top of the screen and + values are below)....
Definition: VoxieBox.cpp:2131
float drawHeightMap(char *fileName, point3d *pos, point3d *rVector, point3d *dVector, point3d *fVector, int colorKey, int reserved, int flags)
Renders a heightmap (.jpg, .png or tiletype data) onto the volumetric display.
Definition: VoxieBox.cpp:3336
float getJoyAnalogAxisValue(int controllerID, int axis)
returns a single analog axis (control stick) from a game controller. Value as an float range between ...
Definition: VoxieBox.cpp:3935
int pointSame(point3d *a, point3d *b, point3d accuracy)
Compare two point3d with a degree of accuracy. returns true if the two points are the same within the...
Definition: VoxieBox.cpp:4489
int getNavOrientation(int spaceNavID)
returns the orientation set for a specific Space Nav
Definition: VoxieBox.cpp:3740
void setAspectY(float newAspectY)
Set the internal voxie_wind_t's Y aspect ratio value and update the voxie_wind_t.
Definition: VoxieBox.cpp:1076
int drawModelGetExtents(const char *charbuff, extents_t *extentsPtr, int flags)
Returns the extents of a 3D model (.obj, .kv6, .stl etc...)
Definition: VoxieBox.cpp:3280
double getJoyButtonDownTime(int controllerID, int joyButtonCode)
returns a value in seconds of how long a controller's button has been held down for....
Definition: VoxieBox.cpp:2341
double getNavButtonDownTime(int spaceNavID, int buttonCode)
Returns in seconds how long a Space Nav's button has been held down, otherwise returns a 0.
Definition: VoxieBox.cpp:4736
void setNavDoubleClickThreshold(double timeThreshold)
Set the time between Space Nav clicks to register a 'double click' (which triggers a true setting for...
Definition: VoxieBox.cpp:4764
double getVPS()
Returns the system's current VPS (volumes per second).
Definition: VoxieBox.cpp:730
voxie_frame_t * getVoxieFrame()
returns a pointer to the internal voxie_frame_t struct
Definition: VoxieBox.cpp:75
unsigned int _kzfilelength(kzfile_t *kzfile)
Internal function for managing zip files.
Definition: VoxieBox.cpp:5057
double getKeyDownTime(int scancode)
return the time (in seconds) The scancode's key has been held down for requires VoxieBox::setEnableLe...
Definition: VoxieBox.cpp:3438
void drawPoly(pol_t *, int, int)
Renders a filled polygon. Assumes points are in loop order and coplanar.
Definition: VoxieBox.cpp:2983
float getTouchRotationDelta()
returns a pinch's touch rotation delta (the amount the two points of the pinch have changed in distan...
Definition: VoxieBox.cpp:1872
void setTouchSensitivity(float newSensitivityValue)
sets the touch sensitivity (1 is default.
Definition: VoxieBox.cpp:2028
int colorHexDivide(int color, float divideAmount)
Definition: VoxieBox.cpp:4349
void debugDrawCircle(int xCenterPos, int yCenterPos, int radius, int col)
Draw circle on the secondary (touch) screen.
Definition: VoxieBox.cpp:2628
void setJoyOrientation(int controllerID, int orientation)
Change the orientation of the users intended position when using a game controller....
Definition: VoxieBox.cpp:3774
int getTouchDeltaX(int index=-1)
returns the X delta movement of a touch point.
Definition: VoxieBox.cpp:1809
void setBorder(bool option, int color=0xffffff)
toggles a white border around the perimeter of the volumetric display.
Definition: VoxieBox.cpp:2097
void setAudioPlayCallBack(void(*userplayfunc)(int *sampleBuffer, int sampleRate))
Define a custom audio callback function to play PCM / raw audio data.
Definition: VoxieBox.cpp:4158
void setEnableLegacyKeyInput(bool option)
toggles when enabled and VoxieBox::quitLoop() is called the Voxiebox library is freed from memory....
Definition: VoxieBox.cpp:2111
int boxInsideCollideChk2D(point2d *TLpos, point2d *BRpos, point2d *collisionPos, bool showCollisionBox=false)
Box inside collision check. Check if a position is inside a box shape. boxTLU = Top,...
Definition: VoxieBox.cpp:316
int getTouchCurrentNoPress()
Returns the number of active touches currently on the touch screen.
Definition: VoxieBox.cpp:2050
void setMaskPlane(float x0, float y0, float z0, float nx, float ny, float nz)
Call after each VoxieBox::setView() to mask off a plane of a specified thickness.
Definition: VoxieBox.cpp:930
int _kzfindfile(kzfind_t *find, kzfileinfo_t *fileinfo)
Internal function for managing zip files.
Definition: VoxieBox.cpp:5045
void reportVoxieWind(int posX, int posY)
Exposes all the variables from the internal (vw) voxie_wind_t onto the secondary (touch) screen.
Definition: VoxieBox.cpp:809
int getNavDoubleClick(int spaceNavID, int buttonCode)
Returns 1 if particular Space Nav's buttonCode has been clicked twice within the double click thresho...
Definition: VoxieBox.cpp:4750
void menuAddItem(const char *st, int x, int y, int xSize, int ySize, int id, int type, int state, int col, double startingVal, double minVal, double maxVal1, double minStepVal, double majStepVal)
Add item to a menu tab.
Definition: VoxieBox.cpp:2562
void debugDrawPix(int x, int y, int col)
Draws single pixel on the secondary (touch) screen.
Definition: VoxieBox.cpp:2589
int getKeyStream()
Returns buffered ASCII keyboard input.
Definition: VoxieBox.cpp:3493
double getDeltaTime()
Returns delta time (the time between volume updates) delta time is CPU speed dependent and can be use...
Definition: VoxieBox.cpp:881
int getNavButtonIsDown(int spaceNavID, int buttonCode)
Returns 1 if particular Space Nav's button is being pressed. Button codes are based on vxInputTypes....
Definition: VoxieBox.cpp:4694
kzfile_t * _kzopen(const char *st)
Internal function for managing zip files.
Definition: VoxieBox.cpp:5028
void startFrame()
start building the frame buffer.
Definition: VoxieBox.cpp:628
void drawTextSimp(point3d *pos, float textWidth, float textHeight, float hang, float vang, float tilt, int col, const char *fmt,...)
Renders a string (printf-style) unto the volumetric display. Simple syntax.
Definition: VoxieBox.cpp:1300
void drawVox(point3d pos, int col)
Renders a single voxel onto the volumetric using a single point3d for coordinates.
Definition: VoxieBox.cpp:2872
point3d getAspect()
Returns all the internal voxie_wind_t's aspect ratio values as a point3d (x,y,z)
Definition: VoxieBox.cpp:1055
float getTouchDistanceDelta()
returns a pinch's touch distance delta (the amount the two points of the pinch have changed in distan...
Definition: VoxieBox.cpp:1877
int updateNavStateRaw(int spaceNavID, voxie_nav_t *nav)
Copies 3DConnexion Space Navigator controller state to voxie_nav_t structure.
Definition: VoxieBox.cpp:2360
void drawBox(point3d posLeftUpTop, point3d posRightDownBottom, int fillmode, int col)
Renders a rectangle / box on the volumetric display using 2 point3ds for coordinates.
Definition: VoxieBox.cpp:2909
void updateSoundPosition(int handleID, double second, int seekType=SEEK_SET)
Updates a sound's play position to .
Definition: VoxieBox.cpp:4121
int getMouseButtonOnDown(int buttonCode)
Returns the state of mouse's buttonCode.
Definition: VoxieBox.cpp:2820
int getNavButtonState(int spaceNavID)
Returns the button values (presented as binary of each button) for the Space Navigator....
Definition: VoxieBox.cpp:4682
void debugDrawLine(float xStartPos, float yStartPos, float xEndPos, float yEndPos, int col)
Draws a line on the secondary (touch) screen.
Definition: VoxieBox.cpp:2616
void setAspect(point3d newAspect)
Set all the internal voxie_wind_t's aspect ratio values and update the voxie_wind_t.
Definition: VoxieBox.cpp:1096
void setNavDeadZone(double deadZoneValue)
Set the internal deadzone for Space Navigators. (dead zone is the area where not input is detected)
Definition: VoxieBox.cpp:3697
int touchManualRead(int *touchIndex, int *xVal, int *yVal, int *packetState)
! reads out the current Touch input states - raw return codes from the voxiebox.dll use this function...
Definition: VoxieBox.cpp:1769
void debugDrawCircFill(int xCenterPos, int yCenterPos, int radius, int col)
Draw filled circle on the secondary (touch) screen. Must be called between startFrame() & endFrame() ...
Definition: VoxieBox.cpp:2653
HINSTANCE getVoxieBoxDLLHandle()
Returns the handle HINSTANCE of the VoxieBox.DLL which might be need access by other DLLs (such as De...
Definition: VoxieBox.cpp:5111
void AddTouchKeyboardLayout(const touchkey_t *touchkey=default_touchkey, int sizeOfArray=sizeof(default_touchkey)/sizeof(touchkey_t))
Add custom touch keys. (enable touch keyboard under 'Misc' menu tab)
Definition: VoxieBox.cpp:1748
bool debugCustomFontSet(const char *fileName, int index=-1)
sets an the internal font to be a custom bitmap. @TODO finish description
Definition: VoxieBox.cpp:2689
float getNavAngleDeltaAxis(int spaceNavID, int axis)
returns a single axis of a spaceNav's angle delta (range is -1 to 1, 0 is centered)....
Definition: VoxieBox.cpp:4886
int getMouseOrientation()
returns the orientation set for the mouse
Definition: VoxieBox.cpp:3750
void debugText(int x, int y, int fcol, int bcol, const char *fmt,...)
display text and/or variables unto to secondary (touch) screen. Supports in printf() format specifier...
Definition: VoxieBox.cpp:1351
float getAspectZ()
Returns the internal voxie_wind_t's aspect Z ratio.
Definition: VoxieBox.cpp:1046
double getMouseButtonDownTime(int buttonCode)
Returns the mount of time (in seconds) a mouse's button has been pressed.
Definition: VoxieBox.cpp:2842
void quitLoop()
Call this to tell Voxiebox library you want to exit the breath() loop and quit the application.
Definition: VoxieBox.cpp:4063
~VoxieBox()
Deconstructor for VoxieBox calls VoxieBox:shutdown to stop hardware and release voxiebox....
Definition: VoxieBox.cpp:38
int getKeyStreamScanCode()
Similar to getKeyStream but returns only the scancode of the keystate of a streaming state....
Definition: VoxieBox.cpp:3499
float getMouseXYSensitivity()
Returns the current mouse XY sensitivity. Default is 0.001.
Definition: VoxieBox.cpp:1609
void endFrame()
function to signify the end of a volumetric frame.
Definition: VoxieBox.cpp:703
void setEnableJoyDeadZone(bool option)
Toggles a joystick / gamepad dead zone on analog sticks. Set to true by default.
Definition: VoxieBox.cpp:2136
void setEnableLegacyNavInput(bool option)
Set to true to handle Nav input manually. Disables many of the nav input functions....
Definition: VoxieBox.cpp:2122
int getKeyIsDown(int scancode)
returns 1 if the scancode's key is held down (pressed). For scancodes see vxInputTypes....
Definition: VoxieBox.cpp:3401
void setDrawTouchInput(bool option)
boolean to enable / disable drawing the touch inputs unto the (secondary) touch screen
Definition: VoxieBox.cpp:1799
unsigned int _kzread(kzfile_t *kzfile, void *buffer, unsigned int leng)
Internal function for managing zip files.
Definition: VoxieBox.cpp:5051
void setEnableLegacyTouchInput(bool option)
Set to true to handle Touch input manually. Disables many of the touch input functions....
Definition: VoxieBox.cpp:2126
int drawModelExt(const char *filename, point3d *pos, point3d *rVector, point3d *dVector, point3d *fVector, int col, float forcescale, float fdrawratio, int flags)
Renders 3D model (.obj, .ply, .stl, .kv6) Displays a filename mesh onto the volumetric display....
Definition: VoxieBox.cpp:3260
void drawTextExt(point3d *pos, point3d *rVector, point3d *dVector, float size, int col, const char *fmt,...)
Renders a string (printf-style) unto the volumetric display w/ addition parameter to set size / radia...
Definition: VoxieBox.cpp:1266
void drawMeshExt(const char *fileNam, point3d *VerticeXYZArray, int verticeXYZNum, uvcol_t *verticcUVCArray, int verticeUVCNum, inds_t *indiceArray, int indiceNum, int flags, int col)
Extended version of VoxieBox::drawMesh() Draws a mesh from a list of vertices comprised of XYZ array ...
Definition: VoxieBox.cpp:3150
float getJoyTriggerValue(int controllerID, int joyTriggerCode)
Returns a controllers analog trigger value. 0 = 0% pressed ... 1 = 100% pressed. Presented as a float...
Definition: VoxieBox.cpp:3795
void drawDicom(voxie_dicom_t *vd, const char *gfilnam, point3d *gp, point3d *gr, point3d *gd, point3d *gf, int *animn, int *loaddone)
draw a DICOM file onto the volumetric display. - for help with this function call contact voxon photo...
Definition: VoxieBox.cpp:4040
int tweenCol(int color, int speed, int destcolor)
Tweens a color to the destination color. good for fade outs or tweens.
Definition: VoxieBox.cpp:4374
void setMouseXYSensitivity(float newAmount)
Set the Mouse's X and Y sensitivity. 0.001 is default. (0.0001 = low sensitive, 0....
Definition: VoxieBox.cpp:1559
void reportVoxieFrame(int posX, int posY)
Exposes some of the variables from the internal voxie_frame_t onto the secondary (touch) screen.
Definition: VoxieBox.cpp:780
int getJoyButtonIsDown(int controllerID, int joyButtonCode)
Returns 1 if controller's button is pressed down. See vxInputTypes::JoyButtonCodes for reference on J...
Definition: VoxieBox.cpp:2202
int getNavNum()
Note for a SpaceNav to be detected it must be moved (is detected when any of the SpaceNav's axis move...
Definition: VoxieBox.cpp:2313
int _kprender(const char *buffer, int nby, INT_PTR fptr, int bpl, int xsiz, int ysiz, int xoff, int yoff)
Internal function for managing image files.
Definition: VoxieBox.cpp:5099
void setJoyInputToXInput()
Sets VoxieBox class to use the XInput API to read joystick inputs (for modern game controllers).
Definition: VoxieBox.cpp:2165
int randomCol()
returns a random color based on the RANDOM_COLOR defined in vxDataTypes.h
Definition: VoxieBox.cpp:4447
int getTouchDeltaY(int index=-1)
returns the Y delta movement of a touch point.
Definition: VoxieBox.cpp:1823
void menuAddTab(const char *st, int x, int y, int xs, int ys)
Add custom menu tab on secondary (touch) screen menu (NOTE: there's only space for 2 more tabs on the...
Definition: VoxieBox.cpp:2527
void drawText(point3d *pos, point3d *rVector, point3d *dVector, int col, const char *fmt,...)
Renders a string (printf-style) unto the volumetric display.
Definition: VoxieBox.cpp:1235
voxie_nav_t getNavStateRaw(int spaceNavID)
Returns the 3DConnexion Space Navigator controller state as voxie_nav_t structure....
Definition: VoxieBox.cpp:2348
double getTime()
Returns the running time (in seconds) from program execution till present.
Definition: VoxieBox.cpp:721
int scrollCol(int offset=0)
returns a scrolling color as an RGB hexadecimal value
Definition: VoxieBox.cpp:4269
double showVPS(int posX, int posY)
Displays volumes per second (volumetric equivalent of 'FPS') and version info on the secondary (touch...
Definition: VoxieBox.cpp:741
int getMouseZDelta()
Returns the internal mouse's Z delta movement. Reads from the internal (in) voxie_input_t.
Definition: VoxieBox.cpp:2776
int getNavButtonOnUp(int spaceNavID, int buttonCode)
Returns 1 if particular Space Nav's button has been just released from being held ('on up').
Definition: VoxieBox.cpp:4720
void reportNav(int posX, int posY, bool showCursor=true)
Reports all SpaceNav input state onto the secondary (touch screen)
Definition: VoxieBox.cpp:2374
void drawCone(float xStartPos, float yStartPos, float zStartPos, float startRadius, float xEndPos, float yEndPos, float zEndPos, float endRadius, int fillmode, int col)
Renders a cone shape on the volumetric display with rounded ends (also capable of rendering a cylinde...
Definition: VoxieBox.cpp:3194
voxie_inputs_t getMouseState()
returns the internal (in) voxie_inputs_t struct.
Definition: VoxieBox.cpp:1523
void reportMouse(int posX, int posY, bool showCursor=true)
Reports mouse input state information onto secondary (touch) screen.
Definition: VoxieBox.cpp:1637
void mountZip(const char *fileName)
MountZip - extracts and loads a .zip file into memory.
Definition: VoxieBox.cpp:4189
int _kzseek(kzfile_t *kzfile, int offset, int whence)
Internal function for managing zip files.
Definition: VoxieBox.cpp:5069
void captureVolumeAsPly()
Causes a screen capture of the volumetric buffer to occur on the next frame. Captured as a PLY file.
Definition: VoxieBox.cpp:4200
int getTouchPosX(int index)
returns the a touch point's X position.
Definition: VoxieBox.cpp:1837
int getKeyState(int scancode)
returns a key's input state (0 = no press, 1 = just pressed, 3 = held down) see vxInputTypes....
Definition: VoxieBox.cpp:3382
int getMouseButtonState()
Returns the internal mouse button state. Reads from the internal (in) voxie_input_t.
Definition: VoxieBox.cpp:2792
kzfile_t * _kzsetfil(FILE *fileName)
Internal function for managing zip files.
Definition: VoxieBox.cpp:5022
float getNavDirectionDeltaAxis(int spaceNavID, int axis)
Returns a single axis of a Space Nav's direction delta (range is -1 to 1, 0 is centered)....
Definition: VoxieBox.cpp:4859
void drawCube(point3d *p, point3d *r, point3d *d, point3d *f, int fillmode, int col)
Renders a cube using specified vectors to volumetric display. Similar to VoxieBox:drawModel() but onl...
Definition: VoxieBox.cpp:3301
void setMouseOrientation(int orientation)
set the orientation of the user's intended position when using the mouse
Definition: VoxieBox.cpp:3730
int boxCollideChk(point3d *LUTpos1, point3d *RDBpos1, point3d *LUTpos2, point3d *RDBpos2, bool showCollisionBox=false)
Box to Box collision check. Check if two box shapes colliding. boxTLU = Top, Left,...
Definition: VoxieBox.cpp:408
unsigned int _kztell(kzfile_t *kzfile)
Internal function for managing zip files.
Definition: VoxieBox.cpp:5063
void setEnableExitOnEsc(bool option)
Toggles the use of the 'esc' key to escape a Voxon program (by calling VoxieBox::quitLoop())
Definition: VoxieBox.cpp:2147
double getJoyDeadZone()
Returns the internal gamepad's dead zone value. Default is 0.3.
Definition: VoxieBox.cpp:3783
int init()
Initializes and updates voxiebox.dll's voxie window (voxie_wind_t)
Definition: VoxieBox.cpp:62
void reportTouch(int posX, int posY)
Shows a debug report for advanced touch input.
Definition: VoxieBox.cpp:2060
void reportJoy(int posX, int posY)
reports the state of the game controllers on to the secondary (touch) screen
Definition: VoxieBox.cpp:3539
void drawCursor(point3d *pos, int inputType, int inputID, int col)
draws a cursor unto the volumetric display at the position specified.
Definition: VoxieBox.cpp:1453
void drawMesh(const char *fileNam, poltex_t *verticeList, int verticeNum, int *meshList, int meshNum, int flags, int col)
Draws a mesh from a list of vertices can render in as dots, lines, polygons, or filled mesh.
Definition: VoxieBox.cpp:3087
int getTouchPressState(point2d TLpos, point2d BRpos, bool drawCollision=false)
checks if a touch input has been registered within a 2D box returns a positive number if touch has be...
Definition: VoxieBox.cpp:1889
kzfile_t * _kzopen_ext(const char *, const char *, const char *)
Internal zip file management function. All 'kz...' functions are to do with Ken's zip file access.
Definition: VoxieBox.cpp:5033
int ciricle2DChk(point2d *circlePos, float radius, point2d *collisionPos, int showCollisionBox=0)
Circle inside collision check. Check if a position is inside a 2D circle. Can be used for the 2D or v...
Definition: VoxieBox.cpp:352
void updateMenu(int id, const char *st, int state, double v)
Once the menu is created, use this function to update a string, button status, or slider value.
Definition: VoxieBox.cpp:2578
void flushGfx()
Flush all graphics commands on internal buffer, causing all graphics commands to actually execute and...
Definition: VoxieBox.cpp:954
void captureVolumeAsPng()
Causes a screen capture of the volumetric buffer to occur on the next frame. Captured as a PNG file.
Definition: VoxieBox.cpp:4210
int sphereCollideChk(point3d *sphereAPos, double sphereARadius, point3d *sphereBPos, double sphereBRadius, bool showCollisionBox=false)
Sphere collision check. Check if two spheres are touching. Returns 1 if collision is found otherwise ...
Definition: VoxieBox.cpp:451
point2d getJoyAnalogAxisValueP2D(int controllerID, int stick)
returns the analog axis (control stick) from a game controller. Value as an Point2d range between -1 ...
Definition: VoxieBox.cpp:3888
void setAspectX(float newAspectX)
Set the internal voxie_wind_t's X aspect ratio value and update the voxie_wind_t.
Definition: VoxieBox.cpp:1066
void setMouseZSensitivity(float newAmount)
Set the Mouse's Z sensitivity. 0.0005 is default. Since Mouse movements work in integers the amount i...
Definition: VoxieBox.cpp:1568
void setEnableTouchInput(bool option)
! set to run to allow the secondary (touch) to be used as an input device.
Definition: VoxieBox.cpp:1779
void setView(float xMin, float yMin, float zMin, float xMax, float yMax, float zMax)
Set a custom view.
Definition: VoxieBox.cpp:903
int _kzgetc(kzfile_t *kzfile)
Internal function for managing zip files.
Definition: VoxieBox.cpp:5075
void freeGfx(const char *fileName)
Frees a filename from VoxieBox.dll internal cache (any filename passed to voxie_drawmeshtex() / drawM...
Definition: VoxieBox.cpp:965
int boxInsideCollideChk(point3d *LUTpos, point3d *RDBpos, point3d collisionPos, bool showCollisionBox=false)
Box inside collision check. Check if a position is inside a box shape. boxTLU = Top,...
Definition: VoxieBox.cpp:279
point3d randomPos()
returns a random position inside the volume
Definition: VoxieBox.cpp:4453
void setEnableMouseClipping(bool option)
Set to true if you want the mouse to clip (cursor is always inside the volume) when using the VoxieBo...
Definition: VoxieBox.cpp:2159
void setProject(int dispNum, int dir, float x, float y, int z, float *xo, float *yo)
Advanced utility function for keystone calibration (used by graphcalc and keystone calibration in vox...
Definition: VoxieBox.cpp:982
int getMousePrevButtonState()
Returns the internal mouse previous button state. Reads from the internal (in) voxie_input_t.
Definition: VoxieBox.cpp:2802
void drawSphere(point3d pos, float radius, int fillmode, int col)
renders a sphere on the volumetric display using a point3d for position
Definition: VoxieBox.cpp:3352
int getTouchPressIndexCir(point2d CirPos, float radius, bool drawCollision=false)
checks if a touch input has been registered within a 2D circle returns the touch inputs index number
Definition: VoxieBox.cpp:1987
void setMousePosition(point3d newPos)
Overrides internal mouse position with a new point3d position.
Definition: VoxieBox.cpp:86
int getTouchState(int index)
returns the touch point's state.
Definition: VoxieBox.cpp:1859
double debugBar(int posX, int posY, double currentVal, double maxVal, double minVal, const char *text, int type)
Draws a vertical bar for help tracking variables onto the secondary (touch) screen.
Definition: VoxieBox.cpp:1382
void _kzuninit()
Internal function for managing zip files.
Definition: VoxieBox.cpp:5016
voxie_xbox_t getJoyStateRaw(int controllerID)
Returns the game controller's state as voxie_xbox_t structure. Use the SpaceNavID to determine which ...
Definition: VoxieBox.cpp:2267
int getTouchPressStateCir(point2d CirPos, float radius, bool drawCollision=false)
checks if a touch input has been registered within a 2D circle returns a positive number if touch has...
Definition: VoxieBox.cpp:1922
point3d getMousePosition()
Definition: VoxieBox.cpp:515
int getMouseButtonIsDown(int buttonCode)
Returns the state of mouse's buttonCode.
Definition: VoxieBox.cpp:2811
void debugDrawHLine(int xStartPos, int xEndPos, int y, int col)
Draws horizontal line on the secondary (touch) screen.
Definition: VoxieBox.cpp:2603
int _kpzload(const char *fileName, INT_PTR *fptr, INT_PTR *bpl, INT_PTR *xsiz, INT_PTR *ysiz)
Internal function for managing zip files.
Definition: VoxieBox.cpp:5105
void setNavSensitivity(int spaceNavID, double newAmount)
Set the Space Nav's sensitivity. Used to manage the Space Nav being used as a cursor....
Definition: VoxieBox.cpp:1549
int playSound(const char *fileName, int sourceChannel, int volumeLeft, int volumeRight, float playBackSpeed)
Plays a sound (can be WAV, FLAC, MP3, M4A)
Definition: VoxieBox.cpp:4089
int _kzeof(kzfile_t *kzfile)
Internal function for managing zip files.
Definition: VoxieBox.cpp:5081
int getJoyButtonOnDown(int controllerID, int joyButtonCode)
Returns 1 if controller's button is just pressed. See vxInputTypes::JoyButtonCodes for reference on J...
Definition: VoxieBox.cpp:2233
float getAspectY()
Returns the internal voxie_wind_t's aspect Y ratio.
Definition: VoxieBox.cpp:1037
void setDisplay3D()
Turns on the reciprocating screen / activates the volumetric display. (Works on Voxon hardware only)
Definition: VoxieBox.cpp:1015
void debugDrawBoxFill(int xStartPos, int yStartPos, int xEndPos, int yEndPos, int col)
Draw filled rectangle on the secondary (touch) screen. Must be called between startFrame() & endFrame...
Definition: VoxieBox.cpp:2641
touchInput_t * getTouchInputStruct()
gets a pointer to the internal vxInputTypes.h::touchInput_t struct.
Definition: VoxieBox.cpp:2012
int getJoyButtonState(int controllerID)
returns the game controllers button state. See vxInputTypes::JoyButtonCodes for details.
Definition: VoxieBox.cpp:3528
int getMouseYDelta()
Returns the internal mouse's Y delta movement. Reads from the internal (in) voxie_input_t.
Definition: VoxieBox.cpp:2768
float getMouseZSensitivity()
Returns the current mouse Z sensitivity. Default is 0.0005.
Definition: VoxieBox.cpp:1600
double getNavDeadZone()
returns the internal dead one value for the Space Navigator
Definition: VoxieBox.cpp:3708
point3d getNavPosition(int spaceNavID)
Return a point3d of the Nav's tracked position. Used primary when the Space Nav is being used as a cu...
Definition: VoxieBox.cpp:4670
void debugDrawTile(tiletype *source, int xpos, int ypos)
Draws a texture onto the secondary (touch) screen.
Definition: VoxieBox.cpp:2684
point3d getNavAngleDelta(int spaceNavID)
returns the Space Nav's angle input delta as a point3d. Range between -1 and 1. 0 being no change.
Definition: VoxieBox.cpp:4780
int getJoyOrientation(int controllerID)
returns the orientation set for a specific game controller
Definition: VoxieBox.cpp:3761
void setEnableLegacyJoyInput(bool option)
Set to true to handle Joy input manually. Disables many of the joy input functions....
Definition: VoxieBox.cpp:2117
int getTouchPosY(int index)
returns the a touch point's Y position.
Definition: VoxieBox.cpp:1849
double getNavSensitivity(int spaceNavID)
Definition: VoxieBox.cpp:1622
void reportKeyboard(int posX, int posY)
Reports the state of the keyboard on to the secondary (touch) screen. Used to help with debugging/.
Definition: VoxieBox.cpp:3981
void setJoyInputToDirectInput()
Set VoxieBox class to use the DirectInput API to read joystick inputs (for older game controllers)....
Definition: VoxieBox.cpp:2172
kzfind_t * _kzfindfilestart(const char *st)
Internal function for managing zip files.
Definition: VoxieBox.cpp:5039
int getKeyOnUp(int scancode)
returns a 1 if the scancode's key is just released. Requires VoxieBox::setEnableLegacyKeyInput() set ...
Definition: VoxieBox.cpp:3462
int getKeyOnDown(int scancode)
returns a 1 if the scancode's key is just pressed. Requires VoxieBox::setEnableLegacyKeyInput() set t...
Definition: VoxieBox.cpp:3415
void setLeds(int dispNum, int r, int g, int b)
Set LEDs values on projector hardware.
Definition: VoxieBox.cpp:998
double getMouseDoubleClickThreshold()
Returns the mouse double click threshold. (how quickly 2 mouse clicks signify a 'double click')....
Definition: VoxieBox.cpp:1591
point3d getNavDirectionDelta(int spaceNavID)
returns the Space Nav's direction input delta as a point3d. Range between -1 and 1....
Definition: VoxieBox.cpp:4821
int moveToPos(point3d *currentPos, point3d destinationPos, float speed, float accuracy)
Updates/"moves" a point from the current position towards the destination point. Returns 1 if current...
Definition: VoxieBox.cpp:4297
int getNavPrevButtonState(int spaceNavID)
Returns the previous button values. Used for a legacy way to create your own button functions....
Definition: VoxieBox.cpp:4660
void debugCustomFont(int xpos, int ypos, int customFontIndex, const char *fmt,...)
Prints the custom bitmap font to the secondary (touch) screen. Must be called between startFrame() & ...
Definition: VoxieBox.cpp:2712
void shutdown()
frees the voxiebox.DLL from memory and allows the file to be accessed by other processes
Definition: VoxieBox.cpp:1107
void rotVexD(float angInDegrees, point3d *a, point3d *b)
Rotate two point3d vectors a & b around their common plane, by angle expressed in degrees.
Definition: VoxieBox.cpp:153
void setAspectZ(float newAspectZ)
Set the internal voxie_wind_t's Z aspect ratio value and update the voxie_wind_t.
Definition: VoxieBox.cpp:1086
float getAspectX()
Returns the internal voxie_wind_t's aspect X ratio.
Definition: VoxieBox.cpp:1028
voxie_keyboard_history_t getKeyHistory()
returns internal voxie_keyboard_history_t struct which holds the keyboard input history....
Definition: VoxieBox.cpp:4033
void setNavOrientation(int spaceNavID, int orientation)
set the orientation of the user's intended position when using a Space Nav
Definition: VoxieBox.cpp:3719
int brightenCol(int color, int amount)
Brighten (saturate) a color by adding only RGB values if they are needed.
Definition: VoxieBox.cpp:4411
int getMouseDoubleClick(int buttonCode)
Returns 1 if particular Mouse's buttonCode has been clicked twice within the double click threshold.
Definition: VoxieBox.cpp:2855
void setGlobalShader(float horizontalAngle, float verticalAngle, float amplitude)
changes the global normal vector (vw.normhax) for shading.
Definition: VoxieBox.cpp:944
void setMouseDoubleClickThreshold(double timeThreshold)
Set the time between mouse clicks to register a 'double click' (which triggers a true setting for get...
Definition: VoxieBox.cpp:1583
void menuReset(int(*menu_update)(int id, char *st, double val, int how, void *userdata), void *userdata, char *bgImageFileName)
Function used to reset the voxie menu and set a new custom menu update function (the menu which is on...
Definition: VoxieBox.cpp:2513
int clipInsideVolume(point3d *pos, float radius=0)
Clips a point to ensures it is within the volumes display's bounds.
Definition: VoxieBox.cpp:484
__int64 getVxCppVersion()
returns a timestamp of the compile date of VxCpp.dll expressed as an __int64. (format: YYYYMMDDHHmmss...
Definition: VoxieBox.cpp:4243
voxie_wind_t * getVoxieWindow()
returns a pointer to the internal voxie_wind_t struct
Definition: VoxieBox.cpp:69
float getTouchSensitivity()
returns the touch sensitivity (1 is default. the higher the value the more sensitivity)
Definition: VoxieBox.cpp:2037
Extents a datatype to hold size extent of a 3D model. (the range a model extends to)
Definition: vxDataTypes.h:96
struct to manage indices for VoxieBox::drawMeshExt() function XYZ index and UV + C (color) index !...
Definition: vxDataTypes.h:88
internal struct used by voxiebox.dll to store ziped files information.
Definition: vxDataTypes.h:431
2 floats (x & y) usually to describe a point in 2D
Definition: vxDataTypes.h:22
3 floats (x, y & z) usually to describe a point in 3D
Definition: vxDataTypes.h:34
point3d with index to next point in loop (starting at 0). Similar to poltex_t but with no texture dat...
Definition: vxDataTypes.h:55
3D point with texture coordinate and color (ARGB32). Used by VoxieBox::drawMesh()
Definition: vxDataTypes.h:65
2D array of pixels can be used with VoxieBox::drawMesh, VoxieBox::drawHeightMap and the 2D display (v...
Definition: vxDataTypes.h:110
Manages custom touch keys displayed on the 2D secondary (touch) screen.
Definition: vxDataTypes.h:353
struct to manage U V colors for VoxieVox::drawMeshExt() function
Definition: vxDataTypes.h:78
struct for reading DICOM (media data) - used internally; not for developers
Definition: vxDataTypes.h:370
Struct which holds all the frame data (frame is a 2D slice of the volumetric image) which gets loaded...
Definition: vxDataTypes.h:271
used internally by VoxieBox to log various keyboard button inputs this struct allows you to view the ...
Definition: vxDataTypes.h:490
used internally by VoxieBox to log various Space Nav inputs this struct allows you to view the histor...
Definition: vxDataTypes.h:505
3D SpaceMouse / Space Navigator by 3DConnexion input state struct. Used to manage SpaceNav input
Definition: vxDataTypes.h:335
struct to manage Voxon Volumetric Recordings .REC files - used internally; not for developers
Definition: vxDataTypes.h:436
Voxie Window Struct - Configuration for the Voxon Window. This struct manages all the settings to do ...
Definition: vxDataTypes.h:151
used internally by VoxieBox to log various USB game controller button inputs this struct allows you t...
Definition: vxDataTypes.h:498
USB game controller input state struct. Used to manage USB game controller input.
Definition: vxDataTypes.h:320
EXTEND_API IVoxieBox *_cdecl CreateVoxieBoxObject()
'Factory' function that will return the new object's instance.
Definition: vxCPP.cpp:6
VX++ data types header contains definitions of all Voxon related structs and types.
VX++ interface header contains interface definitions for creating VX++ related classes.