![]() |
VX++ Framework (VxCpp.dll)
Friendly Voxon development with classes
|
Public Member Functions | |
| VoxieBox () | |
| VoxieBox constructor checks to see if another instance of VoxieBox has been created. More... | |
| ~VoxieBox () | |
| Deconstructor for VoxieBox calls VoxieBox:shutdown to stop hardware and release voxiebox.dll. | |
| int | breath () |
| The 'update loop' for a VX application also updates voxie_input_t struct. More... | |
| int | breath (voxie_inputs_t *input) |
| A breath is a complete volume sweep. More... | |
| void | startFrame () |
| start building the frame buffer. More... | |
| void | endFrame () |
| function to signify the end of a volumetric frame. | |
| void | endBreath () |
| same as VoxieBox::quitLoop() just with an alternative name - exits out the breath() loop. | |
| void | quitLoop () |
| Call this to tell Voxiebox library you want to exit the breath() loop and quit the application. More... | |
| void | shutdown () |
| frees the voxiebox.DLL from memory and allows the file to be accessed by other processes | |
| int | init () |
| Initializes and updates voxiebox.dll's voxie window (voxie_wind_t) More... | |
| voxie_wind_t * | getVoxieWindow () |
| returns a pointer to the internal voxie_wind_t struct | |
| voxie_frame_t * | getVoxieFrame () |
| returns a pointer to the internal voxie_frame_t struct | |
| void | setBorder (bool option, int color=0xffffff) |
| toggles a white border around the perimeter of the volumetric display. | |
| void | setEnableExitOnEsc (bool option) |
| Toggles the use of the 'esc' key to escape a Voxon program (by calling VoxieBox::quitLoop()) | |
| void | setEnableNavClipping (bool option) |
| Toggles nav clipping (cursor / position is always inside the volume) when using the VoxieBox::getNavPosition or the VoxieBox::drawCursor() functions. Set to false by default. | |
| void | setEnableMouseClipping (bool option) |
| Set to true if you want the mouse to clip (cursor is always inside the volume) when using the VoxieBox::getMousePosition or the VoxieBox::drawCursor() functions. | |
| void | setCleanExitOnQuitLoop (bool option) |
| when enabled and VoxieBox::quitLoop is called the Voxiebox library is freed from memory | |
| void | setEnableLegacyKeyInput (bool option) |
| toggles when enabled and VoxieBox::quitLoop() is called the Voxiebox library is freed from memory. Set to true by default. | |
| void | setEnableLegacyJoyInput (bool option) |
| Set to true to handle Joy input manually. Disables many of the joy input functions. Set to false by default. | |
| void | setEnableLegacyNavInput (bool option) |
| Set to true to handle Nav input manually. Disables many of the nav input functions. Set to false by default. | |
| void | setEnableLegacyTouchInput (bool option) |
| Set to true to handle Touch input manually. Disables many of the touch input functions. Set to false by default. | |
| void | setInvertZAxis (bool option) |
| Inverts the Z axis. (by default - values are at the top of the screen and + values are below). Set to false by default. | |
| void | setEnableJoyDeadZone (bool option) |
| Toggles a joystick / gamepad dead zone on analog sticks. Set to true by default. | |
| void | setEnableNavDeadZone (bool option) |
| Toggles a dead zone for Space Navigator. Set to true by default. | |
| double | getDeltaTime () |
| Returns delta time (the time between volume updates) delta time is CPU speed dependent and can be used to make ensure timing is consistent between various computers / systems. More... | |
| double | getTime () |
| Returns the running time (in seconds) from program execution till present. More... | |
| double | getVPS () |
| Returns the system's current VPS (volumes per second). More... | |
| float | getAspectX () |
| Returns the internal voxie_wind_t's aspect X ratio. More... | |
| float | getAspectY () |
| Returns the internal voxie_wind_t's aspect Y ratio. More... | |
| float | getAspectZ () |
| Returns the internal voxie_wind_t's aspect Z ratio. More... | |
| point3d | getAspect () |
| Returns all the internal voxie_wind_t's aspect ratio values as a point3d (x,y,z) More... | |
| void | setAspectX (float newAspectX) |
| Set the internal voxie_wind_t's X aspect ratio value and update the voxie_wind_t. More... | |
| void | setAspectY (float newAspectY) |
| Set the internal voxie_wind_t's Y aspect ratio value and update the voxie_wind_t. More... | |
| void | setAspectZ (float newAspectZ) |
| Set the internal voxie_wind_t's Z aspect ratio value and update the voxie_wind_t. More... | |
| void | setAspect (point3d newAspect) |
| Set all the internal voxie_wind_t's aspect ratio values and update the voxie_wind_t. More... | |
| void | setDisplay2D () |
| Turns off the reciprocating screen and effectively makes the display a '2D' screen. (Works on Voxon hardware only) | |
| void | setDisplay3D () |
| Turns on the reciprocating screen / activates the volumetric display. (Works on Voxon hardware only) | |
| void | setView (float xMin, float yMin, float zMin, float xMax, float yMax, float zMax) |
| Set a custom view. More... | |
| void | setView (point3d LUT, point3d RDB) |
| Same setView() but using point3D for coordinates instead of 6 floats. More... | |
| 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. More... | |
| void | setGlobalShader (float horizontalAngle, float verticalAngle, float amplitude) |
| changes the global normal vector (vw.normhax) for shading. More... | |
| void | flushGfx () |
| Flush all graphics commands on internal buffer, causing all graphics commands to actually execute and complete. More... | |
| void | freeGfx (const char *fileName) |
| Frees a filename from VoxieBox.dll internal cache (any filename passed to voxie_drawmeshtex() / drawMesh, voxie_drawheimap() / drawHeightMap, voxie_drawspr() / drawModel) More... | |
| 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 voxiedemo) see the source code for voxiedemo.c for an understanding of how this works. More... | |
| void | setLeds (int dispNum, int r, int g, int b) |
| Set LEDs values on projector hardware. More... | |
| void | reportVoxieWind (int posX, int posY) |
| Exposes all the variables from the internal (vw) voxie_wind_t onto the secondary (touch) screen. More... | |
| void | reportVoxieFrame (int posX, int posY) |
| Exposes some of the variables from the internal voxie_frame_t onto the secondary (touch) screen. More... | |
| void | reportVoxieWind (int posX, int posY, voxie_wind_t *VW) |
| Exposes all the variables of a voxie_wind_t struct onto the secondary (touch) screen. More... | |
| void | reportVoxieFrame (int posX, int posY, voxie_frame_t *VF) |
| Exposes some of the variables a voxie_frame_t struct onto the secondary (touch) screen. More... | |
| 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 specifiers. -1 for transparent color More... | |
| 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. More... | |
| double | showVPS (int posX, int posY) |
| Displays volumes per second (volumetric equivalent of 'FPS') and version info on the secondary (touch) screen. More... | |
| void | debugDrawPix (int x, int y, int col) |
| Draws single pixel on the secondary (touch) screen. More... | |
| void | debugDrawHLine (int xStartPos, int xEndPos, int y, int col) |
| Draws horizontal line on the secondary (touch) screen. More... | |
| void | debugDrawLine (float xStartPos, float yStartPos, float xEndPos, float yEndPos, int col) |
| Draws a line on the secondary (touch) screen. More... | |
| void | debugDrawCircle (int xCenterPos, int yCenterPos, int radius, int col) |
| Draw circle on the secondary (touch) screen. More... | |
| 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() functions. More... | |
| void | debugDrawCircFill (int xCenterPos, int yCenterPos, int radius, int col) |
| Draw filled circle on the secondary (touch) screen. Must be called between startFrame() & endFrame() functions. More... | |
| void | debugDrawTile (tiletype *source, int xpos, int ypos) |
| Draws a texture onto the secondary (touch) screen. More... | |
| bool | debugCustomFontSet (const char *fileName, int index=-1) |
| sets an the internal font to be a custom bitmap. @TODO finish description | |
| 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() & endFrame() functions. | |
| void | drawVox (point3d pos, int col) |
| Renders a single voxel onto the volumetric using a single point3d for coordinates. More... | |
| void | drawVox (float x, float y, float z, int col) |
| Renders a single voxel onto the volumetric using 3 floats for coordinates. More... | |
| void | drawBox (point3d posLeftUpTop, point3d posRightDownBottom, int fillmode, int col) |
| Renders a rectangle / box on the volumetric display using 2 point3ds for coordinates. More... | |
| void | drawBox (float x0, float y0, float z0, float x1, float y1, float z1, int fillmode, int col) |
| Renders a rectangle/box on the volumetric display using 6 floats for coordinates. | |
| 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 only draws a cube. More... | |
| void | drawSphere (point3d pos, float radius, int fillmode, int col) |
| renders a sphere on the volumetric display using a point3d for position More... | |
| void | drawSphere (float x, float y, float z, float radius, int fillmode, int col) |
| renders a sphere on the volumetric display using 3 floats More... | |
| void | drawLine (point3d startPos, point3d endPos, int col) |
| Renders a line on the volumetric display using point3d for coordinates. More... | |
| void | drawLine (float xStartPos, float yStartPos, float zStartPos, float xEndPos, float yEndPos, float zEndPos, int col) |
| Renders a line on the volumetric display using 6 floats for coordinates. More... | |
| void | drawPoly (pol_t *, int, int) |
| Renders a filled polygon. Assumes points are in loop order and coplanar. More... | |
| 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. More... | |
| 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 and UVC (texture and color) and managed by an indices inds_t can render in as dots, lines, polygons, or filled mesh. More... | |
| 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 cylinder/sphere) using 6 floats for coordinates. More... | |
| void | drawCone (point3d startPos, float startRadius, point3d endPos, float endRadius, int fillmode, int col) |
| Renders a cone shape on the volumetric display with rounded ends (also capable of rendering a cylinder/sphere) using 2 point3ds for coordinates. More... | |
| 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. More... | |
| 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. Extended from VoxieBox:drawModel. More... | |
| int | drawModelGetExtents (const char *charbuff, extents_t *extentsPtr, int flags) |
| Returns the extents of a 3D model (.obj, .kv6, .stl etc...) More... | |
| 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. Useful to rendering 2D textures. Must be called between startFrame() & endFrame() functions. More... | |
| 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. More... | |
| void | drawText (point3d *pos, point3d *rVector, point3d *dVector, int col, const char *fmt,...) |
| Renders a string (printf-style) unto the volumetric display. More... | |
| 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 / radial width. More... | |
| 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. More... | |
| 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 photonics directly. | |
| int | getKeyState (int scancode) |
| returns a key's input state (0 = no press, 1 = just pressed, 3 = held down) see vxInputTypes.h::Keys for scancodes More... | |
| int | getKeyIsDown (int scancode) |
| returns 1 if the scancode's key is held down (pressed). For scancodes see vxInputTypes.h::Keys More... | |
| int | getKeyOnDown (int scancode) |
| returns a 1 if the scancode's key is just pressed. Requires VoxieBox::setEnableLegacyKeyInput() set to false to work. For scancodes see vxInputTypes.h::Keys More... | |
| double | getKeyDownTime (int scancode) |
| return the time (in seconds) The scancode's key has been held down for requires VoxieBox::setEnableLegacyKeyInput() to be set to false to work More... | |
| int | getKeyOnUp (int scancode) |
| returns a 1 if the scancode's key is just released. Requires VoxieBox::setEnableLegacyKeyInput() set to false to work. For scancodes see vxInputTypes.h::Keys More... | |
| int | getKeyStream () |
| Returns buffered ASCII keyboard input. More... | |
| int | getKeyStreamScanCode () |
| Similar to getKeyStream but returns only the scancode of the keystate of a streaming state. To be run with a while loop. Returns 0 if no more keys are in the stream. | |
| void | reportKeyboard (int posX, int posY) |
| Reports the state of the keyboard on to the secondary (touch) screen. Used to help with debugging/. More... | |
| voxie_keyboard_history_t | getKeyHistory () |
| returns internal voxie_keyboard_history_t struct which holds the keyboard input history. setEnableLegacyKeyInput but be set to false. | |
| int | getMouseXDelta () |
| Returns the internal mouse's X delta movement. Reads from internal (in) voxie_input_t. More... | |
| int | getMouseYDelta () |
| Returns the internal mouse's Y delta movement. Reads from the internal (in) voxie_input_t. More... | |
| int | getMouseZDelta () |
| Returns the internal mouse's Z delta movement. Reads from the internal (in) voxie_input_t. More... | |
| point3d | getMouseDelta () |
| Returns the internal mouse's X,Y and Z delta movements as a point3d. Reads from the internal (in) voxie_input_t. More... | |
| point3d | getMousePosition () |
| void | setMousePosition (point3d newPos) |
| Overrides internal mouse position with a new point3d position. More... | |
| void | setMouseXYSensitivity (float newAmount) |
| Set the Mouse's X and Y sensitivity. 0.001 is default. (0.0001 = low sensitive, 0.9 = extremely sensitive) Mouse movements work in integers the amount is scaled down. | |
| void | setMouseZSensitivity (float newAmount) |
| Set the Mouse's Z sensitivity. 0.0005 is default. Since Mouse movements work in integers the amount is scaled down. | |
| void | setMouseDoubleClickThreshold (double timeThreshold) |
| Set the time between mouse clicks to register a 'double click' (which triggers a true setting for getMouseDoubleClick()) More... | |
| double | getMouseDoubleClickThreshold () |
| Returns the mouse double click threshold. (how quickly 2 mouse clicks signify a 'double click'). Presented in seconds. More... | |
| float | getMouseZSensitivity () |
| Returns the current mouse Z sensitivity. Default is 0.0005. More... | |
| float | getMouseXYSensitivity () |
| Returns the current mouse XY sensitivity. Default is 0.001. More... | |
| int | getMouseButtonState () |
| Returns the internal mouse button state. Reads from the internal (in) voxie_input_t. More... | |
| int | getMousePrevButtonState () |
| Returns the internal mouse previous button state. Reads from the internal (in) voxie_input_t. More... | |
| int | getMouseButtonIsDown (int buttonCode) |
| Returns the state of mouse's buttonCode. More... | |
| int | getMouseButtonOnDown (int buttonCode) |
| Returns the state of mouse's buttonCode. More... | |
| int | getMouseButtonOnUp (int buttonCode) |
| Checks to see if desired MoustButton has been just released ('on up') More... | |
| double | getMouseButtonDownTime (int buttonCode) |
| Returns the mount of time (in seconds) a mouse's button has been pressed. More... | |
| int | getMouseDoubleClick (int buttonCode) |
| Returns 1 if particular Mouse's buttonCode has been clicked twice within the double click threshold. More... | |
| void | reportMouse (int posX, int posY, bool showCursor=true) |
| Reports mouse input state information onto secondary (touch) screen. More... | |
| voxie_inputs_t | getMouseState () |
| returns the internal (in) voxie_inputs_t struct. More... | |
| void | setMouseState (voxie_inputs_t newMouse) |
| Override the internal voxie_input_t mouse state. More... | |
| void | drawCursor (point3d *pos, int inputType, int inputID, int col) |
| draws a cursor unto the volumetric display at the position specified. More... | |
| void | setMouseOrientation (int orientation) |
| set the orientation of the user's intended position when using the mouse More... | |
| int | getMouseOrientation () |
| returns the orientation set for the mouse More... | |
| 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) More... | |
| 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 if you want to manage advanced touch input manually. More... | |
| void | setEnableTouchInput (bool option) |
| ! set to run to allow the secondary (touch) to be used as an input device. More... | |
| void | setDrawTouchInput (bool option) |
| boolean to enable / disable drawing the touch inputs unto the (secondary) touch screen More... | |
| int | getTouchDeltaX (int index=-1) |
| returns the X delta movement of a touch point. More... | |
| int | getTouchDeltaY (int index=-1) |
| returns the Y delta movement of a touch point. More... | |
| int | getTouchPosX (int index) |
| returns the a touch point's X position. More... | |
| int | getTouchPosY (int index) |
| returns the a touch point's Y position. More... | |
| int | getTouchState (int index) |
| returns the touch point's state. More... | |
| float | getTouchRotationDelta () |
| returns a pinch's touch rotation delta (the amount the two points of the pinch have changed in distance) More... | |
| float | getTouchDistanceDelta () |
| returns a pinch's touch distance delta (the amount the two points of the pinch have changed in distance) More... | |
| 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 been detected More... | |
| 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 been detected More... | |
| 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 been detected More... | |
| 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 More... | |
| touchInput_t * | getTouchInputStruct () |
| gets a pointer to the internal vxInputTypes.h::touchInput_t struct. More... | |
| void | setTouchInputStruct (touchInput_t *newTouchInput) |
| Replaces the internal touchInput_t struct with a new one could be to make your own touch I/O. More... | |
| void | setTouchSensitivity (float newSensitivityValue) |
| sets the touch sensitivity (1 is default. More... | |
| float | getTouchSensitivity () |
| returns the touch sensitivity (1 is default. the higher the value the more sensitivity) More... | |
| void | enableTouchFocusPinch (bool choice) |
| Toggles focus pinch (off by default) if set to true if a pinch has been registered all other touch inputs are nulled. More... | |
| int | getTouchCurrentNoPress () |
| Returns the number of active touches currently on the touch screen. | |
| void | reportTouch (int posX, int posY) |
| Shows a debug report for advanced touch input. More... | |
| voxie_xbox_t | getJoyStateRaw (int controllerID) |
| Returns the game controller's state as voxie_xbox_t structure. Use the SpaceNavID to determine which one (0 = 1st, 1 = 2nd etc...) | |
| int | updateJoyStateRaw (int controllerID, voxie_xbox_t *vx) |
| Updates the game controller's input state. Used to manage game controller inputs when setEnableLegacyJoyInput() is set to true. More... | |
| void | setJoyInputToXInput () |
| Sets VoxieBox class to use the XInput API to read joystick inputs (for modern game controllers). | |
| void | setJoyInputToDirectInput () |
| Set VoxieBox class to use the DirectInput API to read joystick inputs (for older game controllers). Uses joyGetPosEx function. | |
| int | getJoyButtonState (int controllerID) |
| returns the game controllers button state. See vxInputTypes::JoyButtonCodes for details. More... | |
| int | getJoyButtonIsDown (int controllerID, int joyButtonCode) |
| Returns 1 if controller's button is pressed down. See vxInputTypes::JoyButtonCodes for reference on Joy Button Codes More... | |
| int | getJoyButtonOnDown (int controllerID, int joyButtonCode) |
| Returns 1 if controller's button is just pressed. See vxInputTypes::JoyButtonCodes for reference on Joy Button Codes. More... | |
| int | getJoyButtonOnUp (int controllerID, int joyButtonCode) |
| Returns 1 if controller's button is just released. See vxInputTypes::JoyButtonCodes for reference on Joy Button Codes. More... | |
| float | getJoyAnalogAxisValue (int controllerID, int axis) |
| returns a single analog axis (control stick) from a game controller. Value as an float range between -1 and 1, 0 is centred. More... | |
| point2d | getJoyAnalogAxisValueP2D (int controllerID, int stick) |
| returns the analog axis (control stick) from a game controller. Value as an Point2d range between -1 and 1, 0 is centred. More... | |
| void | setJoyVibrate (int controllerID, float leftMotorSpeed, float rightMotorSpeed) |
| Activates vibration motors in XBox controller. XInput controllers only. To stop Be sure to call again with lmot=0.f, rmot=0.f! More... | |
| int | getJoyNum () |
| Returns the number of USB game controllers detected by the system. More... | |
| double | getJoyButtonDownTime (int controllerID, int joyButtonCode) |
| returns a value in seconds of how long a controller's button has been held down for. Requires setEnableLegacyJoyInput() to be set to false to work. More... | |
| void | reportJoy (int posX, int posY) |
| reports the state of the game controllers on to the secondary (touch) screen More... | |
| void | setJoyDeadZone (double deadZoneValue) |
| Sets the internal dead zone value for game controllers. (dead zone is the area where not input is detected). Value between 0 and 1. 0 = no deadzone. 1 = all deadzone. default is 0.3;. More... | |
| double | getJoyDeadZone () |
| Returns the internal gamepad's dead zone value. Default is 0.3. More... | |
| float | getJoyTriggerValue (int controllerID, int joyTriggerCode) |
| Returns a controllers analog trigger value. 0 = 0% pressed ... 1 = 100% pressed. Presented as a float. More... | |
| void | setJoyOrientation (int controllerID, int orientation) |
| Change the orientation of the users intended position when using a game controller. At what side are they facing towards the volumetric display. More... | |
| int | getJoyOrientation (int controllerID) |
| returns the orientation set for a specific game controller More... | |
| voxie_nav_t | getNavStateRaw (int spaceNavID) |
| Returns the 3DConnexion Space Navigator controller state as voxie_nav_t structure. Use the SpaceNavID to determine which one (0 = 1st, 1 = 2nd etc...) | |
| int | updateNavStateRaw (int spaceNavID, voxie_nav_t *nav) |
| Copies 3DConnexion Space Navigator controller state to voxie_nav_t structure. More... | |
| int | getNavNum () |
| Note for a SpaceNav to be detected it must be moved (is detected when any of the SpaceNav's axis movements) More... | |
| void | reportNav (int posX, int posY, bool showCursor=true) |
| Reports all SpaceNav input state onto the secondary (touch screen) More... | |
| int | getNavButtonState (int spaceNavID) |
| Returns the button values (presented as binary of each button) for the Space Navigator. 0 = none, 1 = left, 2 = right, 3 = both. More... | |
| int | getNavPrevButtonState (int spaceNavID) |
| Returns the previous button values. Used for a legacy way to create your own button functions. Useful if setEnableLegacyNavInput() is set to true. More... | |
| point3d | getNavPosition (int spaceNavID) |
| Return a point3d of the Nav's tracked position. Used primary when the Space Nav is being used as a cursor. More... | |
| point3d | getNavAngleDelta (int spaceNavID) |
| returns the Space Nav's angle input delta as a point3d. Range between -1 and 1. 0 being no change. More... | |
| point3d | getNavDirectionDelta (int spaceNavID) |
| returns the Space Nav's direction input delta as a point3d. Range between -1 and 1. 0 being no change. More... | |
| 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). Axis 0 = x, 1 = y, 2 = z. More... | |
| float | getNavAngleDeltaAxis (int spaceNavID, int axis) |
| returns a single axis of a spaceNav's angle delta (range is -1 to 1, 0 is centered). Axis 0 = x, 1 = y, 2 = z More... | |
| int | getNavButtonIsDown (int spaceNavID, int buttonCode) |
| Returns 1 if particular Space Nav's button is being pressed. Button codes are based on vxInputTypes.h::NavButton(). 0 = left button, 1 = right button. More... | |
| int | getNavButtonOnUp (int spaceNavID, int buttonCode) |
| Returns 1 if particular Space Nav's button has been just released from being held ('on up'). More... | |
| int | getNavButtonOnDown (int spaceNavID, int buttonCode) |
| Returns 1 if particular Space Nav's button has just been pressed. Button codes are based on vxInputTypes.h::NavButton(). 0 = left button, 1 = right button. More... | |
| double | getNavButtonDownTime (int spaceNavID, int buttonCode) |
| Returns in seconds how long a Space Nav's button has been held down, otherwise returns a 0. More... | |
| int | getNavDoubleClick (int spaceNavID, int buttonCode) |
| Returns 1 if particular Space Nav's buttonCode has been clicked twice within the double click threshold. More... | |
| void | setNavDoubleClickThreshold (double timeThreshold) |
| Set the time between Space Nav clicks to register a 'double click' (which triggers a true setting for getNavDoubleClick()) More... | |
| double | getNavDoubleClickThreshold () |
| void | setNavDeadZone (double deadZoneValue) |
| Set the internal deadzone for Space Navigators. (dead zone is the area where not input is detected) More... | |
| void | setNavSensitivity (int spaceNavID, double newAmount) |
| Set the Space Nav's sensitivity. Used to manage the Space Nav being used as a cursor. 0.0025 is default. Higher values increase sensitivity More... | |
| double | getNavSensitivity (int spaceNavID) |
| double | getNavDeadZone () |
| returns the internal dead one value for the Space Navigator | |
| void | setNavOrientation (int spaceNavID, int orientation) |
| set the orientation of the user's intended position when using a Space Nav More... | |
| int | getNavOrientation (int spaceNavID) |
| returns the orientation set for a specific Space Nav More... | |
| 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 the secondary touch screen) More... | |
| 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 7" 1024x600 LCD screen) More... | |
| 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. More... | |
| 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. More... | |
| int | playSound (const char *fileName, int sourceChannel, int volumeLeft, int volumeRight, float playBackSpeed) |
| Plays a sound (can be WAV, FLAC, MP3, M4A) More... | |
| void | updateSound (int handleID, int sourceChannel, int volumeLeft, int volumeRight, float playBackSpeed) |
| Update a currently playing sound. More... | |
| void | updateSoundPosition (int handleID, double second, int seekType=SEEK_SET) |
| Updates a sound's play position to . More... | |
| void | setAudioPlayCallBack (void(*userplayfunc)(int *sampleBuffer, int sampleRate)) |
| Define a custom audio callback function to play PCM / raw audio data. More... | |
| void | setAudioRecordCallBack (void(*userrecfunc)(int *sampleBuffer, int sampleRate)) |
| Define a custom audio callback function to record PCM audio data (not a file) More... | |
| void | mountZip (const char *fileName) |
| MountZip - extracts and loads a .zip file into memory. More... | |
| void | captureVolumeAsPly () |
| Causes a screen capture of the volumetric buffer to occur on the next frame. Captured as a PLY file. More... | |
| void | captureVolumeAsPng () |
| Causes a screen capture of the volumetric buffer to occur on the next frame. Captured as a PNG file. More... | |
| 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. More... | |
| void | captureVolumeStop () |
| If volumetric recording is happening. call this function to stop. | |
| __int64 | getVxCppVersion () |
| returns a timestamp of the compile date of VxCpp.dll expressed as an __int64. (format: YYYYMMDDHHmmss) More... | |
| int | scrollCol (int offset=0) |
| returns a scrolling color as an RGB hexadecimal value More... | |
| void | setColScrollSpeed (double speed) |
| Set the speed of the internal color scroller default is 0.1. Value is how long in seconds before a color change. More... | |
| HINSTANCE | getVoxieBoxDLLHandle () |
| Returns the handle HINSTANCE of the VoxieBox.DLL which might be need access by other DLLs (such as DemView_API) | |
| int | clipInsideVolume (point3d *pos, float radius=0) |
| Clips a point to ensures it is within the volumes display's bounds. More... | |
| 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 accuracy amount specified. More... | |
| int | pointSame (point2d *a, point2d *b, point2d accuracy) |
| Compare two point2d with a degree of accuracy. returns true if the two points are the same within the accuracy amount specified. More... | |
| int | colorHexDivide (int color, float divideAmount) |
| int | tweenCol (int color, int speed, int destcolor) |
| Tweens a color to the destination color. good for fade outs or tweens. More... | |
| int | brightenCol (int color, int amount) |
| Brighten (saturate) a color by adding only RGB values if they are needed. More... | |
| int | randomCol () |
| returns a random color based on the RANDOM_COLOR defined in vxDataTypes.h | |
| point3d | randomPos () |
| returns a random position inside the volume | |
| 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 returns 0. More... | |
| 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, Left, Up, boxBRD = bottom, right, down. More... | |
| 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, Left, Up, boxBRD = bottom, right, down. More... | |
| 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 volumetric display. More... | |
| 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, Up, boxBRD = bottom, right, down. More... | |
| 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 currentPos collides with destinnationPos otherwise returns a 0. More... | |
| void | rotVex (float angInRaidans, point3d *a, point3d *b) |
| Rotate two point3d vectors a & b around their common plane, by angle expressed in radians. | |
| void | rotVexD (float angInDegrees, point3d *a, point3d *b) |
| Rotate two point3d vectors a & b around their common plane, by angle expressed in degrees. | |
| void | rotVex (float angInRaidans, point2d *a, point2d *b) |
| Rotate two point2d vectors a & b around their common plane, by angle expressed in radians. | |
| void | rotVexD (float angInDegrees, point2d *a, point2d *b) |
| Rotate two point2d vectors a & b around their common plane, by angle expressed in degrees. | |
| void | indicesCpyXYZ_2_UVC (inds_t *indiceArray, int indiceCount) |
| Helper function for VoxieBox::DrawMeshExt copies indices.xyz values to indices.uvc values and removes the starting loop flags. More... | |
| int | _kzaddstack (const char *fileName) |
| Internal function for managing zip files. | |
| void | _kzuninit () |
| Internal function for managing zip files. | |
| kzfind_t * | _kzfindfilestart (const char *st) |
| Internal function for managing zip files. | |
| int | _kzfindfile (kzfind_t *find, kzfileinfo_t *fileinfo) |
| Internal function for managing zip files. | |
| kzfile_t * | _kzsetfil (FILE *fileName) |
| Internal function for managing zip files. | |
| kzfile_t * | _kzopen (const char *st) |
| Internal function for managing zip files. | |
| 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. | |
| unsigned int | _kzread (kzfile_t *kzfile, void *buffer, unsigned int leng) |
| Internal function for managing zip files. | |
| unsigned int | _kzfilelength (kzfile_t *kzfile) |
| Internal function for managing zip files. | |
| unsigned int | _kztell (kzfile_t *kzfile) |
| Internal function for managing zip files. | |
| int | _kzseek (kzfile_t *kzfile, int offset, int whence) |
| Internal function for managing zip files. | |
| int | _kzgetc (kzfile_t *kzfile) |
| Internal function for managing zip files. | |
| int | _kzeof (kzfile_t *kzfile) |
| Internal function for managing zip files. | |
| void | _kzclose (kzfile_t *kzfile) |
| Internal function for managing zip files. | |
| int | _kpgetdim (const char *buffer, int nby, int *xsiz, int *ysiz) |
| Internal function for managing image files. | |
| 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. | |
| int | _kpzload (const char *fileName, INT_PTR *fptr, INT_PTR *bpl, INT_PTR *xsiz, INT_PTR *ysiz) |
| Internal function for managing zip files. | |
VoxieBox class.
Voxiebox.dll into a VoxieBox class.
All voxiebox.dll functions presented as class with additional helper functions included.
The VoxieBox class is all the voxiebox.dll functions, helper functions and internal variables to manage a Voxon volumetric application. The VoxieBox class can be interfaced with the IVoxieBox and used a pointer reference This allows the VoxieBox class to be used with OO principals and C++ development easier for Voxon applications.
| VoxieBox::VoxieBox | ( | ) |
VoxieBox constructor checks to see if another instance of VoxieBox has been created.
If not; then loads the internal voxie_wind_t struct (vw) into memory. Then calls VoxieBox:init() & initialise the data, loads settings from voxiebox.ini and voxie_menu_0.ini
|
virtual |
Add custom touch keys. (enable touch keyboard under 'Misc' menu tab)
pass through an array of const touchkey_t setup your own custom touch screen layout
Make sure 'touch controls' are enabled via on the misc. tab on the VoxieMenu
@params touchkey_t * touchkey pointer to an array of const touchkey_t structs with definitions.
@params sizeOfArray size of how many touch buttons in the array to add
Note : call touchAddCustomLayout(NULL,NULL) to return to default layout
each touchkey_t struct contains one key the params are
char* title - the title of the key
int xpos - the x position of where to draw the touch button
int ypos - the y position of where to draw the touch button
int xsize - the size or the horizontal length of the button written as pixels
int ysize - the size or the horizontal length of the button written as pixels
int frontColor - the hexadecimal color value for the button
int backColor - the hexadecimal color value for the button's background. -1 for transparent
int scanCode - the scancode / keyboard scan code * 256 + ASCII code (0 if N/A).
Note special keycodes for mouse: Mouse:0x0000, LBut:0x0001, RBut:0x0002, MBut:0x0003
To make a custom function callback link the touchkey_t struct to a scancode that isn't being used for example (0x8080, 0x8181) Scan codes used: ASCII codes used: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 00 01 02 03 . . . . 08 09 . . . 0d . . 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f . . . . . . . . . . . 1b . . . . 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 20 . . . . . . 27 . . 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f 30 31 32 33 34 35 36 37 38 39 . 3b . 3d . . 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f . . . . . . . . . . . . . . . . 50 51 52 53 . . . 57 58 . . . . . . . . . . . . . . . . . . 5b 5c 5d . . <–0x54..0x56 (3), 0x59..0x5a (2), 0x5e..0x5f (2) . . . . . . . . . . . . . . . . 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f . . . . . . . . . . . . . . . . 70 71 72 73 74 75 76 77 78 79 7a . . . . . <–0x7b..0x9b (33) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9c 9d . . . . . . . . . . . . . . . . . . <–0x9e..0xb4 (23) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . b5 . b7 b8 . . . . . . . . . . . . . . . . . . . . . . . <–0xb9..0xc4 (12) . . . . . c5 . c7 c8 c9 . cb . cd . cf . . . . . . . . . . . . . . . . d0 d1 d2 d3 . . . . . . . . . dd . . . . . . . . . . . . . . . . . . <–0xd4..0xdc (9), 0xde..0xff (34) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
example:
touchkey_t = { "Touch\nonly\nFunc0", 80,100,200,200,0x405060,-1,0x8080 };
voxie->getKeyIsDown(0x80) { ... your custom function here ... }
to actually see the custom touch controls you need to have TOUCH CONTROLLS ENABLED by default they are turned off - they can be turned on by pressing the button in the 'misc' menu or adding 'touchcontrols=1' to voxiebox.ini
Implements IVoxieBox.
|
virtual |
Box to Box collision check. Check if two box shapes colliding. boxTLU = Top, Left, Up, boxBRD = bottom, right, down.
| LUTpos | pointer to the Left, Up, Top position of the first box. |
| RDBpos | pointer to the Right, Down, Bottom position of the first box. |
| LUTpos | pointer to the Left, Up, Top position of the second box. |
| RDBpos | pointer to the Right, Down, Bottom position of the second box. |
| showCollisionBox | For debugging set to false by default. Set to true to render the collision box onto the volumetric display. (Note : The collision check must be called within the start and end frame) |
Implements IVoxieBox.
|
virtual |
Box inside collision check. Check if a position is inside a box shape. boxTLU = Top, Left, Up, boxBRD = bottom, right, down.
| LUTpos | pointer to the Left, Up, Top position of the box. |
| RDBpos | pointer to the Right, Down, Bottom position of the box. |
| collisionPos | the collision position to check. |
| showCollisionBox | For debugging set to false by default. Set to true to render the collision box onto the volumetric display. (Note : The collision check must be called within the start and end frame) |
Implements IVoxieBox.
|
virtual |
Box inside collision check. Check if a position is inside a box shape. boxTLU = Top, Left, Up, boxBRD = bottom, right, down.
| TLpos | pointer to the Top, Left position of the box. |
| BRpos | pointer to the Bottom, Right position of the box. |
| collisionPos | the collision position to check. |
| showCollisionBox | For debugging set to false by default. Set to true to render the collision box onto the volumetric display. (Note : The collision check must be called within the start and end frame) |
Implements IVoxieBox.
|
virtual |
The 'update loop' for a VX application also updates voxie_input_t struct.
Call this once per frame to update variables in voxie_inputs_t structure. returns typically returns a 1. returns a 0 when the program wants to quit. run as a while loop " while (voxiebox::breath() )" using breath() with no parameters uses internal voxie_input_t structure (in) to input updates.
Note the VxCpp version of breath() also updates: the internal timers, checks if the hardware is a rotating or up / down display, calls other input checks (for nav, joy and keyboard), listens for key input to rotate the emulator screen, and the 'Esc' key to quit the application, tracks the mouse position and updates the rainbow color variable. (most of) These are common tasks a typical VX developer would have to do themselves.
Implements IVoxieBox.
|
virtual |
A breath is a complete volume sweep.
Call this once per frame to update variables in voxie_inputs_t structure. returns typically returns a 1. returns a 0 when the program wants to quit. run as a while loop " while (voxiebox::breath() )" using breath() with no parameters uses internal voxie_input_t structure(in) to input updates.
Note the VxCpp version of breath() also updates: the internal timers, checks if the hardware is a rotating or up / down display, calls other input checks (for nav, joy and keyboard), listens for key input to rotate the emulator screen, and the 'Esc' key to quit the application, tracks the mouse position and updates the rainbow color variable. (most of) These are common tasks a typical VX developer would have to do themselves.
| in | pointer to the voxie_inputs_t to update the input state ( voxie_inputs_t() manages the mouse input ) |
Implements IVoxieBox.
|
virtual |
Brighten (saturate) a color by adding only RGB values if they are needed.
| color | the color value to brighten |
| amount | the amount of color to add range (0 - 255) each value is 1 hex value. |
Implements IVoxieBox.
|
virtual |
Causes a capture of the volumetric buffer to occur on the next frame, or video capture to start /stop.
| fileName | the file name of the capture - if null writes to the next available nonexistent numbered file: VOXIE0000.PNG, VOXIE0001.PNG, .. |
| volumeCaptureMode | the capture mode to use. Off (Stop recording) = 0, Single PLY = 1, Video PLY = 2, Single PNG = 3, Single REC = 4, Video Rec = 5, Single VCB = 6, Video VCB = 7, Volume capture Net = 9; |
| targetVPS | if Note : If fileName is NULL, writes to the next available nonexistent numbered file: VOXIE0000.PNG, VOXIE0001.PNG, .. |
Implements IVoxieBox.
|
virtual |
Causes a screen capture of the volumetric buffer to occur on the next frame. Captured as a PLY file.
Writes to the next available nonexistent numbered file: VOXIE0000.PNG, VOXIE0001.PNG, .. will output in the current .exe folder unless VoxieBox.ini contains "volcapdir=" variable where a custom output directory can be set (default for voxiebox.ini is "volcapdir=c:\voxon\media\MyCaptures\"
Implements IVoxieBox.
|
virtual |
Causes a screen capture of the volumetric buffer to occur on the next frame. Captured as a PNG file.
Writes to the next available nonexistent numbered file: VOXIE0000.PNG, VOXIE0001.PNG, .. will output in the current .exe folder unless VoxieBox.ini contains "volcapdir=" variable where a custom output directory can be set (default for voxiebox.ini is "volcapdir=c:\voxon\media\MyCaptures\"
Implements IVoxieBox.
|
virtual |
Circle inside collision check. Check if a position is inside a 2D circle. Can be used for the 2D or volumetric display.
| circlePos | pointer to circle's position |
| radius | the size of the circle's collision box |
| collisionPos | the collision position to check. |
| showCollisionBox | show Collision circle For debugging set to 0 by default. 1 is for the volumetric display. 2 is for touch screen. |
Implements IVoxieBox.
|
virtual |
Clips a point to ensures it is within the volumes display's bounds.
Adjust a point if it is outside of the volume.
| pos | pointer of the point3d to check |
| radius | the size of radius to check |
Implements IVoxieBox.
|
virtual |
| color | the RGB hexadecimal color to scale down |
| divideAmount | the mount to divide the color value. |
Implements IVoxieBox.
|
virtual |
Draws a vertical bar for help tracking variables onto the secondary (touch) screen.
| posx | the x position for the debug bar |
| posy | the y position for the debug bar |
| currentVal | the current value (the variable you want to track) to pass to the debug bar |
| maxVal | the max value to render to the debug bar |
| minVal | the min value to render to the debug bar |
| text | any text to place with the debug bar (the title) |
| type | the type of debug bar. 0 = default closer to max value is 'good'. 1 = closer to max value is 'bad', 2 = mini bar (smaller version with no text), 3 = mini bar centered at 0 for results that can be postive and negative |
Implements IVoxieBox.
|
virtual |
Draw filled rectangle on the secondary (touch) screen. Must be called between startFrame() & endFrame() functions.
| xStartPos | left most starting position of box |
| yStartPos | top most starting position of box |
| xEndPos | right most ending position of box |
| yEndPos | bottom most ending position of box |
| col | 24-bit hexadecimal RGB color value |
Implements IVoxieBox.
|
virtual |
Draw filled circle on the secondary (touch) screen. Must be called between startFrame() & endFrame() functions.
| xCenterPos | x horizontal circle's center position |
| yCenterPos | y vertical circle's center position |
| radius | radius of circle. Size in pixels |
| col | 24-bit hexadecimal RGB color value |
Implements IVoxieBox.
|
virtual |
Draw circle on the secondary (touch) screen.
Must be called between startFrame() & endFrame() functions.
| y | y coordinate of the circle's center. |
| x | x coordinate of the circle's center. |
| radius | radius size in pixels. |
| col | 24-bit RGB color of the line. |
Implements IVoxieBox.
|
virtual |
Draws horizontal line on the secondary (touch) screen.
Drawing is always from left to right. Must be called between startFrame() & endFrame() functions.
| xStartPos | coordinate of the starting x pixel. Needs to be the left most pixel. |
| xEndPos | coordinate of the ending x pixel. Needs to be the right most pixel. |
| y | coordinate of the y pixel. Where the line is drawn on the y axis. |
| col | 24-bit RGB color of the line. |
Implements IVoxieBox.
|
virtual |
Draws a line on the secondary (touch) screen.
Must be called between startFrame() & endFrame() functions.
| xStartPos | coordinate of the starting x pixel. Needs to be the left most pixel. |
| xEndPos | coordinate of the ending x pixel. Needs to be the right most pixel. |
| yStartPos | coordinate of the starting y pixel. Needs to be the left most pixel. |
| yEndPos | coordinate of the ending y pixel. Needs to be the right most pixel. |
| col | 24-bit RGB color of the line. |
Implements IVoxieBox.
|
virtual |
Draws single pixel on the secondary (touch) screen.
Must be called within the startFrame() & endFrame() functions.
| x | x position of pixel location |
| y | y position of pixel location |
| col | 24-bit RGB color |
Implements IVoxieBox.
|
virtual |
Draws a texture onto the secondary (touch) screen.
| tiletype | * source pointer to a tile type |
| int | xpos the x position to render onto the secondary (touch) screen |
| int | ypos the y position to render onto the secondary (touch) screen |
Tile must be fully within bounds of screen.
Note : Alpha bytes (bits 24-31) of source pixels control what's drawn:
0: fully transparent (pixel is ignored)
1-254: blending in between (NOTE: will render slower than 0 or 255)
255: fully opaque (pixel is copied to screen)
@Example on how to create a tile type data (the pure pixel data from an image
// how to create a tile type to show onto the 2D screen.
tiletype example; // define new tiletype type
example.x = 800; // get the image's x dimension (look at the details of the file - Windows explorer -> properties)
example.y = 600; // get the image's y dimension (look at the details of the file - Windows explorer -> properties)
example.p = (example.x<<2); // define the pitch number of bytes per horizontal line (usually x*4 but may be higher or negative)
example.f = (INT_PTR)malloc(balls.p*balls.y); // create pointer to 1st pixel
voxie->_kpzload((char*)"example.jpg", &example.f, &example.p, &example.x, &example.y); // load the image into file memory pass in the pointers
to render your tiletype unto the 2D display call
voxie->debugDrawTile(&example, xposition, yposition);
Implements IVoxieBox.
|
virtual |
display text and/or variables unto to secondary (touch) screen. Supports in printf() format specifiers. -1 for transparent color
@example debugText(100,100, 0xffffff, -1, "Integer value %d, float value %1.2f", myInt, myFloat);
would display a white text message 100 pixels from the left and 100 pixels from the top of touch the screen.
The message will say "Integer value X, float value Y" with X and Y being the values of those variables.
| x | x position to render text on the secondary (touch) screen |
| y | y position to render text on the secondary (touch) screen |
| fcol | foreground color expressed as hexadecimal value (RGB) (-1 to indicate transparent) |
| bcol | background color expressed as hexadecimal value (RGB) (-1 to indicate transparent) |
| fmt | ASCII null terminated text string (must be pre-formatted by caller). |
Note: must be called within the start and end of the frame functions to appear.
Implements IVoxieBox.
|
virtual |
Renders a rectangle / box on the volumetric display using 2 point3ds for coordinates.
| posLeftUpTop | left up top corner of the box |
| posRightDownBottom | bottom, right, down corner of the box |
| fillmode | The fillmode type 0:dots, 1:lines, 2:surfaces, 3:solid |
| col | RGB 24-bit hexadecimal color value |
Must be called between startFrame() & endFrame() functions.
Implements IVoxieBox.
|
virtual |
Renders a cone shape on the volumetric display with rounded ends (also capable of rendering a cylinder/sphere) using 6 floats for coordinates.
| xStartPos | the x position of starting point (1st sphere) |
| yStartPos | the y position of starting point (1st sphere) |
| zStartPos | the z position of starting point (1st sphere) |
| startRadius | the radius size of the starting point (1st sphere) |
| xEndPos | the x position of ending point (2nd sphere) |
| yEndPos | the y position of ending point (2nd sphere) |
| zEndPos | the z position of ending point (2nd sphere) |
| endRadius | the radius size of the ending point (2nd sphere) |
| fillmode | the type of fill 0=shell, 1=solid filled |
| col | RGB 24-bit color |
Shape is basically two spheres connected together like a tube.
Note: be careful with using the solid filled (fillmode 1) type as it can quite a performance hit. (draws many voxels) Must be called between startFrame() & endFrame() functions.
Implements IVoxieBox.
|
virtual |
Renders a cone shape on the volumetric display with rounded ends (also capable of rendering a cylinder/sphere) using 2 point3ds for coordinates.
| startPos | the x,y,z position of starting point (1st sphere) |
| startRadius | the radius size of the starting point (1st sphere) |
| endPos | the x,y,z position of ending point (2nd sphere) |
| endRadius | the radius size of the ending point (2nd sphere) |
| fillmode | the type of fill 0=shell, 1=solid filled |
| col | RGB 24-bit color |
Shape is basically two spheres connected together like a tube.
Note: be careful with using the solid filled (fillmode 1) type as it can quite a performance hit. (draws many voxels) Must be called between startFrame() & endFrame() functions.
Implements IVoxieBox.
|
virtual |
Renders a cube using specified vectors to volumetric display. Similar to VoxieBox:drawModel() but only draws a cube.
| pos | position for left-up-top corner |
| rVector | right vector |
| dVector | down vector |
| fVector | forward vector |
| fillmode | 0:dots, 1:edges/wire frame, 2:surfaces, 3:solid filled |
| col | 24-bit color as RGB hexadecimal |
Must be called between startFrame() & endFrame() functions.
Implements IVoxieBox.
|
virtual |
draws a cursor unto the volumetric display at the position specified.
Draws a cursor on the display based on various input types that can be used. Supports custom positions or Mouse, Gamepad or SpaceNav
| pos | the position of the cursor to track |
| inputType | the input type (0 is mouse, 1 is spaceNav, 2 is Joystick, 3 is all three, 4 is none, 5 is filled state (so you can make your own) ) |
| inputID | the identification number of the input type (which SpaceNav or Joystick?) |
| col | the color of the cursor |
Note : as with all drawing calls, Must be called between startFrame() & endFrame() functions.
Implements IVoxieBox.
|
virtual |
Renders a heightmap (.jpg, .png or tiletype data) onto the volumetric display.
A heightmap is a 2D image which also contains a height channel along side it. Open up some of the heightmap examples for a demo. Demview uses them to render all its information.
| fileName | filename or pointer to 2d array containing image & heightmap stored alpha channel. |
| pos | the position of the top-left corner of the heightmap. |
| rVector | the right vector. rVector.x indicates how wide the height map is also holds rotational data |
| dVector | the down vector. rVector.y indicates how long the height map is also holds rotational data |
| fVector | the forward vector. fVector.z indicates the height the height map it also holds rotational data @ |
| colorkey | ARGB 32-bit color to be transparent (supported in nearest mode only) |
| flags | various flags to adjust render settings. see flags examples. @example of different flag settings to use
(1<<0): reserved (height dither now controlled by vw.dither)
(1<<1): 0=nearest filter , 1=bilinear filter (recommended)
(1<<2): 0=color dither off , 1=color dither on (recommended)
(1<<3): 0=filnam is filename string, 1=filnam is tiletype * or pointer to 2d array.
(1<<4): 0=texture clamp , 1=texture wrap
(1<<5): 0=8-bit height , 1=mapzen.com terrarium style height
|
Note : about scaling and sizing the rVector.z, dVector.z, fVector.x, fVector.y are all not used to render the heightMap but their values are important for storing rotational information. the height / scale of the heightmap is the difference between pos.z and fVector.z values. pos.z is height=0, pos.z+fVector.z is height=255
Implements IVoxieBox.
|
virtual |
Renders a line on the volumetric display using 6 floats for coordinates.
| xStartPos | x position for 1st (starting) point |
| yStartPos | y position for 1st (starting) point |
| zStartPos | z position for 1st (starting) point |
| xEndPos | x position for 2nd (ending) point |
| yEndPos | y position for 2nd (ending) point |
| zEndPos | z position for 2nd (ending) point |
| col | 24-bit hexadecimal color value (RGB) |
Must be called between startFrame() & endFrame() functions.
Implements IVoxieBox.
Renders a line on the volumetric display using point3d for coordinates.
Must be called between startFrame() & endFrame() functions.
Implements IVoxieBox.
|
virtual |
Draws a mesh from a list of vertices can render in as dots, lines, polygons, or filled mesh.
| fileNam | texture filename or pointer to tiletype structure if (flags&8) or leave null for no texture Be sure to fill .u and .v fields of poltex_t when using a texture. |
| verticeList | pointer to the list of vertices array (as a poltex_t data type) |
| verticeNum | max number of vertices in the vertices array |
| meshList | pointer to the list of facets as vertex indices or -1 to end current primitive and start next one, -2 to end loop |
| meshNum | number of entries in mesh array |
| flags | mostly fill mode and texture settings +0:dots, +1:lines, +2:surfaces, +3:solid, +8:texnam is tiletype * instead of filename, +16 vertex shading |
| col | 24-bit hexadecimal base color value (RGB) (0x404040) is the natural value @example
//Example for fillmode 0 (dots) mesh and meshn are ignored - pass 0's in their place.
poltex_t vt[4]; int i = 0;
vt[0].x =-0.8; vt[0].y =-0.8; vt[0].z = 0.0; vt[0].col = 0xffffff;
vt[1].x =+0.8; vt[1].y =+0.8; vt[1].z = 0.0; vt[1].col = 0xffffff;
vt[2].x =-0.8; vt[2].y =+0.8; vt[2].z = 0.0; vt[2].col = 0xffffff;
vt[3].x =+0.8; vt[3].y =-0.8; vt[3].z = 0.0; vt[3].col = 0xffffff;
voxie_drawmeshtex(&vf,0,vt,4,0,0,0,0xffffff);
//Example for fillmode 1 (line list): wireframe 'X'
poltex_t vt[4]; int mesh[6]; i = 0;
vt[0].x =-0.8; vt[0].y =-0.8; vt[0].z = 0.0; vt[0].col = 0xffffff;
vt[1].x =+0.8; vt[1].y =+0.8; vt[1].z = 0.0; vt[1].col = 0xffffff;
vt[2].x =-0.8; vt[2].y =+0.8; vt[2].z = 0.0; vt[2].col = 0xffffff;
vt[3].x =+0.8; vt[3].y =-0.8; vt[3].z = 0.0; vt[3].col = 0xffffff;
mesh[i++] = 0; mesh[i++] = 1; mesh[i++] = -1; //-1 = end of line sequence
mesh[i++] = 2; mesh[i++] = 3; mesh[i++] = -1;
voxie_drawmeshtex(&vf,0,vt,4,mesh,i,1,0xffffff);
//Example for fillmode 2 (polygon list) or fillmode 3 (solid filled): tetrahedron
poltex_t vt[4]; int mesh[16], i = 0;
vt[0].x =-0.4; vt[0].y =-0.4; vt[0].z =-0.4; vt[0].col = 0xffffff;
vt[1].x =-0.4; vt[1].y =+0.4; vt[1].z =+0.4; vt[1].col = 0xffffff;
vt[2].x =+0.4; vt[2].y =-0.4; vt[2].z =+0.4; vt[2].col = 0xffffff;
vt[3].x =+0.4; vt[3].y =+0.4; vt[3].z =-0.4; vt[3].col = 0xffffff;
mesh[i++] = 0; mesh[i++] = 1; mesh[i++] = 2; mesh[i++] = -1; //-1 = end of polygonal facet
mesh[i++] = 1; mesh[i++] = 0; mesh[i++] = 3; mesh[i++] = -1;
mesh[i++] = 2; mesh[i++] = 1; mesh[i++] = 3; mesh[i++] = -1;
mesh[i++] = 0; mesh[i++] = 2; mesh[i++] = 3; mesh[i++] = -1;
voxie_drawmeshtex(&vf,0,vt,4,mesh,i,2 (or 3) ,0xffffff);
//Example for fillmode 2 (complex poly w/hole: 2-triangle donut)
poltex_t vt[6]; int mesh[8], i = 0;
vt[0].x =-0.75; vt[0].y =+0.50; vt[0].z = 0.0; vt[0].col = 0xffffff; // / \
vt[1].x = 0.00; vt[1].y =-0.75; vt[1].z = 0.0; vt[1].col = 0xffffff; // / . \
vt[2].x =+0.75; vt[2].y =+0.50; vt[2].z = 0.0; vt[2].col = 0xffffff; // / /_\ \
vt[3].x =-0.25; vt[3].y =+0.25; vt[3].z = 0.0; vt[3].col = 0xffffff; // / \
vt[4].x = 0.00; vt[4].y =-0.25; vt[4].z = 0.0; vt[4].col = 0xffffff; // /---------\
vt[5].x =+0.25; vt[5].y =+0.25; vt[5].z = 0.0; vt[5].col = 0xffffff;
mesh[i++] = 0; mesh[i++] = 1; mesh[i++] = 2; mesh[i++] = -2; //-2 = end loop
mesh[i++] = 3; mesh[i++] = 4; mesh[i++] = 5; mesh[i++] = -1; //-1 = end polygonal facet
voxie_drawmeshtex(&vf,0,vt,4,mesh,i,2 (or 3),0xffffff);
@example using a tile type graphics as texture
// draw a QUAD mesh using make a tile type as a texture
static tiletype img = { 0 };
int y = 0, x = 0;
if (!img.f) { img.x = 512; img.y = 512; img.p = (INT_PTR)img.x * 4; img.f = (INT_PTR)malloc(img.p * img.y); }
for (y = 0; y < img.y; y++)
for (x = 0; x < img.x; x++)
{
int rgb24 = (128 << 16) + (y << 8) + x, hgt8 = sqrt(256.f * 256.f - (x - 256) * (x - 256) - (y - 256) * (y - 256));
*(int*)(img.p * y + (x << 2) + img.f) = rgb24 + (hgt8 << 24);
}
float xf = -0.8;
float xSize = 1.3;
float yf = -0.99;
float ySize = 1.3;
float z = 0;
poltex_t quadPol[4];
int quadMesh[5];
quadPol[0].x = xf; quadPol[0].y = yf; quadPol[0].z = z;
quadPol[1].x = xf + xSize; quadPol[1].y = yf; quadPol[1].z = z;
quadPol[2].x = xf + xSize; quadPol[2].y = yf + (ySize * 1.53); quadPol[2].z = z;
quadPol[3].x = xf; quadPol[3].y = yf + (ySize * 1.53); quadPol[3].z = z;
quadPol[0].u = 0; quadPol[0].v = 0; quadPol[0].col = 0x404040; // LEFT - TOP
quadPol[1].u = 1; quadPol[1].v = 0; quadPol[1].col = 0x404040; // RIGHT - TOP
quadPol[2].u = 1; quadPol[2].v = 1; quadPol[2].col = 0x404040; // RIGHT - BOT
quadPol[3].u = 0; quadPol[3].v = 1; quadPol[3].col = 0x404040; // LEFT - BOT
// map the mesh
quadMesh[0] = 0; quadMesh[1] = 1; quadMesh[2] = 2; quadMesh[3] = 3; quadMesh[4] = -1;
voxie->drawMesh((char*)&img, quadPol, 4, quadMesh, 5, 2 + 8, 0x404040); // filmode is 2 (draw surface) + 8 (use tile type as texture)
|
Must be called between startFrame() & endFrame() functions.
Implements IVoxieBox.
|
virtual |
Extended version of VoxieBox::drawMesh() Draws a mesh from a list of vertices comprised of XYZ array and UVC (texture and color) and managed by an indices inds_t can render in as dots, lines, polygons, or filled mesh.
| fileNam | texture filename or pointer to tiletype structure if (flags&8) or leave null for no texture Be sure to fill .u and .v fields of poltex_t when using a texture. |
| VerticeXYZArray | pointer to the vertice positional array (as a point3d data type) |
| verticeXYZNum | max number of vertice XYZ count (how long the array is) |
| verticeUVC | pointer to the array of vertice UVI array (as a uvcol_t data type) |
| verticeUVCNum | max number of vertice UVI count (how long the array is) |
| indiceArray | pointer to the indice indexes (both XYZ and UVI) use .xyz + (1<<31) || .xyz + EXT_START_LOOP to signify the start of a new polygon loop. |
| indiceNum | number of entries in indiceArray |
| flags | mostly fill mode and texture settings +0:dots, +1:lines, +2:surfaces, +3:solid, +8:texnam is tiletype * instead of filename, +16 vertex shading |
| col | base color 24-bit hexadecimal color value (RGB) (0x404040) is the natural value @example
//voxie_drawmeshtex_ext() setup:
point3d verticeXYZ[8]; int vXYZCount;
uvcol_t verticeUVC[8]; int vUVCCount;
inds_t indices[40]; int indCount;
//voxie_drawmeshtex_ext() -- draw a diamond
// define vertice positions and vertice U,V and color values spread over 2 different arrays.
vXYZCount = 0; vUVCCount = 0;
verticeXYZ[vXYZCount].x = -0.3; verticeXYZ[vXYZCount].y = -0.3; verticeXYZ[vXYZCount].z = 0.0; vXYZCount++; verticeUVC[vUVCCount].col = 0xff0000; verticeUVC[vUVCCount].u = 0; verticeUVC[vUVCCount].v = 0; vUVCCount++; //LTU
verticeXYZ[vXYZCount].x = +0.3; verticeXYZ[vXYZCount].y = -0.3; verticeXYZ[vXYZCount].z = 0.0; vXYZCount++; verticeUVC[vUVCCount].col = 0xff0000; verticeUVC[vUVCCount].u = 1; verticeUVC[vUVCCount].v = 0; vUVCCount++; //RTU
verticeXYZ[vXYZCount].x = +0.3; verticeXYZ[vXYZCount].y = 0.3; verticeXYZ[vXYZCount].z = 0.0; vXYZCount++; verticeUVC[vUVCCount].col = 0xff0000; verticeUVC[vUVCCount].u = 1; verticeUVC[vUVCCount].v = 1; vUVCCount++; //RBU
verticeXYZ[vXYZCount].x = -0.3; verticeXYZ[vXYZCount].y = 0.3; verticeXYZ[vXYZCount].z = 0.0; vXYZCount++; verticeUVC[vUVCCount].col = 0xff0000; verticeUVC[vUVCCount].u = 0; verticeUVC[vUVCCount].v = 1; vUVCCount++; //LBU
verticeXYZ[vXYZCount].x = 0; verticeXYZ[vXYZCount].y = 0; verticeXYZ[vXYZCount].z = -0.3; vXYZCount++; verticeUVC[vUVCCount].col = 0xff00ff; verticeUVC[vUVCCount].u = 0; verticeUVC[vUVCCount].v = 0; vUVCCount++; //top mid
verticeXYZ[vXYZCount].x = 0; verticeXYZ[vXYZCount].y = 0; verticeXYZ[vXYZCount].z = -0.3; vXYZCount++; verticeUVC[vUVCCount].col = 0xff00ff; verticeUVC[vUVCCount].u = 1; verticeUVC[vUVCCount].v = 1; vUVCCount++; //top mid
verticeXYZ[vXYZCount].x = 0; verticeXYZ[vXYZCount].y = 0; verticeXYZ[vXYZCount].z = 0.3; vXYZCount++; verticeUVC[vUVCCount].col = 0x00ff00; verticeUVC[vUVCCount].u = 0; verticeUVC[vUVCCount].v = 0; vUVCCount++; //bot mid
verticeXYZ[vXYZCount].x = 0; verticeXYZ[vXYZCount].y = 0; verticeXYZ[vXYZCount].z = 0.3; vXYZCount++; verticeUVC[vUVCCount].col = 0x00ff00; verticeUVC[vUVCCount].u = 1; verticeUVC[vUVCCount].v = 1; vUVCCount++; //bot mid
// use the inds_t struct to set define the faces / indices the xyz and col values
// the difference with using drawmeshtex_ext is that instead of using a -1 at the end of the face you add a 1 to the last bit of the 32 bit interger ( +(1<<31) ) to signitfy the start of a new face / polygon index loop.
// this could be assigned to a variable aka EXT_END_LOOP = (1<<31) (as defined in vxDataTypes.h);
// you can use EXT_START_LOOP or +(1<<31) to signify start of polygon loops aka indices[indCount++].xyzi = 0 + (1<<31);
indCount = 0;
indices[indCount++].xyzi = 0 + EXT_START_LOOP; indices[indCount++].xyzi = 5; indices[indCount++].xyzi = 1; //draw top spike
indices[indCount++].xyzi = 1 + EXT_START_LOOP; indices[indCount++].xyzi = 4; indices[indCount++].xyzi = 2;
indices[indCount++].xyzi = 2 + EXT_START_LOOP; indices[indCount++].xyzi = 4; indices[indCount++].xyzi = 3;
indices[indCount++].xyzi = 3 + EXT_START_LOOP; indices[indCount++].xyzi = 5; indices[indCount++].xyzi = 0;
indices[indCount++].xyzi = 0 + EXT_START_LOOP; indices[indCount++].xyzi = 1; indices[indCount++].xyzi = 2; //draw base
indices[indCount++].xyzi = 2 + EXT_START_LOOP; indices[indCount++].xyzi = 3; indices[indCount++].xyzi = 0;
indices[indCount++].xyzi = 0 + EXT_START_LOOP; indices[indCount++].xyzi = 7; indices[indCount++].xyzi = 1; //draw bot spike
indices[indCount++].xyzi = 1 + EXT_START_LOOP; indices[indCount++].xyzi = 6; indices[indCount++].xyzi = 2;
indices[indCount++].xyzi = 2 + EXT_START_LOOP; indices[indCount++].xyzi = 6; indices[indCount++].xyzi = 3;
indices[indCount++].xyzi = 3 + EXT_START_LOOP; indices[indCount++].xyzi = 7; indices[indCount++].xyzi = 0;
// this simple for loop just copies the indices indexes to the uvci values and set the 32nd bit to be corrected
for (int i = 0; i < indCount; i++) { indices[i].uvci = indices[i].xyzi & ~EXT_START_LOOP; }
voxie->drawMeshExt((char*)"pattern.png", verticeXYZ, vXYZCount, verticeUVC, vUVCCount, indices, indCount, 2 + vertexShadingFlag,
Must be called between startFrame() & endFrame() functions. |
Implements IVoxieBox.
|
virtual |
Renders 3D model (.obj, .ply, .stl, .kv6). Displays a filename mesh onto the volumetric display.
known as voxie_drawspr ("draw sprite") in the voxiebox.h / voxiebox.dll. Renamed to "draw model" as a more apt description.
| fileName | filename. Cached internally. Currently supports .KV6,.STL,.OBJ,.PLY |
| pos | position of center of model (pivot) |
| rVector | right vector set to {1,0,0} for a unwarped normal view |
| dVector | down vector set to {0,1,0} for an unwarped normal view |
| fVector | forward vector set to {0,0,1} for an unwarped normal view |
| col | color multiplier. 24-bit color, each 8 bits scales intensity of respective component. 64=1.0 or no scale. Use 0x404040 for no change; 0x808080 to draw as double brightness, etc.. (currently ignored) |
Note : the col parameter works differently to most col values. As it is scaled 0x404040 is equal to 0xFFFFFF color values are scaled up by x 4. You can use VoxieBox::colorHexDivide(col, 4) to divide the intended color by a 4th to render it in its true color. This is useful when you want your model to be shown at the correct color.
For more options when using this function
Implements IVoxieBox.
|
virtual |
Renders 3D model (.obj, .ply, .stl, .kv6) Displays a filename mesh onto the volumetric display. Extended from VoxieBox:drawModel.
Known as voxie_drawspr_ext ("draw sprite extended") in the voxiebox.h / voxiebox.dll. Renamed to "draw model extended" as a more apt description.
| fileName | filename. Cached internally. Currently supports .KV6,.STL,.OBJ,.PLY |
| pos | position of center of model (pivot) |
| rVector | right vector set to {1,0,0} for a unwarped normal view |
| dVector | down vector set to {0,1,0} for an unwarped normal view |
| fVector | forward vector set to {0,0,1} for an unwarped normal view |
| col | color multiplier. 24-bit color, each 8 bits scales intensity of respective component. 64=1.0 or no scale. Use 0x404040 for no change; 0x808080 to draw as double brightness, etc.. (currently ignored) |
| forceScale | for STL files, forces scale factor (for alignment inside ZIP animations) Leave this 0.f typically. |
| fdrawratio | fraction of model to draw (hack for animation) |
| flags | Bit 0:0=normal, 1:wireframe |
Note : the col parameter works differently to most col values. As it is scaled 0x404040 is equal to 0xFFFFFF color values are scaled up by x 4. You can use VoxieBox::colorHexDivide(col, 4) to divide the intended color by a 4th to render it in its true color. This is useful when you want your model to be shown at the correct color.
For a more simpler function
Implements IVoxieBox.
|
virtual |
Returns the extents of a 3D model (.obj, .kv6, .stl etc...)
Works out the distance of what a 3d model extends to. Useful to help calculate the forceScale option found in VoxieBox::drawModelExt()
| filename | of the model object to analyze |
| extentsPtr | pointer to the extents struct to write the data to |
| flags | Bit 0:0=normal, 1:wireframe |
Implements IVoxieBox.
|
virtual |
Renders a filled polygon. Assumes points are in loop order and coplanar.
| pt | pointer to the pol_t array (consists list of vertices and their 'next point index') |
| pt_count | the number of vertices in the pol_t array |
| p2 | is an index to the next point on the loop. Holes/multiple loops are supported. |
| col | 24-bit hexadecimal color value (RGB) @example For example, this would draw a flat draw a rectangle:
pol_t pt[4];
pt[0].x = 0.0; pt[0].y = 0.0; pt[0].z = 0.0; pt[0].p2 = 1;
pt[1].x = 0.5; pt[1].y = 0.0; pt[1].z = 0.0; pt[1].p2 = 2;
pt[2].x = 0.5; pt[2].y = 0.8; pt[2].z = 0.0; pt[2].p2 = 3;
pt[3].x = 0.0; pt[3].y = 0.8; pt[3].z = 0.0; pt[3].p2 = 0;
drawPoly(pol_t &pt, 4, 0xffffff);
|
Must be called between startFrame() & endFrame() functions.
Implements IVoxieBox.
|
virtual |
Renders a 2D textured (.png, .jpg... most image formats) quad (plane) onto the volumetric display. Useful to rendering 2D textures. Must be called between startFrame() & endFrame() functions.
| filename | the filename / path for the texture to load (.png, .jpg... most image formats supported) |
| pos | the center position of the quad to render |
| width | x dimension of the quad (how wide). |
| height | y dimension of the quad (how high). |
| hang | the horizontal angle (yaw) . 0 is front facing. 180 is facing the back of the display. presented in degrees. |
| hang | the vertical angle (pitch). 0 is horizontal facing. 90 is facing vertical. presented in degrees. |
| twist | how much 'twist' is in the quad. (roll) in the quad 0 is flat. presented in degrees. |
| col | the color value of the texture 0x404040 is the natural color from the texture anything less or more will add a tint to the texture. |
| u | the u value of the texture. Adjusting this stretches / the horizontal texture size. Default is 1 |
| u | the v value of the texture. Adjusting this stretches / the vertical texture size. Default is 1 |
Must be called between startFrame() & endFrame() functions.
Implements IVoxieBox.
|
virtual |
renders a sphere on the volumetric display using 3 floats
| x | x position of the sphere's center position |
| y | y position of the sphere's center position |
| z | z position of the sphere's center position |
| radius | the radius (size) of the sphere |
| fill | the fill mode 0 = shell, 1 = filled |
| col | the color as a RGB hex value |
Must be called between startFrame() & endFrame() functions. fillmode 1 (filled) will only color absolute colors ( 0xFF0000, 0x00FF00, 0xFFFF00, etc...)
Implements IVoxieBox.
|
virtual |
renders a sphere on the volumetric display using a point3d for position
| pos | x,y,z position of the sphere's center position |
| radius | the radius (size) of the sphere |
| fill | the fill mode 0 = shell, 1 = filled |
| col | the color as a RGB hex value |
Must be called between startFrame() & endFrame() functions. fillmode 1 (filled) will only color absolute colors ( 0xFF0000, 0x00FF00, 0xFFFF00, etc...)
Implements IVoxieBox.
|
virtual |
Renders a string (printf-style) unto the volumetric display.
Used for displaying text on the volumetric display. Best to keep the text to be near the top or bottom of the display and flat for maximum readability
| pos | the left, up, top position for the text to start. |
| r | right vector use r.x value to set the width of the text. Set r.y and r.z to 0 for straight text |
| d | down vector use d.y value to set the height of the text. Set d.x and d.z to 0 for straight text |
| col | int hex color value. (0xRGB) |
| fmt* | Extension for C/C++ allowing use of this function printf-style. Example '(char*) Hello World Show a int d", myInt' |
Must be called between startFrame() & endFrame() functions.
Implements IVoxieBox.
|
virtual |
Renders a string (printf-style) unto the volumetric display w/ addition parameter to set size / radial width.
Used for displaying text on the volumetric display. Best to keep the text to be near the top or bottom of the display and flat for maximum readability
| pos | the left, up, top position for the text to start. |
| r | right vector use r.x value to set the width of the text. Set r.y and r.z to 0 for straight text |
| d | down vector use d.y value to set the height of the text. Set d.x and d.z to 0 for straight text @oaram size the radius of the font. |
| col | int hex color value. (0xRGB) |
| fmt* | Extension for C/C++ allowing use of this function printf-style. Example '(char*) Hello World Show a int d", myInt' |
Must be called between startFrame() & endFrame() functions.
Implements IVoxieBox.
|
virtual |
Renders a string (printf-style) unto the volumetric display. Simple syntax.
Used for displaying text on the volumetric display. Best to keep the text to be near the top or bottom of the display and flat for maximum readability
| pos | the left, up, top position for the text to start. |
| textWidth | width of the text |
| textHeight | height of the text |
| hang | horizontal angle expressed in degrees |
| vang | vertical angle expressed in degrees |
| tilt | the tilt of the text expressed in degrees |
| col | col int hex color value. (0xRGB) |
| fmt* | Extension for C/C++ allowing use of this function printf-style. Example '(char*) Hello World Show a int d", myInt' |
Must be called between startFrame() & endFrame() functions.
Implements IVoxieBox.
|
virtual |
Renders a single voxel onto the volumetric using 3 floats for coordinates.
Draw single voxel at specified location.
| x | x position of the voxel's location |
| y | y position of the voxel's location |
| z | z position of the voxel's location |
| col | 24-bit hexadecimal color value |
NOTE: The intensity of each color component in col is used for dithering, meaning a voxel might not plot if the intensity of the color component is less than 255. This is by design to allow shades. If you want the voxel to always plot, use 255's in each color component.
Must be called between startFrame() & endFrame() functions.
Implements IVoxieBox.
|
virtual |
Renders a single voxel onto the volumetric using a single point3d for coordinates.
Draw single voxel at specified location.
| pos | x,y,z position of the voxel's location |
| col | 24-bit hexadecimal color value |
NOTE: The intensity of each color component in col is used for dithering, meaning a voxel might not plot if the intensity of the color component is less than 255. This is by design to allow shades. If you want the voxel to always plot, use 255's in each color component.
Implements IVoxieBox.
|
virtual |
Toggles focus pinch (off by default) if set to true if a pinch has been registered all other touch inputs are nulled.
| choice | set to true or false to enable or disable focus pinch |
Implements IVoxieBox.
|
virtual |
Flush all graphics commands on internal buffer, causing all graphics commands to actually execute and complete.
This might be used if one wanted to do some low level access to the voxel buffer. For advanced users only.
Implements IVoxieBox.
|
virtual |
Frees a filename from VoxieBox.dll internal cache (any filename passed to voxie_drawmeshtex() / drawMesh, voxie_drawheimap() / drawHeightMap, voxie_drawspr() / drawModel)
| fileName | the file path and file name of the file to remove from the internal cache NOTE: Pass a '*' file name to remove entire internal cache |
Implements IVoxieBox.
|
virtual |
Returns all the internal voxie_wind_t's aspect ratio values as a point3d (x,y,z)
Implements IVoxieBox.
|
virtual |
Returns the internal voxie_wind_t's aspect X ratio.
Implements IVoxieBox.
|
virtual |
Returns the internal voxie_wind_t's aspect Y ratio.
Implements IVoxieBox.
|
virtual |
Returns the internal voxie_wind_t's aspect Z ratio.
Implements IVoxieBox.
|
virtual |
Returns delta time (the time between volume updates) delta time is CPU speed dependent and can be used to make ensure timing is consistent between various computers / systems.
Implements IVoxieBox.
|
virtual |
returns a single analog axis (control stick) from a game controller. Value as an float range between -1 and 1, 0 is centred.
| controllerID | the controller ID you want to check (0 = player 1, 1 = player 2... etc) |
| axis | the controller's Axis to check (vxInputTypes.h::ControllerAxis) 0 left stick x, 1 left stick y, 2 right stick x, 3 right stick y |
Implements IVoxieBox.
|
virtual |
returns the analog axis (control stick) from a game controller. Value as an Point2d range between -1 and 1, 0 is centred.
| controllerID | the controller ID you want to check (0 = player 1, 1 = player 2... etc) |
| stick | 0 for left stick, 1 for right stick |
Implements IVoxieBox.
|
virtual |
returns a value in seconds of how long a controller's button has been held down for. Requires setEnableLegacyJoyInput() to be set to false to work.
| controllerID | Which game controller to check(0 - 3) |
| joyButtonCode | Which button press to check JOY_DPAD_UP = 0, //!< bit 0 value 1 Digital Dpad Up
JOY_DPAD_DOWN = 1, //!< bit 1 value 2 Digital Dpad Down
JOY_DPAD_LEFT = 2, //!< bit 2 value 4 Digital Dpad Left
JOY_DPAD_RIGHT = 3, //!< bit 3 value 8 Digital Dpad Right
JOY_START = 4, //!< bit 4 value 16 Start Button
JOY_BACK = 5, //!< bit 5 value 32 Back Button
JOY_LEFT_THUMB = 6, //!< bit 6 value 64 Left Thumb Stick Button (when you press 'down' on the left analog stick)
JOY_RIGHT_THUMB = 7, //!< bit 7 value 128 Right Thumb Stick Button (when you press 'down' on the right analog stick)
JOY_LEFT_SHOULDER = 8, //!< bit 8 value 256 Left Shoulder Bumper Button - not the Shoulder triggers are analog
JOY_RIGHT_SHOULDER = 9, //!< bit 9 value 512 Right Shoulder Bumper Button - not the Shoulder triggers are analog
JOY_A = 12, //!< bit 12 value 1,024 The 'A' Button on a standard Xbox Controller
JOY_B = 13, //!< bit 13 value 2,048 The 'B' Button on a standard Xbox Controller
JOY_X = 14, //!< bit 14 value 4,096 The 'X' Button on a standard Xbox Controller
JOY_Y = 15 //!< bit 15 value 8,192 The 'Y' Button on a standard Xbox Controller
|
Implements IVoxieBox.
|
virtual |
Returns 1 if controller's button is pressed down. See vxInputTypes::JoyButtonCodes for reference on Joy Button Codes
| controllerID | Which game controller to check (0 - 3) |
| joyButtonCode | Which button press to check JOY_DPAD_UP = 0, //!< bit 0 value 1 Digital Dpad Up
JOY_DPAD_DOWN = 1, //!< bit 1 value 2 Digital Dpad Down
JOY_DPAD_LEFT = 2, //!< bit 2 value 4 Digital Dpad Left
JOY_DPAD_RIGHT = 3, //!< bit 3 value 8 Digital Dpad Right
JOY_START = 4, //!< bit 4 value 16 Start Button
JOY_BACK = 5, //!< bit 5 value 32 Back Button
JOY_LEFT_THUMB = 6, //!< bit 6 value 64 Left Thumb Stick Button (when you press 'down' on the left analog stick)
JOY_RIGHT_THUMB = 7, //!< bit 7 value 128 Right Thumb Stick Button (when you press 'down' on the right analog stick)
JOY_LEFT_SHOULDER = 8, //!< bit 8 value 256 Left Shoulder Bumper Button - not the Shoulder triggers are analog
JOY_RIGHT_SHOULDER = 9, //!< bit 9 value 512 Right Shoulder Bumper Button - not the Shoulder triggers are analog
JOY_A = 12, //!< bit 12 value 1,024 The 'A' Button on a standard Xbox Controller
JOY_B = 13, //!< bit 13 value 2,048 The 'B' Button on a standard Xbox Controller
JOY_X = 14, //!< bit 14 value 4,096 The 'X' Button on a standard Xbox Controller
JOY_Y = 15 //!< bit 15 value 8,192 The 'Y' Button on a standard Xbox Controller
|
Implements IVoxieBox.
|
virtual |
Returns 1 if controller's button is just pressed. See vxInputTypes::JoyButtonCodes for reference on Joy Button Codes.
| controllerID | Which game controller to check (0 - 3) |
| joyButtonCode | Which button press to check JOY_DPAD_UP = 0, //!< bit 0 value 1 Digital Dpad Up
JOY_DPAD_DOWN = 1, //!< bit 1 value 2 Digital Dpad Down
JOY_DPAD_LEFT = 2, //!< bit 2 value 4 Digital Dpad Left
JOY_DPAD_RIGHT = 3, //!< bit 3 value 8 Digital Dpad Right
JOY_START = 4, //!< bit 4 value 16 Start Button
JOY_BACK = 5, //!< bit 5 value 32 Back Button
JOY_LEFT_THUMB = 6, //!< bit 6 value 64 Left Thumb Stick Button (when you press 'down' on the left analog stick)
JOY_RIGHT_THUMB = 7, //!< bit 7 value 128 Right Thumb Stick Button (when you press 'down' on the right analog stick)
JOY_LEFT_SHOULDER = 8, //!< bit 8 value 256 Left Shoulder Bumper Button - not the Shoulder triggers are analog
JOY_RIGHT_SHOULDER = 9, //!< bit 9 value 512 Right Shoulder Bumper Button - not the Shoulder triggers are analog
JOY_A = 12, //!< bit 12 value 1,024 The 'A' Button on a standard Xbox Controller
JOY_B = 13, //!< bit 13 value 2,048 The 'B' Button on a standard Xbox Controller
JOY_X = 14, //!< bit 14 value 4,096 The 'X' Button on a standard Xbox Controller
JOY_Y = 15 //!< bit 15 value 8,192 The 'Y' Button on a standard Xbox Controller
|
Note : this function works differently to 'IsDown' is down just registers if the button is being pressed while on down is the first instance of the button being pressed before it is released again.
Implements IVoxieBox.
|
virtual |
Returns 1 if controller's button is just released. See vxInputTypes::JoyButtonCodes for reference on Joy Button Codes.
| controllerID | Which game controller to check (0 - 3) |
| joyButtonCode | Which button press to check JOY_DPAD_UP = 0, //!< bit 0 value 1 Digital Dpad Up
JOY_DPAD_DOWN = 1, //!< bit 1 value 2 Digital Dpad Down
JOY_DPAD_LEFT = 2, //!< bit 2 value 4 Digital Dpad Left
JOY_DPAD_RIGHT = 3, //!< bit 3 value 8 Digital Dpad Right
JOY_START = 4, //!< bit 4 value 16 Start Button
JOY_BACK = 5, //!< bit 5 value 32 Back Button
JOY_LEFT_THUMB = 6, //!< bit 6 value 64 Left Thumb Stick Button (when you press 'down' on the left analog stick)
JOY_RIGHT_THUMB = 7, //!< bit 7 value 128 Right Thumb Stick Button (when you press 'down' on the right analog stick)
JOY_LEFT_SHOULDER = 8, //!< bit 8 value 256 Left Shoulder Bumper Button - not the Shoulder triggers are analog
JOY_RIGHT_SHOULDER = 9, //!< bit 9 value 512 Right Shoulder Bumper Button - not the Shoulder triggers are analog
JOY_A = 12, //!< bit 12 value 1,024 The 'A' Button on a standard Xbox Controller
JOY_B = 13, //!< bit 13 value 2,048 The 'B' Button on a standard Xbox Controller
JOY_X = 14, //!< bit 14 value 4,096 The 'X' Button on a standard Xbox Controller
JOY_Y = 15 //!< bit 15 value 8,192 The 'Y' Button on a standard Xbox Controller
|
Implements IVoxieBox.
|
virtual |
returns the game controllers button state. See vxInputTypes::JoyButtonCodes for details.
| controllerID | the ID number of the controller to check (0 = 1st, 1 = 2nd, 2 = 3rd, 4th) |
JOY_DPAD_UP = 0, //!< bit 0 value 1 Digital Dpad Up
JOY_DPAD_DOWN = 1, //!< bit 1 value 2 Digital Dpad Down
JOY_DPAD_LEFT = 2, //!< bit 2 value 4 Digital Dpad Left
JOY_DPAD_RIGHT = 3, //!< bit 3 value 8 Digital Dpad Right
JOY_START = 4, //!< bit 4 value 16 Start Button
JOY_BACK = 5, //!< bit 5 value 32 Back Button
JOY_LEFT_THUMB = 6, //!< bit 6 value 64 Left Thumb Stick Button (when you press 'down' on the left analog stick)
JOY_RIGHT_THUMB = 7, //!< bit 7 value 128 Right Thumb Stick Button (when you press 'down' on the right analog stick)
JOY_LEFT_SHOULDER = 8, //!< bit 8 value 256 Left Shoulder Bumper Button - not the Shoulder triggers are analog
JOY_RIGHT_SHOULDER = 9, //!< bit 9 value 512 Right Shoulder Bumper Button - not the Shoulder triggers are analog
JOY_A = 12, //!< bit 12 value 1,024 The 'A' Button on a standard Xbox Controller
JOY_B = 13, //!< bit 13 value 2,048 The 'B' Button on a standard Xbox Controller
JOY_X = 14, //!< bit 14 value 4,096 The 'X' Button on a standard Xbox Controller
JOY_Y = 15 //!< bit 15 value 8,192 The 'Y' Button on a standard Xbox Controller
Implements IVoxieBox.
|
virtual |
Returns the internal gamepad's dead zone value. Default is 0.3.
Implements IVoxieBox.
|
virtual |
Returns the number of USB game controllers detected by the system.
Implements IVoxieBox.
|
virtual |
returns the orientation set for a specific game controller
| controllerID | the joy's ID of which one you want to return its orientation information |
Implements IVoxieBox.
|
virtual |
Returns a controllers analog trigger value. 0 = 0% pressed ... 1 = 100% pressed. Presented as a float.
| controllerID | the ID number of the controller you want to adjust (0 = port 1,1 = port 2, 2 = port 3, 3 = port 4) |
| joyTriggerCode | the trigger to check 0 = left, 1 = right. |
Implements IVoxieBox.
|
virtual |
return the time (in seconds) The scancode's key has been held down for requires VoxieBox::setEnableLegacyKeyInput() to be set to false to work
| scancode | each key has a unique scancode key. For a list scancodes see vxInputTypes.h::Keys |
Note: VoxieBox::setEnableLegacyKeyInput() to be set to false to work otherwise will always return -1;
Implements IVoxieBox.
|
virtual |
returns 1 if the scancode's key is held down (pressed). For scancodes see vxInputTypes.h::Keys
| scancode | each key has a unique scancode key. For a list scancodes see vxInputTypes.h::Keys |
Implements IVoxieBox.
|
virtual |
returns a 1 if the scancode's key is just pressed. Requires VoxieBox::setEnableLegacyKeyInput() set to false to work. For scancodes see vxInputTypes.h::Keys
| scancode | each key has a unique scancode key. For a list scancodes see vxInputTypes.h::Keys |
Implements IVoxieBox.
|
virtual |
returns a 1 if the scancode's key is just released. Requires VoxieBox::setEnableLegacyKeyInput() set to false to work. For scancodes see vxInputTypes.h::Keys
| scancode | each key has a unique scancode key. For a list scancodes see vxInputTypes.h::Keys |
Note: VoxieBox::setEnableLegacyKeyInput() to be set to false to work otherwise will always return -1
Implements IVoxieBox.
|
virtual |
returns a key's input state (0 = no press, 1 = just pressed, 3 = held down) see vxInputTypes.h::Keys for scancodes
| scancode | each key has a unique scancode key. For a list scancodes see vxInputTypes.h::Keys |
vxInputTypes.h contains an enum for all the scancodes which all start with the prefix 'KB_'
Implements IVoxieBox.
|
virtual |
Returns buffered ASCII keyboard input.
Useful for typing stuff like your name, for example. You may continue to call this function in a while loop until it returns 0. This function only works when setEnableLegacyKeyInput() is set to true. Otherwise use getKeyHistory() instead.
Implements IVoxieBox.
|
virtual |
Returns the mount of time (in seconds) a mouse's button has been pressed.
| buttonCode | the mouse button code to check (0 = left, 1 = right, 2 = middle) |
Implements IVoxieBox.
|
virtual |
Returns the state of mouse's buttonCode.
| buttonCode | the buttonCode for the button to check. 0 = Left, 1 = Right, 2 = Center (mouse wheel button). |
Implements IVoxieBox.
|
virtual |
Returns the state of mouse's buttonCode.
| buttonCode | the buttonCode for the button to check. 0 = Left, 1 = Right, 2 = Center (mouse wheel button). Note : This input check is for the instance of it being just pressed. It will return 0 if you held down a button. |
Implements IVoxieBox.
|
virtual |
Checks to see if desired MoustButton has been just released ('on up')
| buttonCode | the mouse button code you wish to check for (0 = left, 1 = right, 2 = both) |
Implements IVoxieBox.
|
virtual |
Returns the internal mouse button state. Reads from the internal (in) voxie_input_t.
Implements IVoxieBox.
|
virtual |
Returns the internal mouse's X,Y and Z delta movements as a point3d. Reads from the internal (in) voxie_input_t.
Implements IVoxieBox.
|
virtual |
Returns 1 if particular Mouse's buttonCode has been clicked twice within the double click threshold.
| buttonCode | the mouse's button code to check (0 = left, 1 = right, 2 = middle) |
To adjust double click threshold
Implements IVoxieBox.
|
virtual |
Returns the mouse double click threshold. (how quickly 2 mouse clicks signify a 'double click'). Presented in seconds.
Implements IVoxieBox.
|
virtual |
returns the orientation set for the mouse
| spaceNavID | the SpaceNav's ID of which one you want to return its orientation information |
Implements IVoxieBox.
|
virtual |
|
virtual |
Returns the internal mouse previous button state. Reads from the internal (in) voxie_input_t.
Could be used to write your own input functions.
Implements IVoxieBox.
|
virtual |
returns the internal (in) voxie_inputs_t struct.
could be useful for users who want access to what the internal mouse inputs variables are at the internal voxie_inputs_t (which really just hold the mouse input variables) when updated when breath() is called. you can use setMouseState to override these values.
Implements IVoxieBox.
|
virtual |
Returns the internal mouse's X delta movement. Reads from internal (in) voxie_input_t.
Implements IVoxieBox.
|
virtual |
Returns the current mouse XY sensitivity. Default is 0.001.
Implements IVoxieBox.
|
virtual |
Returns the internal mouse's Y delta movement. Reads from the internal (in) voxie_input_t.
Implements IVoxieBox.
|
virtual |
Returns the internal mouse's Z delta movement. Reads from the internal (in) voxie_input_t.
Implements IVoxieBox.
|
virtual |
Returns the current mouse Z sensitivity. Default is 0.0005.
Implements IVoxieBox.
|
virtual |
|
virtual |
returns a single axis of a spaceNav's angle delta (range is -1 to 1, 0 is centered). Axis 0 = x, 1 = y, 2 = z
| spaceNavID | the space Nav's id to fetch |
| axis | the axis to get the angle information 0 = x, 1 = y 2 = z; |
Implements IVoxieBox.
|
virtual |
Returns in seconds how long a Space Nav's button has been held down, otherwise returns a 0.
| SpaceNavID | the ID number of the Space Nav to check (0 = 1st detected, 1 = 2nd detected etc) |
| buttonCode | the button code to check based on vxInputTypes.h::NavButton(). 0 = left button, 1 = right button. |
Implements IVoxieBox.
|
virtual |
Returns 1 if particular Space Nav's button is being pressed. Button codes are based on vxInputTypes.h::NavButton(). 0 = left button, 1 = right button.
| SpaceNavID | the ID number of the Space Nav to check (0 = 1st detected, 1 = 2nd detected etc) |
| buttonCode | the button code to check based on vxInputTypes.h::NavButton(). 0 = left button, 1 = right button. |
Implements IVoxieBox.
|
virtual |
Returns 1 if particular Space Nav's button has just been pressed. Button codes are based on vxInputTypes.h::NavButton(). 0 = left button, 1 = right button.
| SpaceNavID | the ID number of the Space Nav to check (0 = 1st detected, 1 = 2nd detected etc) |
| buttonCode | the button code to check based on vxInputTypes.h::NavButton(). 0 = left button, 1 = right button. |
Implements IVoxieBox.
|
virtual |
Returns 1 if particular Space Nav's button has been just released from being held ('on up').
| SpaceNavID | the ID number of the Space Nav to check (0 = 1st detected, 1 = 2nd detected etc) |
| buttonCode | the button code to check based on vxInputTypes.h::NavButton(). 0 = left button, 1 = right button. |
Implements IVoxieBox.
|
virtual |
Returns the button values (presented as binary of each button) for the Space Navigator. 0 = none, 1 = left, 2 = right, 3 = both.
| SpaceNavID | the ID number of the Space Nav to check (0 = 1st detected, 1 = 2nd detected etc) |
Implements IVoxieBox.
|
virtual |
|
virtual |
Returns a single axis of a Space Nav's direction delta (range is -1 to 1, 0 is centered). Axis 0 = x, 1 = y, 2 = z.
| spaceNavID | the space Nav's id to fetch |
| axis | the axis to get the direction information 0 = x, 1 = y 2 = z; |
Implements IVoxieBox.
|
virtual |
Returns 1 if particular Space Nav's buttonCode has been clicked twice within the double click threshold.
| buttonCode | the Space Nav's button code to check (0 = left, 1 = right, 2 = both) |
To adjust click hold threshold
Implements IVoxieBox.
|
virtual |
Implements IVoxieBox.
|
virtual |
Note for a SpaceNav to be detected it must be moved (is detected when any of the SpaceNav's axis movements)
Implements IVoxieBox.
|
virtual |
returns the orientation set for a specific Space Nav
| spaceNavID | the SpaceNav's ID of which one you want to return its orientation information |
Implements IVoxieBox.
|
virtual |
|
virtual |
Returns the previous button values. Used for a legacy way to create your own button functions. Useful if setEnableLegacyNavInput() is set to true.
| spaceNavID | the ID number of the Space Nav to check (0 = 1st detected, 1 = 2nd detected etc) |
Implements IVoxieBox.
|
virtual |
| spaceNavID | the ID number of the Space Nav to check (0 = 1st detected, 1 = 2nd detected etc) |
Implements IVoxieBox.
|
virtual |
Returns the running time (in seconds) from program execution till present.
Implements IVoxieBox.
|
virtual |
returns the X delta movement of a touch point.
To determine what touch point an index is used.
| index | the index of the touch point to check |
Implements IVoxieBox.
|
virtual |
returns the Y delta movement of a touch point.
To determine what touch point an index is used.
| index | the index of the touch point to check |
Implements IVoxieBox.
|
virtual |
returns a pinch's touch distance delta (the amount the two points of the pinch have changed in distance)
Implements IVoxieBox.
|
virtual |
gets a pointer to the internal vxInputTypes.h::touchInput_t struct.
Implements IVoxieBox.
|
virtual |
returns the a touch point's X position.
To determine what touch point an index is used
| index | the index of the touch point to check |
Implements IVoxieBox.
|
virtual |
returns the a touch point's Y position.
To determine what touch point an index is used
| index | the index of the touch point to check |
Implements IVoxieBox.
|
virtual |
checks if a touch input has been registered within a 2D box returns a positive number if touch has been detected
| TLpos | the top left point of the rectangle to check within |
| BRpos | the bottom right point of the rectangle to check within |
| drawCollision | set to true to draw the collision box on the secondary (touch) screen |
Implements IVoxieBox.
|
virtual |
checks if a touch input has been registered within a 2D circle returns the touch inputs index number
| CirPos | the X Y circle position |
| radius | the radius of the circle. |
| drawCollision | set to true to draw the collision box on the secondary (touch) screen |
Implements IVoxieBox.
|
virtual |
checks if a touch input has been registered within a 2D box returns a positive number if touch has been detected
| TLpos | the top left point of the rectangle to check within |
| BRpos | the bottom right point of the rectangle to check within |
| drawCollision | set to true to draw the collision box on the secondary (touch) screen |
Implements IVoxieBox.
|
virtual |
checks if a touch input has been registered within a 2D circle returns a positive number if touch has been detected
| CirPos | the X Y circle position |
| radius | the radius of the circle. |
| drawCollision | set to true to draw the collision box on the secondary (touch) screen |
Implements IVoxieBox.
|
virtual |
returns a pinch's touch rotation delta (the amount the two points of the pinch have changed in distance)
Implements IVoxieBox.
|
virtual |
returns the touch sensitivity (1 is default. the higher the value the more sensitivity)
Implements IVoxieBox.
|
virtual |
returns the touch point's state.
Requires to know which touch point index to check
| index | the index of the touch point to check |
Implements IVoxieBox.
|
virtual |
Returns the system's current VPS (volumes per second).
Implements IVoxieBox.
|
virtual |
returns a timestamp of the compile date of VxCpp.dll expressed as an __int64. (format: YYYYMMDDHHmmss)
Returns compile date and time of VxCpp.dll as a 64-bit int in this format: year*1e10 + month*1e8 + day*1e6 + hour*1e4 + minute*1e2 + second For example, April 8, 2024 at 16:38:44 would be: 20240408163844
Implements IVoxieBox.
|
virtual |
Helper function for VoxieBox::DrawMeshExt copies indices.xyz values to indices.uvc values and removes the starting loop flags.
| indiceArray | the indiceArray to pass in |
| indiiceCount | the number of indices within the array |
Implements IVoxieBox.
|
virtual |
Initializes and updates voxiebox.dll's voxie window (voxie_wind_t)
The voxie window is the struct which holds all the settings and values to do with the volumetric display.
This function is called first time by the VoxieBox constructor. So there is no need for a developer to initialise it But can be used to update the voxie_window if the VoxieBox class's vw (voxie_wind_t) has been updated. On the first call, this function sets up the window and starts the hardware motor. On later calls, it can be used to override some parameters of the vw (voxie_window_t) structure.
For example: vw.useJoy = 0; voxie_init(&vw); would change the joystick input method to direct input (joyInfoEx) emulation regardless of the setting in voxiebox.ini. if voxie_init returns -1 the function returns an error could not initialise or update
Note : This function always passing in the VoxieBox class's voxie_wind_t which is known as 'vw'
Implements IVoxieBox.
|
virtual |
Add item to a menu tab.
Use this function to add a new menu item to the menu's tab. See the enum from vxInputTypes.h::menuTypes for a list of menu item to add.
| label | name of text/button/slider |
| x | starting x position for menu item |
| y | starting y position for menu item |
| xSize | horizontal size of item |
| ySize | vertical size of item |
| id | user-defined low integer (use enum to differentiate easily). Assign a unique number (ID) so the menu item can be recalled by other functions |
| type | the type of menu item to create see vxInputTypes.h::menuTypes MENU_TEXT: text (decoration only) MENU_LINE: line (decoration only) MENU_BUTTON_MIDDLE+3: push button (single button) MENU_BUTTON_MIDDLE+1: push button (first in group - auto-depresses others so only 1 on) MENU_BUTTON_MIDDLE : push button (in middle of group) MENU_BUTTON_MIDDLE+2: push button (last in group - auto-depresses others so only 1 on) MENU_HSLIDER: horizontal slider MENU_VSLIDER: vertical slider MENU_EDIT: edit text box MENU_EDIT_DO: edit text box, click next item on 'Enter' MENU_TOGGLE: combo box (w/o the drop down). Useful for saving space in dialog. Specify multiple strings in 'st' using \r as separator. MENU_PICKFILE: file selector. Specify type in 2nd string. Ex: "Browse\r*.kv6" |
| col | color of item (typically 0xffffff) |
| startingVal | the starting value of menu item |
| minVal | min value |
| maxVal | max value |
| minStepVal | minor step in value increase/decrease amount |
| majStepVal | major step in value increase/decrease amount |
Implements IVoxieBox.
|
virtual |
Add custom menu tab on secondary (touch) screen menu (NOTE: there's only space for 2 more tabs on the 7" 1024x600 LCD screen)
| st | name of tab |
| x | horizontal position for the tab item area |
| y | vertical position for tab item area |
| xs | width in pixels of the tab item area |
| ys | height in pixels of the tab item area |
menu functions only needs to be called once. Not every volume/frame.
Implements IVoxieBox.
|
virtual |
Function used to reset the voxie menu and set a new custom menu update function (the menu which is on the secondary touch screen)
This function is essential if you want to make your own menu tabs as you'll need to create a function which holds all your menu's logic The menu_update function is where a user makes their own function which manages the menu's input.
| menu_update | callback function to handle interaction updates. See example user function below. |
| userdata | a pointer to a user-defined structure (optional / for convenience only). |
| bgImageFileName | an image file to be used as background (should be 1024x600 for the LCD display) |
The menu_update( int id, char *st, double val. int how, void * userdata) is called every time a menu button is pressed. each menu item has an id and passes through certain values depending on its item type.
Parameters for the menu_update() custom function:
id = the id for the menu item which is calling the function.
st = the custom pointer char array being passed in from the menu item. (for user edit box (MENU_EDIT))
val = the custom val passed in from the menu item this is how slider values are passed in
how = tells how button or slider was changed: (0:enter, 1:left/right arrow, 2:click button, 3:drag slider, 4:slider arrow)
userdata = pointer to user-defined structure (helpful to avoid global variables)
@example Example of custom menu call back function
enum {MENU_SPEED_BUTTON_1,MENU_SPEED_BUTTON_2,MENU_SPEED_BUTTON_3,MENU_SPEED_SLIDER,MENU_FILE};
static int gspeed = 1;
static int user_menu_update(int id, char *st, double v, int how, void *userdata)
{
switch (id)
{
case MENU_SPEED_BUTTON_1: gspeed = 1; break; (MENU_SPEED_BUTTON_1 (1) is menuAddItem's id - defined when the menu item was created)
case MENU_SPEED_BUTTON_2: gspeed = 2; break;
case MENU_SPEED_BUTTON_3: gspeed = 3; break;
case MENU_SPEED_SLIDER: gspeed = (int)v; break;
case MENU_FILE: printf("File:%s\n", st); break; //NOTE:don't use printf in graphical app :P
}
return(1);
}
At some point in your VX program (usually before your breath() update loop). call menuReset and define your call back function. menuReset(user_menu_update, 0, (char*)"test.png");
Note: call with voxie_menu_reset(0,0); to remove the user menu
Implements IVoxieBox.
|
virtual |
MountZip - extracts and loads a .zip file into memory.
Once a zip has been mounted all file names which are withing the zip folder can be referenced as if they were in the local directory Example you have a zip file with 'example.png' within it. Once you mount that zip you refer 'example.png' in your program to access that file
| filename | the path and filename of the zip file to mount. (path is relative) |
Implements IVoxieBox.
|
virtual |
Updates/"moves" a point from the current position towards the destination point. Returns 1 if currentPos collides with destinnationPos otherwise returns a 0.
| currentPos | point3d pointer to the current position |
| currentPos | point3d to the destination position |
| speed | the speed in which the point is traveling |
| accuracy | the accuracy to determine if the current position has reached the destination Pos |
Implements IVoxieBox.
|
virtual |
Plays a sound (can be WAV, FLAC, MP3, M4A)
| fileName | filename (WAV, FLAC, MP3 or M4A) of sound to play |
| sourceChannel | which channel of the audio file extract (0 left, 1 right, -1 stereo, -2 left + right) |
| volumeLeft | % of full volume to left channel {0..100, although may exceed 100} |
| volumeRight | % of full volume to right channel {0..100, although may exceed 100} |
| playBackSpeed | frequency scaling. use 1.0 for default sample rate, 2.0 for 1 octave up, 0.5 for 1 octave down... etc |
Implements IVoxieBox.
Compare two point2d with a degree of accuracy. returns true if the two points are the same within the accuracy amount specified.
| a | pointer to the 1st point2d to compare |
| b | pointer to the 2nd point2d to compare |
| accuracy | the accuracy to compare the two points |
Implements IVoxieBox.
|
virtual |
Compare two point3d with a degree of accuracy. returns true if the two points are the same within the accuracy amount specified.
| a | pointer to the 1st point3d to compare |
| b | pointer to the 2nd point3d to compare |
| accuracy | the accuracy to compare the two points |
Implements IVoxieBox.
|
virtual |
Call this to tell Voxiebox library you want to exit the breath() loop and quit the application.
forces VoxieBox::breath() to return non-zero on its next call.
By default a clean exit is set to true (VoxieBox::setEnsureCleanExitOnQuitLoop()) if VoxieBox::setEnsureCleanExitOnQuitLoop() is set to true. VoxieBox::endFrame() is called and GFX stored in memory is cleared.
Implements IVoxieBox.
|
virtual |
reports the state of the game controllers on to the secondary (touch) screen
| posX | the X position to render the report |
| posY | the Y position to render the report |
Implements IVoxieBox.
|
virtual |
Reports the state of the keyboard on to the secondary (touch) screen. Used to help with debugging/.
| posX | the X position to render the report |
| poxY | the Y position to render the report |
Implements IVoxieBox.
|
virtual |
Reports mouse input state information onto secondary (touch) screen.
This report uses the internal voxie_input_t struct as reference (this could be overwritten with VoxieBox::setMouseState)
| posX | the pixel x (horizontal) position to display the report |
| posY | the pixel y (vertical) position to display the report |
| showCursor | if true shows the mouse cursor on the volumetric display. Set to true by default |
Implements IVoxieBox.
|
virtual |
Reports all SpaceNav input state onto the secondary (touch screen)
| posX | the horizontal position to display the report |
| posY | the vertical position to display the report |
| showCursor | (true by default) draw the cursor of the position of the SpaceNav |
Note: Space Navs are only detected by the system after an inital movement.
Implements IVoxieBox.
|
virtual |
Shows a debug report for advanced touch input.
| posX | the horizontal X position of the secondary (touch) screen to display the report |
| posX | the vertical Y position of the secondary (touch) screen to display the report |
Implements IVoxieBox.
|
virtual |
Exposes some of the variables from the internal voxie_frame_t onto the secondary (touch) screen.
Intended for debug purposes
| posX | the X position of the report |
| posY | the Y position of the report |
Implements IVoxieBox.
| void VoxieBox::reportVoxieFrame | ( | int | posX, |
| int | posY, | ||
| voxie_frame_t * | VF | ||
| ) |
Exposes some of the variables a voxie_frame_t struct onto the secondary (touch) screen.
Intended for debug purposes
| posX | the X position of the report |
| posY | the Y position of the report |
| VF | a pointer for the voxie_frame_t struct to report on |
|
virtual |
Exposes all the variables from the internal (vw) voxie_wind_t onto the secondary (touch) screen.
Intended for debug purposes
| posX | the X position of the report |
| posY | the Y position of the report |
Implements IVoxieBox.
| void VoxieBox::reportVoxieWind | ( | int | posX, |
| int | posY, | ||
| voxie_wind_t * | VW | ||
| ) |
Exposes all the variables of a voxie_wind_t struct onto the secondary (touch) screen.
Intended for debug purposes
| posX | the X position of the report |
| posY | the Y position of the report |
| VW | a pointer fo the voxie_wind_t struct to report on |
|
virtual |
returns a scrolling color as an RGB hexadecimal value
| offSet | offset (any whole number) to offset the color cycle to a different period in the cycle |
Implements IVoxieBox.
|
virtual |
Set all the internal voxie_wind_t's aspect ratio values and update the voxie_wind_t.
| newAspect | the new aspect ratios for the volumetric display. |
Implements IVoxieBox.
|
virtual |
Set the internal voxie_wind_t's X aspect ratio value and update the voxie_wind_t.
| newAspectX | the new Aspect X value to apply. th |
Implements IVoxieBox.
|
virtual |
Set the internal voxie_wind_t's Y aspect ratio value and update the voxie_wind_t.
| newAspectY | the new Aspect Y value to apply. th |
Implements IVoxieBox.
|
virtual |
Set the internal voxie_wind_t's Z aspect ratio value and update the voxie_wind_t.
| newAspectZ | the new Aspect Z value to apply. th |
Implements IVoxieBox.
|
virtual |
Define a custom audio callback function to play PCM / raw audio data.
This function is used to play PCM / audio data (not a file).
If used, this function will be called from a separate thread, every 3ms (for Voxiebox mode), or every 20ms (for emulated mode). Format is set by Voxiebox library. To get sample rate and number of channels, read samprate and nchans from the voxie_wind_t structure after the call to voxie_init(). The sample format is always signed 32-bit integers, with the PCM located in the least significant 24 bits.
| userplayfunc | the custom call back function |
| *sampleBuffer | the sample audio buffer passed in from memory |
| sampleRate | the sample rate of the audio (determined by the voxie_wind_t vw.playsamprate) @example // An example of an custom audio callback.
// Once called this function will always be called on a separate thread. Use a global variable to turn it on / off
static int gPlaySound = -1; // if this is set to 0 it will mute. It will play when set to -1
static int frequencyToPlay = 26162; // middle C note
static void simplemix (int *ibuf, int nsamps)
{
static int cnt[2];
int i, c; // c is number of channels to play (vw.playnchans)
for(i=0;i<nsamps;i++,ibuf+=vw.playnchans)
for(c=min(vw.playnchans,2)-1;c>=0;c--)
{ ibuf[c] = ((cnt[c]&(1<<20))-(1<<19))&gPlaySound; cnt[c] += frequencyToPlay; }
}
Now that a custom audio callback has been defined. Call it within your VX program and it should play.
Note : The playback function will continue to be called until stopped. To kill the call back overwrite the user function with a 0 by writing playPCMData(0) in your program. |
Implements IVoxieBox.
|
virtual |
Define a custom audio callback function to record PCM audio data (not a file)
this function is used to capture audio from the device. How to use this function is still being documented important voxie_wind_t variables to have set before recording.
| userplayfunc | the custom call back function |
| recsamprate | recording sample rate - to use, must write before voxie_init() |
| recnchans | number of audio channels in recording callback |
Implements IVoxieBox.
|
virtual |
Set the speed of the internal color scroller default is 0.1. Value is how long in seconds before a color change.
| speed | how long in seconds before a color change. |
Implements IVoxieBox.
| void VoxieBox::setDrawTouchInput | ( | bool | option | ) |
boolean to enable / disable drawing the touch inputs unto the (secondary) touch screen
| option | set to true to enable drawing and to false to not draw. |
|
virtual |
! set to run to allow the secondary (touch) to be used as an input device.
if you don't allow this any touch on the touchscreen will open up the voxieMenu
| option | set to true or false to enable |
Implements IVoxieBox.
|
virtual |
changes the global normal vector (vw.normhax) for shading.
Pass in three 0's to disable. Alters the global normal vector for shading. Shading only works with models which have vertices Pass 3 0's to disable shading.
| horizontalAngle | the horizontal angle -180 to 180 |
| verticalAngle | the vertical angle -90 to 90 |
| amplitude | the amplitude (intensity) 0 to 100 |
Implements IVoxieBox.
|
virtual |
Sets the internal dead zone value for game controllers. (dead zone is the area where not input is detected). Value between 0 and 1. 0 = no deadzone. 1 = all deadzone. default is 0.3;.
| deadZoneValue | the value to set the deadzone threshold a number between 0 and 1 0 no deadzone... 1 deadzone everywhere default is 0.3 |
Implements IVoxieBox.
|
virtual |
Change the orientation of the users intended position when using a game controller. At what side are they facing towards the volumetric display.
| controllerID | the ID number of the controller you want to adjust (0,1,2,3) |
| orientation | of the controller 0 = front, 1 = 180 ' (behind), 2 = 90 ' CCW (right side), 3 = 90 ' CW (left side) |
Implements IVoxieBox.
|
virtual |
Activates vibration motors in XBox controller. XInput controllers only. To stop Be sure to call again with lmot=0.f, rmot=0.f!
| id | which controller to set (0-3) |
| leftMotorSpeed | left motor speed (0.f-1.f, 0.f=off) |
| rightMotorSpeed | right motor speed (0.f-1.f, 0.f=off) |
Implements IVoxieBox.
|
virtual |
Set LEDs values on projector hardware.
WARNING: Be careful not to overheat projector! Range per component: 0:darkest, 255:brightest WARNING: Be careful not to overheat projector!
| dispNum | the display's number to adjust |
| r | the LED value for the red channel {0..128} (go over 128 at your own risk!) |
| g | the LED value for the green channel {0..128} (go over 128 at your own risk!) |
| b | the LED value for the blue channel {0..128} (go over 128 at your own risk!) |
Implements IVoxieBox.
|
virtual |
Call after each VoxieBox::setView() to mask off a plane of a specified thickness.
Used for viewing a slice of a scene.
| x0 | x point on the center of the mask plane |
| y0 | y point on the center of the mask plane |
| z0 | z point on the center of the mask plane |
| nx | The normal vector; the magnitude of this vector determines the thickness of the plane. |
| ny | The normal vector; the magnitude of this vector determines the thickness of the plane. |
| nz | The normal vector; the magnitude of this vector determines the thickness of the plane. |
Implements IVoxieBox.
|
virtual |
Set the time between mouse clicks to register a 'double click' (which triggers a true setting for getMouseDoubleClick())
| timeThreshold | the time in seconds for 2 clicks to register as a 'double click' Note use with VoxieBox::getMouseDoubleClick() to register double clicks. |
Implements IVoxieBox.
|
virtual |
set the orientation of the user's intended position when using the mouse
| orientation | the orientation of the controller 0 = front, 1 = 180 ' (behind), 2 = 90 ' CCW (right side), 3 = 90 ' CW (left side) |
Implements IVoxieBox.
|
virtual |
|
virtual |
Override the internal voxie_input_t mouse state.
Probably not that useful but its here for some advanced use case see voxie_inputs_t to understand the mouse structure*
| newMouse | the new mouse settings to pass in (pass in a full voxie_inputs_t struct) |
Implements IVoxieBox.
|
virtual |
Set the internal deadzone for Space Navigators. (dead zone is the area where not input is detected)
| deadZoneValue | new value to set deadzone. For Space Navigators between 0 and 350. default is 0.1 |
Implements IVoxieBox.
|
virtual |
Set the time between Space Nav clicks to register a 'double click' (which triggers a true setting for getNavDoubleClick())
| timeThreshold | the time in seconds for 2 clicks to register as a 'double click' Note use with VoxieBox::getNavDoubleClick() to register double clicks. |
Implements IVoxieBox.
|
virtual |
set the orientation of the user's intended position when using a Space Nav
| spaceNavID | the ID number of the spaceNav you want to edit (0,1,2,3) |
| orientation | the orientation of the controller 0 = front, 1 = 180 ' (behind), 2 = 90 ' CCW (right side), 3 = 90 ' CW (left side) |
Implements IVoxieBox.
|
virtual |
Set the Space Nav's sensitivity. Used to manage the Space Nav being used as a cursor. 0.0025 is default. Higher values increase sensitivity
| spaceNavID | the ID number of the Space Nav to check (0 = 1st detected, 1 = 2nd detected etc) |
| newAmount | the new sensitivity amount. 0.0025 is default. Higher values increase sensitivity |
Implements IVoxieBox.
|
virtual |
Advanced utility function for keystone calibration (used by graphcalc and keystone calibration in voxiedemo) see the source code for voxiedemo.c for an understanding of how this works.
| disp | display number: {0..vw.dispnum-1} |
| dir | direction. 1=forward, -1=inverse |
| x | x input point; {-1.f .. +1.f} |
| y | y input point; {-1.f .. +1.f} |
| z | input plane: {0 .. vw.framepervol*24-1} |
| xo | xo keystone adjusted output point |
| yo | yo keystone adjusted output point |
Implements IVoxieBox.
|
virtual |
Replaces the internal touchInput_t struct with a new one could be to make your own touch I/O.
| newTouchInput | * pointer to the new touchInput_t struct to replace |
Implements IVoxieBox.
|
virtual |
sets the touch sensitivity (1 is default.
the higher the value the more sensitivity)
| newSensitivityValue | the new sensitivity value. |
Implements IVoxieBox.
|
virtual |
Set a custom view.
Usually you'll pass in the voxie windows's (voxie_wind_t) aspect values but it can be used like 'camera' and be moved around by passing in different values.
You may call this function any number of times during rendering. This function is called automatically during the VoxieBox::startFrame() function. it is passed with internal vw voxie_window_t aspect ratio values.
Checks to see if invertZAxis is enabled and applies swap if needed
| xMin | minimum x resolution (left) |
| yMin | minimum y resolution (up) |
| zMin | minimum z resolution (top) |
| xMax | maximum x resolution (right) |
| yMax | maximum y resolution (down) |
| zMax | maximum z resolution (bottom) |
Implements IVoxieBox.
|
virtual |
Displays volumes per second (volumetric equivalent of 'FPS') and version info on the secondary (touch) screen.
| posX | X position for output |
| posY | Y position for output |
Implements IVoxieBox.
|
virtual |
Sphere collision check. Check if two spheres are touching. Returns 1 if collision is found otherwise returns 0.
| sphereAPos | pointer of first sphere's position |
| sphereARadius | first sphere's radius |
| sphereBPos | pointer of second sphere's position |
| sphereBRadius | second sphere's radius |
| showCollisionBox | For debugging set to false by default. Set to true to render the collision box onto the volumetric display. (Note : The collision check must be called within the start and end frame) |
Implements IVoxieBox.
|
virtual |
start building the frame buffer.
All volumetric and secondary (touch) screen draw calls need to happen between VoxieBox::startFrame() and VoxieBox::endFrame() the startframe() function prepares the vxTypes::voxie_frame_t struct to start a new frame and empty out the voxel buffer. any draw call used after this point is loaded into the voxel buffer. the startFrame() function uses the internal vf voxie_frame_t to manage its voxel data. It is possible for a developer to write directly to the vf for their own low-level drawing.
The startFrame function also sets the view to the correct aspect ration (traditionally a user would call 'voxie_setview()' after the frame to set the views dimensions) the startFrame function also draws a border around the display (if VoxieBox::setBorder() has been set to true)
Implements IVoxieBox.
|
virtual |
! reads out the current Touch input states - raw return codes from the voxiebox.dll use this function if you want to manage advanced touch input manually.
| touchIndex | index of finger in this packet |
| xVal | the x value coordinate of touch instance |
| yVal | the y value coordinate of touch instance |
| packetState | if (packetState&1): this is 1st packet in path if (packetState&2): this is last packet in path ('touchIndex' will not exist in later calls) |
@example This function should be called in a while loop until 0 is returned, ex:
while (voxie_touch_read(&i,&x,&y,&j)) { //process i,x,y,j }
Implements IVoxieBox.
|
virtual |
Tweens a color to the destination color. good for fade outs or tweens.
| color | the color value to tween. |
| speed | the speed or rate of the color change |
| destcolor | the destination color. The color to tween to. |
Implements IVoxieBox.
|
virtual |
Updates the game controller's input state. Used to manage game controller inputs when setEnableLegacyJoyInput() is set to true.
Use this function to manually update gamepad inputs. The return state is designed to be used within a for loop. This function is only needed when setEnableLegacyJoyInput() is set to true
| id | which controller to query (0-3) |
| voxie_xbox_t | structure to be filled in by function (if successful) |
Implements IVoxieBox.
|
virtual |
Once the menu is created, use this function to update a string, button status, or slider value.
In the menu item. It will change the menu items for any id values that match. If st is null, it will be left alone. 'state' is the status of a menu button (0=up, 1=down), and 'v' is the value for sliders. If a field is not applicable, just pass a 0.
| id | the menu item |
| st | changing the text (if applicable) |
| state | the state of the item (if applicable) |
| v | the value (if applicable) |
Implements IVoxieBox.
|
virtual |
Copies 3DConnexion Space Navigator controller state to voxie_nav_t structure.
| id | which controller to query (ignored for now) |
| nav | structure to be filled in by function (if successful) |
Works similar to VoxieBox::updateJoyStateRaw() use if setEnableLegacyNavInput() is set to true. Otherwise Nav updates are maintained by VxCpp.dll
Implements IVoxieBox.
|
virtual |
Update a currently playing sound.
Use a returned voxie::playSound value as the handle (an int that is assigned to that specific sound) update a sound is great for fades or adjusting volumes set the volperc0, or volperc1 use to a negative number to turn off the sound and free it from memory.
| handle | the current sound to handleID to effect (use the int that gets returned when using VoxieBox::playSound() ) |
| sourceChannel | which channel of WAV or FLAC to extract (0 left, 1 right, -1 stereo, -2 left + right) |
| volumeLeft | % of full volume to left channel {0..100, although may exceed 100} set to -1 to turn off |
| volumeRight | % of full volume to right channel {0..100, although may exceed 100} set to -1 to turn off |
| playBackSpeed | frequency scaling. use 1.0 for default sample rate, 2.0 for 1 octave up, 0.5 for 1 octave down... etc |
Implements IVoxieBox.
|
virtual |
Updates a sound's play position to .
Requires the audio's handle ID
| handleID | the handleID for the audio (when VoxieBox::playSound is called it returns an int value which is its handleID) |
| second | the time in seconds to move the sound position to. Can use the decimal for exact position |
| seekType | the seek type SEEK_SET (0), SEEK_CUR(1), SEEK_END(2). Most cases SEEK_SET (value of 0). Works similar to the fseek() function |
Implements IVoxieBox.