From: Rudolf Polzer Date: Sun, 21 Nov 2021 01:04:54 +0000 (+0100) Subject: Just use JPEG and ODE from the installed Debian system. X-Git-Tag: xonotic-v0.8.5~49 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4a0148a91476cf4caa37afedd99d3a6203493031;p=xonotic%2Fxonotic.git Just use JPEG and ODE from the installed Debian system. It comes with .a files, so we can just embed them statically. --- diff --git a/misc/builddeps/linux64/jpeg/bin/cjpeg b/misc/builddeps/linux64/jpeg/bin/cjpeg deleted file mode 100755 index 66b7f58f..00000000 Binary files a/misc/builddeps/linux64/jpeg/bin/cjpeg and /dev/null differ diff --git a/misc/builddeps/linux64/jpeg/bin/djpeg b/misc/builddeps/linux64/jpeg/bin/djpeg deleted file mode 100755 index 561ec38f..00000000 Binary files a/misc/builddeps/linux64/jpeg/bin/djpeg and /dev/null differ diff --git a/misc/builddeps/linux64/jpeg/bin/jpegtran b/misc/builddeps/linux64/jpeg/bin/jpegtran deleted file mode 100755 index ccdabd2a..00000000 Binary files a/misc/builddeps/linux64/jpeg/bin/jpegtran and /dev/null differ diff --git a/misc/builddeps/linux64/jpeg/bin/rdjpgcom b/misc/builddeps/linux64/jpeg/bin/rdjpgcom deleted file mode 100755 index eab09a27..00000000 Binary files a/misc/builddeps/linux64/jpeg/bin/rdjpgcom and /dev/null differ diff --git a/misc/builddeps/linux64/jpeg/bin/wrjpgcom b/misc/builddeps/linux64/jpeg/bin/wrjpgcom deleted file mode 100755 index 7485c62a..00000000 Binary files a/misc/builddeps/linux64/jpeg/bin/wrjpgcom and /dev/null differ diff --git a/misc/builddeps/linux64/jpeg/include/jconfig.h b/misc/builddeps/linux64/jpeg/include/jconfig.h deleted file mode 100644 index 966b1d51..00000000 --- a/misc/builddeps/linux64/jpeg/include/jconfig.h +++ /dev/null @@ -1,54 +0,0 @@ -/* jconfig.h. Generated from jconfig.cfg by configure. */ -/* jconfig.cfg --- source file edited by configure script */ -/* see jconfig.txt for explanations */ - -#define HAVE_PROTOTYPES 1 -#define HAVE_UNSIGNED_CHAR 1 -#define HAVE_UNSIGNED_SHORT 1 -/* #undef void */ -/* #undef const */ -/* #undef CHAR_IS_UNSIGNED */ -#define HAVE_STDDEF_H 1 -#define HAVE_STDLIB_H 1 -#define HAVE_LOCALE_H 1 -/* #undef NEED_BSD_STRINGS */ -/* #undef NEED_SYS_TYPES_H */ -/* #undef NEED_FAR_POINTERS */ -/* #undef NEED_SHORT_EXTERNAL_NAMES */ -/* Define this if you get warnings about undefined structures. */ -/* #undef INCOMPLETE_TYPES_BROKEN */ - -/* Define "boolean" as unsigned char, not int, on Windows systems. */ -#ifdef _WIN32 -#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ -typedef unsigned char boolean; -#endif -#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ -#endif - -#ifdef JPEG_INTERNALS - -/* #undef RIGHT_SHIFT_IS_UNSIGNED */ -#define INLINE __inline__ -/* These are for configuring the JPEG memory manager. */ -/* #undef DEFAULT_MAX_MEM */ -/* #undef NO_MKTEMP */ - -#endif /* JPEG_INTERNALS */ - -#ifdef JPEG_CJPEG_DJPEG - -#define BMP_SUPPORTED /* BMP image file format */ -#define GIF_SUPPORTED /* GIF image file format */ -#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ -/* #undef RLE_SUPPORTED */ -#define TARGA_SUPPORTED /* Targa image file format */ - -/* #undef TWO_FILE_COMMANDLINE */ -/* #undef NEED_SIGNAL_CATCHER */ -/* #undef DONT_USE_B_MODE */ - -/* Define this if you want percent-done progress reports from cjpeg/djpeg. */ -/* #undef PROGRESS_REPORT */ - -#endif /* JPEG_CJPEG_DJPEG */ diff --git a/misc/builddeps/linux64/jpeg/include/jerror.h b/misc/builddeps/linux64/jpeg/include/jerror.h deleted file mode 100644 index 1cfb2b19..00000000 --- a/misc/builddeps/linux64/jpeg/include/jerror.h +++ /dev/null @@ -1,304 +0,0 @@ -/* - * jerror.h - * - * Copyright (C) 1994-1997, Thomas G. Lane. - * Modified 1997-2009 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file defines the error and message codes for the JPEG library. - * Edit this file to add new codes, or to translate the message strings to - * some other language. - * A set of error-reporting macros are defined too. Some applications using - * the JPEG library may wish to include this file to get the error codes - * and/or the macros. - */ - -/* - * To define the enum list of message codes, include this file without - * defining macro JMESSAGE. To create a message string table, include it - * again with a suitable JMESSAGE definition (see jerror.c for an example). - */ -#ifndef JMESSAGE -#ifndef JERROR_H -/* First time through, define the enum list */ -#define JMAKE_ENUM_LIST -#else -/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */ -#define JMESSAGE(code,string) -#endif /* JERROR_H */ -#endif /* JMESSAGE */ - -#ifdef JMAKE_ENUM_LIST - -typedef enum { - -#define JMESSAGE(code,string) code , - -#endif /* JMAKE_ENUM_LIST */ - -JMESSAGE(JMSG_NOMESSAGE, "Bogus message code %d") /* Must be first entry! */ - -/* For maintenance convenience, list is alphabetical by message code name */ -JMESSAGE(JERR_BAD_ALIGN_TYPE, "ALIGN_TYPE is wrong, please fix") -JMESSAGE(JERR_BAD_ALLOC_CHUNK, "MAX_ALLOC_CHUNK is wrong, please fix") -JMESSAGE(JERR_BAD_BUFFER_MODE, "Bogus buffer control mode") -JMESSAGE(JERR_BAD_COMPONENT_ID, "Invalid component ID %d in SOS") -JMESSAGE(JERR_BAD_CROP_SPEC, "Invalid crop request") -JMESSAGE(JERR_BAD_DCT_COEF, "DCT coefficient out of range") -JMESSAGE(JERR_BAD_DCTSIZE, "DCT scaled block size %dx%d not supported") -JMESSAGE(JERR_BAD_DROP_SAMPLING, - "Component index %d: mismatching sampling ratio %d:%d, %d:%d, %c") -JMESSAGE(JERR_BAD_HUFF_TABLE, "Bogus Huffman table definition") -JMESSAGE(JERR_BAD_IN_COLORSPACE, "Bogus input colorspace") -JMESSAGE(JERR_BAD_J_COLORSPACE, "Bogus JPEG colorspace") -JMESSAGE(JERR_BAD_LENGTH, "Bogus marker length") -JMESSAGE(JERR_BAD_LIB_VERSION, - "Wrong JPEG library version: library is %d, caller expects %d") -JMESSAGE(JERR_BAD_MCU_SIZE, "Sampling factors too large for interleaved scan") -JMESSAGE(JERR_BAD_POOL_ID, "Invalid memory pool code %d") -JMESSAGE(JERR_BAD_PRECISION, "Unsupported JPEG data precision %d") -JMESSAGE(JERR_BAD_PROGRESSION, - "Invalid progressive parameters Ss=%d Se=%d Ah=%d Al=%d") -JMESSAGE(JERR_BAD_PROG_SCRIPT, - "Invalid progressive parameters at scan script entry %d") -JMESSAGE(JERR_BAD_SAMPLING, "Bogus sampling factors") -JMESSAGE(JERR_BAD_SCAN_SCRIPT, "Invalid scan script at entry %d") -JMESSAGE(JERR_BAD_STATE, "Improper call to JPEG library in state %d") -JMESSAGE(JERR_BAD_STRUCT_SIZE, - "JPEG parameter struct mismatch: library thinks size is %u, caller expects %u") -JMESSAGE(JERR_BAD_VIRTUAL_ACCESS, "Bogus virtual array access") -JMESSAGE(JERR_BUFFER_SIZE, "Buffer passed to JPEG library is too small") -JMESSAGE(JERR_CANT_SUSPEND, "Suspension not allowed here") -JMESSAGE(JERR_CCIR601_NOTIMPL, "CCIR601 sampling not implemented yet") -JMESSAGE(JERR_COMPONENT_COUNT, "Too many color components: %d, max %d") -JMESSAGE(JERR_CONVERSION_NOTIMPL, "Unsupported color conversion request") -JMESSAGE(JERR_DAC_INDEX, "Bogus DAC index %d") -JMESSAGE(JERR_DAC_VALUE, "Bogus DAC value 0x%x") -JMESSAGE(JERR_DHT_INDEX, "Bogus DHT index %d") -JMESSAGE(JERR_DQT_INDEX, "Bogus DQT index %d") -JMESSAGE(JERR_EMPTY_IMAGE, "Empty JPEG image (DNL not supported)") -JMESSAGE(JERR_EMS_READ, "Read from EMS failed") -JMESSAGE(JERR_EMS_WRITE, "Write to EMS failed") -JMESSAGE(JERR_EOI_EXPECTED, "Didn't expect more than one scan") -JMESSAGE(JERR_FILE_READ, "Input file read error") -JMESSAGE(JERR_FILE_WRITE, "Output file write error --- out of disk space?") -JMESSAGE(JERR_FRACT_SAMPLE_NOTIMPL, "Fractional sampling not implemented yet") -JMESSAGE(JERR_HUFF_CLEN_OVERFLOW, "Huffman code size table overflow") -JMESSAGE(JERR_HUFF_MISSING_CODE, "Missing Huffman code table entry") -JMESSAGE(JERR_IMAGE_TOO_BIG, "Maximum supported image dimension is %u pixels") -JMESSAGE(JERR_INPUT_EMPTY, "Empty input file") -JMESSAGE(JERR_INPUT_EOF, "Premature end of input file") -JMESSAGE(JERR_MISMATCHED_QUANT_TABLE, - "Cannot transcode due to multiple use of quantization table %d") -JMESSAGE(JERR_MISSING_DATA, "Scan script does not transmit all data") -JMESSAGE(JERR_MODE_CHANGE, "Invalid color quantization mode change") -JMESSAGE(JERR_NOTIMPL, "Not implemented yet") -JMESSAGE(JERR_NOT_COMPILED, "Requested feature was omitted at compile time") -JMESSAGE(JERR_NO_ARITH_TABLE, "Arithmetic table 0x%02x was not defined") -JMESSAGE(JERR_NO_BACKING_STORE, "Backing store not supported") -JMESSAGE(JERR_NO_HUFF_TABLE, "Huffman table 0x%02x was not defined") -JMESSAGE(JERR_NO_IMAGE, "JPEG datastream contains no image") -JMESSAGE(JERR_NO_QUANT_TABLE, "Quantization table 0x%02x was not defined") -JMESSAGE(JERR_NO_SOI, "Not a JPEG file: starts with 0x%02x 0x%02x") -JMESSAGE(JERR_OUT_OF_MEMORY, "Insufficient memory (case %d)") -JMESSAGE(JERR_QUANT_COMPONENTS, - "Cannot quantize more than %d color components") -JMESSAGE(JERR_QUANT_FEW_COLORS, "Cannot quantize to fewer than %d colors") -JMESSAGE(JERR_QUANT_MANY_COLORS, "Cannot quantize to more than %d colors") -JMESSAGE(JERR_SOF_DUPLICATE, "Invalid JPEG file structure: two SOF markers") -JMESSAGE(JERR_SOF_NO_SOS, "Invalid JPEG file structure: missing SOS marker") -JMESSAGE(JERR_SOF_UNSUPPORTED, "Unsupported JPEG process: SOF type 0x%02x") -JMESSAGE(JERR_SOI_DUPLICATE, "Invalid JPEG file structure: two SOI markers") -JMESSAGE(JERR_SOS_NO_SOF, "Invalid JPEG file structure: SOS before SOF") -JMESSAGE(JERR_TFILE_CREATE, "Failed to create temporary file %s") -JMESSAGE(JERR_TFILE_READ, "Read failed on temporary file") -JMESSAGE(JERR_TFILE_SEEK, "Seek failed on temporary file") -JMESSAGE(JERR_TFILE_WRITE, - "Write failed on temporary file --- out of disk space?") -JMESSAGE(JERR_TOO_LITTLE_DATA, "Application transferred too few scanlines") -JMESSAGE(JERR_UNKNOWN_MARKER, "Unsupported marker type 0x%02x") -JMESSAGE(JERR_VIRTUAL_BUG, "Virtual array controller messed up") -JMESSAGE(JERR_WIDTH_OVERFLOW, "Image too wide for this implementation") -JMESSAGE(JERR_XMS_READ, "Read from XMS failed") -JMESSAGE(JERR_XMS_WRITE, "Write to XMS failed") -JMESSAGE(JMSG_COPYRIGHT, JCOPYRIGHT) -JMESSAGE(JMSG_VERSION, JVERSION) -JMESSAGE(JTRC_16BIT_TABLES, - "Caution: quantization tables are too coarse for baseline JPEG") -JMESSAGE(JTRC_ADOBE, - "Adobe APP14 marker: version %d, flags 0x%04x 0x%04x, transform %d") -JMESSAGE(JTRC_APP0, "Unknown APP0 marker (not JFIF), length %u") -JMESSAGE(JTRC_APP14, "Unknown APP14 marker (not Adobe), length %u") -JMESSAGE(JTRC_DAC, "Define Arithmetic Table 0x%02x: 0x%02x") -JMESSAGE(JTRC_DHT, "Define Huffman Table 0x%02x") -JMESSAGE(JTRC_DQT, "Define Quantization Table %d precision %d") -JMESSAGE(JTRC_DRI, "Define Restart Interval %u") -JMESSAGE(JTRC_EMS_CLOSE, "Freed EMS handle %u") -JMESSAGE(JTRC_EMS_OPEN, "Obtained EMS handle %u") -JMESSAGE(JTRC_EOI, "End Of Image") -JMESSAGE(JTRC_HUFFBITS, " %3d %3d %3d %3d %3d %3d %3d %3d") -JMESSAGE(JTRC_JFIF, "JFIF APP0 marker: version %d.%02d, density %dx%d %d") -JMESSAGE(JTRC_JFIF_BADTHUMBNAILSIZE, - "Warning: thumbnail image size does not match data length %u") -JMESSAGE(JTRC_JFIF_EXTENSION, - "JFIF extension marker: type 0x%02x, length %u") -JMESSAGE(JTRC_JFIF_THUMBNAIL, " with %d x %d thumbnail image") -JMESSAGE(JTRC_MISC_MARKER, "Miscellaneous marker 0x%02x, length %u") -JMESSAGE(JTRC_PARMLESS_MARKER, "Unexpected marker 0x%02x") -JMESSAGE(JTRC_QUANTVALS, " %4u %4u %4u %4u %4u %4u %4u %4u") -JMESSAGE(JTRC_QUANT_3_NCOLORS, "Quantizing to %d = %d*%d*%d colors") -JMESSAGE(JTRC_QUANT_NCOLORS, "Quantizing to %d colors") -JMESSAGE(JTRC_QUANT_SELECTED, "Selected %d colors for quantization") -JMESSAGE(JTRC_RECOVERY_ACTION, "At marker 0x%02x, recovery action %d") -JMESSAGE(JTRC_RST, "RST%d") -JMESSAGE(JTRC_SMOOTH_NOTIMPL, - "Smoothing not supported with nonstandard sampling ratios") -JMESSAGE(JTRC_SOF, "Start Of Frame 0x%02x: width=%u, height=%u, components=%d") -JMESSAGE(JTRC_SOF_COMPONENT, " Component %d: %dhx%dv q=%d") -JMESSAGE(JTRC_SOI, "Start of Image") -JMESSAGE(JTRC_SOS, "Start Of Scan: %d components") -JMESSAGE(JTRC_SOS_COMPONENT, " Component %d: dc=%d ac=%d") -JMESSAGE(JTRC_SOS_PARAMS, " Ss=%d, Se=%d, Ah=%d, Al=%d") -JMESSAGE(JTRC_TFILE_CLOSE, "Closed temporary file %s") -JMESSAGE(JTRC_TFILE_OPEN, "Opened temporary file %s") -JMESSAGE(JTRC_THUMB_JPEG, - "JFIF extension marker: JPEG-compressed thumbnail image, length %u") -JMESSAGE(JTRC_THUMB_PALETTE, - "JFIF extension marker: palette thumbnail image, length %u") -JMESSAGE(JTRC_THUMB_RGB, - "JFIF extension marker: RGB thumbnail image, length %u") -JMESSAGE(JTRC_UNKNOWN_IDS, - "Unrecognized component IDs %d %d %d, assuming YCbCr") -JMESSAGE(JTRC_XMS_CLOSE, "Freed XMS handle %u") -JMESSAGE(JTRC_XMS_OPEN, "Obtained XMS handle %u") -JMESSAGE(JWRN_ADOBE_XFORM, "Unknown Adobe color transform code %d") -JMESSAGE(JWRN_ARITH_BAD_CODE, "Corrupt JPEG data: bad arithmetic code") -JMESSAGE(JWRN_BOGUS_PROGRESSION, - "Inconsistent progression sequence for component %d coefficient %d") -JMESSAGE(JWRN_EXTRANEOUS_DATA, - "Corrupt JPEG data: %u extraneous bytes before marker 0x%02x") -JMESSAGE(JWRN_HIT_MARKER, "Corrupt JPEG data: premature end of data segment") -JMESSAGE(JWRN_HUFF_BAD_CODE, "Corrupt JPEG data: bad Huffman code") -JMESSAGE(JWRN_JFIF_MAJOR, "Warning: unknown JFIF revision number %d.%02d") -JMESSAGE(JWRN_JPEG_EOF, "Premature end of JPEG file") -JMESSAGE(JWRN_MUST_RESYNC, - "Corrupt JPEG data: found marker 0x%02x instead of RST%d") -JMESSAGE(JWRN_NOT_SEQUENTIAL, "Invalid SOS parameters for sequential JPEG") -JMESSAGE(JWRN_TOO_MUCH_DATA, "Application transferred too many scanlines") - -#ifdef JMAKE_ENUM_LIST - - JMSG_LASTMSGCODE -} J_MESSAGE_CODE; - -#undef JMAKE_ENUM_LIST -#endif /* JMAKE_ENUM_LIST */ - -/* Zap JMESSAGE macro so that future re-inclusions do nothing by default */ -#undef JMESSAGE - - -#ifndef JERROR_H -#define JERROR_H - -/* Macros to simplify using the error and trace message stuff */ -/* The first parameter is either type of cinfo pointer */ - -/* Fatal errors (print message and exit) */ -#define ERREXIT(cinfo,code) \ - ((cinfo)->err->msg_code = (code), \ - (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) -#define ERREXIT1(cinfo,code,p1) \ - ((cinfo)->err->msg_code = (code), \ - (cinfo)->err->msg_parm.i[0] = (p1), \ - (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) -#define ERREXIT2(cinfo,code,p1,p2) \ - ((cinfo)->err->msg_code = (code), \ - (cinfo)->err->msg_parm.i[0] = (p1), \ - (cinfo)->err->msg_parm.i[1] = (p2), \ - (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) -#define ERREXIT3(cinfo,code,p1,p2,p3) \ - ((cinfo)->err->msg_code = (code), \ - (cinfo)->err->msg_parm.i[0] = (p1), \ - (cinfo)->err->msg_parm.i[1] = (p2), \ - (cinfo)->err->msg_parm.i[2] = (p3), \ - (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) -#define ERREXIT4(cinfo,code,p1,p2,p3,p4) \ - ((cinfo)->err->msg_code = (code), \ - (cinfo)->err->msg_parm.i[0] = (p1), \ - (cinfo)->err->msg_parm.i[1] = (p2), \ - (cinfo)->err->msg_parm.i[2] = (p3), \ - (cinfo)->err->msg_parm.i[3] = (p4), \ - (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) -#define ERREXIT6(cinfo,code,p1,p2,p3,p4,p5,p6) \ - ((cinfo)->err->msg_code = (code), \ - (cinfo)->err->msg_parm.i[0] = (p1), \ - (cinfo)->err->msg_parm.i[1] = (p2), \ - (cinfo)->err->msg_parm.i[2] = (p3), \ - (cinfo)->err->msg_parm.i[3] = (p4), \ - (cinfo)->err->msg_parm.i[4] = (p5), \ - (cinfo)->err->msg_parm.i[5] = (p6), \ - (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) -#define ERREXITS(cinfo,code,str) \ - ((cinfo)->err->msg_code = (code), \ - strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \ - (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) - -#define MAKESTMT(stuff) do { stuff } while (0) - -/* Nonfatal errors (we can keep going, but the data is probably corrupt) */ -#define WARNMS(cinfo,code) \ - ((cinfo)->err->msg_code = (code), \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) -#define WARNMS1(cinfo,code,p1) \ - ((cinfo)->err->msg_code = (code), \ - (cinfo)->err->msg_parm.i[0] = (p1), \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) -#define WARNMS2(cinfo,code,p1,p2) \ - ((cinfo)->err->msg_code = (code), \ - (cinfo)->err->msg_parm.i[0] = (p1), \ - (cinfo)->err->msg_parm.i[1] = (p2), \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) - -/* Informational/debugging messages */ -#define TRACEMS(cinfo,lvl,code) \ - ((cinfo)->err->msg_code = (code), \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) -#define TRACEMS1(cinfo,lvl,code,p1) \ - ((cinfo)->err->msg_code = (code), \ - (cinfo)->err->msg_parm.i[0] = (p1), \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) -#define TRACEMS2(cinfo,lvl,code,p1,p2) \ - ((cinfo)->err->msg_code = (code), \ - (cinfo)->err->msg_parm.i[0] = (p1), \ - (cinfo)->err->msg_parm.i[1] = (p2), \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) -#define TRACEMS3(cinfo,lvl,code,p1,p2,p3) \ - MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ - _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); \ - (cinfo)->err->msg_code = (code); \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) -#define TRACEMS4(cinfo,lvl,code,p1,p2,p3,p4) \ - MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ - _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ - (cinfo)->err->msg_code = (code); \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) -#define TRACEMS5(cinfo,lvl,code,p1,p2,p3,p4,p5) \ - MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ - _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ - _mp[4] = (p5); \ - (cinfo)->err->msg_code = (code); \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) -#define TRACEMS8(cinfo,lvl,code,p1,p2,p3,p4,p5,p6,p7,p8) \ - MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ - _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ - _mp[4] = (p5); _mp[5] = (p6); _mp[6] = (p7); _mp[7] = (p8); \ - (cinfo)->err->msg_code = (code); \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) -#define TRACEMSS(cinfo,lvl,code,str) \ - ((cinfo)->err->msg_code = (code), \ - strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) - -#endif /* JERROR_H */ diff --git a/misc/builddeps/linux64/jpeg/include/jmorecfg.h b/misc/builddeps/linux64/jpeg/include/jmorecfg.h deleted file mode 100644 index 928d052c..00000000 --- a/misc/builddeps/linux64/jpeg/include/jmorecfg.h +++ /dev/null @@ -1,371 +0,0 @@ -/* - * jmorecfg.h - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * Modified 1997-2009 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains additional configuration options that customize the - * JPEG software for special applications or support machine-dependent - * optimizations. Most users will not need to touch this file. - */ - - -/* - * Define BITS_IN_JSAMPLE as either - * 8 for 8-bit sample values (the usual setting) - * 12 for 12-bit sample values - * Only 8 and 12 are legal data precisions for lossy JPEG according to the - * JPEG standard, and the IJG code does not support anything else! - * We do not support run-time selection of data precision, sorry. - */ - -#define BITS_IN_JSAMPLE 8 /* use 8 or 12 */ - - -/* - * Maximum number of components (color channels) allowed in JPEG image. - * To meet the letter of the JPEG spec, set this to 255. However, darn - * few applications need more than 4 channels (maybe 5 for CMYK + alpha - * mask). We recommend 10 as a reasonable compromise; use 4 if you are - * really short on memory. (Each allowed component costs a hundred or so - * bytes of storage, whether actually used in an image or not.) - */ - -#define MAX_COMPONENTS 10 /* maximum number of image components */ - - -/* - * Basic data types. - * You may need to change these if you have a machine with unusual data - * type sizes; for example, "char" not 8 bits, "short" not 16 bits, - * or "long" not 32 bits. We don't care whether "int" is 16 or 32 bits, - * but it had better be at least 16. - */ - -/* Representation of a single sample (pixel element value). - * We frequently allocate large arrays of these, so it's important to keep - * them small. But if you have memory to burn and access to char or short - * arrays is very slow on your hardware, you might want to change these. - */ - -#if BITS_IN_JSAMPLE == 8 -/* JSAMPLE should be the smallest type that will hold the values 0..255. - * You can use a signed char by having GETJSAMPLE mask it with 0xFF. - */ - -#ifdef HAVE_UNSIGNED_CHAR - -typedef unsigned char JSAMPLE; -#define GETJSAMPLE(value) ((int) (value)) - -#else /* not HAVE_UNSIGNED_CHAR */ - -typedef char JSAMPLE; -#ifdef CHAR_IS_UNSIGNED -#define GETJSAMPLE(value) ((int) (value)) -#else -#define GETJSAMPLE(value) ((int) (value) & 0xFF) -#endif /* CHAR_IS_UNSIGNED */ - -#endif /* HAVE_UNSIGNED_CHAR */ - -#define MAXJSAMPLE 255 -#define CENTERJSAMPLE 128 - -#endif /* BITS_IN_JSAMPLE == 8 */ - - -#if BITS_IN_JSAMPLE == 12 -/* JSAMPLE should be the smallest type that will hold the values 0..4095. - * On nearly all machines "short" will do nicely. - */ - -typedef short JSAMPLE; -#define GETJSAMPLE(value) ((int) (value)) - -#define MAXJSAMPLE 4095 -#define CENTERJSAMPLE 2048 - -#endif /* BITS_IN_JSAMPLE == 12 */ - - -/* Representation of a DCT frequency coefficient. - * This should be a signed value of at least 16 bits; "short" is usually OK. - * Again, we allocate large arrays of these, but you can change to int - * if you have memory to burn and "short" is really slow. - */ - -typedef short JCOEF; - - -/* Compressed datastreams are represented as arrays of JOCTET. - * These must be EXACTLY 8 bits wide, at least once they are written to - * external storage. Note that when using the stdio data source/destination - * managers, this is also the data type passed to fread/fwrite. - */ - -#ifdef HAVE_UNSIGNED_CHAR - -typedef unsigned char JOCTET; -#define GETJOCTET(value) (value) - -#else /* not HAVE_UNSIGNED_CHAR */ - -typedef char JOCTET; -#ifdef CHAR_IS_UNSIGNED -#define GETJOCTET(value) (value) -#else -#define GETJOCTET(value) ((value) & 0xFF) -#endif /* CHAR_IS_UNSIGNED */ - -#endif /* HAVE_UNSIGNED_CHAR */ - - -/* These typedefs are used for various table entries and so forth. - * They must be at least as wide as specified; but making them too big - * won't cost a huge amount of memory, so we don't provide special - * extraction code like we did for JSAMPLE. (In other words, these - * typedefs live at a different point on the speed/space tradeoff curve.) - */ - -/* UINT8 must hold at least the values 0..255. */ - -#ifdef HAVE_UNSIGNED_CHAR -typedef unsigned char UINT8; -#else /* not HAVE_UNSIGNED_CHAR */ -#ifdef CHAR_IS_UNSIGNED -typedef char UINT8; -#else /* not CHAR_IS_UNSIGNED */ -typedef short UINT8; -#endif /* CHAR_IS_UNSIGNED */ -#endif /* HAVE_UNSIGNED_CHAR */ - -/* UINT16 must hold at least the values 0..65535. */ - -#ifdef HAVE_UNSIGNED_SHORT -typedef unsigned short UINT16; -#else /* not HAVE_UNSIGNED_SHORT */ -typedef unsigned int UINT16; -#endif /* HAVE_UNSIGNED_SHORT */ - -/* INT16 must hold at least the values -32768..32767. */ - -#ifndef XMD_H /* X11/xmd.h correctly defines INT16 */ -typedef short INT16; -#endif - -/* INT32 must hold at least signed 32-bit values. */ - -#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */ -#ifndef _BASETSD_H_ /* Microsoft defines it in basetsd.h */ -#ifndef _BASETSD_H /* MinGW is slightly different */ -#ifndef QGLOBAL_H /* Qt defines it in qglobal.h */ -typedef long INT32; -#endif -#endif -#endif -#endif - -/* Datatype used for image dimensions. The JPEG standard only supports - * images up to 64K*64K due to 16-bit fields in SOF markers. Therefore - * "unsigned int" is sufficient on all machines. However, if you need to - * handle larger images and you don't mind deviating from the spec, you - * can change this datatype. - */ - -typedef unsigned int JDIMENSION; - -#define JPEG_MAX_DIMENSION 65500L /* a tad under 64K to prevent overflows */ - - -/* These macros are used in all function definitions and extern declarations. - * You could modify them if you need to change function linkage conventions; - * in particular, you'll need to do that to make the library a Windows DLL. - * Another application is to make all functions global for use with debuggers - * or code profilers that require it. - */ - -/* a function called through method pointers: */ -#define METHODDEF(type) static type -/* a function used only in its module: */ -#define LOCAL(type) static type -/* a function referenced thru EXTERNs: */ -#define GLOBAL(type) type -/* a reference to a GLOBAL function: */ -#define EXTERN(type) extern type - - -/* This macro is used to declare a "method", that is, a function pointer. - * We want to supply prototype parameters if the compiler can cope. - * Note that the arglist parameter must be parenthesized! - * Again, you can customize this if you need special linkage keywords. - */ - -#ifdef HAVE_PROTOTYPES -#define JMETHOD(type,methodname,arglist) type (*methodname) arglist -#else -#define JMETHOD(type,methodname,arglist) type (*methodname) () -#endif - - -/* Here is the pseudo-keyword for declaring pointers that must be "far" - * on 80x86 machines. Most of the specialized coding for 80x86 is handled - * by just saying "FAR *" where such a pointer is needed. In a few places - * explicit coding is needed; see uses of the NEED_FAR_POINTERS symbol. - */ - -#ifndef FAR -#ifdef NEED_FAR_POINTERS -#define FAR far -#else -#define FAR -#endif -#endif - - -/* - * On a few systems, type boolean and/or its values FALSE, TRUE may appear - * in standard header files. Or you may have conflicts with application- - * specific header files that you want to include together with these files. - * Defining HAVE_BOOLEAN before including jpeglib.h should make it work. - */ - -#ifndef HAVE_BOOLEAN -typedef int boolean; -#endif -#ifndef FALSE /* in case these macros already exist */ -#define FALSE 0 /* values of boolean */ -#endif -#ifndef TRUE -#define TRUE 1 -#endif - - -/* - * The remaining options affect code selection within the JPEG library, - * but they don't need to be visible to most applications using the library. - * To minimize application namespace pollution, the symbols won't be - * defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined. - */ - -#ifdef JPEG_INTERNALS -#define JPEG_INTERNAL_OPTIONS -#endif - -#ifdef JPEG_INTERNAL_OPTIONS - - -/* - * These defines indicate whether to include various optional functions. - * Undefining some of these symbols will produce a smaller but less capable - * library. Note that you can leave certain source files out of the - * compilation/linking process if you've #undef'd the corresponding symbols. - * (You may HAVE to do that if your compiler doesn't like null source files.) - */ - -/* Capability options common to encoder and decoder: */ - -#define DCT_ISLOW_SUPPORTED /* slow but accurate integer algorithm */ -#define DCT_IFAST_SUPPORTED /* faster, less accurate integer method */ -#define DCT_FLOAT_SUPPORTED /* floating-point: accurate, fast on fast HW */ - -/* Encoder capability options: */ - -#define C_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */ -#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ -#define C_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/ -#define DCT_SCALING_SUPPORTED /* Input rescaling via DCT? (Requires DCT_ISLOW)*/ -#define ENTROPY_OPT_SUPPORTED /* Optimization of entropy coding parms? */ -/* Note: if you selected 12-bit data precision, it is dangerous to turn off - * ENTROPY_OPT_SUPPORTED. The standard Huffman tables are only good for 8-bit - * precision, so jchuff.c normally uses entropy optimization to compute - * usable tables for higher precision. If you don't want to do optimization, - * you'll have to supply different default Huffman tables. - * The exact same statements apply for progressive JPEG: the default tables - * don't work for progressive mode. (This may get fixed, however.) - */ -#define INPUT_SMOOTHING_SUPPORTED /* Input image smoothing option? */ - -/* Decoder capability options: */ - -#define D_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */ -#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ -#define D_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/ -#define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? */ -#define SAVE_MARKERS_SUPPORTED /* jpeg_save_markers() needed? */ -#define BLOCK_SMOOTHING_SUPPORTED /* Block smoothing? (Progressive only) */ -#undef UPSAMPLE_SCALING_SUPPORTED /* Output rescaling at upsample stage? */ -#define UPSAMPLE_MERGING_SUPPORTED /* Fast path for sloppy upsampling? */ -#define QUANT_1PASS_SUPPORTED /* 1-pass color quantization? */ -#define QUANT_2PASS_SUPPORTED /* 2-pass color quantization? */ - -/* more capability options later, no doubt */ - - -/* - * Ordering of RGB data in scanlines passed to or from the application. - * If your application wants to deal with data in the order B,G,R, just - * change these macros. You can also deal with formats such as R,G,B,X - * (one extra byte per pixel) by changing RGB_PIXELSIZE. Note that changing - * the offsets will also change the order in which colormap data is organized. - * RESTRICTIONS: - * 1. The sample applications cjpeg,djpeg do NOT support modified RGB formats. - * 2. These macros only affect RGB<=>YCbCr color conversion, so they are not - * useful if you are using JPEG color spaces other than YCbCr or grayscale. - * 3. The color quantizer modules will not behave desirably if RGB_PIXELSIZE - * is not 3 (they don't understand about dummy color components!). So you - * can't use color quantization if you change that value. - */ - -#define RGB_RED 0 /* Offset of Red in an RGB scanline element */ -#define RGB_GREEN 1 /* Offset of Green */ -#define RGB_BLUE 2 /* Offset of Blue */ -#define RGB_PIXELSIZE 3 /* JSAMPLEs per RGB scanline element */ - - -/* Definitions for speed-related optimizations. */ - - -/* If your compiler supports inline functions, define INLINE - * as the inline keyword; otherwise define it as empty. - */ - -#ifndef INLINE -#ifdef __GNUC__ /* for instance, GNU C knows about inline */ -#define INLINE __inline__ -#endif -#ifndef INLINE -#define INLINE /* default is to define it as empty */ -#endif -#endif - - -/* On some machines (notably 68000 series) "int" is 32 bits, but multiplying - * two 16-bit shorts is faster than multiplying two ints. Define MULTIPLIER - * as short on such a machine. MULTIPLIER must be at least 16 bits wide. - */ - -#ifndef MULTIPLIER -#define MULTIPLIER int /* type for fastest integer multiply */ -#endif - - -/* FAST_FLOAT should be either float or double, whichever is done faster - * by your compiler. (Note that this type is only used in the floating point - * DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.) - * Typically, float is faster in ANSI C compilers, while double is faster in - * pre-ANSI compilers (because they insist on converting to double anyway). - * The code below therefore chooses float if we have ANSI-style prototypes. - */ - -#ifndef FAST_FLOAT -#ifdef HAVE_PROTOTYPES -#define FAST_FLOAT float -#else -#define FAST_FLOAT double -#endif -#endif - -#endif /* JPEG_INTERNAL_OPTIONS */ diff --git a/misc/builddeps/linux64/jpeg/include/jpeglib.h b/misc/builddeps/linux64/jpeg/include/jpeglib.h deleted file mode 100644 index 5039d4bf..00000000 --- a/misc/builddeps/linux64/jpeg/include/jpeglib.h +++ /dev/null @@ -1,1158 +0,0 @@ -/* - * jpeglib.h - * - * Copyright (C) 1991-1998, Thomas G. Lane. - * Modified 2002-2009 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file defines the application interface for the JPEG library. - * Most applications using the library need only include this file, - * and perhaps jerror.h if they want to know the exact error codes. - */ - -#ifndef JPEGLIB_H -#define JPEGLIB_H - -/* - * First we include the configuration files that record how this - * installation of the JPEG library is set up. jconfig.h can be - * generated automatically for many systems. jmorecfg.h contains - * manual configuration options that most people need not worry about. - */ - -#ifndef JCONFIG_INCLUDED /* in case jinclude.h already did */ -#include "jconfig.h" /* widely used configuration options */ -#endif -#include "jmorecfg.h" /* seldom changed options */ - - -#ifdef __cplusplus -#ifndef DONT_USE_EXTERN_C -extern "C" { -#endif -#endif - -/* Version ID for the JPEG library. - * Might be useful for tests like "#if JPEG_LIB_VERSION >= 80". - */ - -#define JPEG_LIB_VERSION 80 /* Version 8.0 */ - - -/* Various constants determining the sizes of things. - * All of these are specified by the JPEG standard, so don't change them - * if you want to be compatible. - */ - -#define DCTSIZE 8 /* The basic DCT block is 8x8 samples */ -#define DCTSIZE2 64 /* DCTSIZE squared; # of elements in a block */ -#define NUM_QUANT_TBLS 4 /* Quantization tables are numbered 0..3 */ -#define NUM_HUFF_TBLS 4 /* Huffman tables are numbered 0..3 */ -#define NUM_ARITH_TBLS 16 /* Arith-coding tables are numbered 0..15 */ -#define MAX_COMPS_IN_SCAN 4 /* JPEG limit on # of components in one scan */ -#define MAX_SAMP_FACTOR 4 /* JPEG limit on sampling factors */ -/* Unfortunately, some bozo at Adobe saw no reason to be bound by the standard; - * the PostScript DCT filter can emit files with many more than 10 blocks/MCU. - * If you happen to run across such a file, you can up D_MAX_BLOCKS_IN_MCU - * to handle it. We even let you do this from the jconfig.h file. However, - * we strongly discourage changing C_MAX_BLOCKS_IN_MCU; just because Adobe - * sometimes emits noncompliant files doesn't mean you should too. - */ -#define C_MAX_BLOCKS_IN_MCU 10 /* compressor's limit on blocks per MCU */ -#ifndef D_MAX_BLOCKS_IN_MCU -#define D_MAX_BLOCKS_IN_MCU 10 /* decompressor's limit on blocks per MCU */ -#endif - - -/* Data structures for images (arrays of samples and of DCT coefficients). - * On 80x86 machines, the image arrays are too big for near pointers, - * but the pointer arrays can fit in near memory. - */ - -typedef JSAMPLE FAR *JSAMPROW; /* ptr to one image row of pixel samples. */ -typedef JSAMPROW *JSAMPARRAY; /* ptr to some rows (a 2-D sample array) */ -typedef JSAMPARRAY *JSAMPIMAGE; /* a 3-D sample array: top index is color */ - -typedef JCOEF JBLOCK[DCTSIZE2]; /* one block of coefficients */ -typedef JBLOCK FAR *JBLOCKROW; /* pointer to one row of coefficient blocks */ -typedef JBLOCKROW *JBLOCKARRAY; /* a 2-D array of coefficient blocks */ -typedef JBLOCKARRAY *JBLOCKIMAGE; /* a 3-D array of coefficient blocks */ - -typedef JCOEF FAR *JCOEFPTR; /* useful in a couple of places */ - - -/* Types for JPEG compression parameters and working tables. */ - - -/* DCT coefficient quantization tables. */ - -typedef struct { - /* This array gives the coefficient quantizers in natural array order - * (not the zigzag order in which they are stored in a JPEG DQT marker). - * CAUTION: IJG versions prior to v6a kept this array in zigzag order. - */ - UINT16 quantval[DCTSIZE2]; /* quantization step for each coefficient */ - /* This field is used only during compression. It's initialized FALSE when - * the table is created, and set TRUE when it's been output to the file. - * You could suppress output of a table by setting this to TRUE. - * (See jpeg_suppress_tables for an example.) - */ - boolean sent_table; /* TRUE when table has been output */ -} JQUANT_TBL; - - -/* Huffman coding tables. */ - -typedef struct { - /* These two fields directly represent the contents of a JPEG DHT marker */ - UINT8 bits[17]; /* bits[k] = # of symbols with codes of */ - /* length k bits; bits[0] is unused */ - UINT8 huffval[256]; /* The symbols, in order of incr code length */ - /* This field is used only during compression. It's initialized FALSE when - * the table is created, and set TRUE when it's been output to the file. - * You could suppress output of a table by setting this to TRUE. - * (See jpeg_suppress_tables for an example.) - */ - boolean sent_table; /* TRUE when table has been output */ -} JHUFF_TBL; - - -/* Basic info about one component (color channel). */ - -typedef struct { - /* These values are fixed over the whole image. */ - /* For compression, they must be supplied by parameter setup; */ - /* for decompression, they are read from the SOF marker. */ - int component_id; /* identifier for this component (0..255) */ - int component_index; /* its index in SOF or cinfo->comp_info[] */ - int h_samp_factor; /* horizontal sampling factor (1..4) */ - int v_samp_factor; /* vertical sampling factor (1..4) */ - int quant_tbl_no; /* quantization table selector (0..3) */ - /* These values may vary between scans. */ - /* For compression, they must be supplied by parameter setup; */ - /* for decompression, they are read from the SOS marker. */ - /* The decompressor output side may not use these variables. */ - int dc_tbl_no; /* DC entropy table selector (0..3) */ - int ac_tbl_no; /* AC entropy table selector (0..3) */ - - /* Remaining fields should be treated as private by applications. */ - - /* These values are computed during compression or decompression startup: */ - /* Component's size in DCT blocks. - * Any dummy blocks added to complete an MCU are not counted; therefore - * these values do not depend on whether a scan is interleaved or not. - */ - JDIMENSION width_in_blocks; - JDIMENSION height_in_blocks; - /* Size of a DCT block in samples, - * reflecting any scaling we choose to apply during the DCT step. - * Values from 1 to 16 are supported. - * Note that different components may receive different DCT scalings. - */ - int DCT_h_scaled_size; - int DCT_v_scaled_size; - /* The downsampled dimensions are the component's actual, unpadded number - * of samples at the main buffer (preprocessing/compression interface); - * DCT scaling is included, so - * downsampled_width = ceil(image_width * Hi/Hmax * DCT_h_scaled_size/DCTSIZE) - * and similarly for height. - */ - JDIMENSION downsampled_width; /* actual width in samples */ - JDIMENSION downsampled_height; /* actual height in samples */ - /* This flag is used only for decompression. In cases where some of the - * components will be ignored (eg grayscale output from YCbCr image), - * we can skip most computations for the unused components. - */ - boolean component_needed; /* do we need the value of this component? */ - - /* These values are computed before starting a scan of the component. */ - /* The decompressor output side may not use these variables. */ - int MCU_width; /* number of blocks per MCU, horizontally */ - int MCU_height; /* number of blocks per MCU, vertically */ - int MCU_blocks; /* MCU_width * MCU_height */ - int MCU_sample_width; /* MCU width in samples: MCU_width * DCT_h_scaled_size */ - int last_col_width; /* # of non-dummy blocks across in last MCU */ - int last_row_height; /* # of non-dummy blocks down in last MCU */ - - /* Saved quantization table for component; NULL if none yet saved. - * See jdinput.c comments about the need for this information. - * This field is currently used only for decompression. - */ - JQUANT_TBL * quant_table; - - /* Private per-component storage for DCT or IDCT subsystem. */ - void * dct_table; -} jpeg_component_info; - - -/* The script for encoding a multiple-scan file is an array of these: */ - -typedef struct { - int comps_in_scan; /* number of components encoded in this scan */ - int component_index[MAX_COMPS_IN_SCAN]; /* their SOF/comp_info[] indexes */ - int Ss, Se; /* progressive JPEG spectral selection parms */ - int Ah, Al; /* progressive JPEG successive approx. parms */ -} jpeg_scan_info; - -/* The decompressor can save APPn and COM markers in a list of these: */ - -typedef struct jpeg_marker_struct FAR * jpeg_saved_marker_ptr; - -struct jpeg_marker_struct { - jpeg_saved_marker_ptr next; /* next in list, or NULL */ - UINT8 marker; /* marker code: JPEG_COM, or JPEG_APP0+n */ - unsigned int original_length; /* # bytes of data in the file */ - unsigned int data_length; /* # bytes of data saved at data[] */ - JOCTET FAR * data; /* the data contained in the marker */ - /* the marker length word is not counted in data_length or original_length */ -}; - -/* Known color spaces. */ - -typedef enum { - JCS_UNKNOWN, /* error/unspecified */ - JCS_GRAYSCALE, /* monochrome */ - JCS_RGB, /* red/green/blue */ - JCS_YCbCr, /* Y/Cb/Cr (also known as YUV) */ - JCS_CMYK, /* C/M/Y/K */ - JCS_YCCK /* Y/Cb/Cr/K */ -} J_COLOR_SPACE; - -/* DCT/IDCT algorithm options. */ - -typedef enum { - JDCT_ISLOW, /* slow but accurate integer algorithm */ - JDCT_IFAST, /* faster, less accurate integer method */ - JDCT_FLOAT /* floating-point: accurate, fast on fast HW */ -} J_DCT_METHOD; - -#ifndef JDCT_DEFAULT /* may be overridden in jconfig.h */ -#define JDCT_DEFAULT JDCT_ISLOW -#endif -#ifndef JDCT_FASTEST /* may be overridden in jconfig.h */ -#define JDCT_FASTEST JDCT_IFAST -#endif - -/* Dithering options for decompression. */ - -typedef enum { - JDITHER_NONE, /* no dithering */ - JDITHER_ORDERED, /* simple ordered dither */ - JDITHER_FS /* Floyd-Steinberg error diffusion dither */ -} J_DITHER_MODE; - - -/* Common fields between JPEG compression and decompression master structs. */ - -#define jpeg_common_fields \ - struct jpeg_error_mgr * err; /* Error handler module */\ - struct jpeg_memory_mgr * mem; /* Memory manager module */\ - struct jpeg_progress_mgr * progress; /* Progress monitor, or NULL if none */\ - void * client_data; /* Available for use by application */\ - boolean is_decompressor; /* So common code can tell which is which */\ - int global_state /* For checking call sequence validity */ - -/* Routines that are to be used by both halves of the library are declared - * to receive a pointer to this structure. There are no actual instances of - * jpeg_common_struct, only of jpeg_compress_struct and jpeg_decompress_struct. - */ -struct jpeg_common_struct { - jpeg_common_fields; /* Fields common to both master struct types */ - /* Additional fields follow in an actual jpeg_compress_struct or - * jpeg_decompress_struct. All three structs must agree on these - * initial fields! (This would be a lot cleaner in C++.) - */ -}; - -typedef struct jpeg_common_struct * j_common_ptr; -typedef struct jpeg_compress_struct * j_compress_ptr; -typedef struct jpeg_decompress_struct * j_decompress_ptr; - - -/* Master record for a compression instance */ - -struct jpeg_compress_struct { - jpeg_common_fields; /* Fields shared with jpeg_decompress_struct */ - - /* Destination for compressed data */ - struct jpeg_destination_mgr * dest; - - /* Description of source image --- these fields must be filled in by - * outer application before starting compression. in_color_space must - * be correct before you can even call jpeg_set_defaults(). - */ - - JDIMENSION image_width; /* input image width */ - JDIMENSION image_height; /* input image height */ - int input_components; /* # of color components in input image */ - J_COLOR_SPACE in_color_space; /* colorspace of input image */ - - double input_gamma; /* image gamma of input image */ - - /* Compression parameters --- these fields must be set before calling - * jpeg_start_compress(). We recommend calling jpeg_set_defaults() to - * initialize everything to reasonable defaults, then changing anything - * the application specifically wants to change. That way you won't get - * burnt when new parameters are added. Also note that there are several - * helper routines to simplify changing parameters. - */ - - unsigned int scale_num, scale_denom; /* fraction by which to scale image */ - - JDIMENSION jpeg_width; /* scaled JPEG image width */ - JDIMENSION jpeg_height; /* scaled JPEG image height */ - /* Dimensions of actual JPEG image that will be written to file, - * derived from input dimensions by scaling factors above. - * These fields are computed by jpeg_start_compress(). - * You can also use jpeg_calc_jpeg_dimensions() to determine these values - * in advance of calling jpeg_start_compress(). - */ - - int data_precision; /* bits of precision in image data */ - - int num_components; /* # of color components in JPEG image */ - J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */ - - jpeg_component_info * comp_info; - /* comp_info[i] describes component that appears i'th in SOF */ - - JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS]; - int q_scale_factor[NUM_QUANT_TBLS]; - /* ptrs to coefficient quantization tables, or NULL if not defined, - * and corresponding scale factors (percentage, initialized 100). - */ - - JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS]; - JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS]; - /* ptrs to Huffman coding tables, or NULL if not defined */ - - UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */ - UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */ - UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */ - - int num_scans; /* # of entries in scan_info array */ - const jpeg_scan_info * scan_info; /* script for multi-scan file, or NULL */ - /* The default value of scan_info is NULL, which causes a single-scan - * sequential JPEG file to be emitted. To create a multi-scan file, - * set num_scans and scan_info to point to an array of scan definitions. - */ - - boolean raw_data_in; /* TRUE=caller supplies downsampled data */ - boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */ - boolean optimize_coding; /* TRUE=optimize entropy encoding parms */ - boolean CCIR601_sampling; /* TRUE=first samples are cosited */ - boolean do_fancy_downsampling; /* TRUE=apply fancy downsampling */ - int smoothing_factor; /* 1..100, or 0 for no input smoothing */ - J_DCT_METHOD dct_method; /* DCT algorithm selector */ - - /* The restart interval can be specified in absolute MCUs by setting - * restart_interval, or in MCU rows by setting restart_in_rows - * (in which case the correct restart_interval will be figured - * for each scan). - */ - unsigned int restart_interval; /* MCUs per restart, or 0 for no restart */ - int restart_in_rows; /* if > 0, MCU rows per restart interval */ - - /* Parameters controlling emission of special markers. */ - - boolean write_JFIF_header; /* should a JFIF marker be written? */ - UINT8 JFIF_major_version; /* What to write for the JFIF version number */ - UINT8 JFIF_minor_version; - /* These three values are not used by the JPEG code, merely copied */ - /* into the JFIF APP0 marker. density_unit can be 0 for unknown, */ - /* 1 for dots/inch, or 2 for dots/cm. Note that the pixel aspect */ - /* ratio is defined by X_density/Y_density even when density_unit=0. */ - UINT8 density_unit; /* JFIF code for pixel size units */ - UINT16 X_density; /* Horizontal pixel density */ - UINT16 Y_density; /* Vertical pixel density */ - boolean write_Adobe_marker; /* should an Adobe marker be written? */ - - /* State variable: index of next scanline to be written to - * jpeg_write_scanlines(). Application may use this to control its - * processing loop, e.g., "while (next_scanline < image_height)". - */ - - JDIMENSION next_scanline; /* 0 .. image_height-1 */ - - /* Remaining fields are known throughout compressor, but generally - * should not be touched by a surrounding application. - */ - - /* - * These fields are computed during compression startup - */ - boolean progressive_mode; /* TRUE if scan script uses progressive mode */ - int max_h_samp_factor; /* largest h_samp_factor */ - int max_v_samp_factor; /* largest v_samp_factor */ - - int min_DCT_h_scaled_size; /* smallest DCT_h_scaled_size of any component */ - int min_DCT_v_scaled_size; /* smallest DCT_v_scaled_size of any component */ - - JDIMENSION total_iMCU_rows; /* # of iMCU rows to be input to coef ctlr */ - /* The coefficient controller receives data in units of MCU rows as defined - * for fully interleaved scans (whether the JPEG file is interleaved or not). - * There are v_samp_factor * DCTSIZE sample rows of each component in an - * "iMCU" (interleaved MCU) row. - */ - - /* - * These fields are valid during any one scan. - * They describe the components and MCUs actually appearing in the scan. - */ - int comps_in_scan; /* # of JPEG components in this scan */ - jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN]; - /* *cur_comp_info[i] describes component that appears i'th in SOS */ - - JDIMENSION MCUs_per_row; /* # of MCUs across the image */ - JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */ - - int blocks_in_MCU; /* # of DCT blocks per MCU */ - int MCU_membership[C_MAX_BLOCKS_IN_MCU]; - /* MCU_membership[i] is index in cur_comp_info of component owning */ - /* i'th block in an MCU */ - - int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */ - - int block_size; /* the basic DCT block size: 1..16 */ - const int * natural_order; /* natural-order position array */ - int lim_Se; /* min( Se, DCTSIZE2-1 ) */ - - /* - * Links to compression subobjects (methods and private variables of modules) - */ - struct jpeg_comp_master * master; - struct jpeg_c_main_controller * main; - struct jpeg_c_prep_controller * prep; - struct jpeg_c_coef_controller * coef; - struct jpeg_marker_writer * marker; - struct jpeg_color_converter * cconvert; - struct jpeg_downsampler * downsample; - struct jpeg_forward_dct * fdct; - struct jpeg_entropy_encoder * entropy; - jpeg_scan_info * script_space; /* workspace for jpeg_simple_progression */ - int script_space_size; -}; - - -/* Master record for a decompression instance */ - -struct jpeg_decompress_struct { - jpeg_common_fields; /* Fields shared with jpeg_compress_struct */ - - /* Source of compressed data */ - struct jpeg_source_mgr * src; - - /* Basic description of image --- filled in by jpeg_read_header(). */ - /* Application may inspect these values to decide how to process image. */ - - JDIMENSION image_width; /* nominal image width (from SOF marker) */ - JDIMENSION image_height; /* nominal image height */ - int num_components; /* # of color components in JPEG image */ - J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */ - - /* Decompression processing parameters --- these fields must be set before - * calling jpeg_start_decompress(). Note that jpeg_read_header() initializes - * them to default values. - */ - - J_COLOR_SPACE out_color_space; /* colorspace for output */ - - unsigned int scale_num, scale_denom; /* fraction by which to scale image */ - - double output_gamma; /* image gamma wanted in output */ - - boolean buffered_image; /* TRUE=multiple output passes */ - boolean raw_data_out; /* TRUE=downsampled data wanted */ - - J_DCT_METHOD dct_method; /* IDCT algorithm selector */ - boolean do_fancy_upsampling; /* TRUE=apply fancy upsampling */ - boolean do_block_smoothing; /* TRUE=apply interblock smoothing */ - - boolean quantize_colors; /* TRUE=colormapped output wanted */ - /* the following are ignored if not quantize_colors: */ - J_DITHER_MODE dither_mode; /* type of color dithering to use */ - boolean two_pass_quantize; /* TRUE=use two-pass color quantization */ - int desired_number_of_colors; /* max # colors to use in created colormap */ - /* these are significant only in buffered-image mode: */ - boolean enable_1pass_quant; /* enable future use of 1-pass quantizer */ - boolean enable_external_quant;/* enable future use of external colormap */ - boolean enable_2pass_quant; /* enable future use of 2-pass quantizer */ - - /* Description of actual output image that will be returned to application. - * These fields are computed by jpeg_start_decompress(). - * You can also use jpeg_calc_output_dimensions() to determine these values - * in advance of calling jpeg_start_decompress(). - */ - - JDIMENSION output_width; /* scaled image width */ - JDIMENSION output_height; /* scaled image height */ - int out_color_components; /* # of color components in out_color_space */ - int output_components; /* # of color components returned */ - /* output_components is 1 (a colormap index) when quantizing colors; - * otherwise it equals out_color_components. - */ - int rec_outbuf_height; /* min recommended height of scanline buffer */ - /* If the buffer passed to jpeg_read_scanlines() is less than this many rows - * high, space and time will be wasted due to unnecessary data copying. - * Usually rec_outbuf_height will be 1 or 2, at most 4. - */ - - /* When quantizing colors, the output colormap is described by these fields. - * The application can supply a colormap by setting colormap non-NULL before - * calling jpeg_start_decompress; otherwise a colormap is created during - * jpeg_start_decompress or jpeg_start_output. - * The map has out_color_components rows and actual_number_of_colors columns. - */ - int actual_number_of_colors; /* number of entries in use */ - JSAMPARRAY colormap; /* The color map as a 2-D pixel array */ - - /* State variables: these variables indicate the progress of decompression. - * The application may examine these but must not modify them. - */ - - /* Row index of next scanline to be read from jpeg_read_scanlines(). - * Application may use this to control its processing loop, e.g., - * "while (output_scanline < output_height)". - */ - JDIMENSION output_scanline; /* 0 .. output_height-1 */ - - /* Current input scan number and number of iMCU rows completed in scan. - * These indicate the progress of the decompressor input side. - */ - int input_scan_number; /* Number of SOS markers seen so far */ - JDIMENSION input_iMCU_row; /* Number of iMCU rows completed */ - - /* The "output scan number" is the notional scan being displayed by the - * output side. The decompressor will not allow output scan/row number - * to get ahead of input scan/row, but it can fall arbitrarily far behind. - */ - int output_scan_number; /* Nominal scan number being displayed */ - JDIMENSION output_iMCU_row; /* Number of iMCU rows read */ - - /* Current progression status. coef_bits[c][i] indicates the precision - * with which component c's DCT coefficient i (in zigzag order) is known. - * It is -1 when no data has yet been received, otherwise it is the point - * transform (shift) value for the most recent scan of the coefficient - * (thus, 0 at completion of the progression). - * This pointer is NULL when reading a non-progressive file. - */ - int (*coef_bits)[DCTSIZE2]; /* -1 or current Al value for each coef */ - - /* Internal JPEG parameters --- the application usually need not look at - * these fields. Note that the decompressor output side may not use - * any parameters that can change between scans. - */ - - /* Quantization and Huffman tables are carried forward across input - * datastreams when processing abbreviated JPEG datastreams. - */ - - JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS]; - /* ptrs to coefficient quantization tables, or NULL if not defined */ - - JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS]; - JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS]; - /* ptrs to Huffman coding tables, or NULL if not defined */ - - /* These parameters are never carried across datastreams, since they - * are given in SOF/SOS markers or defined to be reset by SOI. - */ - - int data_precision; /* bits of precision in image data */ - - jpeg_component_info * comp_info; - /* comp_info[i] describes component that appears i'th in SOF */ - - boolean is_baseline; /* TRUE if Baseline SOF0 encountered */ - boolean progressive_mode; /* TRUE if SOFn specifies progressive mode */ - boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */ - - UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */ - UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */ - UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */ - - unsigned int restart_interval; /* MCUs per restart interval, or 0 for no restart */ - - /* These fields record data obtained from optional markers recognized by - * the JPEG library. - */ - boolean saw_JFIF_marker; /* TRUE iff a JFIF APP0 marker was found */ - /* Data copied from JFIF marker; only valid if saw_JFIF_marker is TRUE: */ - UINT8 JFIF_major_version; /* JFIF version number */ - UINT8 JFIF_minor_version; - UINT8 density_unit; /* JFIF code for pixel size units */ - UINT16 X_density; /* Horizontal pixel density */ - UINT16 Y_density; /* Vertical pixel density */ - boolean saw_Adobe_marker; /* TRUE iff an Adobe APP14 marker was found */ - UINT8 Adobe_transform; /* Color transform code from Adobe marker */ - - boolean CCIR601_sampling; /* TRUE=first samples are cosited */ - - /* Aside from the specific data retained from APPn markers known to the - * library, the uninterpreted contents of any or all APPn and COM markers - * can be saved in a list for examination by the application. - */ - jpeg_saved_marker_ptr marker_list; /* Head of list of saved markers */ - - /* Remaining fields are known throughout decompressor, but generally - * should not be touched by a surrounding application. - */ - - /* - * These fields are computed during decompression startup - */ - int max_h_samp_factor; /* largest h_samp_factor */ - int max_v_samp_factor; /* largest v_samp_factor */ - - int min_DCT_h_scaled_size; /* smallest DCT_h_scaled_size of any component */ - int min_DCT_v_scaled_size; /* smallest DCT_v_scaled_size of any component */ - - JDIMENSION total_iMCU_rows; /* # of iMCU rows in image */ - /* The coefficient controller's input and output progress is measured in - * units of "iMCU" (interleaved MCU) rows. These are the same as MCU rows - * in fully interleaved JPEG scans, but are used whether the scan is - * interleaved or not. We define an iMCU row as v_samp_factor DCT block - * rows of each component. Therefore, the IDCT output contains - * v_samp_factor*DCT_v_scaled_size sample rows of a component per iMCU row. - */ - - JSAMPLE * sample_range_limit; /* table for fast range-limiting */ - - /* - * These fields are valid during any one scan. - * They describe the components and MCUs actually appearing in the scan. - * Note that the decompressor output side must not use these fields. - */ - int comps_in_scan; /* # of JPEG components in this scan */ - jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN]; - /* *cur_comp_info[i] describes component that appears i'th in SOS */ - - JDIMENSION MCUs_per_row; /* # of MCUs across the image */ - JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */ - - int blocks_in_MCU; /* # of DCT blocks per MCU */ - int MCU_membership[D_MAX_BLOCKS_IN_MCU]; - /* MCU_membership[i] is index in cur_comp_info of component owning */ - /* i'th block in an MCU */ - - int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */ - - /* These fields are derived from Se of first SOS marker. - */ - int block_size; /* the basic DCT block size: 1..16 */ - const int * natural_order; /* natural-order position array for entropy decode */ - int lim_Se; /* min( Se, DCTSIZE2-1 ) for entropy decode */ - - /* This field is shared between entropy decoder and marker parser. - * It is either zero or the code of a JPEG marker that has been - * read from the data source, but has not yet been processed. - */ - int unread_marker; - - /* - * Links to decompression subobjects (methods, private variables of modules) - */ - struct jpeg_decomp_master * master; - struct jpeg_d_main_controller * main; - struct jpeg_d_coef_controller * coef; - struct jpeg_d_post_controller * post; - struct jpeg_input_controller * inputctl; - struct jpeg_marker_reader * marker; - struct jpeg_entropy_decoder * entropy; - struct jpeg_inverse_dct * idct; - struct jpeg_upsampler * upsample; - struct jpeg_color_deconverter * cconvert; - struct jpeg_color_quantizer * cquantize; -}; - - -/* "Object" declarations for JPEG modules that may be supplied or called - * directly by the surrounding application. - * As with all objects in the JPEG library, these structs only define the - * publicly visible methods and state variables of a module. Additional - * private fields may exist after the public ones. - */ - - -/* Error handler object */ - -struct jpeg_error_mgr { - /* Error exit handler: does not return to caller */ - JMETHOD(void, error_exit, (j_common_ptr cinfo)); - /* Conditionally emit a trace or warning message */ - JMETHOD(void, emit_message, (j_common_ptr cinfo, int msg_level)); - /* Routine that actually outputs a trace or error message */ - JMETHOD(void, output_message, (j_common_ptr cinfo)); - /* Format a message string for the most recent JPEG error or message */ - JMETHOD(void, format_message, (j_common_ptr cinfo, char * buffer)); -#define JMSG_LENGTH_MAX 200 /* recommended size of format_message buffer */ - /* Reset error state variables at start of a new image */ - JMETHOD(void, reset_error_mgr, (j_common_ptr cinfo)); - - /* The message ID code and any parameters are saved here. - * A message can have one string parameter or up to 8 int parameters. - */ - int msg_code; -#define JMSG_STR_PARM_MAX 80 - union { - int i[8]; - char s[JMSG_STR_PARM_MAX]; - } msg_parm; - - /* Standard state variables for error facility */ - - int trace_level; /* max msg_level that will be displayed */ - - /* For recoverable corrupt-data errors, we emit a warning message, - * but keep going unless emit_message chooses to abort. emit_message - * should count warnings in num_warnings. The surrounding application - * can check for bad data by seeing if num_warnings is nonzero at the - * end of processing. - */ - long num_warnings; /* number of corrupt-data warnings */ - - /* These fields point to the table(s) of error message strings. - * An application can change the table pointer to switch to a different - * message list (typically, to change the language in which errors are - * reported). Some applications may wish to add additional error codes - * that will be handled by the JPEG library error mechanism; the second - * table pointer is used for this purpose. - * - * First table includes all errors generated by JPEG library itself. - * Error code 0 is reserved for a "no such error string" message. - */ - const char * const * jpeg_message_table; /* Library errors */ - int last_jpeg_message; /* Table contains strings 0..last_jpeg_message */ - /* Second table can be added by application (see cjpeg/djpeg for example). - * It contains strings numbered first_addon_message..last_addon_message. - */ - const char * const * addon_message_table; /* Non-library errors */ - int first_addon_message; /* code for first string in addon table */ - int last_addon_message; /* code for last string in addon table */ -}; - - -/* Progress monitor object */ - -struct jpeg_progress_mgr { - JMETHOD(void, progress_monitor, (j_common_ptr cinfo)); - - long pass_counter; /* work units completed in this pass */ - long pass_limit; /* total number of work units in this pass */ - int completed_passes; /* passes completed so far */ - int total_passes; /* total number of passes expected */ -}; - - -/* Data destination object for compression */ - -struct jpeg_destination_mgr { - JOCTET * next_output_byte; /* => next byte to write in buffer */ - size_t free_in_buffer; /* # of byte spaces remaining in buffer */ - - JMETHOD(void, init_destination, (j_compress_ptr cinfo)); - JMETHOD(boolean, empty_output_buffer, (j_compress_ptr cinfo)); - JMETHOD(void, term_destination, (j_compress_ptr cinfo)); -}; - - -/* Data source object for decompression */ - -struct jpeg_source_mgr { - const JOCTET * next_input_byte; /* => next byte to read from buffer */ - size_t bytes_in_buffer; /* # of bytes remaining in buffer */ - - JMETHOD(void, init_source, (j_decompress_ptr cinfo)); - JMETHOD(boolean, fill_input_buffer, (j_decompress_ptr cinfo)); - JMETHOD(void, skip_input_data, (j_decompress_ptr cinfo, long num_bytes)); - JMETHOD(boolean, resync_to_restart, (j_decompress_ptr cinfo, int desired)); - JMETHOD(void, term_source, (j_decompress_ptr cinfo)); -}; - - -/* Memory manager object. - * Allocates "small" objects (a few K total), "large" objects (tens of K), - * and "really big" objects (virtual arrays with backing store if needed). - * The memory manager does not allow individual objects to be freed; rather, - * each created object is assigned to a pool, and whole pools can be freed - * at once. This is faster and more convenient than remembering exactly what - * to free, especially where malloc()/free() are not too speedy. - * NB: alloc routines never return NULL. They exit to error_exit if not - * successful. - */ - -#define JPOOL_PERMANENT 0 /* lasts until master record is destroyed */ -#define JPOOL_IMAGE 1 /* lasts until done with image/datastream */ -#define JPOOL_NUMPOOLS 2 - -typedef struct jvirt_sarray_control * jvirt_sarray_ptr; -typedef struct jvirt_barray_control * jvirt_barray_ptr; - - -struct jpeg_memory_mgr { - /* Method pointers */ - JMETHOD(void *, alloc_small, (j_common_ptr cinfo, int pool_id, - size_t sizeofobject)); - JMETHOD(void FAR *, alloc_large, (j_common_ptr cinfo, int pool_id, - size_t sizeofobject)); - JMETHOD(JSAMPARRAY, alloc_sarray, (j_common_ptr cinfo, int pool_id, - JDIMENSION samplesperrow, - JDIMENSION numrows)); - JMETHOD(JBLOCKARRAY, alloc_barray, (j_common_ptr cinfo, int pool_id, - JDIMENSION blocksperrow, - JDIMENSION numrows)); - JMETHOD(jvirt_sarray_ptr, request_virt_sarray, (j_common_ptr cinfo, - int pool_id, - boolean pre_zero, - JDIMENSION samplesperrow, - JDIMENSION numrows, - JDIMENSION maxaccess)); - JMETHOD(jvirt_barray_ptr, request_virt_barray, (j_common_ptr cinfo, - int pool_id, - boolean pre_zero, - JDIMENSION blocksperrow, - JDIMENSION numrows, - JDIMENSION maxaccess)); - JMETHOD(void, realize_virt_arrays, (j_common_ptr cinfo)); - JMETHOD(JSAMPARRAY, access_virt_sarray, (j_common_ptr cinfo, - jvirt_sarray_ptr ptr, - JDIMENSION start_row, - JDIMENSION num_rows, - boolean writable)); - JMETHOD(JBLOCKARRAY, access_virt_barray, (j_common_ptr cinfo, - jvirt_barray_ptr ptr, - JDIMENSION start_row, - JDIMENSION num_rows, - boolean writable)); - JMETHOD(void, free_pool, (j_common_ptr cinfo, int pool_id)); - JMETHOD(void, self_destruct, (j_common_ptr cinfo)); - - /* Limit on memory allocation for this JPEG object. (Note that this is - * merely advisory, not a guaranteed maximum; it only affects the space - * used for virtual-array buffers.) May be changed by outer application - * after creating the JPEG object. - */ - long max_memory_to_use; - - /* Maximum allocation request accepted by alloc_large. */ - long max_alloc_chunk; -}; - - -/* Routine signature for application-supplied marker processing methods. - * Need not pass marker code since it is stored in cinfo->unread_marker. - */ -typedef JMETHOD(boolean, jpeg_marker_parser_method, (j_decompress_ptr cinfo)); - - -/* Declarations for routines called by application. - * The JPP macro hides prototype parameters from compilers that can't cope. - * Note JPP requires double parentheses. - */ - -#ifdef HAVE_PROTOTYPES -#define JPP(arglist) arglist -#else -#define JPP(arglist) () -#endif - - -/* Short forms of external names for systems with brain-damaged linkers. - * We shorten external names to be unique in the first six letters, which - * is good enough for all known systems. - * (If your compiler itself needs names to be unique in less than 15 - * characters, you are out of luck. Get a better compiler.) - */ - -#ifdef NEED_SHORT_EXTERNAL_NAMES -#define jpeg_std_error jStdError -#define jpeg_CreateCompress jCreaCompress -#define jpeg_CreateDecompress jCreaDecompress -#define jpeg_destroy_compress jDestCompress -#define jpeg_destroy_decompress jDestDecompress -#define jpeg_stdio_dest jStdDest -#define jpeg_stdio_src jStdSrc -#define jpeg_mem_dest jMemDest -#define jpeg_mem_src jMemSrc -#define jpeg_set_defaults jSetDefaults -#define jpeg_set_colorspace jSetColorspace -#define jpeg_default_colorspace jDefColorspace -#define jpeg_set_quality jSetQuality -#define jpeg_set_linear_quality jSetLQuality -#define jpeg_default_qtables jDefQTables -#define jpeg_add_quant_table jAddQuantTable -#define jpeg_quality_scaling jQualityScaling -#define jpeg_simple_progression jSimProgress -#define jpeg_suppress_tables jSuppressTables -#define jpeg_alloc_quant_table jAlcQTable -#define jpeg_alloc_huff_table jAlcHTable -#define jpeg_start_compress jStrtCompress -#define jpeg_write_scanlines jWrtScanlines -#define jpeg_finish_compress jFinCompress -#define jpeg_calc_jpeg_dimensions jCjpegDimensions -#define jpeg_write_raw_data jWrtRawData -#define jpeg_write_marker jWrtMarker -#define jpeg_write_m_header jWrtMHeader -#define jpeg_write_m_byte jWrtMByte -#define jpeg_write_tables jWrtTables -#define jpeg_read_header jReadHeader -#define jpeg_start_decompress jStrtDecompress -#define jpeg_read_scanlines jReadScanlines -#define jpeg_finish_decompress jFinDecompress -#define jpeg_read_raw_data jReadRawData -#define jpeg_has_multiple_scans jHasMultScn -#define jpeg_start_output jStrtOutput -#define jpeg_finish_output jFinOutput -#define jpeg_input_complete jInComplete -#define jpeg_new_colormap jNewCMap -#define jpeg_consume_input jConsumeInput -#define jpeg_core_output_dimensions jCoreDimensions -#define jpeg_calc_output_dimensions jCalcDimensions -#define jpeg_save_markers jSaveMarkers -#define jpeg_set_marker_processor jSetMarker -#define jpeg_read_coefficients jReadCoefs -#define jpeg_write_coefficients jWrtCoefs -#define jpeg_copy_critical_parameters jCopyCrit -#define jpeg_abort_compress jAbrtCompress -#define jpeg_abort_decompress jAbrtDecompress -#define jpeg_abort jAbort -#define jpeg_destroy jDestroy -#define jpeg_resync_to_restart jResyncRestart -#endif /* NEED_SHORT_EXTERNAL_NAMES */ - - -/* Default error-management setup */ -EXTERN(struct jpeg_error_mgr *) jpeg_std_error - JPP((struct jpeg_error_mgr * err)); - -/* Initialization of JPEG compression objects. - * jpeg_create_compress() and jpeg_create_decompress() are the exported - * names that applications should call. These expand to calls on - * jpeg_CreateCompress and jpeg_CreateDecompress with additional information - * passed for version mismatch checking. - * NB: you must set up the error-manager BEFORE calling jpeg_create_xxx. - */ -#define jpeg_create_compress(cinfo) \ - jpeg_CreateCompress((cinfo), JPEG_LIB_VERSION, \ - (size_t) sizeof(struct jpeg_compress_struct)) -#define jpeg_create_decompress(cinfo) \ - jpeg_CreateDecompress((cinfo), JPEG_LIB_VERSION, \ - (size_t) sizeof(struct jpeg_decompress_struct)) -EXTERN(void) jpeg_CreateCompress JPP((j_compress_ptr cinfo, - int version, size_t structsize)); -EXTERN(void) jpeg_CreateDecompress JPP((j_decompress_ptr cinfo, - int version, size_t structsize)); -/* Destruction of JPEG compression objects */ -EXTERN(void) jpeg_destroy_compress JPP((j_compress_ptr cinfo)); -EXTERN(void) jpeg_destroy_decompress JPP((j_decompress_ptr cinfo)); - -/* Standard data source and destination managers: stdio streams. */ -/* Caller is responsible for opening the file before and closing after. */ -EXTERN(void) jpeg_stdio_dest JPP((j_compress_ptr cinfo, FILE * outfile)); -EXTERN(void) jpeg_stdio_src JPP((j_decompress_ptr cinfo, FILE * infile)); - -/* Data source and destination managers: memory buffers. */ -EXTERN(void) jpeg_mem_dest JPP((j_compress_ptr cinfo, - unsigned char ** outbuffer, - unsigned long * outsize)); -EXTERN(void) jpeg_mem_src JPP((j_decompress_ptr cinfo, - unsigned char * inbuffer, - unsigned long insize)); - -/* Default parameter setup for compression */ -EXTERN(void) jpeg_set_defaults JPP((j_compress_ptr cinfo)); -/* Compression parameter setup aids */ -EXTERN(void) jpeg_set_colorspace JPP((j_compress_ptr cinfo, - J_COLOR_SPACE colorspace)); -EXTERN(void) jpeg_default_colorspace JPP((j_compress_ptr cinfo)); -EXTERN(void) jpeg_set_quality JPP((j_compress_ptr cinfo, int quality, - boolean force_baseline)); -EXTERN(void) jpeg_set_linear_quality JPP((j_compress_ptr cinfo, - int scale_factor, - boolean force_baseline)); -EXTERN(void) jpeg_default_qtables JPP((j_compress_ptr cinfo, - boolean force_baseline)); -EXTERN(void) jpeg_add_quant_table JPP((j_compress_ptr cinfo, int which_tbl, - const unsigned int *basic_table, - int scale_factor, - boolean force_baseline)); -EXTERN(int) jpeg_quality_scaling JPP((int quality)); -EXTERN(void) jpeg_simple_progression JPP((j_compress_ptr cinfo)); -EXTERN(void) jpeg_suppress_tables JPP((j_compress_ptr cinfo, - boolean suppress)); -EXTERN(JQUANT_TBL *) jpeg_alloc_quant_table JPP((j_common_ptr cinfo)); -EXTERN(JHUFF_TBL *) jpeg_alloc_huff_table JPP((j_common_ptr cinfo)); - -/* Main entry points for compression */ -EXTERN(void) jpeg_start_compress JPP((j_compress_ptr cinfo, - boolean write_all_tables)); -EXTERN(JDIMENSION) jpeg_write_scanlines JPP((j_compress_ptr cinfo, - JSAMPARRAY scanlines, - JDIMENSION num_lines)); -EXTERN(void) jpeg_finish_compress JPP((j_compress_ptr cinfo)); - -/* Precalculate JPEG dimensions for current compression parameters. */ -EXTERN(void) jpeg_calc_jpeg_dimensions JPP((j_compress_ptr cinfo)); - -/* Replaces jpeg_write_scanlines when writing raw downsampled data. */ -EXTERN(JDIMENSION) jpeg_write_raw_data JPP((j_compress_ptr cinfo, - JSAMPIMAGE data, - JDIMENSION num_lines)); - -/* Write a special marker. See libjpeg.txt concerning safe usage. */ -EXTERN(void) jpeg_write_marker - JPP((j_compress_ptr cinfo, int marker, - const JOCTET * dataptr, unsigned int datalen)); -/* Same, but piecemeal. */ -EXTERN(void) jpeg_write_m_header - JPP((j_compress_ptr cinfo, int marker, unsigned int datalen)); -EXTERN(void) jpeg_write_m_byte - JPP((j_compress_ptr cinfo, int val)); - -/* Alternate compression function: just write an abbreviated table file */ -EXTERN(void) jpeg_write_tables JPP((j_compress_ptr cinfo)); - -/* Decompression startup: read start of JPEG datastream to see what's there */ -EXTERN(int) jpeg_read_header JPP((j_decompress_ptr cinfo, - boolean require_image)); -/* Return value is one of: */ -#define JPEG_SUSPENDED 0 /* Suspended due to lack of input data */ -#define JPEG_HEADER_OK 1 /* Found valid image datastream */ -#define JPEG_HEADER_TABLES_ONLY 2 /* Found valid table-specs-only datastream */ -/* If you pass require_image = TRUE (normal case), you need not check for - * a TABLES_ONLY return code; an abbreviated file will cause an error exit. - * JPEG_SUSPENDED is only possible if you use a data source module that can - * give a suspension return (the stdio source module doesn't). - */ - -/* Main entry points for decompression */ -EXTERN(boolean) jpeg_start_decompress JPP((j_decompress_ptr cinfo)); -EXTERN(JDIMENSION) jpeg_read_scanlines JPP((j_decompress_ptr cinfo, - JSAMPARRAY scanlines, - JDIMENSION max_lines)); -EXTERN(boolean) jpeg_finish_decompress JPP((j_decompress_ptr cinfo)); - -/* Replaces jpeg_read_scanlines when reading raw downsampled data. */ -EXTERN(JDIMENSION) jpeg_read_raw_data JPP((j_decompress_ptr cinfo, - JSAMPIMAGE data, - JDIMENSION max_lines)); - -/* Additional entry points for buffered-image mode. */ -EXTERN(boolean) jpeg_has_multiple_scans JPP((j_decompress_ptr cinfo)); -EXTERN(boolean) jpeg_start_output JPP((j_decompress_ptr cinfo, - int scan_number)); -EXTERN(boolean) jpeg_finish_output JPP((j_decompress_ptr cinfo)); -EXTERN(boolean) jpeg_input_complete JPP((j_decompress_ptr cinfo)); -EXTERN(void) jpeg_new_colormap JPP((j_decompress_ptr cinfo)); -EXTERN(int) jpeg_consume_input JPP((j_decompress_ptr cinfo)); -/* Return value is one of: */ -/* #define JPEG_SUSPENDED 0 Suspended due to lack of input data */ -#define JPEG_REACHED_SOS 1 /* Reached start of new scan */ -#define JPEG_REACHED_EOI 2 /* Reached end of image */ -#define JPEG_ROW_COMPLETED 3 /* Completed one iMCU row */ -#define JPEG_SCAN_COMPLETED 4 /* Completed last iMCU row of a scan */ - -/* Precalculate output dimensions for current decompression parameters. */ -EXTERN(void) jpeg_core_output_dimensions JPP((j_decompress_ptr cinfo)); -EXTERN(void) jpeg_calc_output_dimensions JPP((j_decompress_ptr cinfo)); - -/* Control saving of COM and APPn markers into marker_list. */ -EXTERN(void) jpeg_save_markers - JPP((j_decompress_ptr cinfo, int marker_code, - unsigned int length_limit)); - -/* Install a special processing method for COM or APPn markers. */ -EXTERN(void) jpeg_set_marker_processor - JPP((j_decompress_ptr cinfo, int marker_code, - jpeg_marker_parser_method routine)); - -/* Read or write raw DCT coefficients --- useful for lossless transcoding. */ -EXTERN(jvirt_barray_ptr *) jpeg_read_coefficients JPP((j_decompress_ptr cinfo)); -EXTERN(void) jpeg_write_coefficients JPP((j_compress_ptr cinfo, - jvirt_barray_ptr * coef_arrays)); -EXTERN(void) jpeg_copy_critical_parameters JPP((j_decompress_ptr srcinfo, - j_compress_ptr dstinfo)); - -/* If you choose to abort compression or decompression before completing - * jpeg_finish_(de)compress, then you need to clean up to release memory, - * temporary files, etc. You can just call jpeg_destroy_(de)compress - * if you're done with the JPEG object, but if you want to clean it up and - * reuse it, call this: - */ -EXTERN(void) jpeg_abort_compress JPP((j_compress_ptr cinfo)); -EXTERN(void) jpeg_abort_decompress JPP((j_decompress_ptr cinfo)); - -/* Generic versions of jpeg_abort and jpeg_destroy that work on either - * flavor of JPEG object. These may be more convenient in some places. - */ -EXTERN(void) jpeg_abort JPP((j_common_ptr cinfo)); -EXTERN(void) jpeg_destroy JPP((j_common_ptr cinfo)); - -/* Default restart-marker-resync procedure for use by data source modules */ -EXTERN(boolean) jpeg_resync_to_restart JPP((j_decompress_ptr cinfo, - int desired)); - - -/* These marker codes are exported since applications and data source modules - * are likely to want to use them. - */ - -#define JPEG_RST0 0xD0 /* RST0 marker code */ -#define JPEG_EOI 0xD9 /* EOI marker code */ -#define JPEG_APP0 0xE0 /* APP0 marker code */ -#define JPEG_COM 0xFE /* COM marker code */ - - -/* If we have a brain-damaged compiler that emits warnings (or worse, errors) - * for structure definitions that are never filled in, keep it quiet by - * supplying dummy definitions for the various substructures. - */ - -#ifdef INCOMPLETE_TYPES_BROKEN -#ifndef JPEG_INTERNALS /* will be defined in jpegint.h */ -struct jvirt_sarray_control { long dummy; }; -struct jvirt_barray_control { long dummy; }; -struct jpeg_comp_master { long dummy; }; -struct jpeg_c_main_controller { long dummy; }; -struct jpeg_c_prep_controller { long dummy; }; -struct jpeg_c_coef_controller { long dummy; }; -struct jpeg_marker_writer { long dummy; }; -struct jpeg_color_converter { long dummy; }; -struct jpeg_downsampler { long dummy; }; -struct jpeg_forward_dct { long dummy; }; -struct jpeg_entropy_encoder { long dummy; }; -struct jpeg_decomp_master { long dummy; }; -struct jpeg_d_main_controller { long dummy; }; -struct jpeg_d_coef_controller { long dummy; }; -struct jpeg_d_post_controller { long dummy; }; -struct jpeg_input_controller { long dummy; }; -struct jpeg_marker_reader { long dummy; }; -struct jpeg_entropy_decoder { long dummy; }; -struct jpeg_inverse_dct { long dummy; }; -struct jpeg_upsampler { long dummy; }; -struct jpeg_color_deconverter { long dummy; }; -struct jpeg_color_quantizer { long dummy; }; -#endif /* JPEG_INTERNALS */ -#endif /* INCOMPLETE_TYPES_BROKEN */ - - -/* - * The JPEG library modules define JPEG_INTERNALS before including this file. - * The internal structure declarations are read only when that is true. - * Applications using the library should not include jpegint.h, but may wish - * to include jerror.h. - */ - -#ifdef JPEG_INTERNALS -#include "jpegint.h" /* fetch private declarations */ -#include "jerror.h" /* fetch error codes too */ -#endif - -#ifdef __cplusplus -#ifndef DONT_USE_EXTERN_C -} -#endif -#endif - -#endif /* JPEGLIB_H */ diff --git a/misc/builddeps/linux64/jpeg/lib/libjpeg.a b/misc/builddeps/linux64/jpeg/lib/libjpeg.a deleted file mode 100644 index bc497396..00000000 Binary files a/misc/builddeps/linux64/jpeg/lib/libjpeg.a and /dev/null differ diff --git a/misc/builddeps/linux64/jpeg/lib/libjpeg.la b/misc/builddeps/linux64/jpeg/lib/libjpeg.la deleted file mode 100755 index ac8ef61f..00000000 --- a/misc/builddeps/linux64/jpeg/lib/libjpeg.la +++ /dev/null @@ -1,41 +0,0 @@ -# libjpeg.la - a libtool library file -# Generated by ltmain.sh (GNU libtool) 2.2.6b -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='' - -# Names of this library. -library_names='' - -# The name of the static archive. -old_library='libjpeg.a' - -# Linker flags that can not go in dependency_libs. -inherited_linker_flags='' - -# Libraries that this one depends upon. -dependency_libs='' - -# Names of additional weak libraries provided by this library -weak_library_names='' - -# Version information for libjpeg. -current=8 -age=0 -revision=2 - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=no - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/tmp/j/lib' diff --git a/misc/builddeps/linux64/jpeg/share/man/man1/cjpeg.1 b/misc/builddeps/linux64/jpeg/share/man/man1/cjpeg.1 deleted file mode 100644 index 01bfa259..00000000 --- a/misc/builddeps/linux64/jpeg/share/man/man1/cjpeg.1 +++ /dev/null @@ -1,325 +0,0 @@ -.TH CJPEG 1 "30 December 2009" -.SH NAME -cjpeg \- compress an image file to a JPEG file -.SH SYNOPSIS -.B cjpeg -[ -.I options -] -[ -.I filename -] -.LP -.SH DESCRIPTION -.LP -.B cjpeg -compresses the named image file, or the standard input if no file is -named, and produces a JPEG/JFIF file on the standard output. -The currently supported input file formats are: PPM (PBMPLUS color -format), PGM (PBMPLUS gray-scale format), BMP, Targa, and RLE (Utah Raster -Toolkit format). (RLE is supported only if the URT library is available.) -.SH OPTIONS -All switch names may be abbreviated; for example, -.B \-grayscale -may be written -.B \-gray -or -.BR \-gr . -Most of the "basic" switches can be abbreviated to as little as one letter. -Upper and lower case are equivalent (thus -.B \-BMP -is the same as -.BR \-bmp ). -British spellings are also accepted (e.g., -.BR \-greyscale ), -though for brevity these are not mentioned below. -.PP -The basic switches are: -.TP -.BI \-quality " N[,...]" -Scale quantization tables to adjust image quality. Quality is 0 (worst) to -100 (best); default is 75. (See below for more info.) -.TP -.B \-grayscale -Create monochrome JPEG file from color input. Be sure to use this switch when -compressing a grayscale BMP file, because -.B cjpeg -isn't bright enough to notice whether a BMP file uses only shades of gray. -By saying -.BR \-grayscale , -you'll get a smaller JPEG file that takes less time to process. -.TP -.B \-optimize -Perform optimization of entropy encoding parameters. Without this, default -encoding parameters are used. -.B \-optimize -usually makes the JPEG file a little smaller, but -.B cjpeg -runs somewhat slower and needs much more memory. Image quality and speed of -decompression are unaffected by -.BR \-optimize . -.TP -.B \-progressive -Create progressive JPEG file (see below). -.TP -.BI \-scale " M/N" -Scale the output image by a factor M/N. Currently supported scale factors are -8/N with all N from 1 to 16. -.TP -.B \-targa -Input file is Targa format. Targa files that contain an "identification" -field will not be automatically recognized by -.BR cjpeg ; -for such files you must specify -.B \-targa -to make -.B cjpeg -treat the input as Targa format. -For most Targa files, you won't need this switch. -.PP -The -.B \-quality -switch lets you trade off compressed file size against quality of the -reconstructed image: the higher the quality setting, the larger the JPEG file, -and the closer the output image will be to the original input. Normally you -want to use the lowest quality setting (smallest file) that decompresses into -something visually indistinguishable from the original image. For this -purpose the quality setting should be between 50 and 95; the default of 75 is -often about right. If you see defects at -.B \-quality -75, then go up 5 or 10 counts at a time until you are happy with the output -image. (The optimal setting will vary from one image to another.) -.PP -.B \-quality -100 will generate a quantization table of all 1's, minimizing loss in the -quantization step (but there is still information loss in subsampling, as well -as roundoff error). This setting is mainly of interest for experimental -purposes. Quality values above about 95 are -.B not -recommended for normal use; the compressed file size goes up dramatically for -hardly any gain in output image quality. -.PP -In the other direction, quality values below 50 will produce very small files -of low image quality. Settings around 5 to 10 might be useful in preparing an -index of a large image library, for example. Try -.B \-quality -2 (or so) for some amusing Cubist effects. (Note: quality -values below about 25 generate 2-byte quantization tables, which are -considered optional in the JPEG standard. -.B cjpeg -emits a warning message when you give such a quality value, because some -other JPEG programs may be unable to decode the resulting file. Use -.B \-baseline -if you need to ensure compatibility at low quality values.) -.PP -The -.B \-quality -option has been extended in IJG version 7 for support of separate quality -settings for luminance and chrominance (or in general, for every provided -quantization table slot). This feature is useful for high-quality -applications which cannot accept the damage of color data by coarse -subsampling settings. You can now easily reduce the color data amount more -smoothly with finer control without separate subsampling. The resulting file -is fully compliant with standard JPEG decoders. -Note that the -.B \-quality -ratings refer to the quantization table slots, and that the last value is -replicated if there are more q-table slots than parameters. The default -q-table slots are 0 for luminance and 1 for chrominance with default tables as -given in the JPEG standard. This is compatible with the old behaviour in case -that only one parameter is given, which is then used for both luminance and -chrominance (slots 0 and 1). More or custom quantization tables can be set -with -.B \-qtables -and assigned to components with -.B \-qslots -parameter (see the "wizard" switches below). -.B Caution: -You must explicitly add -.BI \-sample " 1x1" -for efficient separate color -quality selection, since the default value used by library is 2x2! -.PP -The -.B \-progressive -switch creates a "progressive JPEG" file. In this type of JPEG file, the data -is stored in multiple scans of increasing quality. If the file is being -transmitted over a slow communications link, the decoder can use the first -scan to display a low-quality image very quickly, and can then improve the -display with each subsequent scan. The final image is exactly equivalent to a -standard JPEG file of the same quality setting, and the total file size is -about the same --- often a little smaller. -.PP -Switches for advanced users: -.TP -.B \-dct int -Use integer DCT method (default). -.TP -.B \-dct fast -Use fast integer DCT (less accurate). -.TP -.B \-dct float -Use floating-point DCT method. -The float method is very slightly more accurate than the int method, but is -much slower unless your machine has very fast floating-point hardware. Also -note that results of the floating-point method may vary slightly across -machines, while the integer methods should give the same results everywhere. -The fast integer method is much less accurate than the other two. -.TP -.B \-nosmooth -Don't use high-quality downsampling. -.TP -.BI \-restart " N" -Emit a JPEG restart marker every N MCU rows, or every N MCU blocks if "B" is -attached to the number. -.B \-restart 0 -(the default) means no restart markers. -.TP -.BI \-smooth " N" -Smooth the input image to eliminate dithering noise. N, ranging from 1 to -100, indicates the strength of smoothing. 0 (the default) means no smoothing. -.TP -.BI \-maxmemory " N" -Set limit for amount of memory to use in processing large images. Value is -in thousands of bytes, or millions of bytes if "M" is attached to the -number. For example, -.B \-max 4m -selects 4000000 bytes. If more space is needed, temporary files will be used. -.TP -.BI \-outfile " name" -Send output image to the named file, not to standard output. -.TP -.B \-verbose -Enable debug printout. More -.BR \-v 's -give more output. Also, version information is printed at startup. -.TP -.B \-debug -Same as -.BR \-verbose . -.PP -The -.B \-restart -option inserts extra markers that allow a JPEG decoder to resynchronize after -a transmission error. Without restart markers, any damage to a compressed -file will usually ruin the image from the point of the error to the end of the -image; with restart markers, the damage is usually confined to the portion of -the image up to the next restart marker. Of course, the restart markers -occupy extra space. We recommend -.B \-restart 1 -for images that will be transmitted across unreliable networks such as Usenet. -.PP -The -.B \-smooth -option filters the input to eliminate fine-scale noise. This is often useful -when converting dithered images to JPEG: a moderate smoothing factor of 10 to -50 gets rid of dithering patterns in the input file, resulting in a smaller -JPEG file and a better-looking image. Too large a smoothing factor will -visibly blur the image, however. -.PP -Switches for wizards: -.TP -.B \-arithmetic -Use arithmetic coding. -.B Caution: -arithmetic coded JPEG is not yet widely implemented, so many decoders will be -unable to view an arithmetic coded JPEG file at all. -.TP -.B \-baseline -Force baseline-compatible quantization tables to be generated. This clamps -quantization values to 8 bits even at low quality settings. (This switch is -poorly named, since it does not ensure that the output is actually baseline -JPEG. For example, you can use -.B \-baseline -and -.B \-progressive -together.) -.TP -.BI \-qtables " file" -Use the quantization tables given in the specified text file. -.TP -.BI \-qslots " N[,...]" -Select which quantization table to use for each color component. -.TP -.BI \-sample " HxV[,...]" -Set JPEG sampling factors for each color component. -.TP -.BI \-scans " file" -Use the scan script given in the specified text file. -.PP -The "wizard" switches are intended for experimentation with JPEG. If you -don't know what you are doing, \fBdon't use them\fR. These switches are -documented further in the file wizard.txt. -.SH EXAMPLES -.LP -This example compresses the PPM file foo.ppm with a quality factor of -60 and saves the output as foo.jpg: -.IP -.B cjpeg \-quality -.I 60 foo.ppm -.B > -.I foo.jpg -.SH HINTS -Color GIF files are not the ideal input for JPEG; JPEG is really intended for -compressing full-color (24-bit) images. In particular, don't try to convert -cartoons, line drawings, and other images that have only a few distinct -colors. GIF works great on these, JPEG does not. If you want to convert a -GIF to JPEG, you should experiment with -.BR cjpeg 's -.B \-quality -and -.B \-smooth -options to get a satisfactory conversion. -.B \-smooth 10 -or so is often helpful. -.PP -Avoid running an image through a series of JPEG compression/decompression -cycles. Image quality loss will accumulate; after ten or so cycles the image -may be noticeably worse than it was after one cycle. It's best to use a -lossless format while manipulating an image, then convert to JPEG format when -you are ready to file the image away. -.PP -The -.B \-optimize -option to -.B cjpeg -is worth using when you are making a "final" version for posting or archiving. -It's also a win when you are using low quality settings to make very small -JPEG files; the percentage improvement is often a lot more than it is on -larger files. (At present, -.B \-optimize -mode is always selected when generating progressive JPEG files.) -.SH ENVIRONMENT -.TP -.B JPEGMEM -If this environment variable is set, its value is the default memory limit. -The value is specified as described for the -.B \-maxmemory -switch. -.B JPEGMEM -overrides the default value specified when the program was compiled, and -itself is overridden by an explicit -.BR \-maxmemory . -.SH SEE ALSO -.BR djpeg (1), -.BR jpegtran (1), -.BR rdjpgcom (1), -.BR wrjpgcom (1) -.br -.BR ppm (5), -.BR pgm (5) -.br -Wallace, Gregory K. "The JPEG Still Picture Compression Standard", -Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44. -.SH AUTHOR -Independent JPEG Group -.SH BUGS -GIF input files are no longer supported, to avoid the Unisys LZW patent. -(Conversion of GIF files to JPEG is usually a bad idea anyway.) -.PP -Not all variants of BMP and Targa file formats are supported. -.PP -The -.B \-targa -switch is not a bug, it's a feature. (It would be a bug if the Targa format -designers had not been clueless.) diff --git a/misc/builddeps/linux64/jpeg/share/man/man1/djpeg.1 b/misc/builddeps/linux64/jpeg/share/man/man1/djpeg.1 deleted file mode 100644 index f3722d15..00000000 --- a/misc/builddeps/linux64/jpeg/share/man/man1/djpeg.1 +++ /dev/null @@ -1,252 +0,0 @@ -.TH DJPEG 1 "3 October 2009" -.SH NAME -djpeg \- decompress a JPEG file to an image file -.SH SYNOPSIS -.B djpeg -[ -.I options -] -[ -.I filename -] -.LP -.SH DESCRIPTION -.LP -.B djpeg -decompresses the named JPEG file, or the standard input if no file is named, -and produces an image file on the standard output. PBMPLUS (PPM/PGM), BMP, -GIF, Targa, or RLE (Utah Raster Toolkit) output format can be selected. -(RLE is supported only if the URT library is available.) -.SH OPTIONS -All switch names may be abbreviated; for example, -.B \-grayscale -may be written -.B \-gray -or -.BR \-gr . -Most of the "basic" switches can be abbreviated to as little as one letter. -Upper and lower case are equivalent (thus -.B \-BMP -is the same as -.BR \-bmp ). -British spellings are also accepted (e.g., -.BR \-greyscale ), -though for brevity these are not mentioned below. -.PP -The basic switches are: -.TP -.BI \-colors " N" -Reduce image to at most N colors. This reduces the number of colors used in -the output image, so that it can be displayed on a colormapped display or -stored in a colormapped file format. For example, if you have an 8-bit -display, you'd need to reduce to 256 or fewer colors. -.TP -.BI \-quantize " N" -Same as -.BR \-colors . -.B \-colors -is the recommended name, -.B \-quantize -is provided only for backwards compatibility. -.TP -.B \-fast -Select recommended processing options for fast, low quality output. (The -default options are chosen for highest quality output.) Currently, this is -equivalent to \fB\-dct fast \-nosmooth \-onepass \-dither ordered\fR. -.TP -.B \-grayscale -Force gray-scale output even if JPEG file is color. Useful for viewing on -monochrome displays; also, -.B djpeg -runs noticeably faster in this mode. -.TP -.BI \-scale " M/N" -Scale the output image by a factor M/N. Currently supported scale factors are -M/N with all M from 1 to 16, where N is the source DCT size, which is 8 for -baseline JPEG. If the /N part is omitted, then M specifies the DCT scaled -size to be applied on the given input. For baseline JPEG this is equivalent -to M/8 scaling, since the source DCT size for baseline JPEG is 8. -Scaling is handy if the image is larger than your screen; also, -.B djpeg -runs much faster when scaling down the output. -.TP -.B \-bmp -Select BMP output format (Windows flavor). 8-bit colormapped format is -emitted if -.B \-colors -or -.B \-grayscale -is specified, or if the JPEG file is gray-scale; otherwise, 24-bit full-color -format is emitted. -.TP -.B \-gif -Select GIF output format. Since GIF does not support more than 256 colors, -.B \-colors 256 -is assumed (unless you specify a smaller number of colors). -.TP -.B \-os2 -Select BMP output format (OS/2 1.x flavor). 8-bit colormapped format is -emitted if -.B \-colors -or -.B \-grayscale -is specified, or if the JPEG file is gray-scale; otherwise, 24-bit full-color -format is emitted. -.TP -.B \-pnm -Select PBMPLUS (PPM/PGM) output format (this is the default format). -PGM is emitted if the JPEG file is gray-scale or if -.B \-grayscale -is specified; otherwise PPM is emitted. -.TP -.B \-rle -Select RLE output format. (Requires URT library.) -.TP -.B \-targa -Select Targa output format. Gray-scale format is emitted if the JPEG file is -gray-scale or if -.B \-grayscale -is specified; otherwise, colormapped format is emitted if -.B \-colors -is specified; otherwise, 24-bit full-color format is emitted. -.PP -Switches for advanced users: -.TP -.B \-dct int -Use integer DCT method (default). -.TP -.B \-dct fast -Use fast integer DCT (less accurate). -.TP -.B \-dct float -Use floating-point DCT method. -The float method is very slightly more accurate than the int method, but is -much slower unless your machine has very fast floating-point hardware. Also -note that results of the floating-point method may vary slightly across -machines, while the integer methods should give the same results everywhere. -The fast integer method is much less accurate than the other two. -.TP -.B \-dither fs -Use Floyd-Steinberg dithering in color quantization. -.TP -.B \-dither ordered -Use ordered dithering in color quantization. -.TP -.B \-dither none -Do not use dithering in color quantization. -By default, Floyd-Steinberg dithering is applied when quantizing colors; this -is slow but usually produces the best results. Ordered dither is a compromise -between speed and quality; no dithering is fast but usually looks awful. Note -that these switches have no effect unless color quantization is being done. -Ordered dither is only available in -.B \-onepass -mode. -.TP -.BI \-map " file" -Quantize to the colors used in the specified image file. This is useful for -producing multiple files with identical color maps, or for forcing a -predefined set of colors to be used. The -.I file -must be a GIF or PPM file. This option overrides -.B \-colors -and -.BR \-onepass . -.TP -.B \-nosmooth -Don't use high-quality upsampling. -.TP -.B \-onepass -Use one-pass instead of two-pass color quantization. The one-pass method is -faster and needs less memory, but it produces a lower-quality image. -.B \-onepass -is ignored unless you also say -.B \-colors -.IR N . -Also, the one-pass method is always used for gray-scale output (the two-pass -method is no improvement then). -.TP -.BI \-maxmemory " N" -Set limit for amount of memory to use in processing large images. Value is -in thousands of bytes, or millions of bytes if "M" is attached to the -number. For example, -.B \-max 4m -selects 4000000 bytes. If more space is needed, temporary files will be used. -.TP -.BI \-outfile " name" -Send output image to the named file, not to standard output. -.TP -.B \-verbose -Enable debug printout. More -.BR \-v 's -give more output. Also, version information is printed at startup. -.TP -.B \-debug -Same as -.BR \-verbose . -.SH EXAMPLES -.LP -This example decompresses the JPEG file foo.jpg, quantizes it to -256 colors, and saves the output in 8-bit BMP format in foo.bmp: -.IP -.B djpeg \-colors 256 \-bmp -.I foo.jpg -.B > -.I foo.bmp -.SH HINTS -To get a quick preview of an image, use the -.B \-grayscale -and/or -.B \-scale -switches. -.B \-grayscale \-scale 1/8 -is the fastest case. -.PP -Several options are available that trade off image quality to gain speed. -.B \-fast -turns on the recommended settings. -.PP -.B \-dct fast -and/or -.B \-nosmooth -gain speed at a small sacrifice in quality. -When producing a color-quantized image, -.B \-onepass \-dither ordered -is fast but much lower quality than the default behavior. -.B \-dither none -may give acceptable results in two-pass mode, but is seldom tolerable in -one-pass mode. -.PP -If you are fortunate enough to have very fast floating point hardware, -\fB\-dct float\fR may be even faster than \fB\-dct fast\fR. But on most -machines \fB\-dct float\fR is slower than \fB\-dct int\fR; in this case it is -not worth using, because its theoretical accuracy advantage is too small to be -significant in practice. -.SH ENVIRONMENT -.TP -.B JPEGMEM -If this environment variable is set, its value is the default memory limit. -The value is specified as described for the -.B \-maxmemory -switch. -.B JPEGMEM -overrides the default value specified when the program was compiled, and -itself is overridden by an explicit -.BR \-maxmemory . -.SH SEE ALSO -.BR cjpeg (1), -.BR jpegtran (1), -.BR rdjpgcom (1), -.BR wrjpgcom (1) -.br -.BR ppm (5), -.BR pgm (5) -.br -Wallace, Gregory K. "The JPEG Still Picture Compression Standard", -Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44. -.SH AUTHOR -Independent JPEG Group -.SH BUGS -To avoid the Unisys LZW patent, -.B djpeg -produces uncompressed GIF files. These are larger than they should be, but -are readable by standard GIF decoders. diff --git a/misc/builddeps/linux64/jpeg/share/man/man1/jpegtran.1 b/misc/builddeps/linux64/jpeg/share/man/man1/jpegtran.1 deleted file mode 100644 index 0ad1bbc8..00000000 --- a/misc/builddeps/linux64/jpeg/share/man/man1/jpegtran.1 +++ /dev/null @@ -1,285 +0,0 @@ -.TH JPEGTRAN 1 "28 December 2009" -.SH NAME -jpegtran \- lossless transformation of JPEG files -.SH SYNOPSIS -.B jpegtran -[ -.I options -] -[ -.I filename -] -.LP -.SH DESCRIPTION -.LP -.B jpegtran -performs various useful transformations of JPEG files. -It can translate the coded representation from one variant of JPEG to another, -for example from baseline JPEG to progressive JPEG or vice versa. It can also -perform some rearrangements of the image data, for example turning an image -from landscape to portrait format by rotation. -.PP -.B jpegtran -works by rearranging the compressed data (DCT coefficients), without -ever fully decoding the image. Therefore, its transformations are lossless: -there is no image degradation at all, which would not be true if you used -.B djpeg -followed by -.B cjpeg -to accomplish the same conversion. But by the same token, -.B jpegtran -cannot perform lossy operations such as changing the image quality. -.PP -.B jpegtran -reads the named JPEG/JFIF file, or the standard input if no file is -named, and produces a JPEG/JFIF file on the standard output. -.SH OPTIONS -All switch names may be abbreviated; for example, -.B \-optimize -may be written -.B \-opt -or -.BR \-o . -Upper and lower case are equivalent. -British spellings are also accepted (e.g., -.BR \-optimise ), -though for brevity these are not mentioned below. -.PP -To specify the coded JPEG representation used in the output file, -.B jpegtran -accepts a subset of the switches recognized by -.BR cjpeg : -.TP -.B \-optimize -Perform optimization of entropy encoding parameters. -.TP -.B \-progressive -Create progressive JPEG file. -.TP -.BI \-restart " N" -Emit a JPEG restart marker every N MCU rows, or every N MCU blocks if "B" is -attached to the number. -.TP -.B \-arithmetic -Use arithmetic coding. -.TP -.BI \-scans " file" -Use the scan script given in the specified text file. -.PP -See -.BR cjpeg (1) -for more details about these switches. -If you specify none of these switches, you get a plain baseline-JPEG output -file. The quality setting and so forth are determined by the input file. -.PP -The image can be losslessly transformed by giving one of these switches: -.TP -.B \-flip horizontal -Mirror image horizontally (left-right). -.TP -.B \-flip vertical -Mirror image vertically (top-bottom). -.TP -.B \-rotate 90 -Rotate image 90 degrees clockwise. -.TP -.B \-rotate 180 -Rotate image 180 degrees. -.TP -.B \-rotate 270 -Rotate image 270 degrees clockwise (or 90 ccw). -.TP -.B \-transpose -Transpose image (across UL-to-LR axis). -.TP -.B \-transverse -Transverse transpose (across UR-to-LL axis). -.IP -The transpose transformation has no restrictions regarding image dimensions. -The other transformations operate rather oddly if the image dimensions are not -a multiple of the iMCU size (usually 8 or 16 pixels), because they can only -transform complete blocks of DCT coefficient data in the desired way. -.IP -.BR jpegtran 's -default behavior when transforming an odd-size image is designed -to preserve exact reversibility and mathematical consistency of the -transformation set. As stated, transpose is able to flip the entire image -area. Horizontal mirroring leaves any partial iMCU column at the right edge -untouched, but is able to flip all rows of the image. Similarly, vertical -mirroring leaves any partial iMCU row at the bottom edge untouched, but is -able to flip all columns. The other transforms can be built up as sequences -of transpose and flip operations; for consistency, their actions on edge -pixels are defined to be the same as the end result of the corresponding -transpose-and-flip sequence. -.IP -For practical use, you may prefer to discard any untransformable edge pixels -rather than having a strange-looking strip along the right and/or bottom edges -of a transformed image. To do this, add the -.B \-trim -switch: -.TP -.B \-trim -Drop non-transformable edge blocks. -.IP -Obviously, a transformation with -.B \-trim -is not reversible, so strictly speaking -.B jpegtran -with this switch is not lossless. Also, the expected mathematical -equivalences between the transformations no longer hold. For example, -.B \-rot 270 -trim -trims only the bottom edge, but -.B \-rot 90 -trim -followed by -.B \-rot 180 -trim -trims both edges. -.IP -If you are only interested in perfect transformation, add the -.B \-perfect -switch: -.TP -.B \-perfect -Fails with an error if the transformation is not perfect. -.IP -For example you may want to do -.IP -.B (jpegtran \-rot 90 -perfect -.I foo.jpg -.B || djpeg -.I foo.jpg -.B | pnmflip \-r90 | cjpeg) -.IP -to do a perfect rotation if available or an approximated one if not. -.PP -We also offer a lossless-crop option, which discards data outside a given -image region but losslessly preserves what is inside. Like the rotate and -flip transforms, lossless crop is restricted by the current JPEG format: the -upper left corner of the selected region must fall on an iMCU boundary. If -this does not hold for the given crop parameters, we silently move the upper -left corner up and/or left to make it so, simultaneously increasing the region -dimensions to keep the lower right crop corner unchanged. (Thus, the output -image covers at least the requested region, but may cover more.) - -The image can be losslessly cropped by giving the switch: -.TP -.B \-crop WxH+X+Y -Crop to a rectangular subarea of width W, height H starting at point X,Y. -.PP -Other not-strictly-lossless transformation switches are: -.TP -.B \-grayscale -Force grayscale output. -.IP -This option discards the chrominance channels if the input image is YCbCr -(ie, a standard color JPEG), resulting in a grayscale JPEG file. The -luminance channel is preserved exactly, so this is a better method of reducing -to grayscale than decompression, conversion, and recompression. This switch -is particularly handy for fixing a monochrome picture that was mistakenly -encoded as a color JPEG. (In such a case, the space savings from getting rid -of the near-empty chroma channels won't be large; but the decoding time for -a grayscale JPEG is substantially less than that for a color JPEG.) -.TP -.BI \-scale " M/N" -Scale the output image by a factor M/N. -.IP -Currently supported scale factors are M/N with all M from 1 to 16, where N is -the source DCT size, which is 8 for baseline JPEG. If the /N part is omitted, -then M specifies the DCT scaled size to be applied on the given input. For -baseline JPEG this is equivalent to M/8 scaling, since the source DCT size -for baseline JPEG is 8. -.B Caution: -An implementation of the JPEG SmartScale extension is required for this -feature. SmartScale enabled JPEG is not yet widely implemented, so many -decoders will be unable to view a SmartScale extended JPEG file at all. -.PP -.B jpegtran -also recognizes these switches that control what to do with "extra" markers, -such as comment blocks: -.TP -.B \-copy none -Copy no extra markers from source file. This setting suppresses all -comments and other excess baggage present in the source file. -.TP -.B \-copy comments -Copy only comment markers. This setting copies comments from the source file, -but discards any other inessential (for image display) data. -.TP -.B \-copy all -Copy all extra markers. This setting preserves miscellaneous markers -found in the source file, such as JFIF thumbnails, Exif data, and Photoshop -settings. In some files these extra markers can be sizable. -.IP -The default behavior is -.BR "\-copy comments" . -(Note: in IJG releases v6 and v6a, -.B jpegtran -always did the equivalent of -.BR "\-copy none" .) -.PP -Additional switches recognized by jpegtran are: -.TP -.BI \-maxmemory " N" -Set limit for amount of memory to use in processing large images. Value is -in thousands of bytes, or millions of bytes if "M" is attached to the -number. For example, -.B \-max 4m -selects 4000000 bytes. If more space is needed, temporary files will be used. -.TP -.BI \-outfile " name" -Send output image to the named file, not to standard output. -.TP -.B \-verbose -Enable debug printout. More -.BR \-v 's -give more output. Also, version information is printed at startup. -.TP -.B \-debug -Same as -.BR \-verbose . -.SH EXAMPLES -.LP -This example converts a baseline JPEG file to progressive form: -.IP -.B jpegtran \-progressive -.I foo.jpg -.B > -.I fooprog.jpg -.PP -This example rotates an image 90 degrees clockwise, discarding any -unrotatable edge pixels: -.IP -.B jpegtran \-rot 90 -trim -.I foo.jpg -.B > -.I foo90.jpg -.SH ENVIRONMENT -.TP -.B JPEGMEM -If this environment variable is set, its value is the default memory limit. -The value is specified as described for the -.B \-maxmemory -switch. -.B JPEGMEM -overrides the default value specified when the program was compiled, and -itself is overridden by an explicit -.BR \-maxmemory . -.SH SEE ALSO -.BR cjpeg (1), -.BR djpeg (1), -.BR rdjpgcom (1), -.BR wrjpgcom (1) -.br -Wallace, Gregory K. "The JPEG Still Picture Compression Standard", -Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44. -.SH AUTHOR -Independent JPEG Group -.SH BUGS -The transform options can't transform odd-size images perfectly. Use -.B \-trim -or -.B \-perfect -if you don't like the results. -.PP -The entire image is read into memory and then written out again, even in -cases where this isn't really necessary. Expect swapping on large images, -especially when using the more complex transform options. diff --git a/misc/builddeps/linux64/jpeg/share/man/man1/rdjpgcom.1 b/misc/builddeps/linux64/jpeg/share/man/man1/rdjpgcom.1 deleted file mode 100644 index 97611df8..00000000 --- a/misc/builddeps/linux64/jpeg/share/man/man1/rdjpgcom.1 +++ /dev/null @@ -1,63 +0,0 @@ -.TH RDJPGCOM 1 "02 April 2009" -.SH NAME -rdjpgcom \- display text comments from a JPEG file -.SH SYNOPSIS -.B rdjpgcom -[ -.B \-raw -] -[ -.B \-verbose -] -[ -.I filename -] -.LP -.SH DESCRIPTION -.LP -.B rdjpgcom -reads the named JPEG/JFIF file, or the standard input if no file is named, -and prints any text comments found in the file on the standard output. -.PP -The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file. -Although the standard doesn't actually define what COM blocks are for, they -are widely used to hold user-supplied text strings. This lets you add -annotations, titles, index terms, etc to your JPEG files, and later retrieve -them as text. COM blocks do not interfere with the image stored in the JPEG -file. The maximum size of a COM block is 64K, but you can have as many of -them as you like in one JPEG file. -.SH OPTIONS -.TP -.B \-raw -Normally -.B rdjpgcom -escapes non-printable characters in comments, for security reasons. -This option avoids that. -.PP -.B \-verbose -Causes -.B rdjpgcom -to also display the JPEG image dimensions. -.PP -Switch names may be abbreviated, and are not case sensitive. -.SH HINTS -.B rdjpgcom -does not depend on the IJG JPEG library. Its source code is intended as an -illustration of the minimum amount of code required to parse a JPEG file -header correctly. -.PP -In -.B \-verbose -mode, -.B rdjpgcom -will also attempt to print the contents of any "APP12" markers as text. -Some digital cameras produce APP12 markers containing useful textual -information. If you like, you can modify the source code to print -other APPn marker types as well. -.SH SEE ALSO -.BR cjpeg (1), -.BR djpeg (1), -.BR jpegtran (1), -.BR wrjpgcom (1) -.SH AUTHOR -Independent JPEG Group diff --git a/misc/builddeps/linux64/jpeg/share/man/man1/wrjpgcom.1 b/misc/builddeps/linux64/jpeg/share/man/man1/wrjpgcom.1 deleted file mode 100644 index d419a999..00000000 --- a/misc/builddeps/linux64/jpeg/share/man/man1/wrjpgcom.1 +++ /dev/null @@ -1,103 +0,0 @@ -.TH WRJPGCOM 1 "15 June 1995" -.SH NAME -wrjpgcom \- insert text comments into a JPEG file -.SH SYNOPSIS -.B wrjpgcom -[ -.B \-replace -] -[ -.BI \-comment " text" -] -[ -.BI \-cfile " name" -] -[ -.I filename -] -.LP -.SH DESCRIPTION -.LP -.B wrjpgcom -reads the named JPEG/JFIF file, or the standard input if no file is named, -and generates a new JPEG/JFIF file on standard output. A comment block is -added to the file. -.PP -The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file. -Although the standard doesn't actually define what COM blocks are for, they -are widely used to hold user-supplied text strings. This lets you add -annotations, titles, index terms, etc to your JPEG files, and later retrieve -them as text. COM blocks do not interfere with the image stored in the JPEG -file. The maximum size of a COM block is 64K, but you can have as many of -them as you like in one JPEG file. -.PP -.B wrjpgcom -adds a COM block, containing text you provide, to a JPEG file. -Ordinarily, the COM block is added after any existing COM blocks; but you -can delete the old COM blocks if you wish. -.SH OPTIONS -Switch names may be abbreviated, and are not case sensitive. -.TP -.B \-replace -Delete any existing COM blocks from the file. -.TP -.BI \-comment " text" -Supply text for new COM block on command line. -.TP -.BI \-cfile " name" -Read text for new COM block from named file. -.PP -If you have only one line of comment text to add, you can provide it on the -command line with -.BR \-comment . -The comment text must be surrounded with quotes so that it is treated as a -single argument. Longer comments can be read from a text file. -.PP -If you give neither -.B \-comment -nor -.BR \-cfile , -then -.B wrjpgcom -will read the comment text from standard input. (In this case an input image -file name MUST be supplied, so that the source JPEG file comes from somewhere -else.) You can enter multiple lines, up to 64KB worth. Type an end-of-file -indicator (usually control-D) to terminate the comment text entry. -.PP -.B wrjpgcom -will not add a COM block if the provided comment string is empty. Therefore -\fB\-replace \-comment ""\fR can be used to delete all COM blocks from a file. -.SH EXAMPLES -.LP -Add a short comment to in.jpg, producing out.jpg: -.IP -.B wrjpgcom \-c -\fI"View of my back yard" in.jpg -.B > -.I out.jpg -.PP -Attach a long comment previously stored in comment.txt: -.IP -.B wrjpgcom -.I in.jpg -.B < -.I comment.txt -.B > -.I out.jpg -.PP -or equivalently -.IP -.B wrjpgcom -.B -cfile -.I comment.txt -.B < -.I in.jpg -.B > -.I out.jpg -.SH SEE ALSO -.BR cjpeg (1), -.BR djpeg (1), -.BR jpegtran (1), -.BR rdjpgcom (1) -.SH AUTHOR -Independent JPEG Group diff --git a/misc/builddeps/linux64/ode/bin/ode-config b/misc/builddeps/linux64/ode/bin/ode-config deleted file mode 100755 index dddc75da..00000000 --- a/misc/builddeps/linux64/ode/bin/ode-config +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh - -prefix=/usr/local -exec_prefix=${prefix} -exec_prefix_set=no - -usage="\ -Usage: ode-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs]" - -if test $# -eq 0; then - echo "${usage}" 1>&2 - exit 1 -fi - -while test $# -gt 0; do - case "$1" in - -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac - - case $1 in - --prefix=*) - prefix=$optarg - if test $exec_prefix_set = no ; then - exec_prefix=$optarg - fi - ;; - --prefix) - echo $prefix - ;; - --exec-prefix=*) - exec_prefix=$optarg - exec_prefix_set=yes - ;; - --exec-prefix) - echo $exec_prefix - ;; - --version) - echo 0.12 - ;; - --cflags) - echo -I${prefix}/include -DdDOUBLE - ;; - --libs) - echo -L${exec_prefix}/lib -lode - ;; - *) - echo "${usage}" 1>&2 - exit 1 - ;; - esac - shift -done diff --git a/misc/builddeps/linux64/ode/include/ode/collision.h b/misc/builddeps/linux64/ode/include/ode/collision.h deleted file mode 100644 index e89726cb..00000000 --- a/misc/builddeps/linux64/ode/include/ode/collision.h +++ /dev/null @@ -1,1523 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001-2003 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#ifndef _ODE_COLLISION_H_ -#define _ODE_COLLISION_H_ - -#include -#include -#include -// Include odeinit.h for backward compatibility as some of initialization APIs -// were initally declared in current header. -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @defgroup collide Collision Detection - * - * ODE has two main components: a dynamics simulation engine and a collision - * detection engine. The collision engine is given information about the - * shape of each body. At each time step it figures out which bodies touch - * each other and passes the resulting contact point information to the user. - * The user in turn creates contact joints between bodies. - * - * Using ODE's collision detection is optional - an alternative collision - * detection system can be used as long as it can supply the right kinds of - * contact information. - */ - - -/* ************************************************************************ */ -/* general functions */ - -/** - * @brief Destroy a geom, removing it from any space. - * - * Destroy a geom, removing it from any space it is in first. This one - * function destroys a geom of any type, but to create a geom you must call - * a creation function for that type. - * - * When a space is destroyed, if its cleanup mode is 1 (the default) then all - * the geoms in that space are automatically destroyed as well. - * - * @param geom the geom to be destroyed. - * @ingroup collide - */ -ODE_API void dGeomDestroy (dGeomID geom); - - -/** - * @brief Set the user-defined data pointer stored in the geom. - * - * @param geom the geom to hold the data - * @param data the data pointer to be stored - * @ingroup collide - */ -ODE_API void dGeomSetData (dGeomID geom, void* data); - - -/** - * @brief Get the user-defined data pointer stored in the geom. - * - * @param geom the geom containing the data - * @ingroup collide - */ -ODE_API void *dGeomGetData (dGeomID geom); - - -/** - * @brief Set the body associated with a placeable geom. - * - * Setting a body on a geom automatically combines the position vector and - * rotation matrix of the body and geom, so that setting the position or - * orientation of one will set the value for both objects. Setting a body - * ID of zero gives the geom its own position and rotation, independent - * from any body. If the geom was previously connected to a body then its - * new independent position/rotation is set to the current position/rotation - * of the body. - * - * Calling these functions on a non-placeable geom results in a runtime - * error in the debug build of ODE. - * - * @param geom the geom to connect - * @param body the body to attach to the geom - * @ingroup collide - */ -ODE_API void dGeomSetBody (dGeomID geom, dBodyID body); - - -/** - * @brief Get the body associated with a placeable geom. - * @param geom the geom to query. - * @sa dGeomSetBody - * @ingroup collide - */ -ODE_API dBodyID dGeomGetBody (dGeomID geom); - - -/** - * @brief Set the position vector of a placeable geom. - * - * If the geom is attached to a body, the body's position will also be changed. - * Calling this function on a non-placeable geom results in a runtime error in - * the debug build of ODE. - * - * @param geom the geom to set. - * @param x the new X coordinate. - * @param y the new Y coordinate. - * @param z the new Z coordinate. - * @sa dBodySetPosition - * @ingroup collide - */ -ODE_API void dGeomSetPosition (dGeomID geom, dReal x, dReal y, dReal z); - - -/** - * @brief Set the rotation matrix of a placeable geom. - * - * If the geom is attached to a body, the body's rotation will also be changed. - * Calling this function on a non-placeable geom results in a runtime error in - * the debug build of ODE. - * - * @param geom the geom to set. - * @param R the new rotation matrix. - * @sa dBodySetRotation - * @ingroup collide - */ -ODE_API void dGeomSetRotation (dGeomID geom, const dMatrix3 R); - - -/** - * @brief Set the rotation of a placeable geom. - * - * If the geom is attached to a body, the body's rotation will also be changed. - * - * Calling this function on a non-placeable geom results in a runtime error in - * the debug build of ODE. - * - * @param geom the geom to set. - * @param Q the new rotation. - * @sa dBodySetQuaternion - * @ingroup collide - */ -ODE_API void dGeomSetQuaternion (dGeomID geom, const dQuaternion Q); - - -/** - * @brief Get the position vector of a placeable geom. - * - * If the geom is attached to a body, the body's position will be returned. - * - * Calling this function on a non-placeable geom results in a runtime error in - * the debug build of ODE. - * - * @param geom the geom to query. - * @returns A pointer to the geom's position vector. - * @remarks The returned value is a pointer to the geom's internal - * data structure. It is valid until any changes are made - * to the geom. - * @sa dBodyGetPosition - * @ingroup collide - */ -ODE_API const dReal * dGeomGetPosition (dGeomID geom); - - -/** - * @brief Copy the position of a geom into a vector. - * @ingroup collide - * @param geom the geom to query - * @param pos a copy of the geom position - * @sa dGeomGetPosition - */ -ODE_API void dGeomCopyPosition (dGeomID geom, dVector3 pos); - - -/** - * @brief Get the rotation matrix of a placeable geom. - * - * If the geom is attached to a body, the body's rotation will be returned. - * - * Calling this function on a non-placeable geom results in a runtime error in - * the debug build of ODE. - * - * @param geom the geom to query. - * @returns A pointer to the geom's rotation matrix. - * @remarks The returned value is a pointer to the geom's internal - * data structure. It is valid until any changes are made - * to the geom. - * @sa dBodyGetRotation - * @ingroup collide - */ -ODE_API const dReal * dGeomGetRotation (dGeomID geom); - - -/** - * @brief Get the rotation matrix of a placeable geom. - * - * If the geom is attached to a body, the body's rotation will be returned. - * - * Calling this function on a non-placeable geom results in a runtime error in - * the debug build of ODE. - * - * @param geom the geom to query. - * @param R a copy of the geom rotation - * @sa dGeomGetRotation - * @ingroup collide - */ -ODE_API void dGeomCopyRotation(dGeomID geom, dMatrix3 R); - - -/** - * @brief Get the rotation quaternion of a placeable geom. - * - * If the geom is attached to a body, the body's quaternion will be returned. - * - * Calling this function on a non-placeable geom results in a runtime error in - * the debug build of ODE. - * - * @param geom the geom to query. - * @param result a copy of the rotation quaternion. - * @sa dBodyGetQuaternion - * @ingroup collide - */ -ODE_API void dGeomGetQuaternion (dGeomID geom, dQuaternion result); - - -/** - * @brief Return the axis-aligned bounding box. - * - * Return in aabb an axis aligned bounding box that surrounds the given geom. - * The aabb array has elements (minx, maxx, miny, maxy, minz, maxz). If the - * geom is a space, a bounding box that surrounds all contained geoms is - * returned. - * - * This function may return a pre-computed cached bounding box, if it can - * determine that the geom has not moved since the last time the bounding - * box was computed. - * - * @param geom the geom to query - * @param aabb the returned bounding box - * @ingroup collide - */ -ODE_API void dGeomGetAABB (dGeomID geom, dReal aabb[6]); - - -/** - * @brief Determing if a geom is a space. - * @param geom the geom to query - * @returns Non-zero if the geom is a space, zero otherwise. - * @ingroup collide - */ -ODE_API int dGeomIsSpace (dGeomID geom); - - -/** - * @brief Query for the space containing a particular geom. - * @param geom the geom to query - * @returns The space that contains the geom, or NULL if the geom is - * not contained by a space. - * @ingroup collide - */ -ODE_API dSpaceID dGeomGetSpace (dGeomID); - - -/** - * @brief Given a geom, this returns its class. - * - * The ODE classes are: - * @li dSphereClass - * @li dBoxClass - * @li dCylinderClass - * @li dPlaneClass - * @li dRayClass - * @li dConvexClass - * @li dGeomTransformClass - * @li dTriMeshClass - * @li dSimpleSpaceClass - * @li dHashSpaceClass - * @li dQuadTreeSpaceClass - * @li dFirstUserClass - * @li dLastUserClass - * - * User-defined class will return their own number. - * - * @param geom the geom to query - * @returns The geom class ID. - * @ingroup collide - */ -ODE_API int dGeomGetClass (dGeomID geom); - - -/** - * @brief Set the "category" bitfield for the given geom. - * - * The category bitfield is used by spaces to govern which geoms will - * interact with each other. The bitfield is guaranteed to be at least - * 32 bits wide. The default category values for newly created geoms - * have all bits set. - * - * @param geom the geom to set - * @param bits the new bitfield value - * @ingroup collide - */ -ODE_API void dGeomSetCategoryBits (dGeomID geom, unsigned long bits); - - -/** - * @brief Set the "collide" bitfield for the given geom. - * - * The collide bitfield is used by spaces to govern which geoms will - * interact with each other. The bitfield is guaranteed to be at least - * 32 bits wide. The default category values for newly created geoms - * have all bits set. - * - * @param geom the geom to set - * @param bits the new bitfield value - * @ingroup collide - */ -ODE_API void dGeomSetCollideBits (dGeomID geom, unsigned long bits); - - -/** - * @brief Get the "category" bitfield for the given geom. - * - * @param geom the geom to set - * @param bits the new bitfield value - * @sa dGeomSetCategoryBits - * @ingroup collide - */ -ODE_API unsigned long dGeomGetCategoryBits (dGeomID); - - -/** - * @brief Get the "collide" bitfield for the given geom. - * - * @param geom the geom to set - * @param bits the new bitfield value - * @sa dGeomSetCollideBits - * @ingroup collide - */ -ODE_API unsigned long dGeomGetCollideBits (dGeomID); - - -/** - * @brief Enable a geom. - * - * Disabled geoms are completely ignored by dSpaceCollide and dSpaceCollide2, - * although they can still be members of a space. New geoms are created in - * the enabled state. - * - * @param geom the geom to enable - * @sa dGeomDisable - * @sa dGeomIsEnabled - * @ingroup collide - */ -ODE_API void dGeomEnable (dGeomID geom); - - -/** - * @brief Disable a geom. - * - * Disabled geoms are completely ignored by dSpaceCollide and dSpaceCollide2, - * although they can still be members of a space. New geoms are created in - * the enabled state. - * - * @param geom the geom to disable - * @sa dGeomDisable - * @sa dGeomIsEnabled - * @ingroup collide - */ -ODE_API void dGeomDisable (dGeomID geom); - - -/** - * @brief Check to see if a geom is enabled. - * - * Disabled geoms are completely ignored by dSpaceCollide and dSpaceCollide2, - * although they can still be members of a space. New geoms are created in - * the enabled state. - * - * @param geom the geom to query - * @returns Non-zero if the geom is enabled, zero otherwise. - * @sa dGeomDisable - * @sa dGeomIsEnabled - * @ingroup collide - */ -ODE_API int dGeomIsEnabled (dGeomID geom); - - -enum -{ - dGeomCommonControlClass = 0, - dGeomColliderControlClass = 1 -}; - -enum -{ - dGeomCommonAnyControlCode = 0, - - dGeomColliderSetMergeSphereContactsControlCode = 1, - dGeomColliderGetMergeSphereContactsControlCode = 2 -}; - -enum -{ - dGeomColliderMergeContactsValue__Default = 0, // Used with Set... to restore default value - dGeomColliderMergeContactsValue_None = 1, - dGeomColliderMergeContactsValue_Normals = 2, - dGeomColliderMergeContactsValue_Full = 3 -}; - -/** - * @brief Execute low level control operation for geometry. - * - * The variable the dataSize points to must be initialized before the call. - * If the size does not match the one expected for the control class/code function - * changes it to the size expected and returns failure. This implies the function - * can be called with NULL data and zero size to test if control class/code is supported - * and obtain required data size for it. - * - * dGeomCommonAnyControlCode applies to any control class and returns success if - * at least one control code is available for the given class with given geom. - * - * Currently there are the folliwing control classes supported: - * @li dGeomColliderControlClass - * - * For dGeomColliderControlClass there are the following codes available: - * @li dGeomColliderSetMergeSphereContactsControlCode (arg of type int, dGeomColliderMergeContactsValue_*) - * @li dGeomColliderGetMergeSphereContactsControlCode (arg of type int, dGeomColliderMergeContactsValue_*) - * - * @param geom the geom to control - * @param controlClass the control class - * @param controlCode the control code for the class - * @param dataValue the control argument pointer - * @param dataSize the control argument size provided or expected - * @returns Boolean execution status - * @ingroup collide - */ -ODE_API int dGeomLowLevelControl (dGeomID geom, int controlClass, int controlCode, void *dataValue, int *dataSize); - - -/** - * @brief Get world position of a relative point on geom. - * - * Calling this function on a non-placeable geom results in the same point being - * returned. - * - * @ingroup collide - * @param result will contain the result. - */ -ODE_API void dGeomGetRelPointPos -( - dGeomID geom, dReal px, dReal py, dReal pz, - dVector3 result -); - -/** - * @brief takes a point in global coordinates and returns - * the point's position in geom-relative coordinates. - * - * Calling this function on a non-placeable geom results in the same point being - * returned. - * - * @remarks - * This is the inverse of dGeomGetRelPointPos() - * @ingroup collide - * @param result will contain the result. - */ -ODE_API void dGeomGetPosRelPoint -( - dGeomID geom, dReal px, dReal py, dReal pz, - dVector3 result -); - -/** - * @brief Convert from geom-local to world coordinates. - * - * Calling this function on a non-placeable geom results in the same vector being - * returned. - * - * @ingroup collide - * @param result will contain the result. - */ -ODE_API void dGeomVectorToWorld -( - dGeomID geom, dReal px, dReal py, dReal pz, - dVector3 result -); - -/** - * @brief Convert from world to geom-local coordinates. - * - * Calling this function on a non-placeable geom results in the same vector being - * returned. - * - * @ingroup collide - * @param result will contain the result. - */ -ODE_API void dGeomVectorFromWorld -( - dGeomID geom, dReal px, dReal py, dReal pz, - dVector3 result -); - - -/* ************************************************************************ */ -/* geom offset from body */ - -/** - * @brief Set the local offset position of a geom from its body. - * - * Sets the geom's positional offset in local coordinates. - * After this call, the geom will be at a new position determined from the - * body's position and the offset. - * The geom must be attached to a body. - * If the geom did not have an offset, it is automatically created. - * - * @param geom the geom to set. - * @param x the new X coordinate. - * @param y the new Y coordinate. - * @param z the new Z coordinate. - * @ingroup collide - */ -ODE_API void dGeomSetOffsetPosition (dGeomID geom, dReal x, dReal y, dReal z); - - -/** - * @brief Set the local offset rotation matrix of a geom from its body. - * - * Sets the geom's rotational offset in local coordinates. - * After this call, the geom will be at a new position determined from the - * body's position and the offset. - * The geom must be attached to a body. - * If the geom did not have an offset, it is automatically created. - * - * @param geom the geom to set. - * @param R the new rotation matrix. - * @ingroup collide - */ -ODE_API void dGeomSetOffsetRotation (dGeomID geom, const dMatrix3 R); - - -/** - * @brief Set the local offset rotation of a geom from its body. - * - * Sets the geom's rotational offset in local coordinates. - * After this call, the geom will be at a new position determined from the - * body's position and the offset. - * The geom must be attached to a body. - * If the geom did not have an offset, it is automatically created. - * - * @param geom the geom to set. - * @param Q the new rotation. - * @ingroup collide - */ -ODE_API void dGeomSetOffsetQuaternion (dGeomID geom, const dQuaternion Q); - - -/** - * @brief Set the offset position of a geom from its body. - * - * Sets the geom's positional offset to move it to the new world - * coordinates. - * After this call, the geom will be at the world position passed in, - * and the offset will be the difference from the current body position. - * The geom must be attached to a body. - * If the geom did not have an offset, it is automatically created. - * - * @param geom the geom to set. - * @param x the new X coordinate. - * @param y the new Y coordinate. - * @param z the new Z coordinate. - * @ingroup collide - */ -ODE_API void dGeomSetOffsetWorldPosition (dGeomID geom, dReal x, dReal y, dReal z); - - -/** - * @brief Set the offset rotation of a geom from its body. - * - * Sets the geom's rotational offset to orient it to the new world - * rotation matrix. - * After this call, the geom will be at the world orientation passed in, - * and the offset will be the difference from the current body orientation. - * The geom must be attached to a body. - * If the geom did not have an offset, it is automatically created. - * - * @param geom the geom to set. - * @param R the new rotation matrix. - * @ingroup collide - */ -ODE_API void dGeomSetOffsetWorldRotation (dGeomID geom, const dMatrix3 R); - - -/** - * @brief Set the offset rotation of a geom from its body. - * - * Sets the geom's rotational offset to orient it to the new world - * rotation matrix. - * After this call, the geom will be at the world orientation passed in, - * and the offset will be the difference from the current body orientation. - * The geom must be attached to a body. - * If the geom did not have an offset, it is automatically created. - * - * @param geom the geom to set. - * @param Q the new rotation. - * @ingroup collide - */ -ODE_API void dGeomSetOffsetWorldQuaternion (dGeomID geom, const dQuaternion); - - -/** - * @brief Clear any offset from the geom. - * - * If the geom has an offset, it is eliminated and the geom is - * repositioned at the body's position. If the geom has no offset, - * this function does nothing. - * This is more efficient than calling dGeomSetOffsetPosition(zero) - * and dGeomSetOffsetRotation(identiy), because this function actually - * eliminates the offset, rather than leaving it as the identity transform. - * - * @param geom the geom to have its offset destroyed. - * @ingroup collide - */ -ODE_API void dGeomClearOffset(dGeomID geom); - - -/** - * @brief Check to see whether the geom has an offset. - * - * This function will return non-zero if the offset has been created. - * Note that there is a difference between a geom with no offset, - * and a geom with an offset that is the identity transform. - * In the latter case, although the observed behaviour is identical, - * there is a unnecessary computation involved because the geom will - * be applying the transform whenever it needs to recalculate its world - * position. - * - * @param geom the geom to query. - * @returns Non-zero if the geom has an offset, zero otherwise. - * @ingroup collide - */ -ODE_API int dGeomIsOffset(dGeomID geom); - - -/** - * @brief Get the offset position vector of a geom. - * - * Returns the positional offset of the geom in local coordinates. - * If the geom has no offset, this function returns the zero vector. - * - * @param geom the geom to query. - * @returns A pointer to the geom's offset vector. - * @remarks The returned value is a pointer to the geom's internal - * data structure. It is valid until any changes are made - * to the geom. - * @ingroup collide - */ -ODE_API const dReal * dGeomGetOffsetPosition (dGeomID geom); - - -/** - * @brief Copy the offset position vector of a geom. - * - * Returns the positional offset of the geom in local coordinates. - * If the geom has no offset, this function returns the zero vector. - * - * @param geom the geom to query. - * @param pos returns the offset position - * @ingroup collide - */ -ODE_API void dGeomCopyOffsetPosition (dGeomID geom, dVector3 pos); - - -/** - * @brief Get the offset rotation matrix of a geom. - * - * Returns the rotational offset of the geom in local coordinates. - * If the geom has no offset, this function returns the identity - * matrix. - * - * @param geom the geom to query. - * @returns A pointer to the geom's offset rotation matrix. - * @remarks The returned value is a pointer to the geom's internal - * data structure. It is valid until any changes are made - * to the geom. - * @ingroup collide - */ -ODE_API const dReal * dGeomGetOffsetRotation (dGeomID geom); - - -/** - * @brief Copy the offset rotation matrix of a geom. - * - * Returns the rotational offset of the geom in local coordinates. - * If the geom has no offset, this function returns the identity - * matrix. - * - * @param geom the geom to query. - * @param R returns the rotation matrix. - * @ingroup collide - */ -ODE_API void dGeomCopyOffsetRotation (dGeomID geom, dMatrix3 R); - - -/** - * @brief Get the offset rotation quaternion of a geom. - * - * Returns the rotation offset of the geom as a quaternion. - * If the geom has no offset, the identity quaternion is returned. - * - * @param geom the geom to query. - * @param result a copy of the rotation quaternion. - * @ingroup collide - */ -ODE_API void dGeomGetOffsetQuaternion (dGeomID geom, dQuaternion result); - - -/* ************************************************************************ */ -/* collision detection */ - -/* - * Just generate any contacts (disables any contact refining). - */ -#define CONTACTS_UNIMPORTANT 0x80000000 - -/** - * - * @brief Given two geoms o1 and o2 that potentially intersect, - * generate contact information for them. - * - * Internally, this just calls the correct class-specific collision - * functions for o1 and o2. - * - * @param o1 The first geom to test. - * @param o2 The second geom to test. - * - * @param flags The flags specify how contacts should be generated if - * the geoms touch. The lower 16 bits of flags is an integer that - * specifies the maximum number of contact points to generate. You must - * ask for at least one contact. - * Additionally, following bits may be set: - * CONTACTS_UNIMPORTANT -- just generate any contacts (skip contact refining). - * All other bits in flags must be set to zero. In the future the other bits - * may be used to select from different contact generation strategies. - * - * @param contact Points to an array of dContactGeom structures. The array - * must be able to hold at least the maximum number of contacts. These - * dContactGeom structures may be embedded within larger structures in the - * array -- the skip parameter is the byte offset from one dContactGeom to - * the next in the array. If skip is sizeof(dContactGeom) then contact - * points to a normal (C-style) array. It is an error for skip to be smaller - * than sizeof(dContactGeom). - * - * @returns If the geoms intersect, this function returns the number of contact - * points generated (and updates the contact array), otherwise it returns 0 - * (and the contact array is not touched). - * - * @remarks If a space is passed as o1 or o2 then this function will collide - * all objects contained in o1 with all objects contained in o2, and return - * the resulting contact points. This method for colliding spaces with geoms - * (or spaces with spaces) provides no user control over the individual - * collisions. To get that control, use dSpaceCollide or dSpaceCollide2 instead. - * - * @remarks If o1 and o2 are the same geom then this function will do nothing - * and return 0. Technically speaking an object intersects with itself, but it - * is not useful to find contact points in this case. - * - * @remarks This function does not care if o1 and o2 are in the same space or not - * (or indeed if they are in any space at all). - * - * @ingroup collide - */ -ODE_API int dCollide (dGeomID o1, dGeomID o2, int flags, dContactGeom *contact, - int skip); - -/** - * @brief Determines which pairs of geoms in a space may potentially intersect, - * and calls the callback function for each candidate pair. - * - * @param space The space to test. - * - * @param data Passed from dSpaceCollide directly to the callback - * function. Its meaning is user defined. The o1 and o2 arguments are the - * geoms that may be near each other. - * - * @param callback A callback function is of type @ref dNearCallback. - * - * @remarks Other spaces that are contained within the colliding space are - * not treated specially, i.e. they are not recursed into. The callback - * function may be passed these contained spaces as one or both geom - * arguments. - * - * @remarks dSpaceCollide() is guaranteed to pass all intersecting geom - * pairs to the callback function, but may also pass close but - * non-intersecting pairs. The number of these calls depends on the - * internal algorithms used by the space. Thus you should not expect - * that dCollide will return contacts for every pair passed to the - * callback. - * - * @sa dSpaceCollide2 - * @ingroup collide - */ -ODE_API void dSpaceCollide (dSpaceID space, void *data, dNearCallback *callback); - - -/** - * @brief Determines which geoms from one space may potentially intersect with - * geoms from another space, and calls the callback function for each candidate - * pair. - * - * @param space1 The first space to test. - * - * @param space2 The second space to test. - * - * @param data Passed from dSpaceCollide directly to the callback - * function. Its meaning is user defined. The o1 and o2 arguments are the - * geoms that may be near each other. - * - * @param callback A callback function is of type @ref dNearCallback. - * - * @remarks This function can also test a single non-space geom against a - * space. This function is useful when there is a collision hierarchy, i.e. - * when there are spaces that contain other spaces. - * - * @remarks Other spaces that are contained within the colliding space are - * not treated specially, i.e. they are not recursed into. The callback - * function may be passed these contained spaces as one or both geom - * arguments. - * - * @remarks Sublevel value of space affects how the spaces are iterated. - * Both spaces are recursed only if their sublevels match. Otherwise, only - * the space with greater sublevel is recursed and the one with lesser sublevel - * is used as a geom itself. - * - * @remarks dSpaceCollide2() is guaranteed to pass all intersecting geom - * pairs to the callback function, but may also pass close but - * non-intersecting pairs. The number of these calls depends on the - * internal algorithms used by the space. Thus you should not expect - * that dCollide will return contacts for every pair passed to the - * callback. - * - * @sa dSpaceCollide - * @sa dSpaceSetSublevel - * @ingroup collide - */ -ODE_API void dSpaceCollide2 (dGeomID space1, dGeomID space2, void *data, dNearCallback *callback); - - -/* ************************************************************************ */ -/* standard classes */ - -/* the maximum number of user classes that are supported */ -enum { - dMaxUserClasses = 4 -}; - -/* class numbers - each geometry object needs a unique number */ -enum { - dSphereClass = 0, - dBoxClass, - dCapsuleClass, - dCylinderClass, - dPlaneClass, - dRayClass, - dConvexClass, - dGeomTransformClass, - dTriMeshClass, - dHeightfieldClass, - - dFirstSpaceClass, - dSimpleSpaceClass = dFirstSpaceClass, - dHashSpaceClass, - dSweepAndPruneSpaceClass, // SAP - dQuadTreeSpaceClass, - dLastSpaceClass = dQuadTreeSpaceClass, - - dFirstUserClass, - dLastUserClass = dFirstUserClass + dMaxUserClasses - 1, - dGeomNumClasses -}; - - -/** - * @defgroup collide_sphere Sphere Class - * @ingroup collide - */ - -/** - * @brief Create a sphere geom of the given radius, and return its ID. - * - * @param space a space to contain the new geom. May be null. - * @param radius the radius of the sphere. - * - * @returns A new sphere geom. - * - * @remarks The point of reference for a sphere is its center. - * - * @sa dGeomDestroy - * @sa dGeomSphereSetRadius - * @ingroup collide_sphere - */ -ODE_API dGeomID dCreateSphere (dSpaceID space, dReal radius); - - -/** - * @brief Set the radius of a sphere geom. - * - * @param sphere the sphere to set. - * @param radius the new radius. - * - * @sa dGeomSphereGetRadius - * @ingroup collide_sphere - */ -ODE_API void dGeomSphereSetRadius (dGeomID sphere, dReal radius); - - -/** - * @brief Retrieves the radius of a sphere geom. - * - * @param sphere the sphere to query. - * - * @sa dGeomSphereSetRadius - * @ingroup collide_sphere - */ -ODE_API dReal dGeomSphereGetRadius (dGeomID sphere); - - -/** - * @brief Calculate the depth of the a given point within a sphere. - * - * @param sphere the sphere to query. - * @param x the X coordinate of the point. - * @param y the Y coordinate of the point. - * @param z the Z coordinate of the point. - * - * @returns The depth of the point. Points inside the sphere will have a - * positive depth, points outside it will have a negative depth, and points - * on the surface will have a depth of zero. - * - * @ingroup collide_sphere - */ -ODE_API dReal dGeomSpherePointDepth (dGeomID sphere, dReal x, dReal y, dReal z); - - -//--> Convex Functions -ODE_API dGeomID dCreateConvex (dSpaceID space, - dReal *_planes, - unsigned int _planecount, - dReal *_points, - unsigned int _pointcount,unsigned int *_polygons); - -ODE_API void dGeomSetConvex (dGeomID g, - dReal *_planes, - unsigned int _count, - dReal *_points, - unsigned int _pointcount,unsigned int *_polygons); -//<-- Convex Functions - -/** - * @defgroup collide_box Box Class - * @ingroup collide - */ - -/** - * @brief Create a box geom with the provided side lengths. - * - * @param space a space to contain the new geom. May be null. - * @param lx the length of the box along the X axis - * @param ly the length of the box along the Y axis - * @param lz the length of the box along the Z axis - * - * @returns A new box geom. - * - * @remarks The point of reference for a box is its center. - * - * @sa dGeomDestroy - * @sa dGeomBoxSetLengths - * @ingroup collide_box - */ -ODE_API dGeomID dCreateBox (dSpaceID space, dReal lx, dReal ly, dReal lz); - - -/** - * @brief Set the side lengths of the given box. - * - * @param box the box to set - * @param lx the length of the box along the X axis - * @param ly the length of the box along the Y axis - * @param lz the length of the box along the Z axis - * - * @sa dGeomBoxGetLengths - * @ingroup collide_box - */ -ODE_API void dGeomBoxSetLengths (dGeomID box, dReal lx, dReal ly, dReal lz); - - -/** - * @brief Get the side lengths of a box. - * - * @param box the box to query - * @param result the returned side lengths - * - * @sa dGeomBoxSetLengths - * @ingroup collide_box - */ -ODE_API void dGeomBoxGetLengths (dGeomID box, dVector3 result); - - -/** - * @brief Return the depth of a point in a box. - * - * @param box the box to query - * @param x the X coordinate of the point to test. - * @param y the Y coordinate of the point to test. - * @param z the Z coordinate of the point to test. - * - * @returns The depth of the point. Points inside the box will have a - * positive depth, points outside it will have a negative depth, and points - * on the surface will have a depth of zero. - */ -ODE_API dReal dGeomBoxPointDepth (dGeomID box, dReal x, dReal y, dReal z); - - -ODE_API dGeomID dCreatePlane (dSpaceID space, dReal a, dReal b, dReal c, dReal d); -ODE_API void dGeomPlaneSetParams (dGeomID plane, dReal a, dReal b, dReal c, dReal d); -ODE_API void dGeomPlaneGetParams (dGeomID plane, dVector4 result); -ODE_API dReal dGeomPlanePointDepth (dGeomID plane, dReal x, dReal y, dReal z); - -ODE_API dGeomID dCreateCapsule (dSpaceID space, dReal radius, dReal length); -ODE_API void dGeomCapsuleSetParams (dGeomID ccylinder, dReal radius, dReal length); -ODE_API void dGeomCapsuleGetParams (dGeomID ccylinder, dReal *radius, dReal *length); -ODE_API dReal dGeomCapsulePointDepth (dGeomID ccylinder, dReal x, dReal y, dReal z); - -// For now we want to have a backwards compatible C-API, note: C++ API is not. -#define dCreateCCylinder dCreateCapsule -#define dGeomCCylinderSetParams dGeomCapsuleSetParams -#define dGeomCCylinderGetParams dGeomCapsuleGetParams -#define dGeomCCylinderPointDepth dGeomCapsulePointDepth -#define dCCylinderClass dCapsuleClass - -ODE_API dGeomID dCreateCylinder (dSpaceID space, dReal radius, dReal length); -ODE_API void dGeomCylinderSetParams (dGeomID cylinder, dReal radius, dReal length); -ODE_API void dGeomCylinderGetParams (dGeomID cylinder, dReal *radius, dReal *length); - -ODE_API dGeomID dCreateRay (dSpaceID space, dReal length); -ODE_API void dGeomRaySetLength (dGeomID ray, dReal length); -ODE_API dReal dGeomRayGetLength (dGeomID ray); -ODE_API void dGeomRaySet (dGeomID ray, dReal px, dReal py, dReal pz, - dReal dx, dReal dy, dReal dz); -ODE_API void dGeomRayGet (dGeomID ray, dVector3 start, dVector3 dir); - -/* - * Set/get ray flags that influence ray collision detection. - * These flags are currently only noticed by the trimesh collider, because - * they can make a major differences there. - */ -ODE_API void dGeomRaySetParams (dGeomID g, int FirstContact, int BackfaceCull); -ODE_API void dGeomRayGetParams (dGeomID g, int *FirstContact, int *BackfaceCull); -ODE_API void dGeomRaySetClosestHit (dGeomID g, int closestHit); -ODE_API int dGeomRayGetClosestHit (dGeomID g); - -#include "collision_trimesh.h" - -ODE_API dGeomID dCreateGeomTransform (dSpaceID space); -ODE_API void dGeomTransformSetGeom (dGeomID g, dGeomID obj); -ODE_API dGeomID dGeomTransformGetGeom (dGeomID g); -ODE_API void dGeomTransformSetCleanup (dGeomID g, int mode); -ODE_API int dGeomTransformGetCleanup (dGeomID g); -ODE_API void dGeomTransformSetInfo (dGeomID g, int mode); -ODE_API int dGeomTransformGetInfo (dGeomID g); - - -/* ************************************************************************ */ -/* heightfield functions */ - - -// Data storage for heightfield data. -struct dxHeightfieldData; -typedef struct dxHeightfieldData* dHeightfieldDataID; - - -/** - * @brief Callback prototype - * - * Used by the callback heightfield data type to sample a height for a - * given cell position. - * - * @param p_user_data User data specified when creating the dHeightfieldDataID - * @param x The index of a sample in the local x axis. It is a value - * in the range zero to ( nWidthSamples - 1 ). - * @param x The index of a sample in the local z axis. It is a value - * in the range zero to ( nDepthSamples - 1 ). - * - * @return The sample height which is then scaled and offset using the - * values specified when the heightfield data was created. - * - * @ingroup collide - */ -typedef dReal dHeightfieldGetHeight( void* p_user_data, int x, int z ); - - - -/** - * @brief Creates a heightfield geom. - * - * Uses the information in the given dHeightfieldDataID to construct - * a geom representing a heightfield in a collision space. - * - * @param space The space to add the geom to. - * @param data The dHeightfieldDataID created by dGeomHeightfieldDataCreate and - * setup by dGeomHeightfieldDataBuildCallback, dGeomHeightfieldDataBuildByte, - * dGeomHeightfieldDataBuildShort or dGeomHeightfieldDataBuildFloat. - * @param bPlaceable If non-zero this geom can be transformed in the world using the - * usual functions such as dGeomSetPosition and dGeomSetRotation. If the geom is - * not set as placeable, then it uses a fixed orientation where the global y axis - * represents the dynamic 'height' of the heightfield. - * - * @return A geom id to reference this geom in other calls. - * - * @ingroup collide - */ -ODE_API dGeomID dCreateHeightfield( dSpaceID space, - dHeightfieldDataID data, int bPlaceable ); - - -/** - * @brief Creates a new empty dHeightfieldDataID. - * - * Allocates a new dHeightfieldDataID and returns it. You must call - * dGeomHeightfieldDataDestroy to destroy it after the geom has been removed. - * The dHeightfieldDataID value is used when specifying a data format type. - * - * @return A dHeightfieldDataID for use with dGeomHeightfieldDataBuildCallback, - * dGeomHeightfieldDataBuildByte, dGeomHeightfieldDataBuildShort or - * dGeomHeightfieldDataBuildFloat. - * @ingroup collide - */ -ODE_API dHeightfieldDataID dGeomHeightfieldDataCreate(void); - - -/** - * @brief Destroys a dHeightfieldDataID. - * - * Deallocates a given dHeightfieldDataID and all managed resources. - * - * @param d A dHeightfieldDataID created by dGeomHeightfieldDataCreate - * @ingroup collide - */ -ODE_API void dGeomHeightfieldDataDestroy( dHeightfieldDataID d ); - - - -/** - * @brief Configures a dHeightfieldDataID to use a callback to - * retrieve height data. - * - * Before a dHeightfieldDataID can be used by a geom it must be - * configured to specify the format of the height data. - * This call specifies that the heightfield data is computed by - * the user and it should use the given callback when determining - * the height of a given element of it's shape. - * - * @param d A new dHeightfieldDataID created by dGeomHeightfieldDataCreate - * - * @param width Specifies the total 'width' of the heightfield along - * the geom's local x axis. - * @param depth Specifies the total 'depth' of the heightfield along - * the geom's local z axis. - * - * @param widthSamples Specifies the number of vertices to sample - * along the width of the heightfield. Each vertex has a corresponding - * height value which forms the overall shape. - * Naturally this value must be at least two or more. - * @param depthSamples Specifies the number of vertices to sample - * along the depth of the heightfield. - * - * @param scale A uniform scale applied to all raw height data. - * @param offset An offset applied to the scaled height data. - * - * @param thickness A value subtracted from the lowest height - * value which in effect adds an additional cuboid to the base of the - * heightfield. This is used to prevent geoms from looping under the - * desired terrain and not registering as a collision. Note that the - * thickness is not affected by the scale or offset parameters. - * - * @param bWrap If non-zero the heightfield will infinitely tile in both - * directions along the local x and z axes. If zero the heightfield is - * bounded from zero to width in the local x axis, and zero to depth in - * the local z axis. - * - * @ingroup collide - */ -ODE_API void dGeomHeightfieldDataBuildCallback( dHeightfieldDataID d, - void* pUserData, dHeightfieldGetHeight* pCallback, - dReal width, dReal depth, int widthSamples, int depthSamples, - dReal scale, dReal offset, dReal thickness, int bWrap ); - -/** - * @brief Configures a dHeightfieldDataID to use height data in byte format. - * - * Before a dHeightfieldDataID can be used by a geom it must be - * configured to specify the format of the height data. - * This call specifies that the heightfield data is stored as a rectangular - * array of bytes (8 bit unsigned) representing the height at each sample point. - * - * @param d A new dHeightfieldDataID created by dGeomHeightfieldDataCreate - * - * @param pHeightData A pointer to the height data. - * @param bCopyHeightData When non-zero the height data is copied to an - * internal store. When zero the height data is accessed by reference and - * so must persist throughout the lifetime of the heightfield. - * - * @param width Specifies the total 'width' of the heightfield along - * the geom's local x axis. - * @param depth Specifies the total 'depth' of the heightfield along - * the geom's local z axis. - * - * @param widthSamples Specifies the number of vertices to sample - * along the width of the heightfield. Each vertex has a corresponding - * height value which forms the overall shape. - * Naturally this value must be at least two or more. - * @param depthSamples Specifies the number of vertices to sample - * along the depth of the heightfield. - * - * @param scale A uniform scale applied to all raw height data. - * @param offset An offset applied to the scaled height data. - * - * @param thickness A value subtracted from the lowest height - * value which in effect adds an additional cuboid to the base of the - * heightfield. This is used to prevent geoms from looping under the - * desired terrain and not registering as a collision. Note that the - * thickness is not affected by the scale or offset parameters. - * - * @param bWrap If non-zero the heightfield will infinitely tile in both - * directions along the local x and z axes. If zero the heightfield is - * bounded from zero to width in the local x axis, and zero to depth in - * the local z axis. - * - * @ingroup collide - */ -ODE_API void dGeomHeightfieldDataBuildByte( dHeightfieldDataID d, - const unsigned char* pHeightData, int bCopyHeightData, - dReal width, dReal depth, int widthSamples, int depthSamples, - dReal scale, dReal offset, dReal thickness, int bWrap ); - -/** - * @brief Configures a dHeightfieldDataID to use height data in short format. - * - * Before a dHeightfieldDataID can be used by a geom it must be - * configured to specify the format of the height data. - * This call specifies that the heightfield data is stored as a rectangular - * array of shorts (16 bit signed) representing the height at each sample point. - * - * @param d A new dHeightfieldDataID created by dGeomHeightfieldDataCreate - * - * @param pHeightData A pointer to the height data. - * @param bCopyHeightData When non-zero the height data is copied to an - * internal store. When zero the height data is accessed by reference and - * so must persist throughout the lifetime of the heightfield. - * - * @param width Specifies the total 'width' of the heightfield along - * the geom's local x axis. - * @param depth Specifies the total 'depth' of the heightfield along - * the geom's local z axis. - * - * @param widthSamples Specifies the number of vertices to sample - * along the width of the heightfield. Each vertex has a corresponding - * height value which forms the overall shape. - * Naturally this value must be at least two or more. - * @param depthSamples Specifies the number of vertices to sample - * along the depth of the heightfield. - * - * @param scale A uniform scale applied to all raw height data. - * @param offset An offset applied to the scaled height data. - * - * @param thickness A value subtracted from the lowest height - * value which in effect adds an additional cuboid to the base of the - * heightfield. This is used to prevent geoms from looping under the - * desired terrain and not registering as a collision. Note that the - * thickness is not affected by the scale or offset parameters. - * - * @param bWrap If non-zero the heightfield will infinitely tile in both - * directions along the local x and z axes. If zero the heightfield is - * bounded from zero to width in the local x axis, and zero to depth in - * the local z axis. - * - * @ingroup collide - */ -ODE_API void dGeomHeightfieldDataBuildShort( dHeightfieldDataID d, - const short* pHeightData, int bCopyHeightData, - dReal width, dReal depth, int widthSamples, int depthSamples, - dReal scale, dReal offset, dReal thickness, int bWrap ); - -/** - * @brief Configures a dHeightfieldDataID to use height data in - * single precision floating point format. - * - * Before a dHeightfieldDataID can be used by a geom it must be - * configured to specify the format of the height data. - * This call specifies that the heightfield data is stored as a rectangular - * array of single precision floats representing the height at each - * sample point. - * - * @param d A new dHeightfieldDataID created by dGeomHeightfieldDataCreate - * - * @param pHeightData A pointer to the height data. - * @param bCopyHeightData When non-zero the height data is copied to an - * internal store. When zero the height data is accessed by reference and - * so must persist throughout the lifetime of the heightfield. - * - * @param width Specifies the total 'width' of the heightfield along - * the geom's local x axis. - * @param depth Specifies the total 'depth' of the heightfield along - * the geom's local z axis. - * - * @param widthSamples Specifies the number of vertices to sample - * along the width of the heightfield. Each vertex has a corresponding - * height value which forms the overall shape. - * Naturally this value must be at least two or more. - * @param depthSamples Specifies the number of vertices to sample - * along the depth of the heightfield. - * - * @param scale A uniform scale applied to all raw height data. - * @param offset An offset applied to the scaled height data. - * - * @param thickness A value subtracted from the lowest height - * value which in effect adds an additional cuboid to the base of the - * heightfield. This is used to prevent geoms from looping under the - * desired terrain and not registering as a collision. Note that the - * thickness is not affected by the scale or offset parameters. - * - * @param bWrap If non-zero the heightfield will infinitely tile in both - * directions along the local x and z axes. If zero the heightfield is - * bounded from zero to width in the local x axis, and zero to depth in - * the local z axis. - * - * @ingroup collide - */ -ODE_API void dGeomHeightfieldDataBuildSingle( dHeightfieldDataID d, - const float* pHeightData, int bCopyHeightData, - dReal width, dReal depth, int widthSamples, int depthSamples, - dReal scale, dReal offset, dReal thickness, int bWrap ); - -/** - * @brief Configures a dHeightfieldDataID to use height data in - * double precision floating point format. - * - * Before a dHeightfieldDataID can be used by a geom it must be - * configured to specify the format of the height data. - * This call specifies that the heightfield data is stored as a rectangular - * array of double precision floats representing the height at each - * sample point. - * - * @param d A new dHeightfieldDataID created by dGeomHeightfieldDataCreate - * - * @param pHeightData A pointer to the height data. - * @param bCopyHeightData When non-zero the height data is copied to an - * internal store. When zero the height data is accessed by reference and - * so must persist throughout the lifetime of the heightfield. - * - * @param width Specifies the total 'width' of the heightfield along - * the geom's local x axis. - * @param depth Specifies the total 'depth' of the heightfield along - * the geom's local z axis. - * - * @param widthSamples Specifies the number of vertices to sample - * along the width of the heightfield. Each vertex has a corresponding - * height value which forms the overall shape. - * Naturally this value must be at least two or more. - * @param depthSamples Specifies the number of vertices to sample - * along the depth of the heightfield. - * - * @param scale A uniform scale applied to all raw height data. - * @param offset An offset applied to the scaled height data. - * - * @param thickness A value subtracted from the lowest height - * value which in effect adds an additional cuboid to the base of the - * heightfield. This is used to prevent geoms from looping under the - * desired terrain and not registering as a collision. Note that the - * thickness is not affected by the scale or offset parameters. - * - * @param bWrap If non-zero the heightfield will infinitely tile in both - * directions along the local x and z axes. If zero the heightfield is - * bounded from zero to width in the local x axis, and zero to depth in - * the local z axis. - * - * @ingroup collide - */ -ODE_API void dGeomHeightfieldDataBuildDouble( dHeightfieldDataID d, - const double* pHeightData, int bCopyHeightData, - dReal width, dReal depth, int widthSamples, int depthSamples, - dReal scale, dReal offset, dReal thickness, int bWrap ); - -/** - * @brief Manually set the minimum and maximum height bounds. - * - * This call allows you to set explicit min / max values after initial - * creation typically for callback heightfields which default to +/- infinity, - * or those whose data has changed. This must be set prior to binding with a - * geom, as the the AABB is not recomputed after it's first generation. - * - * @remarks The minimum and maximum values are used to compute the AABB - * for the heightfield which is used for early rejection of collisions. - * A close fit will yield a more efficient collision check. - * - * @param d A dHeightfieldDataID created by dGeomHeightfieldDataCreate - * @param min_height The new minimum height value. Scale, offset and thickness is then applied. - * @param max_height The new maximum height value. Scale and offset is then applied. - * @ingroup collide - */ -ODE_API void dGeomHeightfieldDataSetBounds( dHeightfieldDataID d, - dReal minHeight, dReal maxHeight ); - - -/** - * @brief Assigns a dHeightfieldDataID to a heightfield geom. - * - * Associates the given dHeightfieldDataID with a heightfield geom. - * This is done without affecting the GEOM_PLACEABLE flag. - * - * @param g A geom created by dCreateHeightfield - * @param d A dHeightfieldDataID created by dGeomHeightfieldDataCreate - * @ingroup collide - */ -ODE_API void dGeomHeightfieldSetHeightfieldData( dGeomID g, dHeightfieldDataID d ); - - -/** - * @brief Gets the dHeightfieldDataID bound to a heightfield geom. - * - * Returns the dHeightfieldDataID associated with a heightfield geom. - * - * @param g A geom created by dCreateHeightfield - * @return The dHeightfieldDataID which may be NULL if none was assigned. - * @ingroup collide - */ -ODE_API dHeightfieldDataID dGeomHeightfieldGetHeightfieldData( dGeomID g ); - - - -/* ************************************************************************ */ -/* utility functions */ - -ODE_API void dClosestLineSegmentPoints (const dVector3 a1, const dVector3 a2, - const dVector3 b1, const dVector3 b2, - dVector3 cp1, dVector3 cp2); - -ODE_API int dBoxTouchesBox (const dVector3 _p1, const dMatrix3 R1, - const dVector3 side1, const dVector3 _p2, - const dMatrix3 R2, const dVector3 side2); - -// The meaning of flags parameter is the same as in dCollide() -ODE_API int dBoxBox (const dVector3 p1, const dMatrix3 R1, - const dVector3 side1, const dVector3 p2, - const dMatrix3 R2, const dVector3 side2, - dVector3 normal, dReal *depth, int *return_code, - int flags, dContactGeom *contact, int skip); - -ODE_API void dInfiniteAABB (dGeomID geom, dReal aabb[6]); - - -/* ************************************************************************ */ -/* custom classes */ - -typedef void dGetAABBFn (dGeomID, dReal aabb[6]); -typedef int dColliderFn (dGeomID o1, dGeomID o2, - int flags, dContactGeom *contact, int skip); -typedef dColliderFn * dGetColliderFnFn (int num); -typedef void dGeomDtorFn (dGeomID o); -typedef int dAABBTestFn (dGeomID o1, dGeomID o2, dReal aabb[6]); - -typedef struct dGeomClass { - int bytes; - dGetColliderFnFn *collider; - dGetAABBFn *aabb; - dAABBTestFn *aabb_test; - dGeomDtorFn *dtor; -} dGeomClass; - -ODE_API int dCreateGeomClass (const dGeomClass *classptr); -ODE_API void * dGeomGetClassData (dGeomID); -ODE_API dGeomID dCreateGeom (int classnum); - -/** - * @brief Sets a custom collider function for two geom classes. - * - * @param i The first geom class handled by this collider - * @param j The second geom class handled by this collider - * @param fn The collider function to use to determine collisions. - * @ingroup collide - */ -ODE_API void dSetColliderOverride (int i, int j, dColliderFn *fn); - - -/* ************************************************************************ */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/misc/builddeps/linux64/ode/include/ode/collision_space.h b/misc/builddeps/linux64/ode/include/ode/collision_space.h deleted file mode 100644 index bf7ef9b4..00000000 --- a/misc/builddeps/linux64/ode/include/ode/collision_space.h +++ /dev/null @@ -1,182 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001-2003 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#ifndef _ODE_COLLISION_SPACE_H_ -#define _ODE_COLLISION_SPACE_H_ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -struct dContactGeom; - -/** - * @brief User callback for geom-geom collision testing. - * - * @param data The user data object, as passed to dSpaceCollide. - * @param o1 The first geom being tested. - * @param o2 The second geom being test. - * - * @remarks The callback function can call dCollide on o1 and o2 to generate - * contact points between each pair. Then these contact points may be added - * to the simulation as contact joints. The user's callback function can of - * course chose not to call dCollide for any pair, e.g. if the user decides - * that those pairs should not interact. - * - * @ingroup collide - */ -typedef void dNearCallback (void *data, dGeomID o1, dGeomID o2); - - -ODE_API dSpaceID dSimpleSpaceCreate (dSpaceID space); -ODE_API dSpaceID dHashSpaceCreate (dSpaceID space); -ODE_API dSpaceID dQuadTreeSpaceCreate (dSpaceID space, const dVector3 Center, const dVector3 Extents, int Depth); - - -// SAP -// Order XZY or ZXY usually works best, if your Y is up. -#define dSAP_AXES_XYZ ((0)|(1<<2)|(2<<4)) -#define dSAP_AXES_XZY ((0)|(2<<2)|(1<<4)) -#define dSAP_AXES_YXZ ((1)|(0<<2)|(2<<4)) -#define dSAP_AXES_YZX ((1)|(2<<2)|(0<<4)) -#define dSAP_AXES_ZXY ((2)|(0<<2)|(1<<4)) -#define dSAP_AXES_ZYX ((2)|(1<<2)|(0<<4)) - -ODE_API dSpaceID dSweepAndPruneSpaceCreate( dSpaceID space, int axisorder ); - - - -ODE_API void dSpaceDestroy (dSpaceID); - -ODE_API void dHashSpaceSetLevels (dSpaceID space, int minlevel, int maxlevel); -ODE_API void dHashSpaceGetLevels (dSpaceID space, int *minlevel, int *maxlevel); - -ODE_API void dSpaceSetCleanup (dSpaceID space, int mode); -ODE_API int dSpaceGetCleanup (dSpaceID space); - -/** -* @brief Sets sublevel value for a space. -* -* Sublevel affects how the space is handled in dSpaceCollide2 when it is collided -* with another space. If sublevels of both spaces match, the function iterates -* geometries of both spaces and collides them with each other. If sublevel of one -* space is greater than the sublevel of another one, only the geometries of the -* space with greater sublevel are iterated, another space is passed into -* collision callback as a geometry itself. By default all the spaces are assigned -* zero sublevel. -* -* @note -* The space sublevel @e IS @e NOT automatically updated when one space is inserted -* into another or removed from one. It is a client's responsibility to update sublevel -* value if necessary. -* -* @param space the space to modify -* @param sublevel the sublevel value to be assigned -* @ingroup collide -* @see dSpaceGetSublevel -* @see dSpaceCollide2 -*/ -ODE_API void dSpaceSetSublevel (dSpaceID space, int sublevel); - -/** -* @brief Gets sublevel value of a space. -* -* Sublevel affects how the space is handled in dSpaceCollide2 when it is collided -* with another space. See @c dSpaceSetSublevel for more details. -* -* @param space the space to query -* @returns the sublevel value of the space -* @ingroup collide -* @see dSpaceSetSublevel -* @see dSpaceCollide2 -*/ -ODE_API int dSpaceGetSublevel (dSpaceID space); - - -/** -* @brief Sets manual cleanup flag for a space. -* -* Manual cleanup flag marks a space as eligible for manual thread data cleanup. -* This function should be called for every space object right after creation in -* case if ODE has been initialized with @c dInitFlagManualThreadCleanup flag. -* -* Failure to set manual cleanup flag for a space may lead to some resources -* remaining leaked until the program exit. -* -* @param space the space to modify -* @param mode 1 for manual cleanup mode and 0 for default cleanup mode -* @ingroup collide -* @see dSpaceGetManualCleanup -* @see dInitODE2 -*/ -ODE_API void dSpaceSetManualCleanup (dSpaceID space, int mode); - -/** -* @brief Get manual cleanup flag of a space. -* -* Manual cleanup flag marks a space space as eligible for manual thread data cleanup. -* See @c dSpaceSetManualCleanup for more details. -* -* @param space the space to query -* @returns 1 for manual cleanup mode and 0 for default cleanup mode of the space -* @ingroup collide -* @see dSpaceSetManualCleanup -* @see dInitODE2 -*/ -ODE_API int dSpaceGetManualCleanup (dSpaceID space); - -ODE_API void dSpaceAdd (dSpaceID, dGeomID); -ODE_API void dSpaceRemove (dSpaceID, dGeomID); -ODE_API int dSpaceQuery (dSpaceID, dGeomID); -ODE_API void dSpaceClean (dSpaceID); -ODE_API int dSpaceGetNumGeoms (dSpaceID); -ODE_API dGeomID dSpaceGetGeom (dSpaceID, int i); - -/** - * @brief Given a space, this returns its class. - * - * The ODE classes are: - * @li dSimpleSpaceClass - * @li dHashSpaceClass - * @li dSweepAndPruneSpaceClass - * @li dQuadTreeSpaceClass - * @li dFirstUserClass - * @li dLastUserClass - * - * The class id not defined by the user should be between - * dFirstSpaceClass and dLastSpaceClass. - * - * User-defined class will return their own number. - * - * @param space the space to query - * @returns The space class ID. - * @ingroup collide - */ -ODE_API int dSpaceGetClass(dSpaceID space); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/misc/builddeps/linux64/ode/include/ode/collision_trimesh.h b/misc/builddeps/linux64/ode/include/ode/collision_trimesh.h deleted file mode 100644 index f263a9ea..00000000 --- a/misc/builddeps/linux64/ode/include/ode/collision_trimesh.h +++ /dev/null @@ -1,216 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001-2003 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -/* - * TriMesh code by Erwin de Vries. - * - * Trimesh data. - * This is where the actual vertexdata (pointers), and BV tree is stored. - * Vertices should be single precision! - * This should be more sophisticated, so that the user can easyly implement - * another collision library, but this is a lot of work, and also costs some - * performance because some data has to be copied. - */ - -#ifndef _ODE_COLLISION_TRIMESH_H_ -#define _ODE_COLLISION_TRIMESH_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Data storage for triangle meshes. - */ -struct dxTriMeshData; -typedef struct dxTriMeshData* dTriMeshDataID; - -/* - * These dont make much sense now, but they will later when we add more - * features. - */ -ODE_API dTriMeshDataID dGeomTriMeshDataCreate(void); -ODE_API void dGeomTriMeshDataDestroy(dTriMeshDataID g); - - - -enum { TRIMESH_FACE_NORMALS }; -ODE_API void dGeomTriMeshDataSet(dTriMeshDataID g, int data_id, void* in_data); -ODE_API void* dGeomTriMeshDataGet(dTriMeshDataID g, int data_id); - - - -/** - * We need to set the last transform after each time step for - * accurate collision response. These functions get and set that transform. - * It is stored per geom instance, rather than per dTriMeshDataID. - */ -ODE_API void dGeomTriMeshSetLastTransform( dGeomID g, dMatrix4 last_trans ); -ODE_API dReal* dGeomTriMeshGetLastTransform( dGeomID g ); - -/* - * Build a TriMesh data object with single precision vertex data. - */ -ODE_API void dGeomTriMeshDataBuildSingle(dTriMeshDataID g, - const void* Vertices, int VertexStride, int VertexCount, - const void* Indices, int IndexCount, int TriStride); -/* same again with a normals array (used as trimesh-trimesh optimization) */ -ODE_API void dGeomTriMeshDataBuildSingle1(dTriMeshDataID g, - const void* Vertices, int VertexStride, int VertexCount, - const void* Indices, int IndexCount, int TriStride, - const void* Normals); -/* -* Build a TriMesh data object with double precision vertex data. -*/ -ODE_API void dGeomTriMeshDataBuildDouble(dTriMeshDataID g, - const void* Vertices, int VertexStride, int VertexCount, - const void* Indices, int IndexCount, int TriStride); -/* same again with a normals array (used as trimesh-trimesh optimization) */ -ODE_API void dGeomTriMeshDataBuildDouble1(dTriMeshDataID g, - const void* Vertices, int VertexStride, int VertexCount, - const void* Indices, int IndexCount, int TriStride, - const void* Normals); - -/* - * Simple build. Single/double precision based on dSINGLE/dDOUBLE! - */ -ODE_API void dGeomTriMeshDataBuildSimple(dTriMeshDataID g, - const dReal* Vertices, int VertexCount, - const dTriIndex* Indices, int IndexCount); -/* same again with a normals array (used as trimesh-trimesh optimization) */ -ODE_API void dGeomTriMeshDataBuildSimple1(dTriMeshDataID g, - const dReal* Vertices, int VertexCount, - const dTriIndex* Indices, int IndexCount, - const int* Normals); - -/* Preprocess the trimesh data to remove mark unnecessary edges and vertices */ -ODE_API void dGeomTriMeshDataPreprocess(dTriMeshDataID g); -/* Get and set the internal preprocessed trimesh data buffer, for loading and saving */ -ODE_API void dGeomTriMeshDataGetBuffer(dTriMeshDataID g, unsigned char** buf, int* bufLen); -ODE_API void dGeomTriMeshDataSetBuffer(dTriMeshDataID g, unsigned char* buf); - - -/* - * Per triangle callback. Allows the user to say if he wants a collision with - * a particular triangle. - */ -typedef int dTriCallback(dGeomID TriMesh, dGeomID RefObject, int TriangleIndex); -ODE_API void dGeomTriMeshSetCallback(dGeomID g, dTriCallback* Callback); -ODE_API dTriCallback* dGeomTriMeshGetCallback(dGeomID g); - -/* - * Per object callback. Allows the user to get the list of triangles in 1 - * shot. Maybe we should remove this one. - */ -typedef void dTriArrayCallback(dGeomID TriMesh, dGeomID RefObject, const int* TriIndices, int TriCount); -ODE_API void dGeomTriMeshSetArrayCallback(dGeomID g, dTriArrayCallback* ArrayCallback); -ODE_API dTriArrayCallback* dGeomTriMeshGetArrayCallback(dGeomID g); - -/* - * Ray callback. - * Allows the user to say if a ray collides with a triangle on barycentric - * coords. The user can for example sample a texture with alpha transparency - * to determine if a collision should occur. - */ -typedef int dTriRayCallback(dGeomID TriMesh, dGeomID Ray, int TriangleIndex, dReal u, dReal v); -ODE_API void dGeomTriMeshSetRayCallback(dGeomID g, dTriRayCallback* Callback); -ODE_API dTriRayCallback* dGeomTriMeshGetRayCallback(dGeomID g); - -/* - * Triangle merging callback. - * Allows the user to generate a fake triangle index for a new contact generated - * from merging of two other contacts. That index could later be used by the - * user to determine attributes of original triangles used as sources for a - * merged contact. - */ -typedef int dTriTriMergeCallback(dGeomID TriMesh, int FirstTriangleIndex, int SecondTriangleIndex); -ODE_API void dGeomTriMeshSetTriMergeCallback(dGeomID g, dTriTriMergeCallback* Callback); -ODE_API dTriTriMergeCallback* dGeomTriMeshGetTriMergeCallback(dGeomID g); - -/* - * Trimesh class - * Construction. Callbacks are optional. - */ -ODE_API dGeomID dCreateTriMesh(dSpaceID space, dTriMeshDataID Data, dTriCallback* Callback, dTriArrayCallback* ArrayCallback, dTriRayCallback* RayCallback); - -ODE_API void dGeomTriMeshSetData(dGeomID g, dTriMeshDataID Data); -ODE_API dTriMeshDataID dGeomTriMeshGetData(dGeomID g); - - -// enable/disable/check temporal coherence -ODE_API void dGeomTriMeshEnableTC(dGeomID g, int geomClass, int enable); -ODE_API int dGeomTriMeshIsTCEnabled(dGeomID g, int geomClass); - -/* - * Clears the internal temporal coherence caches. When a geom has its - * collision checked with a trimesh once, data is stored inside the trimesh. - * With large worlds with lots of seperate objects this list could get huge. - * We should be able to do this automagically. - */ -ODE_API void dGeomTriMeshClearTCCache(dGeomID g); - - -/* - * returns the TriMeshDataID - */ -ODE_API dTriMeshDataID dGeomTriMeshGetTriMeshDataID(dGeomID g); - -/* - * Gets a triangle. - */ -ODE_API void dGeomTriMeshGetTriangle(dGeomID g, int Index, dVector3* v0, dVector3* v1, dVector3* v2); - -/* - * Gets the point on the requested triangle and the given barycentric - * coordinates. - */ -ODE_API void dGeomTriMeshGetPoint(dGeomID g, int Index, dReal u, dReal v, dVector3 Out); - -/* - -This is how the strided data works: - -struct StridedVertex{ - dVector3 Vertex; - // Userdata -}; -int VertexStride = sizeof(StridedVertex); - -struct StridedTri{ - int Indices[3]; - // Userdata -}; -int TriStride = sizeof(StridedTri); - -*/ - - -ODE_API int dGeomTriMeshGetTriangleCount (dGeomID g); - -ODE_API void dGeomTriMeshDataUpdate(dTriMeshDataID g); - -#ifdef __cplusplus -} -#endif - -#endif /* _ODE_COLLISION_TRIMESH_H_ */ - diff --git a/misc/builddeps/linux64/ode/include/ode/common.h b/misc/builddeps/linux64/ode/include/ode/common.h deleted file mode 100644 index d7b2bba7..00000000 --- a/misc/builddeps/linux64/ode/include/ode/common.h +++ /dev/null @@ -1,420 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#ifndef _ODE_COMMON_H_ -#define _ODE_COMMON_H_ -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - - -#define PURE_INLINE static __inline - - -/* configuration stuff */ - -/* constants */ - -/* pi and 1/sqrt(2) are defined here if necessary because they don't get - * defined in on some platforms (like MS-Windows) - */ - -#ifndef M_PI -#define M_PI REAL(3.1415926535897932384626433832795029) -#endif -#ifndef M_SQRT1_2 -#define M_SQRT1_2 REAL(0.7071067811865475244008443621048490) -#endif - - -/* debugging: - * IASSERT is an internal assertion, i.e. a consistency check. if it fails - * we want to know where. - * UASSERT is a user assertion, i.e. if it fails a nice error message - * should be printed for the user. - * AASSERT is an arguments assertion, i.e. if it fails "bad argument(s)" - * is printed. - * DEBUGMSG just prints out a message - */ - -# if defined(__STDC__) && __STDC_VERSION__ >= 199901L -# define __FUNCTION__ __func__ -# endif -#ifndef dNODEBUG -# ifdef __GNUC__ -# define dIASSERT(a) { if (!(a)) { dDebug (d_ERR_IASSERT, \ - "assertion \"" #a "\" failed in %s() [%s:%u]",__FUNCTION__,__FILE__,__LINE__); } } -# define dUASSERT(a,msg) { if (!(a)) { dDebug (d_ERR_UASSERT, \ - msg " in %s()", __FUNCTION__); } } -# define dDEBUGMSG(msg) { dMessage (d_ERR_UASSERT, \ - msg " in %s() [%s:%u]", __FUNCTION__,__FILE__,__LINE__); } -# else // not __GNUC__ -# define dIASSERT(a) { if (!(a)) { dDebug (d_ERR_IASSERT, \ - "assertion \"" #a "\" failed in %s:%u",__FILE__,__LINE__); } } -# define dUASSERT(a,msg) { if (!(a)) { dDebug (d_ERR_UASSERT, \ - msg " (%s:%u)", __FILE__,__LINE__); } } -# define dDEBUGMSG(msg) { dMessage (d_ERR_UASSERT, \ - msg " (%s:%u)", __FILE__,__LINE__); } -# endif -# define dIVERIFY(a) dIASSERT(a) -#else -# define dIASSERT(a) ((void)0) -# define dUASSERT(a,msg) ((void)0) -# define dDEBUGMSG(msg) ((void)0) -# define dIVERIFY(a) ((void)(a)) -#endif - -# ifdef __GNUC__ -# define dICHECK(a) { if (!(a)) { dDebug (d_ERR_IASSERT, \ - "assertion \"" #a "\" failed in %s() [%s:%u]",__FUNCTION__,__FILE__,__LINE__); *(int *)0 = 0; } } -# else // not __GNUC__ -# define dICHECK(a) { if (!(a)) { dDebug (d_ERR_IASSERT, \ - "assertion \"" #a "\" failed in %s:%u",__FILE__,__LINE__); *(int *)0 = 0; } } -# endif - -// Argument assert is a special case of user assert -#define dAASSERT(a) dUASSERT(a,"Bad argument(s)") - -/* floating point data type, vector, matrix and quaternion types */ - -#if defined(dSINGLE) -typedef float dReal; -#ifdef dDOUBLE -#error You can only #define dSINGLE or dDOUBLE, not both. -#endif // dDOUBLE -#elif defined(dDOUBLE) -typedef double dReal; -#else -#error You must #define dSINGLE or dDOUBLE -#endif - -// Detect if we've got both trimesh engines enabled. -#if dTRIMESH_ENABLED -#if dTRIMESH_OPCODE && dTRIMESH_GIMPACT -#error You can only #define dTRIMESH_OPCODE or dTRIMESH_GIMPACT, not both. -#endif -#endif // dTRIMESH_ENABLED - -// Define a type for indices, either 16 or 32 bit, based on build option -// TODO: Currently GIMPACT only supports 32 bit indices. -#if dTRIMESH_16BIT_INDICES -#if dTRIMESH_GIMPACT -typedef uint32 dTriIndex; -#else // dTRIMESH_GIMPACT -typedef uint16 dTriIndex; -#endif // dTRIMESH_GIMPACT -#else // dTRIMESH_16BIT_INDICES -typedef uint32 dTriIndex; -#endif // dTRIMESH_16BIT_INDICES - -/* round an integer up to a multiple of 4, except that 0 and 1 are unmodified - * (used to compute matrix leading dimensions) - */ -#define dPAD(a) (((a) > 1) ? ((((a)-1)|3)+1) : (a)) - -/* these types are mainly just used in headers */ -typedef dReal dVector3[4]; -typedef dReal dVector4[4]; -typedef dReal dMatrix3[4*3]; -typedef dReal dMatrix4[4*4]; -typedef dReal dMatrix6[8*6]; -typedef dReal dQuaternion[4]; - - -/* precision dependent scalar math functions */ - -#if defined(dSINGLE) - -#define REAL(x) (x ## f) /* form a constant */ -#define dRecip(x) ((1.0f/(x))) /* reciprocal */ -#define dSqrt(x) (sqrtf(x)) /* square root */ -#define dRecipSqrt(x) ((1.0f/sqrtf(x))) /* reciprocal square root */ -#define dSin(x) (sinf(x)) /* sine */ -#define dCos(x) (cosf(x)) /* cosine */ -#define dFabs(x) (fabsf(x)) /* absolute value */ -#define dAtan2(y,x) (atan2f(y,x)) /* arc tangent with 2 args */ -#define dFMod(a,b) (fmodf(a,b)) /* modulo */ -#define dFloor(x) floorf(x) /* floor */ -#define dCeil(x) ceilf(x) /* floor */ -#define dCopySign(a,b) ((dReal)copysignf(a,b)) /* copy value sign */ -#define dNextAfter(x, y) nextafterf(x, y) /* next value after */ - -#if defined(_ODE__NEXTAFTERF_REQUIRED) -float _nextafterf(float x, float y); -#endif - -#ifdef HAVE___ISNANF -#define dIsNan(x) (__isnanf(x)) -#elif defined(HAVE__ISNANF) -#define dIsNan(x) (_isnanf(x)) -#elif defined(HAVE_ISNANF) -#define dIsNan(x) (isnanf(x)) -#else - /* - fall back to _isnan which is the VC way, - this may seem redundant since we already checked - for _isnan before, but if isnan is detected by - configure but is not found during compilation - we should always make sure we check for __isnanf, - _isnanf and isnanf in that order before falling - back to a default - */ -#define dIsNan(x) (_isnan(x)) -#endif - -#elif defined(dDOUBLE) - -#define REAL(x) (x) -#define dRecip(x) (1.0/(x)) -#define dSqrt(x) sqrt(x) -#define dRecipSqrt(x) (1.0/sqrt(x)) -#define dSin(x) sin(x) -#define dCos(x) cos(x) -#define dFabs(x) fabs(x) -#define dAtan2(y,x) atan2((y),(x)) -#define dFMod(a,b) (fmod((a),(b))) -#define dFloor(x) floor(x) -#define dCeil(x) ceil(x) -#define dCopySign(a,b) (copysign((a),(b))) -#define dNextAfter(x, y) nextafter(x, y) - -#undef _ODE__NEXTAFTERF_REQUIRED - -#ifdef HAVE___ISNAN -#define dIsNan(x) (__isnan(x)) -#elif defined(HAVE__ISNAN) -#define dIsNan(x) (_isnan(x)) -#elif defined(HAVE_ISNAN) -#define dIsNan(x) (isnan(x)) -#else -#define dIsNan(x) (_isnan(x)) -#endif - -#else -#error You must #define dSINGLE or dDOUBLE -#endif - -/* internal object types (all prefixed with `dx') */ - -struct dxWorld; /* dynamics world */ -struct dxSpace; /* collision space */ -struct dxBody; /* rigid body (dynamics object) */ -struct dxGeom; /* geometry (collision object) */ -struct dxJoint; -struct dxJointNode; -struct dxJointGroup; -struct dxWorldProcessThreadingManager; - -typedef struct dxWorld *dWorldID; -typedef struct dxSpace *dSpaceID; -typedef struct dxBody *dBodyID; -typedef struct dxGeom *dGeomID; -typedef struct dxJoint *dJointID; -typedef struct dxJointGroup *dJointGroupID; -typedef struct dxWorldProcessThreadingManager *dWorldStepThreadingManagerID; - -/* error numbers */ - -enum { - d_ERR_UNKNOWN = 0, /* unknown error */ - d_ERR_IASSERT, /* internal assertion failed */ - d_ERR_UASSERT, /* user assertion failed */ - d_ERR_LCP /* user assertion failed */ -}; - - -/* joint type numbers */ - -typedef enum { - dJointTypeNone = 0, /* or "unknown" */ - dJointTypeBall, - dJointTypeHinge, - dJointTypeSlider, - dJointTypeContact, - dJointTypeUniversal, - dJointTypeHinge2, - dJointTypeFixed, - dJointTypeNull, - dJointTypeAMotor, - dJointTypeLMotor, - dJointTypePlane2D, - dJointTypePR, - dJointTypePU, - dJointTypePiston -} dJointType; - - -/* an alternative way of setting joint parameters, using joint parameter - * structures and member constants. we don't actually do this yet. - */ - -/* -typedef struct dLimot { - int mode; - dReal lostop, histop; - dReal vel, fmax; - dReal fudge_factor; - dReal bounce, soft; - dReal suspension_erp, suspension_cfm; -} dLimot; - -enum { - dLimotLoStop = 0x0001, - dLimotHiStop = 0x0002, - dLimotVel = 0x0004, - dLimotFMax = 0x0008, - dLimotFudgeFactor = 0x0010, - dLimotBounce = 0x0020, - dLimotSoft = 0x0040 -}; -*/ - - -/* standard joint parameter names. why are these here? - because we don't want - * to include all the joint function definitions in joint.cpp. hmmmm. - * MSVC complains if we call D_ALL_PARAM_NAMES_X with a blank second argument, - * which is why we have the D_ALL_PARAM_NAMES macro as well. please copy and - * paste between these two. - */ - -#define D_ALL_PARAM_NAMES(start) \ - /* parameters for limits and motors */ \ - dParamLoStop = start, \ - dParamHiStop, \ - dParamVel, \ - dParamFMax, \ - dParamFudgeFactor, \ - dParamBounce, \ - dParamCFM, \ - dParamStopERP, \ - dParamStopCFM, \ - /* parameters for suspension */ \ - dParamSuspensionERP, \ - dParamSuspensionCFM, \ - dParamERP, \ - - ////////////////////////////////////////////////////////////////////////////// - /// \enum D_ALL_PARAM_NAMES_X - /// - /// \var dParamGroup This is the starting value of the different group - /// (i.e. dParamGroup1, dParamGroup2, dParamGroup3) - /// It also helps in the use of parameter - /// (dParamGroup2 | dParamFMax) == dParamFMax2 - ////////////////////////////////////////////////////////////////////////////// -#define D_ALL_PARAM_NAMES_X(start,x) \ - dParamGroup ## x = start, \ - /* parameters for limits and motors */ \ - dParamLoStop ## x = start, \ - dParamHiStop ## x, \ - dParamVel ## x, \ - dParamFMax ## x, \ - dParamFudgeFactor ## x, \ - dParamBounce ## x, \ - dParamCFM ## x, \ - dParamStopERP ## x, \ - dParamStopCFM ## x, \ - /* parameters for suspension */ \ - dParamSuspensionERP ## x, \ - dParamSuspensionCFM ## x, \ - dParamERP ## x, - -enum { - D_ALL_PARAM_NAMES(0) - dParamsInGroup, ///< Number of parameter in a group - D_ALL_PARAM_NAMES_X(0x000,1) - D_ALL_PARAM_NAMES_X(0x100,2) - D_ALL_PARAM_NAMES_X(0x200,3) - - /* add a multiple of this constant to the basic parameter numbers to get - * the parameters for the second, third etc axes. - */ - dParamGroup=0x100 -}; - - -/* angular motor mode numbers */ - -enum { - dAMotorUser = 0, - dAMotorEuler = 1 -}; - - -/* joint force feedback information */ - -typedef struct dJointFeedback { - dVector3 f1; /* force applied to body 1 */ - dVector3 t1; /* torque applied to body 1 */ - dVector3 f2; /* force applied to body 2 */ - dVector3 t2; /* torque applied to body 2 */ -} dJointFeedback; - - -/* private functions that must be implemented by the collision library: - * (1) indicate that a geom has moved, (2) get the next geom in a body list. - * these functions are called whenever the position of geoms connected to a - * body have changed, e.g. with dBodySetPosition(), dBodySetRotation(), or - * when the ODE step function updates the body state. - */ - -void dGeomMoved (dGeomID); -dGeomID dGeomGetBodyNext (dGeomID); - -/** - * dGetConfiguration returns the specific ODE build configuration as - * a string of tokens. The string can be parsed in a similar way to - * the OpenGL extension mechanism, the naming convention should be - * familiar too. The following extensions are reported: - * - * ODE - * ODE_single_precision - * ODE_double_precision - * ODE_EXT_no_debug - * ODE_EXT_trimesh - * ODE_EXT_opcode - * ODE_EXT_gimpact - * ODE_EXT_malloc_not_alloca - * ODE_EXT_gyroscopic - * ODE_OPC_16bit_indices - * ODE_OPC_new_collider -*/ -ODE_API const char* dGetConfiguration (void); - -/** - * Helper to check for a token in the ODE configuration string. - * Caution, this function is case sensitive. - * - * @param token A configuration token, see dGetConfiguration for details - * - * @return 1 if exact token is present, 0 if not present - */ -ODE_API int dCheckConfiguration( const char* token ); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/misc/builddeps/linux64/ode/include/ode/compatibility.h b/misc/builddeps/linux64/ode/include/ode/compatibility.h deleted file mode 100644 index b3709866..00000000 --- a/misc/builddeps/linux64/ode/include/ode/compatibility.h +++ /dev/null @@ -1,40 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#ifndef _ODE_COMPATIBILITY_H_ -#define _ODE_COMPATIBILITY_H_ - -/* - * ODE's backward compatibility system ensures that as ODE's API - * evolves, user code will not break. - */ - -/* - * These new rotation function names are more consistent with the - * rest of the API. - */ -#define dQtoR(q,R) dRfromQ((R),(q)) -#define dRtoQ(R,q) dQfromR((q),(R)) -#define dWtoDQ(w,q,dq) dDQfromW((dq),(w),(q)) - - -#endif diff --git a/misc/builddeps/linux64/ode/include/ode/contact.h b/misc/builddeps/linux64/ode/include/ode/contact.h deleted file mode 100644 index 8bb810f5..00000000 --- a/misc/builddeps/linux64/ode/include/ode/contact.h +++ /dev/null @@ -1,104 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#ifndef _ODE_CONTACT_H_ -#define _ODE_CONTACT_H_ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - - -enum { - dContactMu2 = 0x001, - dContactFDir1 = 0x002, - dContactBounce = 0x004, - dContactSoftERP = 0x008, - dContactSoftCFM = 0x010, - dContactMotion1 = 0x020, - dContactMotion2 = 0x040, - dContactMotionN = 0x080, - dContactSlip1 = 0x100, - dContactSlip2 = 0x200, - - dContactApprox0 = 0x0000, - dContactApprox1_1 = 0x1000, - dContactApprox1_2 = 0x2000, - dContactApprox1 = 0x3000 -}; - - -typedef struct dSurfaceParameters { - /* must always be defined */ - int mode; - dReal mu; - - /* only defined if the corresponding flag is set in mode */ - dReal mu2; - dReal bounce; - dReal bounce_vel; - dReal soft_erp; - dReal soft_cfm; - dReal motion1,motion2,motionN; - dReal slip1,slip2; -} dSurfaceParameters; - - -/** - * @brief Describe the contact point between two geoms. - * - * If two bodies touch, or if a body touches a static feature in its - * environment, the contact is represented by one or more "contact - * points", described by dContactGeom. - * - * The convention is that if body 1 is moved along the normal vector by - * a distance depth (or equivalently if body 2 is moved the same distance - * in the opposite direction) then the contact depth will be reduced to - * zero. This means that the normal vector points "in" to body 1. - * - * @ingroup collide - */ -typedef struct dContactGeom { - dVector3 pos; ///< contact position - dVector3 normal; ///< normal vector - dReal depth; ///< penetration depth - dGeomID g1,g2; ///< the colliding geoms - int side1,side2; ///< (to be documented) -} dContactGeom; - - -/* contact info used by contact joint */ - -typedef struct dContact { - dSurfaceParameters surface; - dContactGeom geom; - dVector3 fdir1; -} dContact; - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/misc/builddeps/linux64/ode/include/ode/error.h b/misc/builddeps/linux64/ode/include/ode/error.h deleted file mode 100644 index 20b9ba45..00000000 --- a/misc/builddeps/linux64/ode/include/ode/error.h +++ /dev/null @@ -1,63 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -/* this comes from the `reuse' library. copy any changes back to the source */ - -#ifndef _ODE_ERROR_H_ -#define _ODE_ERROR_H_ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* all user defined error functions have this type. error and debug functions - * should not return. - */ -typedef void dMessageFunction (int errnum, const char *msg, va_list ap); - -/* set a new error, debug or warning handler. if fn is 0, the default handlers - * are used. - */ -ODE_API void dSetErrorHandler (dMessageFunction *fn); -ODE_API void dSetDebugHandler (dMessageFunction *fn); -ODE_API void dSetMessageHandler (dMessageFunction *fn); - -/* return the current error, debug or warning handler. if the return value is - * 0, the default handlers are in place. - */ -ODE_API dMessageFunction *dGetErrorHandler(void); -ODE_API dMessageFunction *dGetDebugHandler(void); -ODE_API dMessageFunction *dGetMessageHandler(void); - -/* generate a fatal error, debug trap or a message. */ -ODE_API void dError (int num, const char *msg, ...); -ODE_API void dDebug (int num, const char *msg, ...); -ODE_API void dMessage (int num, const char *msg, ...); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/misc/builddeps/linux64/ode/include/ode/export-dif.h b/misc/builddeps/linux64/ode/include/ode/export-dif.h deleted file mode 100644 index f6578ac7..00000000 --- a/misc/builddeps/linux64/ode/include/ode/export-dif.h +++ /dev/null @@ -1,40 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#ifndef _ODE_EXPORT_DIF_ -#define _ODE_EXPORT_DIF_ - -#include - - -#ifdef __cplusplus -extern "C" { -#endif - -ODE_API void dWorldExportDIF (dWorldID w, FILE *file, const char *world_name); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/misc/builddeps/linux64/ode/include/ode/mass.h b/misc/builddeps/linux64/ode/include/ode/mass.h deleted file mode 100644 index d74500c9..00000000 --- a/misc/builddeps/linux64/ode/include/ode/mass.h +++ /dev/null @@ -1,144 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#ifndef _ODE_MASS_H_ -#define _ODE_MASS_H_ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -struct dMass; -typedef struct dMass dMass; - -/** - * Check if a mass structure has valid value. - * The function check if the mass and innertia matrix are positive definits - * - * @param m A mass structure to check - * - * @return 1 if both codition are met - */ -ODE_API int dMassCheck(const dMass *m); - -ODE_API void dMassSetZero (dMass *); - -ODE_API void dMassSetParameters (dMass *, dReal themass, - dReal cgx, dReal cgy, dReal cgz, - dReal I11, dReal I22, dReal I33, - dReal I12, dReal I13, dReal I23); - -ODE_API void dMassSetSphere (dMass *, dReal density, dReal radius); -ODE_API void dMassSetSphereTotal (dMass *, dReal total_mass, dReal radius); - -ODE_API void dMassSetCapsule (dMass *, dReal density, int direction, - dReal radius, dReal length); -ODE_API void dMassSetCapsuleTotal (dMass *, dReal total_mass, int direction, - dReal radius, dReal length); - -ODE_API void dMassSetCylinder (dMass *, dReal density, int direction, - dReal radius, dReal length); -ODE_API void dMassSetCylinderTotal (dMass *, dReal total_mass, int direction, - dReal radius, dReal length); - -ODE_API void dMassSetBox (dMass *, dReal density, - dReal lx, dReal ly, dReal lz); -ODE_API void dMassSetBoxTotal (dMass *, dReal total_mass, - dReal lx, dReal ly, dReal lz); - -ODE_API void dMassSetTrimesh (dMass *, dReal density, dGeomID g); - -ODE_API void dMassSetTrimeshTotal (dMass *m, dReal total_mass, dGeomID g); - -ODE_API void dMassAdjust (dMass *, dReal newmass); - -ODE_API void dMassTranslate (dMass *, dReal x, dReal y, dReal z); - -ODE_API void dMassRotate (dMass *, const dMatrix3 R); - -ODE_API void dMassAdd (dMass *a, const dMass *b); - - -// Backwards compatible API -ODE_API ODE_API_DEPRECATED void dMassSetCappedCylinder(dMass *a, dReal b, int c, dReal d, dReal e); -ODE_API ODE_API_DEPRECATED void dMassSetCappedCylinderTotal(dMass *a, dReal b, int c, dReal d, dReal e); - - -struct dMass { - dReal mass; - dVector3 c; - dMatrix3 I; - -#ifdef __cplusplus - dMass() - { dMassSetZero (this); } - void setZero() - { dMassSetZero (this); } - void setParameters (dReal themass, dReal cgx, dReal cgy, dReal cgz, - dReal I11, dReal I22, dReal I33, - dReal I12, dReal I13, dReal I23) - { dMassSetParameters (this,themass,cgx,cgy,cgz,I11,I22,I33,I12,I13,I23); } - - void setSphere (dReal density, dReal radius) - { dMassSetSphere (this,density,radius); } - void setSphereTotal (dReal total, dReal radius) - { dMassSetSphereTotal (this,total,radius); } - - void setCapsule (dReal density, int direction, dReal radius, dReal length) - { dMassSetCapsule (this,density,direction,radius,length); } - void setCapsuleTotal (dReal total, int direction, dReal radius, dReal length) - { dMassSetCapsule (this,total,direction,radius,length); } - - void setCylinder(dReal density, int direction, dReal radius, dReal length) - { dMassSetCylinder (this,density,direction,radius,length); } - void setCylinderTotal(dReal total, int direction, dReal radius, dReal length) - { dMassSetCylinderTotal (this,total,direction,radius,length); } - - void setBox (dReal density, dReal lx, dReal ly, dReal lz) - { dMassSetBox (this,density,lx,ly,lz); } - void setBoxTotal (dReal total, dReal lx, dReal ly, dReal lz) - { dMassSetBoxTotal (this,total,lx,ly,lz); } - - void setTrimesh(dReal density, dGeomID g) - { dMassSetTrimesh (this, density, g); } - void setTrimeshTotal(dReal total, dGeomID g) - { dMassSetTrimeshTotal (this, total, g); } - - void adjust (dReal newmass) - { dMassAdjust (this,newmass); } - void translate (dReal x, dReal y, dReal z) - { dMassTranslate (this,x,y,z); } - void rotate (const dMatrix3 R) - { dMassRotate (this,R); } - void add (const dMass *b) - { dMassAdd (this,b); } -#endif -}; - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/misc/builddeps/linux64/ode/include/ode/matrix.h b/misc/builddeps/linux64/ode/include/ode/matrix.h deleted file mode 100644 index e177f44f..00000000 --- a/misc/builddeps/linux64/ode/include/ode/matrix.h +++ /dev/null @@ -1,280 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -/* optimized and unoptimized vector and matrix functions */ - -#ifndef _ODE_MATRIX_H_ -#define _ODE_MATRIX_H_ - -#include - - -#ifdef __cplusplus -extern "C" { -#endif - - -/* set a vector/matrix of size n to all zeros, or to a specific value. */ - -ODE_API void dSetZero (dReal *a, int n); -ODE_API void dSetValue (dReal *a, int n, dReal value); - - -/* get the dot product of two n*1 vectors. if n <= 0 then - * zero will be returned (in which case a and b need not be valid). - */ - -ODE_API dReal dDot (const dReal *a, const dReal *b, int n); - - -/* get the dot products of (a0,b), (a1,b), etc and return them in outsum. - * all vectors are n*1. if n <= 0 then zeroes will be returned (in which case - * the input vectors need not be valid). this function is somewhat faster - * than calling dDot() for all of the combinations separately. - */ - -/* NOT INCLUDED in the library for now. -void dMultidot2 (const dReal *a0, const dReal *a1, - const dReal *b, dReal *outsum, int n); -*/ - - -/* matrix multiplication. all matrices are stored in standard row format. - * the digit refers to the argument that is transposed: - * 0: A = B * C (sizes: A:p*r B:p*q C:q*r) - * 1: A = B' * C (sizes: A:p*r B:q*p C:q*r) - * 2: A = B * C' (sizes: A:p*r B:p*q C:r*q) - * case 1,2 are equivalent to saying that the operation is A=B*C but - * B or C are stored in standard column format. - */ - -ODE_API void dMultiply0 (dReal *A, const dReal *B, const dReal *C, int p,int q,int r); -ODE_API void dMultiply1 (dReal *A, const dReal *B, const dReal *C, int p,int q,int r); -ODE_API void dMultiply2 (dReal *A, const dReal *B, const dReal *C, int p,int q,int r); - - -/* do an in-place cholesky decomposition on the lower triangle of the n*n - * symmetric matrix A (which is stored by rows). the resulting lower triangle - * will be such that L*L'=A. return 1 on success and 0 on failure (on failure - * the matrix is not positive definite). - */ - -ODE_API int dFactorCholesky (dReal *A, int n); - - -/* solve for x: L*L'*x = b, and put the result back into x. - * L is size n*n, b is size n*1. only the lower triangle of L is considered. - */ - -ODE_API void dSolveCholesky (const dReal *L, dReal *b, int n); - - -/* compute the inverse of the n*n positive definite matrix A and put it in - * Ainv. this is not especially fast. this returns 1 on success (A was - * positive definite) or 0 on failure (not PD). - */ - -ODE_API int dInvertPDMatrix (const dReal *A, dReal *Ainv, int n); - - -/* check whether an n*n matrix A is positive definite, return 1/0 (yes/no). - * positive definite means that x'*A*x > 0 for any x. this performs a - * cholesky decomposition of A. if the decomposition fails then the matrix - * is not positive definite. A is stored by rows. A is not altered. - */ - -ODE_API int dIsPositiveDefinite (const dReal *A, int n); - - -/* factorize a matrix A into L*D*L', where L is lower triangular with ones on - * the diagonal, and D is diagonal. - * A is an n*n matrix stored by rows, with a leading dimension of n rounded - * up to 4. L is written into the strict lower triangle of A (the ones are not - * written) and the reciprocal of the diagonal elements of D are written into - * d. - */ -ODE_API void dFactorLDLT (dReal *A, dReal *d, int n, int nskip); - - -/* solve L*x=b, where L is n*n lower triangular with ones on the diagonal, - * and x,b are n*1. b is overwritten with x. - * the leading dimension of L is `nskip'. - */ -ODE_API void dSolveL1 (const dReal *L, dReal *b, int n, int nskip); - - -/* solve L'*x=b, where L is n*n lower triangular with ones on the diagonal, - * and x,b are n*1. b is overwritten with x. - * the leading dimension of L is `nskip'. - */ -ODE_API void dSolveL1T (const dReal *L, dReal *b, int n, int nskip); - - -/* in matlab syntax: a(1:n) = a(1:n) .* d(1:n) */ - -ODE_API void dVectorScale (dReal *a, const dReal *d, int n); - - -/* given `L', a n*n lower triangular matrix with ones on the diagonal, - * and `d', a n*1 vector of the reciprocal diagonal elements of an n*n matrix - * D, solve L*D*L'*x=b where x,b are n*1. x overwrites b. - * the leading dimension of L is `nskip'. - */ - -ODE_API void dSolveLDLT (const dReal *L, const dReal *d, dReal *b, int n, int nskip); - - -/* given an L*D*L' factorization of an n*n matrix A, return the updated - * factorization L2*D2*L2' of A plus the following "top left" matrix: - * - * [ b a' ] <-- b is a[0] - * [ a 0 ] <-- a is a[1..n-1] - * - * - L has size n*n, its leading dimension is nskip. L is lower triangular - * with ones on the diagonal. only the lower triangle of L is referenced. - * - d has size n. d contains the reciprocal diagonal elements of D. - * - a has size n. - * the result is written into L, except that the left column of L and d[0] - * are not actually modified. see ldltaddTL.m for further comments. - */ -ODE_API void dLDLTAddTL (dReal *L, dReal *d, const dReal *a, int n, int nskip); - - -/* given an L*D*L' factorization of a permuted matrix A, produce a new - * factorization for row and column `r' removed. - * - A has size n1*n1, its leading dimension in nskip. A is symmetric and - * positive definite. only the lower triangle of A is referenced. - * A itself may actually be an array of row pointers. - * - L has size n2*n2, its leading dimension in nskip. L is lower triangular - * with ones on the diagonal. only the lower triangle of L is referenced. - * - d has size n2. d contains the reciprocal diagonal elements of D. - * - p is a permutation vector. it contains n2 indexes into A. each index - * must be in the range 0..n1-1. - * - r is the row/column of L to remove. - * the new L will be written within the old L, i.e. will have the same leading - * dimension. the last row and column of L, and the last element of d, are - * undefined on exit. - * - * a fast O(n^2) algorithm is used. see ldltremove.m for further comments. - */ -ODE_API void dLDLTRemove (dReal **A, const int *p, dReal *L, dReal *d, - int n1, int n2, int r, int nskip); - - -/* given an n*n matrix A (with leading dimension nskip), remove the r'th row - * and column by moving elements. the new matrix will have the same leading - * dimension. the last row and column of A are untouched on exit. - */ -ODE_API void dRemoveRowCol (dReal *A, int n, int nskip, int r); - - -#if defined(__ODE__) - -void _dSetZero (dReal *a, size_t n); -void _dSetValue (dReal *a, size_t n, dReal value); -dReal _dDot (const dReal *a, const dReal *b, int n); -void _dMultiply0 (dReal *A, const dReal *B, const dReal *C, int p,int q,int r); -void _dMultiply1 (dReal *A, const dReal *B, const dReal *C, int p,int q,int r); -void _dMultiply2 (dReal *A, const dReal *B, const dReal *C, int p,int q,int r); -int _dFactorCholesky (dReal *A, int n, void *tmpbuf); -void _dSolveCholesky (const dReal *L, dReal *b, int n, void *tmpbuf); -int _dInvertPDMatrix (const dReal *A, dReal *Ainv, int n, void *tmpbuf); -int _dIsPositiveDefinite (const dReal *A, int n, void *tmpbuf); -void _dFactorLDLT (dReal *A, dReal *d, int n, int nskip); -void _dSolveL1 (const dReal *L, dReal *b, int n, int nskip); -void _dSolveL1T (const dReal *L, dReal *b, int n, int nskip); -void _dVectorScale (dReal *a, const dReal *d, int n); -void _dSolveLDLT (const dReal *L, const dReal *d, dReal *b, int n, int nskip); -void _dLDLTAddTL (dReal *L, dReal *d, const dReal *a, int n, int nskip, void *tmpbuf); -void _dLDLTRemove (dReal **A, const int *p, dReal *L, dReal *d, int n1, int n2, int r, int nskip, void *tmpbuf); -void _dRemoveRowCol (dReal *A, int n, int nskip, int r); - -PURE_INLINE size_t _dEstimateFactorCholeskyTmpbufSize(int n) -{ - return dPAD(n) * sizeof(dReal); -} - -PURE_INLINE size_t _dEstimateSolveCholeskyTmpbufSize(int n) -{ - return dPAD(n) * sizeof(dReal); -} - -PURE_INLINE size_t _dEstimateInvertPDMatrixTmpbufSize(int n) -{ - size_t FactorCholesky_size = _dEstimateFactorCholeskyTmpbufSize(n); - size_t SolveCholesky_size = _dEstimateSolveCholeskyTmpbufSize(n); - size_t MaxCholesky_size = FactorCholesky_size > SolveCholesky_size ? FactorCholesky_size : SolveCholesky_size; - return dPAD(n) * (n + 1) * sizeof(dReal) + MaxCholesky_size; -} - -PURE_INLINE size_t _dEstimateIsPositiveDefiniteTmpbufSize(int n) -{ - return dPAD(n) * n * sizeof(dReal) + _dEstimateFactorCholeskyTmpbufSize(n); -} - -PURE_INLINE size_t _dEstimateLDLTAddTLTmpbufSize(int nskip) -{ - return nskip * 2 * sizeof(dReal); -} - -PURE_INLINE size_t _dEstimateLDLTRemoveTmpbufSize(int n2, int nskip) -{ - return n2 * sizeof(dReal) + _dEstimateLDLTAddTLTmpbufSize(nskip); -} - -// For internal use -#define dSetZero(a, n) _dSetZero(a, n) -#define dSetValue(a, n, value) _dSetValue(a, n, value) -#define dDot(a, b, n) _dDot(a, b, n) -#define dMultiply0(A, B, C, p, q, r) _dMultiply0(A, B, C, p, q, r) -#define dMultiply1(A, B, C, p, q, r) _dMultiply1(A, B, C, p, q, r) -#define dMultiply2(A, B, C, p, q, r) _dMultiply2(A, B, C, p, q, r) -#define dFactorCholesky(A, n, tmpbuf) _dFactorCholesky(A, n, tmpbuf) -#define dSolveCholesky(L, b, n, tmpbuf) _dSolveCholesky(L, b, n, tmpbuf) -#define dInvertPDMatrix(A, Ainv, n, tmpbuf) _dInvertPDMatrix(A, Ainv, n, tmpbuf) -#define dIsPositiveDefinite(A, n, tmpbuf) _dIsPositiveDefinite(A, n, tmpbuf) -#define dFactorLDLT(A, d, n, nskip) _dFactorLDLT(A, d, n, nskip) -#define dSolveL1(L, b, n, nskip) _dSolveL1(L, b, n, nskip) -#define dSolveL1T(L, b, n, nskip) _dSolveL1T(L, b, n, nskip) -#define dVectorScale(a, d, n) _dVectorScale(a, d, n) -#define dSolveLDLT(L, d, b, n, nskip) _dSolveLDLT(L, d, b, n, nskip) -#define dLDLTAddTL(L, d, a, n, nskip, tmpbuf) _dLDLTAddTL(L, d, a, n, nskip, tmpbuf) -#define dLDLTRemove(A, p, L, d, n1, n2, r, nskip, tmpbuf) _dLDLTRemove(A, p, L, d, n1, n2, r, nskip, tmpbuf) -#define dRemoveRowCol(A, n, nskip, r) _dRemoveRowCol(A, n, nskip, r) - - -#define dEstimateFactorCholeskyTmpbufSize(n) _dEstimateFactorCholeskyTmpbufSize(n) -#define dEstimateSolveCholeskyTmpbufSize(n) _dEstimateSolveCholeskyTmpbufSize(n) -#define dEstimateInvertPDMatrixTmpbufSize(n) _dEstimateInvertPDMatrixTmpbufSize(n) -#define dEstimateIsPositiveDefiniteTmpbufSize(n) _dEstimateIsPositiveDefiniteTmpbufSize(n) -#define dEstimateLDLTAddTLTmpbufSize(nskip) _dEstimateLDLTAddTLTmpbufSize(nskip) -#define dEstimateLDLTRemoveTmpbufSize(n2, nskip) _dEstimateLDLTRemoveTmpbufSize(n2, nskip) - - -#endif // defined(__ODE__) - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/misc/builddeps/linux64/ode/include/ode/memory.h b/misc/builddeps/linux64/ode/include/ode/memory.h deleted file mode 100644 index 361061c1..00000000 --- a/misc/builddeps/linux64/ode/include/ode/memory.h +++ /dev/null @@ -1,59 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -/* this comes from the `reuse' library. copy any changes back to the source */ - -#ifndef _ODE_MEMORY_H_ -#define _ODE_MEMORY_H_ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* function types to allocate and free memory */ -typedef void * dAllocFunction (size_t size); -typedef void * dReallocFunction (void *ptr, size_t oldsize, size_t newsize); -typedef void dFreeFunction (void *ptr, size_t size); - -/* set new memory management functions. if fn is 0, the default handlers are - * used. */ -ODE_API void dSetAllocHandler (dAllocFunction *fn); -ODE_API void dSetReallocHandler (dReallocFunction *fn); -ODE_API void dSetFreeHandler (dFreeFunction *fn); - -/* get current memory management functions */ -ODE_API dAllocFunction *dGetAllocHandler (void); -ODE_API dReallocFunction *dGetReallocHandler (void); -ODE_API dFreeFunction *dGetFreeHandler (void); - -/* allocate and free memory. */ -ODE_API void * dAlloc (size_t size); -ODE_API void * dRealloc (void *ptr, size_t oldsize, size_t newsize); -ODE_API void dFree (void *ptr, size_t size); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/misc/builddeps/linux64/ode/include/ode/misc.h b/misc/builddeps/linux64/ode/include/ode/misc.h deleted file mode 100644 index 0c55fc5b..00000000 --- a/misc/builddeps/linux64/ode/include/ode/misc.h +++ /dev/null @@ -1,85 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -/* miscellaneous math functions. these are mostly useful for testing */ - -#ifndef _ODE_MISC_H_ -#define _ODE_MISC_H_ - -#include - - -#ifdef __cplusplus -extern "C" { -#endif - - -/* return 1 if the random number generator is working. */ -ODE_API int dTestRand(void); - -/* return next 32 bit random number. this uses a not-very-random linear - * congruential method. - */ -ODE_API unsigned long dRand(void); - -/* get and set the current random number seed. */ -ODE_API unsigned long dRandGetSeed(void); -ODE_API void dRandSetSeed (unsigned long s); - -/* return a random integer between 0..n-1. the distribution will get worse - * as n approaches 2^32. - */ -ODE_API int dRandInt (int n); - -/* return a random real number between 0..1 */ -ODE_API dReal dRandReal(void); - -/* print out a matrix */ -#ifdef __cplusplus -ODE_API void dPrintMatrix (const dReal *A, int n, int m, char *fmt = "%10.4f ", - FILE *f=stdout); -#else -ODE_API void dPrintMatrix (const dReal *A, int n, int m, char *fmt, FILE *f); -#endif - -/* make a random vector with entries between +/- range. A has n elements. */ -ODE_API void dMakeRandomVector (dReal *A, int n, dReal range); - -/* make a random matrix with entries between +/- range. A has size n*m. */ -ODE_API void dMakeRandomMatrix (dReal *A, int n, int m, dReal range); - -/* clear the upper triangle of a square matrix */ -ODE_API void dClearUpperTriangle (dReal *A, int n); - -/* return the maximum element difference between the two n*m matrices */ -ODE_API dReal dMaxDifference (const dReal *A, const dReal *B, int n, int m); - -/* return the maximum element difference between the lower triangle of two - * n*n matrices */ -ODE_API dReal dMaxDifferenceLowerTriangle (const dReal *A, const dReal *B, int n); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/misc/builddeps/linux64/ode/include/ode/objects.h b/misc/builddeps/linux64/ode/include/ode/objects.h deleted file mode 100644 index 379de010..00000000 --- a/misc/builddeps/linux64/ode/include/ode/objects.h +++ /dev/null @@ -1,2975 +0,0 @@ - - -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#ifndef _ODE_OBJECTS_H_ -#define _ODE_OBJECTS_H_ - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @defgroup world World - * - * The world object is a container for rigid bodies and joints. Objects in - * different worlds can not interact, for example rigid bodies from two - * different worlds can not collide. - * - * All the objects in a world exist at the same point in time, thus one - * reason to use separate worlds is to simulate systems at different rates. - * Most applications will only need one world. - */ - - -/** - * @brief Create a new, empty world and return its ID number. - * @return an identifier - * @ingroup world - */ -ODE_API dWorldID dWorldCreate(void); - - -/** - * @brief Destroy a world and everything in it. - * - * This includes all bodies, and all joints that are not part of a joint - * group. Joints that are part of a joint group will be deactivated, and - * can be destroyed by calling, for example, dJointGroupEmpty(). - * @ingroup world - * @param world the identifier for the world the be destroyed. - */ -ODE_API void dWorldDestroy (dWorldID world); - - -/** - * @brief Set the world's global gravity vector. - * - * The units are m/s^2, so Earth's gravity vector would be (0,0,-9.81), - * assuming that +z is up. The default is no gravity, i.e. (0,0,0). - * - * @ingroup world - */ -ODE_API void dWorldSetGravity (dWorldID, dReal x, dReal y, dReal z); - - -/** - * @brief Get the gravity vector for a given world. - * @ingroup world - */ -ODE_API void dWorldGetGravity (dWorldID, dVector3 gravity); - - -/** - * @brief Set the global ERP value, that controls how much error - * correction is performed in each time step. - * @ingroup world - * @param dWorldID the identifier of the world. - * @param erp Typical values are in the range 0.1--0.8. The default is 0.2. - */ -ODE_API void dWorldSetERP (dWorldID, dReal erp); - -/** - * @brief Get the error reduction parameter. - * @ingroup world - * @return ERP value - */ -ODE_API dReal dWorldGetERP (dWorldID); - - -/** - * @brief Set the global CFM (constraint force mixing) value. - * @ingroup world - * @param cfm Typical values are in the range @m{10^{-9}} -- 1. - * The default is 10^-5 if single precision is being used, or 10^-10 - * if double precision is being used. - */ -ODE_API void dWorldSetCFM (dWorldID, dReal cfm); - -/** - * @brief Get the constraint force mixing value. - * @ingroup world - * @return CFM value - */ -ODE_API dReal dWorldGetCFM (dWorldID); - - -/** - * @brief Set the world to use shared working memory along with another world. - * - * The worlds allocate working memory internally for simulation stepping. This - * memory is cached among the calls to @c dWordStep and @c dWorldQuickStep. - * Similarly, several worlds can be set up to share this memory caches thus - * reducing overall memory usage by cost of making worlds inappropriate for - * simultaneous simulation in multiple threads. - * - * If null value is passed for @a from_world parameter the world is detached from - * sharing and returns to defaults for working memory, reservation policy and - * memory manager as if just created. This can also be used to enable use of shared - * memory for a world that has already had working memory allocated privately. - * Normally using shared memory after a world has its private working memory allocated - * is prohibited. - * - * Allocation policy used can only increase world's internal reserved memory size - * and never decreases it. @c dWorldCleanupWorkingMemory can be used to release - * working memory for a world in case if number of objects/joint decreases - * significantly in it. - * - * With sharing working memory worlds also automatically share memory reservation - * policy and memory manager. Thus, these parameters need to be customized for - * initial world to be used as sharing source only. - * - * Failure result status means a memory allocation failure. - * - * @param w The world to use the shared memory with. - * @param from_world Null or the world the shared memory is to be used from. - * @returns 1 for success and 0 for failure. - * - * @ingroup world - * @see dWorldCleanupWorkingMemory - * @see dWorldSetStepMemoryReservationPolicy - * @see dWorldSetStepMemoryManager - */ -ODE_API int dWorldUseSharedWorkingMemory(dWorldID w, dWorldID from_world/*=NULL*/); - -/** - * @brief Release internal working memory allocated for world - * - * The worlds allocate working memory internally for simulation stepping. This - * function can be used to free world's internal memory cache in case if number of - * objects/joints in the world decreases significantly. By default, internal - * allocation policy is used to only increase cache size as necessary and never - * decrease it. - * - * If a world shares its working memory with other worlds the cache deletion - * affects all the linked worlds. However the shared status itself remains intact. - * - * The function call does affect neither memory reservation policy nor memory manager. - * - * @param w The world to release working memory for. - * - * @ingroup world - * @see dWorldUseSharedWorkingMemory - * @see dWorldSetStepMemoryReservationPolicy - * @see dWorldSetStepMemoryManager - */ -ODE_API void dWorldCleanupWorkingMemory(dWorldID w); - -#define dWORLDSTEP_RESERVEFACTOR_DEFAULT 1.2f -#define dWORLDSTEP_RESERVESIZE_DEFAULT 65536U - -/** - * @struct dWorldStepReserveInfo - * @brief Memory reservation policy descriptor structure for world stepping functions. - * - * @c struct_size should be assigned the size of the structure. - * - * @c reserve_factor is a quotient that is multiplied by required memory size - * to allocate extra reserve whenever reallocation is needed. - * - * @c reserve_minimum is a minimum size that is checked against whenever reallocation - * is needed to allocate expected working memory minimum at once without extra - * reallocations as number of bodies/joints grows. - * - * @ingroup world - * @see dWorldSetStepMemoryReservationPolicy - */ -typedef struct -{ - unsigned struct_size; - float reserve_factor; // Use float as precision does not matter here - unsigned reserve_minimum; - -} dWorldStepReserveInfo; - -/** - * @brief Set memory reservation policy for world to be used with simulation stepping functions - * - * The function allows to customize reservation policy to be used for internal - * memory which is allocated to aid simulation for a world. By default, values - * of @c dWORLDSTEP_RESERVEFACTOR_DEFAULT and @c dWORLDSTEP_RESERVESIZE_DEFAULT - * are used. - * - * Passing @a policyinfo argument as NULL results in reservation policy being - * reset to defaults as if the world has been just created. The content of - * @a policyinfo structure is copied internally and does not need to remain valid - * after the call returns. - * - * If the world uses working memory sharing, changing memory reservation policy - * affects all the worlds linked together. - * - * Failure result status means a memory allocation failure. - * - * @param w The world to change memory reservation policy for. - * @param policyinfo Null or a pointer to policy descriptor structure. - * @returns 1 for success and 0 for failure. - * - * @ingroup world - * @see dWorldUseSharedWorkingMemory - */ -ODE_API int dWorldSetStepMemoryReservationPolicy(dWorldID w, const dWorldStepReserveInfo *policyinfo/*=NULL*/); - -/** -* @struct dWorldStepMemoryFunctionsInfo -* @brief World stepping memory manager descriptor structure -* -* This structure is intended to define the functions of memory manager to be used -* with world stepping functions. -* -* @c struct_size should be assigned the size of the structure -* -* @c alloc_block is a function to allocate memory block of given size. -* -* @c shrink_block is a function to shrink existing memory block to a smaller size. -* It must preserve the contents of block head while shrinking. The new block size -* is guaranteed to be always less than the existing one. -* -* @c free_block is a function to delete existing memory block. -* -* @ingroup init -* @see dWorldSetStepMemoryManager -*/ -typedef struct -{ - unsigned struct_size; - void *(*alloc_block)(size_t block_size); - void *(*shrink_block)(void *block_pointer, size_t block_current_size, size_t block_smaller_size); - void (*free_block)(void *block_pointer, size_t block_current_size); - -} dWorldStepMemoryFunctionsInfo; - -/** -* @brief Set memory manager for world to be used with simulation stepping functions -* -* The function allows to customize memory manager to be used for internal -* memory allocation during simulation for a world. By default, @c dAlloc/@c dRealloc/@c dFree -* based memory manager is used. -* -* Passing @a memfuncs argument as NULL results in memory manager being -* reset to default one as if the world has been just created. The content of -* @a memfuncs structure is copied internally and does not need to remain valid -* after the call returns. -* -* If the world uses working memory sharing, changing memory manager -* affects all the worlds linked together. -* -* Failure result status means a memory allocation failure. -* -* @param w The world to change memory reservation policy for. -* @param memfuncs Null or a pointer to memory manager descriptor structure. -* @returns 1 for success and 0 for failure. -* -* @ingroup world -* @see dWorldUseSharedWorkingMemory -*/ -ODE_API int dWorldSetStepMemoryManager(dWorldID w, const dWorldStepMemoryFunctionsInfo *memfuncs); - -/** - * @brief Step the world. - * - * This uses a "big matrix" method that takes time on the order of m^3 - * and memory on the order of m^2, where m is the total number of constraint - * rows. For large systems this will use a lot of memory and can be very slow, - * but this is currently the most accurate method. - * - * Failure result status means that the memory allocation has failed for operation. - * In such a case all the objects remain in unchanged state and simulation can be - * retried as soon as more memory is available. - * - * @param w The world to be stepped - * @param stepsize The number of seconds that the simulation has to advance. - * @returns 1 for success and 0 for failure - * - * @ingroup world - */ -ODE_API int dWorldStep (dWorldID w, dReal stepsize); - -/** - * @brief Quick-step the world. - * - * This uses an iterative method that takes time on the order of m*N - * and memory on the order of m, where m is the total number of constraint - * rows N is the number of iterations. - * For large systems this is a lot faster than dWorldStep(), - * but it is less accurate. - * - * QuickStep is great for stacks of objects especially when the - * auto-disable feature is used as well. - * However, it has poor accuracy for near-singular systems. - * Near-singular systems can occur when using high-friction contacts, motors, - * or certain articulated structures. For example, a robot with multiple legs - * sitting on the ground may be near-singular. - * - * There are ways to help overcome QuickStep's inaccuracy problems: - * - * \li Increase CFM. - * \li Reduce the number of contacts in your system (e.g. use the minimum - * number of contacts for the feet of a robot or creature). - * \li Don't use excessive friction in the contacts. - * \li Use contact slip if appropriate - * \li Avoid kinematic loops (however, kinematic loops are inevitable in - * legged creatures). - * \li Don't use excessive motor strength. - * \liUse force-based motors instead of velocity-based motors. - * - * Increasing the number of QuickStep iterations may help a little bit, but - * it is not going to help much if your system is really near singular. - * - * Failure result status means that the memory allocation has failed for operation. - * In such a case all the objects remain in unchanged state and simulation can be - * retried as soon as more memory is available. - * - * @param w The world to be stepped - * @param stepsize The number of seconds that the simulation has to advance. - * @returns 1 for success and 0 for failure - * - * @ingroup world - */ -ODE_API int dWorldQuickStep (dWorldID w, dReal stepsize); - - -/** -* @brief Converts an impulse to a force. -* @ingroup world -* @remarks -* If you want to apply a linear or angular impulse to a rigid body, -* instead of a force or a torque, then you can use this function to convert -* the desired impulse into a force/torque vector before calling the -* BodyAdd... function. -* The current algorithm simply scales the impulse by 1/stepsize, -* where stepsize is the step size for the next step that will be taken. -* This function is given a dWorldID because, in the future, the force -* computation may depend on integrator parameters that are set as -* properties of the world. -*/ -ODE_API void dWorldImpulseToForce -( - dWorldID, dReal stepsize, - dReal ix, dReal iy, dReal iz, dVector3 force - ); - - -/** - * @brief Set the number of iterations that the QuickStep method performs per - * step. - * @ingroup world - * @remarks - * More iterations will give a more accurate solution, but will take - * longer to compute. - * @param num The default is 20 iterations. - */ -ODE_API void dWorldSetQuickStepNumIterations (dWorldID, int num); - - -/** - * @brief Get the number of iterations that the QuickStep method performs per - * step. - * @ingroup world - * @return nr of iterations - */ -ODE_API int dWorldGetQuickStepNumIterations (dWorldID); - -/** - * @brief Set the SOR over-relaxation parameter - * @ingroup world - * @param over_relaxation value to use by SOR - */ -ODE_API void dWorldSetQuickStepW (dWorldID, dReal over_relaxation); - -/** - * @brief Get the SOR over-relaxation parameter - * @ingroup world - * @returns the over-relaxation setting - */ -ODE_API dReal dWorldGetQuickStepW (dWorldID); - -/* World contact parameter functions */ - -/** - * @brief Set the maximum correcting velocity that contacts are allowed - * to generate. - * @ingroup world - * @param vel The default value is infinity (i.e. no limit). - * @remarks - * Reducing this value can help prevent "popping" of deeply embedded objects. - */ -ODE_API void dWorldSetContactMaxCorrectingVel (dWorldID, dReal vel); - -/** - * @brief Get the maximum correcting velocity that contacts are allowed - * to generated. - * @ingroup world - */ -ODE_API dReal dWorldGetContactMaxCorrectingVel (dWorldID); - -/** - * @brief Set the depth of the surface layer around all geometry objects. - * @ingroup world - * @remarks - * Contacts are allowed to sink into the surface layer up to the given - * depth before coming to rest. - * @param depth The default value is zero. - * @remarks - * Increasing this to some small value (e.g. 0.001) can help prevent - * jittering problems due to contacts being repeatedly made and broken. - */ -ODE_API void dWorldSetContactSurfaceLayer (dWorldID, dReal depth); - -/** - * @brief Get the depth of the surface layer around all geometry objects. - * @ingroup world - * @returns the depth - */ -ODE_API dReal dWorldGetContactSurfaceLayer (dWorldID); - - -/** - * @defgroup disable Automatic Enabling and Disabling - * @ingroup world bodies - * - * Every body can be enabled or disabled. Enabled bodies participate in the - * simulation, while disabled bodies are turned off and do not get updated - * during a simulation step. New bodies are always created in the enabled state. - * - * A disabled body that is connected through a joint to an enabled body will be - * automatically re-enabled at the next simulation step. - * - * Disabled bodies do not consume CPU time, therefore to speed up the simulation - * bodies should be disabled when they come to rest. This can be done automatically - * with the auto-disable feature. - * - * If a body has its auto-disable flag turned on, it will automatically disable - * itself when - * @li It has been idle for a given number of simulation steps. - * @li It has also been idle for a given amount of simulation time. - * - * A body is considered to be idle when the magnitudes of both its - * linear average velocity and angular average velocity are below given thresholds. - * The sample size for the average defaults to one and can be disabled by setting - * to zero with - * - * Thus, every body has six auto-disable parameters: an enabled flag, a idle step - * count, an idle time, linear/angular average velocity thresholds, and the - * average samples count. - * - * Newly created bodies get these parameters from world. - */ - -/** - * @brief Get auto disable linear threshold for newly created bodies. - * @ingroup disable - * @return the threshold - */ -ODE_API dReal dWorldGetAutoDisableLinearThreshold (dWorldID); - -/** - * @brief Set auto disable linear threshold for newly created bodies. - * @param linear_threshold default is 0.01 - * @ingroup disable - */ -ODE_API void dWorldSetAutoDisableLinearThreshold (dWorldID, dReal linear_threshold); - -/** - * @brief Get auto disable angular threshold for newly created bodies. - * @ingroup disable - * @return the threshold - */ -ODE_API dReal dWorldGetAutoDisableAngularThreshold (dWorldID); - -/** - * @brief Set auto disable angular threshold for newly created bodies. - * @param linear_threshold default is 0.01 - * @ingroup disable - */ -ODE_API void dWorldSetAutoDisableAngularThreshold (dWorldID, dReal angular_threshold); - -/** - * @brief Get auto disable linear average threshold for newly created bodies. - * @ingroup disable - * @return the threshold - */ -ODE_API dReal dWorldGetAutoDisableLinearAverageThreshold (dWorldID); - -/** - * @brief Set auto disable linear average threshold for newly created bodies. - * @param linear_average_threshold default is 0.01 - * @ingroup disable - */ -ODE_API void dWorldSetAutoDisableLinearAverageThreshold (dWorldID, dReal linear_average_threshold); - -/** - * @brief Get auto disable angular average threshold for newly created bodies. - * @ingroup disable - * @return the threshold - */ -ODE_API dReal dWorldGetAutoDisableAngularAverageThreshold (dWorldID); - -/** - * @brief Set auto disable angular average threshold for newly created bodies. - * @param linear_average_threshold default is 0.01 - * @ingroup disable - */ -ODE_API void dWorldSetAutoDisableAngularAverageThreshold (dWorldID, dReal angular_average_threshold); - -/** - * @brief Get auto disable sample count for newly created bodies. - * @ingroup disable - * @return number of samples used - */ -ODE_API int dWorldGetAutoDisableAverageSamplesCount (dWorldID); - -/** - * @brief Set auto disable average sample count for newly created bodies. - * @ingroup disable - * @param average_samples_count Default is 1, meaning only instantaneous velocity is used. - * Set to zero to disable sampling and thus prevent any body from auto-disabling. - */ -ODE_API void dWorldSetAutoDisableAverageSamplesCount (dWorldID, unsigned int average_samples_count ); - -/** - * @brief Get auto disable steps for newly created bodies. - * @ingroup disable - * @return nr of steps - */ -ODE_API int dWorldGetAutoDisableSteps (dWorldID); - -/** - * @brief Set auto disable steps for newly created bodies. - * @ingroup disable - * @param steps default is 10 - */ -ODE_API void dWorldSetAutoDisableSteps (dWorldID, int steps); - -/** - * @brief Get auto disable time for newly created bodies. - * @ingroup disable - * @return nr of seconds - */ -ODE_API dReal dWorldGetAutoDisableTime (dWorldID); - -/** - * @brief Set auto disable time for newly created bodies. - * @ingroup disable - * @param time default is 0 seconds - */ -ODE_API void dWorldSetAutoDisableTime (dWorldID, dReal time); - -/** - * @brief Get auto disable flag for newly created bodies. - * @ingroup disable - * @return 0 or 1 - */ -ODE_API int dWorldGetAutoDisableFlag (dWorldID); - -/** - * @brief Set auto disable flag for newly created bodies. - * @ingroup disable - * @param do_auto_disable default is false. - */ -ODE_API void dWorldSetAutoDisableFlag (dWorldID, int do_auto_disable); - - -/** - * @defgroup damping Damping - * @ingroup bodies world - * - * Damping serves two purposes: reduce simulation instability, and to allow - * the bodies to come to rest (and possibly auto-disabling them). - * - * Bodies are constructed using the world's current damping parameters. Setting - * the scales to 0 disables the damping. - * - * Here is how it is done: after every time step linear and angular - * velocities are tested against the corresponding thresholds. If they - * are above, they are multiplied by (1 - scale). So a negative scale value - * will actually increase the speed, and values greater than one will - * make the object oscillate every step; both can make the simulation unstable. - * - * To disable damping just set the damping scale to zero. - * - * You can also limit the maximum angular velocity. In contrast to the damping - * functions, the angular velocity is affected before the body is moved. - * This means that it will introduce errors in joints that are forcing the body - * to rotate too fast. Some bodies have naturally high angular velocities - * (like cars' wheels), so you may want to give them a very high (like the default, - * dInfinity) limit. - * - * @note The velocities are damped after the stepper function has moved the - * object. Otherwise the damping could introduce errors in joints. First the - * joint constraints are processed by the stepper (moving the body), then - * the damping is applied. - * - * @note The damping happens right after the moved callback is called; this way - * it still possible use the exact velocities the body has acquired during the - * step. You can even use the callback to create your own customized damping. - */ - -/** - * @brief Get the world's linear damping threshold. - * @ingroup damping - */ -ODE_API dReal dWorldGetLinearDampingThreshold (dWorldID w); - -/** - * @brief Set the world's linear damping threshold. - * @param threshold The damping won't be applied if the linear speed is - * below this threshold. Default is 0.01. - * @ingroup damping - */ -ODE_API void dWorldSetLinearDampingThreshold(dWorldID w, dReal threshold); - -/** - * @brief Get the world's angular damping threshold. - * @ingroup damping - */ -ODE_API dReal dWorldGetAngularDampingThreshold (dWorldID w); - -/** - * @brief Set the world's angular damping threshold. - * @param threshold The damping won't be applied if the angular speed is - * below this threshold. Default is 0.01. - * @ingroup damping - */ -ODE_API void dWorldSetAngularDampingThreshold(dWorldID w, dReal threshold); - -/** - * @brief Get the world's linear damping scale. - * @ingroup damping - */ -ODE_API dReal dWorldGetLinearDamping (dWorldID w); - -/** - * @brief Set the world's linear damping scale. - * @param scale The linear damping scale that is to be applied to bodies. - * Default is 0 (no damping). Should be in the interval [0, 1]. - * @ingroup damping - */ -ODE_API void dWorldSetLinearDamping (dWorldID w, dReal scale); - -/** - * @brief Get the world's angular damping scale. - * @ingroup damping - */ -ODE_API dReal dWorldGetAngularDamping (dWorldID w); - -/** - * @brief Set the world's angular damping scale. - * @param scale The angular damping scale that is to be applied to bodies. - * Default is 0 (no damping). Should be in the interval [0, 1]. - * @ingroup damping - */ -ODE_API void dWorldSetAngularDamping(dWorldID w, dReal scale); - -/** - * @brief Convenience function to set body linear and angular scales. - * @param linear_scale The linear damping scale that is to be applied to bodies. - * @param angular_scale The angular damping scale that is to be applied to bodies. - * @ingroup damping - */ -ODE_API void dWorldSetDamping(dWorldID w, - dReal linear_scale, - dReal angular_scale); - -/** - * @brief Get the default maximum angular speed. - * @ingroup damping - * @sa dBodyGetMaxAngularSpeed() - */ -ODE_API dReal dWorldGetMaxAngularSpeed (dWorldID w); - - -/** - * @brief Set the default maximum angular speed for new bodies. - * @ingroup damping - * @sa dBodySetMaxAngularSpeed() - */ -ODE_API void dWorldSetMaxAngularSpeed (dWorldID w, dReal max_speed); - - - -/** - * @defgroup bodies Rigid Bodies - * - * A rigid body has various properties from the point of view of the - * simulation. Some properties change over time: - * - * @li Position vector (x,y,z) of the body's point of reference. - * Currently the point of reference must correspond to the body's center of mass. - * @li Linear velocity of the point of reference, a vector (vx,vy,vz). - * @li Orientation of a body, represented by a quaternion (qs,qx,qy,qz) or - * a 3x3 rotation matrix. - * @li Angular velocity vector (wx,wy,wz) which describes how the orientation - * changes over time. - * - * Other body properties are usually constant over time: - * - * @li Mass of the body. - * @li Position of the center of mass with respect to the point of reference. - * In the current implementation the center of mass and the point of - * reference must coincide. - * @li Inertia matrix. This is a 3x3 matrix that describes how the body's mass - * is distributed around the center of mass. Conceptually each body has an - * x-y-z coordinate frame embedded in it that moves and rotates with the body. - * - * The origin of this coordinate frame is the body's point of reference. Some values - * in ODE (vectors, matrices etc) are relative to the body coordinate frame, and others - * are relative to the global coordinate frame. - * - * Note that the shape of a rigid body is not a dynamical property (except insofar as - * it influences the various mass properties). It is only collision detection that cares - * about the detailed shape of the body. - */ - - -/** - * @brief Get auto disable linear average threshold. - * @ingroup bodies disable - * @return the threshold - */ -ODE_API dReal dBodyGetAutoDisableLinearThreshold (dBodyID); - -/** - * @brief Set auto disable linear average threshold. - * @ingroup bodies disable - * @return the threshold - */ -ODE_API void dBodySetAutoDisableLinearThreshold (dBodyID, dReal linear_average_threshold); - -/** - * @brief Get auto disable angular average threshold. - * @ingroup bodies disable - * @return the threshold - */ -ODE_API dReal dBodyGetAutoDisableAngularThreshold (dBodyID); - -/** - * @brief Set auto disable angular average threshold. - * @ingroup bodies disable - * @return the threshold - */ -ODE_API void dBodySetAutoDisableAngularThreshold (dBodyID, dReal angular_average_threshold); - -/** - * @brief Get auto disable average size (samples count). - * @ingroup bodies disable - * @return the nr of steps/size. - */ -ODE_API int dBodyGetAutoDisableAverageSamplesCount (dBodyID); - -/** - * @brief Set auto disable average buffer size (average steps). - * @ingroup bodies disable - * @param average_samples_count the nr of samples to review. - */ -ODE_API void dBodySetAutoDisableAverageSamplesCount (dBodyID, unsigned int average_samples_count); - - -/** - * @brief Get auto steps a body must be thought of as idle to disable - * @ingroup bodies disable - * @return the nr of steps - */ -ODE_API int dBodyGetAutoDisableSteps (dBodyID); - -/** - * @brief Set auto disable steps. - * @ingroup bodies disable - * @param steps the nr of steps. - */ -ODE_API void dBodySetAutoDisableSteps (dBodyID, int steps); - -/** - * @brief Get auto disable time. - * @ingroup bodies disable - * @return nr of seconds - */ -ODE_API dReal dBodyGetAutoDisableTime (dBodyID); - -/** - * @brief Set auto disable time. - * @ingroup bodies disable - * @param time nr of seconds. - */ -ODE_API void dBodySetAutoDisableTime (dBodyID, dReal time); - -/** - * @brief Get auto disable flag. - * @ingroup bodies disable - * @return 0 or 1 - */ -ODE_API int dBodyGetAutoDisableFlag (dBodyID); - -/** - * @brief Set auto disable flag. - * @ingroup bodies disable - * @param do_auto_disable 0 or 1 - */ -ODE_API void dBodySetAutoDisableFlag (dBodyID, int do_auto_disable); - -/** - * @brief Set auto disable defaults. - * @remarks - * Set the values for the body to those set as default for the world. - * @ingroup bodies disable - */ -ODE_API void dBodySetAutoDisableDefaults (dBodyID); - - -/** - * @brief Retrieves the world attached to te given body. - * @remarks - * - * @ingroup bodies - */ -ODE_API dWorldID dBodyGetWorld (dBodyID); - -/** - * @brief Create a body in given world. - * @remarks - * Default mass parameters are at position (0,0,0). - * @ingroup bodies - */ -ODE_API dBodyID dBodyCreate (dWorldID); - -/** - * @brief Destroy a body. - * @remarks - * All joints that are attached to this body will be put into limbo: - * i.e. unattached and not affecting the simulation, but they will NOT be - * deleted. - * @ingroup bodies - */ -ODE_API void dBodyDestroy (dBodyID); - -/** - * @brief Set the body's user-data pointer. - * @ingroup bodies - * @param data arbitraty pointer - */ -ODE_API void dBodySetData (dBodyID, void *data); - -/** - * @brief Get the body's user-data pointer. - * @ingroup bodies - * @return a pointer to the user's data. - */ -ODE_API void *dBodyGetData (dBodyID); - -/** - * @brief Set position of a body. - * @remarks - * After setting, the outcome of the simulation is undefined - * if the new configuration is inconsistent with the joints/constraints - * that are present. - * @ingroup bodies - */ -ODE_API void dBodySetPosition (dBodyID, dReal x, dReal y, dReal z); - -/** - * @brief Set the orientation of a body. - * @ingroup bodies - * @remarks - * After setting, the outcome of the simulation is undefined - * if the new configuration is inconsistent with the joints/constraints - * that are present. - */ -ODE_API void dBodySetRotation (dBodyID, const dMatrix3 R); - -/** - * @brief Set the orientation of a body. - * @ingroup bodies - * @remarks - * After setting, the outcome of the simulation is undefined - * if the new configuration is inconsistent with the joints/constraints - * that are present. - */ -ODE_API void dBodySetQuaternion (dBodyID, const dQuaternion q); - -/** - * @brief Set the linear velocity of a body. - * @ingroup bodies - */ -ODE_API void dBodySetLinearVel (dBodyID, dReal x, dReal y, dReal z); - -/** - * @brief Set the angular velocity of a body. - * @ingroup bodies - */ -ODE_API void dBodySetAngularVel (dBodyID, dReal x, dReal y, dReal z); - -/** - * @brief Get the position of a body. - * @ingroup bodies - * @remarks - * When getting, the returned values are pointers to internal data structures, - * so the vectors are valid until any changes are made to the rigid body - * system structure. - * @sa dBodyCopyPosition - */ -ODE_API const dReal * dBodyGetPosition (dBodyID); - - -/** - * @brief Copy the position of a body into a vector. - * @ingroup bodies - * @param body the body to query - * @param pos a copy of the body position - * @sa dBodyGetPosition - */ -ODE_API void dBodyCopyPosition (dBodyID body, dVector3 pos); - - -/** - * @brief Get the rotation of a body. - * @ingroup bodies - * @return pointer to a 4x3 rotation matrix. - */ -ODE_API const dReal * dBodyGetRotation (dBodyID); - - -/** - * @brief Copy the rotation of a body. - * @ingroup bodies - * @param body the body to query - * @param R a copy of the rotation matrix - * @sa dBodyGetRotation - */ -ODE_API void dBodyCopyRotation (dBodyID, dMatrix3 R); - - -/** - * @brief Get the rotation of a body. - * @ingroup bodies - * @return pointer to 4 scalars that represent the quaternion. - */ -ODE_API const dReal * dBodyGetQuaternion (dBodyID); - - -/** - * @brief Copy the orientation of a body into a quaternion. - * @ingroup bodies - * @param body the body to query - * @param quat a copy of the orientation quaternion - * @sa dBodyGetQuaternion - */ -ODE_API void dBodyCopyQuaternion(dBodyID body, dQuaternion quat); - - -/** - * @brief Get the linear velocity of a body. - * @ingroup bodies - */ -ODE_API const dReal * dBodyGetLinearVel (dBodyID); - -/** - * @brief Get the angular velocity of a body. - * @ingroup bodies - */ -ODE_API const dReal * dBodyGetAngularVel (dBodyID); - -/** - * @brief Set the mass of a body. - * @ingroup bodies - */ -ODE_API void dBodySetMass (dBodyID, const dMass *mass); - -/** - * @brief Get the mass of a body. - * @ingroup bodies - */ -ODE_API void dBodyGetMass (dBodyID, dMass *mass); - -/** - * @brief Add force at centre of mass of body in absolute coordinates. - * @ingroup bodies - */ -ODE_API void dBodyAddForce (dBodyID, dReal fx, dReal fy, dReal fz); - -/** - * @brief Add torque at centre of mass of body in absolute coordinates. - * @ingroup bodies - */ -ODE_API void dBodyAddTorque (dBodyID, dReal fx, dReal fy, dReal fz); - -/** - * @brief Add force at centre of mass of body in coordinates relative to body. - * @ingroup bodies - */ -ODE_API void dBodyAddRelForce (dBodyID, dReal fx, dReal fy, dReal fz); - -/** - * @brief Add torque at centre of mass of body in coordinates relative to body. - * @ingroup bodies - */ -ODE_API void dBodyAddRelTorque (dBodyID, dReal fx, dReal fy, dReal fz); - -/** - * @brief Add force at specified point in body in global coordinates. - * @ingroup bodies - */ -ODE_API void dBodyAddForceAtPos (dBodyID, dReal fx, dReal fy, dReal fz, - dReal px, dReal py, dReal pz); -/** - * @brief Add force at specified point in body in local coordinates. - * @ingroup bodies - */ -ODE_API void dBodyAddForceAtRelPos (dBodyID, dReal fx, dReal fy, dReal fz, - dReal px, dReal py, dReal pz); -/** - * @brief Add force at specified point in body in global coordinates. - * @ingroup bodies - */ -ODE_API void dBodyAddRelForceAtPos (dBodyID, dReal fx, dReal fy, dReal fz, - dReal px, dReal py, dReal pz); -/** - * @brief Add force at specified point in body in local coordinates. - * @ingroup bodies - */ -ODE_API void dBodyAddRelForceAtRelPos (dBodyID, dReal fx, dReal fy, dReal fz, - dReal px, dReal py, dReal pz); - -/** - * @brief Return the current accumulated force vector. - * @return points to an array of 3 reals. - * @remarks - * The returned values are pointers to internal data structures, so - * the vectors are only valid until any changes are made to the rigid - * body system. - * @ingroup bodies - */ -ODE_API const dReal * dBodyGetForce (dBodyID); - -/** - * @brief Return the current accumulated torque vector. - * @return points to an array of 3 reals. - * @remarks - * The returned values are pointers to internal data structures, so - * the vectors are only valid until any changes are made to the rigid - * body system. - * @ingroup bodies - */ -ODE_API const dReal * dBodyGetTorque (dBodyID); - -/** - * @brief Set the body force accumulation vector. - * @remarks - * This is mostly useful to zero the force and torque for deactivated bodies - * before they are reactivated, in the case where the force-adding functions - * were called on them while they were deactivated. - * @ingroup bodies - */ -ODE_API void dBodySetForce (dBodyID b, dReal x, dReal y, dReal z); - -/** - * @brief Set the body torque accumulation vector. - * @remarks - * This is mostly useful to zero the force and torque for deactivated bodies - * before they are reactivated, in the case where the force-adding functions - * were called on them while they were deactivated. - * @ingroup bodies - */ -ODE_API void dBodySetTorque (dBodyID b, dReal x, dReal y, dReal z); - -/** - * @brief Get world position of a relative point on body. - * @ingroup bodies - * @param result will contain the result. - */ -ODE_API void dBodyGetRelPointPos -( - dBodyID, dReal px, dReal py, dReal pz, - dVector3 result -); - -/** - * @brief Get velocity vector in global coords of a relative point on body. - * @ingroup bodies - * @param result will contain the result. - */ -ODE_API void dBodyGetRelPointVel -( - dBodyID, dReal px, dReal py, dReal pz, - dVector3 result -); - -/** - * @brief Get velocity vector in global coords of a globally - * specified point on a body. - * @ingroup bodies - * @param result will contain the result. - */ -ODE_API void dBodyGetPointVel -( - dBodyID, dReal px, dReal py, dReal pz, - dVector3 result -); - -/** - * @brief takes a point in global coordinates and returns - * the point's position in body-relative coordinates. - * @remarks - * This is the inverse of dBodyGetRelPointPos() - * @ingroup bodies - * @param result will contain the result. - */ -ODE_API void dBodyGetPosRelPoint -( - dBodyID, dReal px, dReal py, dReal pz, - dVector3 result -); - -/** - * @brief Convert from local to world coordinates. - * @ingroup bodies - * @param result will contain the result. - */ -ODE_API void dBodyVectorToWorld -( - dBodyID, dReal px, dReal py, dReal pz, - dVector3 result -); - -/** - * @brief Convert from world to local coordinates. - * @ingroup bodies - * @param result will contain the result. - */ -ODE_API void dBodyVectorFromWorld -( - dBodyID, dReal px, dReal py, dReal pz, - dVector3 result -); - -/** - * @brief controls the way a body's orientation is updated at each timestep. - * @ingroup bodies - * @param mode can be 0 or 1: - * \li 0: An ``infinitesimal'' orientation update is used. - * This is fast to compute, but it can occasionally cause inaccuracies - * for bodies that are rotating at high speed, especially when those - * bodies are joined to other bodies. - * This is the default for every new body that is created. - * \li 1: A ``finite'' orientation update is used. - * This is more costly to compute, but will be more accurate for high - * speed rotations. - * @remarks - * Note however that high speed rotations can result in many types of - * error in a simulation, and the finite mode will only fix one of those - * sources of error. - */ -ODE_API void dBodySetFiniteRotationMode (dBodyID, int mode); - -/** - * @brief sets the finite rotation axis for a body. - * @ingroup bodies - * @remarks - * This is axis only has meaning when the finite rotation mode is set - * If this axis is zero (0,0,0), full finite rotations are performed on - * the body. - * If this axis is nonzero, the body is rotated by performing a partial finite - * rotation along the axis direction followed by an infinitesimal rotation - * along an orthogonal direction. - * @remarks - * This can be useful to alleviate certain sources of error caused by quickly - * spinning bodies. For example, if a car wheel is rotating at high speed - * you can call this function with the wheel's hinge axis as the argument to - * try and improve its behavior. - */ -ODE_API void dBodySetFiniteRotationAxis (dBodyID, dReal x, dReal y, dReal z); - -/** - * @brief Get the way a body's orientation is updated each timestep. - * @ingroup bodies - * @return the mode 0 (infitesimal) or 1 (finite). - */ -ODE_API int dBodyGetFiniteRotationMode (dBodyID); - -/** - * @brief Get the finite rotation axis. - * @param result will contain the axis. - * @ingroup bodies - */ -ODE_API void dBodyGetFiniteRotationAxis (dBodyID, dVector3 result); - -/** - * @brief Get the number of joints that are attached to this body. - * @ingroup bodies - * @return nr of joints - */ -ODE_API int dBodyGetNumJoints (dBodyID b); - -/** - * @brief Return a joint attached to this body, given by index. - * @ingroup bodies - * @param index valid range is 0 to n-1 where n is the value returned by - * dBodyGetNumJoints(). - */ -ODE_API dJointID dBodyGetJoint (dBodyID, int index); - - - - -/** - * @brief Set rigid body to dynamic state (default). - * @param dBodyID identification of body. - * @ingroup bodies - */ -ODE_API void dBodySetDynamic (dBodyID); - -/** - * @brief Set rigid body to kinematic state. - * When in kinematic state the body isn't simulated as a dynamic - * body (it's "unstoppable", doesn't respond to forces), - * but can still affect dynamic bodies (e.g. in joints). - * Kinematic bodies can be controlled by position and velocity. - * @note A kinematic body has infinite mass. If you set its mass - * to something else, it loses the kinematic state and behaves - * as a normal dynamic body. - * @param dBodyID identification of body. - * @ingroup bodies - */ -ODE_API void dBodySetKinematic (dBodyID); - -/** - * @brief Check wether a body is in kinematic state. - * @ingroup bodies - * @return 1 if a body is kinematic or 0 if it is dynamic. - */ -ODE_API int dBodyIsKinematic (dBodyID); - -/** - * @brief Manually enable a body. - * @param dBodyID identification of body. - * @ingroup bodies - */ -ODE_API void dBodyEnable (dBodyID); - -/** - * @brief Manually disable a body. - * @ingroup bodies - * @remarks - * A disabled body that is connected through a joint to an enabled body will - * be automatically re-enabled at the next simulation step. - */ -ODE_API void dBodyDisable (dBodyID); - -/** - * @brief Check wether a body is enabled. - * @ingroup bodies - * @return 1 if a body is currently enabled or 0 if it is disabled. - */ -ODE_API int dBodyIsEnabled (dBodyID); - -/** - * @brief Set whether the body is influenced by the world's gravity or not. - * @ingroup bodies - * @param mode when nonzero gravity affects this body. - * @remarks - * Newly created bodies are always influenced by the world's gravity. - */ -ODE_API void dBodySetGravityMode (dBodyID b, int mode); - -/** - * @brief Get whether the body is influenced by the world's gravity or not. - * @ingroup bodies - * @return nonzero means gravity affects this body. - */ -ODE_API int dBodyGetGravityMode (dBodyID b); - -/** - * @brief Set the 'moved' callback of a body. - * - * Whenever a body has its position or rotation changed during the - * timestep, the callback will be called (with body as the argument). - * Use it to know which body may need an update in an external - * structure (like a 3D engine). - * - * @param b the body that needs to be watched. - * @param callback the callback to be invoked when the body moves. Set to zero - * to disable. - * @ingroup bodies - */ -ODE_API void dBodySetMovedCallback(dBodyID b, void (*callback)(dBodyID)); - - -/** - * @brief Return the first geom associated with the body. - * - * You can traverse through the geoms by repeatedly calling - * dBodyGetNextGeom(). - * - * @return the first geom attached to this body, or 0. - * @ingroup bodies - */ -ODE_API dGeomID dBodyGetFirstGeom (dBodyID b); - - -/** - * @brief returns the next geom associated with the same body. - * @param g a geom attached to some body. - * @return the next geom attached to the same body, or 0. - * @sa dBodyGetFirstGeom - * @ingroup bodies - */ -ODE_API dGeomID dBodyGetNextGeom (dGeomID g); - - -/** - * @brief Resets the damping settings to the current world's settings. - * @ingroup bodies damping - */ -ODE_API void dBodySetDampingDefaults(dBodyID b); - -/** - * @brief Get the body's linear damping scale. - * @ingroup bodies damping - */ -ODE_API dReal dBodyGetLinearDamping (dBodyID b); - -/** - * @brief Set the body's linear damping scale. - * @param scale The linear damping scale. Should be in the interval [0, 1]. - * @ingroup bodies damping - * @remarks From now on the body will not use the world's linear damping - * scale until dBodySetDampingDefaults() is called. - * @sa dBodySetDampingDefaults() - */ -ODE_API void dBodySetLinearDamping(dBodyID b, dReal scale); - -/** - * @brief Get the body's angular damping scale. - * @ingroup bodies damping - * @remarks If the body's angular damping scale was not set, this function - * returns the world's angular damping scale. - */ -ODE_API dReal dBodyGetAngularDamping (dBodyID b); - -/** - * @brief Set the body's angular damping scale. - * @param scale The angular damping scale. Should be in the interval [0, 1]. - * @ingroup bodies damping - * @remarks From now on the body will not use the world's angular damping - * scale until dBodyResetAngularDamping() is called. - * @sa dBodyResetAngularDamping() - */ -ODE_API void dBodySetAngularDamping(dBodyID b, dReal scale); - -/** - * @brief Convenience function to set linear and angular scales at once. - * @param linear_scale The linear damping scale. Should be in the interval [0, 1]. - * @param angular_scale The angular damping scale. Should be in the interval [0, 1]. - * @ingroup bodies damping - * @sa dBodySetLinearDamping() dBodySetAngularDamping() - */ -ODE_API void dBodySetDamping(dBodyID b, dReal linear_scale, dReal angular_scale); - -/** - * @brief Get the body's linear damping threshold. - * @ingroup bodies damping - */ -ODE_API dReal dBodyGetLinearDampingThreshold (dBodyID b); - -/** - * @brief Set the body's linear damping threshold. - * @param threshold The linear threshold to be used. Damping - * is only applied if the linear speed is above this limit. - * @ingroup bodies damping - */ -ODE_API void dBodySetLinearDampingThreshold(dBodyID b, dReal threshold); - -/** - * @brief Get the body's angular damping threshold. - * @ingroup bodies damping - */ -ODE_API dReal dBodyGetAngularDampingThreshold (dBodyID b); - -/** - * @brief Set the body's angular damping threshold. - * @param threshold The angular threshold to be used. Damping is - * only used if the angular speed is above this limit. - * @ingroup bodies damping - */ -ODE_API void dBodySetAngularDampingThreshold(dBodyID b, dReal threshold); - -/** - * @brief Get the body's maximum angular speed. - * @ingroup damping bodies - * @sa dWorldGetMaxAngularSpeed() - */ -ODE_API dReal dBodyGetMaxAngularSpeed (dBodyID b); - -/** - * @brief Set the body's maximum angular speed. - * @ingroup damping bodies - * @sa dWorldSetMaxAngularSpeed() dBodyResetMaxAngularSpeed() - * The default value is dInfinity, but it's a good idea to limit - * it at less than 500 if the body has the gyroscopic term - * enabled. - */ -ODE_API void dBodySetMaxAngularSpeed(dBodyID b, dReal max_speed); - - - -/** - * @brief Get the body's gyroscopic state. - * - * @return nonzero if gyroscopic term computation is enabled (default), - * zero otherwise. - * @ingroup bodies - */ -ODE_API int dBodyGetGyroscopicMode(dBodyID b); - - -/** - * @brief Enable/disable the body's gyroscopic term. - * - * Disabling the gyroscopic term of a body usually improves - * stability. It also helps turning spining objects, like cars' - * wheels. - * - * @param enabled nonzero (default) to enable gyroscopic term, 0 - * to disable. - * @ingroup bodies - */ -ODE_API void dBodySetGyroscopicMode(dBodyID b, int enabled); - - - - -/** - * @defgroup joints Joints - * - * In real life a joint is something like a hinge, that is used to connect two - * objects. - * In ODE a joint is very similar: It is a relationship that is enforced between - * two bodies so that they can only have certain positions and orientations - * relative to each other. - * This relationship is called a constraint -- the words joint and - * constraint are often used interchangeably. - * - * A joint has a set of parameters that can be set. These include: - * - * - * \li dParamLoStop Low stop angle or position. Setting this to - * -dInfinity (the default value) turns off the low stop. - * For rotational joints, this stop must be greater than -pi to be - * effective. - * \li dParamHiStop High stop angle or position. Setting this to - * dInfinity (the default value) turns off the high stop. - * For rotational joints, this stop must be less than pi to be - * effective. - * If the high stop is less than the low stop then both stops will - * be ineffective. - * \li dParamVel Desired motor velocity (this will be an angular or - * linear velocity). - * \li dParamFMax The maximum force or torque that the motor will use to - * achieve the desired velocity. - * This must always be greater than or equal to zero. - * Setting this to zero (the default value) turns off the motor. - * \li dParamFudgeFactor The current joint stop/motor implementation has - * a small problem: - * when the joint is at one stop and the motor is set to move it away - * from the stop, too much force may be applied for one time step, - * causing a ``jumping'' motion. - * This fudge factor is used to scale this excess force. - * It should have a value between zero and one (the default value). - * If the jumping motion is too visible in a joint, the value can be - * reduced. - * Making this value too small can prevent the motor from being able to - * move the joint away from a stop. - * \li dParamBounce The bouncyness of the stops. - * This is a restitution parameter in the range 0..1. - * 0 means the stops are not bouncy at all, 1 means maximum bouncyness. - * \li dParamCFM The constraint force mixing (CFM) value used when not - * at a stop. - * \li dParamStopERP The error reduction parameter (ERP) used by the - * stops. - * \li dParamStopCFM The constraint force mixing (CFM) value used by the - * stops. Together with the ERP value this can be used to get spongy or - * soft stops. - * Note that this is intended for unpowered joints, it does not really - * work as expected when a powered joint reaches its limit. - * \li dParamSuspensionERP Suspension error reduction parameter (ERP). - * Currently this is only implemented on the hinge-2 joint. - * \li dParamSuspensionCFM Suspension constraint force mixing (CFM) value. - * Currently this is only implemented on the hinge-2 joint. - * - * If a particular parameter is not implemented by a given joint, setting it - * will have no effect. - * These parameter names can be optionally followed by a digit (2 or 3) - * to indicate the second or third set of parameters, e.g. for the second axis - * in a hinge-2 joint, or the third axis in an AMotor joint. - */ - - -/** - * @brief Create a new joint of the ball type. - * @ingroup joints - * @remarks - * The joint is initially in "limbo" (i.e. it has no effect on the simulation) - * because it does not connect to any bodies. - * @param dJointGroupID set to 0 to allocate the joint normally. - * If it is nonzero the joint is allocated in the given joint group. - */ -ODE_API dJointID dJointCreateBall (dWorldID, dJointGroupID); - -/** - * @brief Create a new joint of the hinge type. - * @ingroup joints - * @param dJointGroupID set to 0 to allocate the joint normally. - * If it is nonzero the joint is allocated in the given joint group. - */ -ODE_API dJointID dJointCreateHinge (dWorldID, dJointGroupID); - -/** - * @brief Create a new joint of the slider type. - * @ingroup joints - * @param dJointGroupID set to 0 to allocate the joint normally. - * If it is nonzero the joint is allocated in the given joint group. - */ -ODE_API dJointID dJointCreateSlider (dWorldID, dJointGroupID); - -/** - * @brief Create a new joint of the contact type. - * @ingroup joints - * @param dJointGroupID set to 0 to allocate the joint normally. - * If it is nonzero the joint is allocated in the given joint group. - */ -ODE_API dJointID dJointCreateContact (dWorldID, dJointGroupID, const dContact *); - -/** - * @brief Create a new joint of the hinge2 type. - * @ingroup joints - * @param dJointGroupID set to 0 to allocate the joint normally. - * If it is nonzero the joint is allocated in the given joint group. - */ -ODE_API dJointID dJointCreateHinge2 (dWorldID, dJointGroupID); - -/** - * @brief Create a new joint of the universal type. - * @ingroup joints - * @param dJointGroupID set to 0 to allocate the joint normally. - * If it is nonzero the joint is allocated in the given joint group. - */ -ODE_API dJointID dJointCreateUniversal (dWorldID, dJointGroupID); - -/** - * @brief Create a new joint of the PR (Prismatic and Rotoide) type. - * @ingroup joints - * @param dJointGroupID set to 0 to allocate the joint normally. - * If it is nonzero the joint is allocated in the given joint group. - */ -ODE_API dJointID dJointCreatePR (dWorldID, dJointGroupID); - - /** - * @brief Create a new joint of the PU (Prismatic and Universal) type. - * @ingroup joints - * @param dJointGroupID set to 0 to allocate the joint normally. - * If it is nonzero the joint is allocated in the given joint group. - */ - ODE_API dJointID dJointCreatePU (dWorldID, dJointGroupID); - - /** - * @brief Create a new joint of the Piston type. - * @ingroup joints - * @param dJointGroupID set to 0 to allocate the joint normally. - * If it is nonzero the joint is allocated in the given - * joint group. - */ - ODE_API dJointID dJointCreatePiston (dWorldID, dJointGroupID); - -/** - * @brief Create a new joint of the fixed type. - * @ingroup joints - * @param dJointGroupID set to 0 to allocate the joint normally. - * If it is nonzero the joint is allocated in the given joint group. - */ -ODE_API dJointID dJointCreateFixed (dWorldID, dJointGroupID); - -ODE_API dJointID dJointCreateNull (dWorldID, dJointGroupID); - -/** - * @brief Create a new joint of the A-motor type. - * @ingroup joints - * @param dJointGroupID set to 0 to allocate the joint normally. - * If it is nonzero the joint is allocated in the given joint group. - */ -ODE_API dJointID dJointCreateAMotor (dWorldID, dJointGroupID); - -/** - * @brief Create a new joint of the L-motor type. - * @ingroup joints - * @param dJointGroupID set to 0 to allocate the joint normally. - * If it is nonzero the joint is allocated in the given joint group. - */ -ODE_API dJointID dJointCreateLMotor (dWorldID, dJointGroupID); - -/** - * @brief Create a new joint of the plane-2d type. - * @ingroup joints - * @param dJointGroupID set to 0 to allocate the joint normally. - * If it is nonzero the joint is allocated in the given joint group. - */ -ODE_API dJointID dJointCreatePlane2D (dWorldID, dJointGroupID); - -/** - * @brief Destroy a joint. - * @ingroup joints - * - * disconnects it from its attached bodies and removing it from the world. - * However, if the joint is a member of a group then this function has no - * effect - to destroy that joint the group must be emptied or destroyed. - */ -ODE_API void dJointDestroy (dJointID); - - -/** - * @brief Create a joint group - * @ingroup joints - * @param max_size deprecated. Set to 0. - */ -ODE_API dJointGroupID dJointGroupCreate (int max_size); - -/** - * @brief Destroy a joint group. - * @ingroup joints - * - * All joints in the joint group will be destroyed. - */ -ODE_API void dJointGroupDestroy (dJointGroupID); - -/** - * @brief Empty a joint group. - * @ingroup joints - * - * All joints in the joint group will be destroyed, - * but the joint group itself will not be destroyed. - */ -ODE_API void dJointGroupEmpty (dJointGroupID); - -/** - * @brief Return the number of bodies attached to the joint - * @ingroup joints - */ -ODE_API int dJointGetNumBodies(dJointID); - -/** - * @brief Attach the joint to some new bodies. - * @ingroup joints - * - * If the joint is already attached, it will be detached from the old bodies - * first. - * To attach this joint to only one body, set body1 or body2 to zero - a zero - * body refers to the static environment. - * Setting both bodies to zero puts the joint into "limbo", i.e. it will - * have no effect on the simulation. - * @remarks - * Some joints, like hinge-2 need to be attached to two bodies to work. - */ -ODE_API void dJointAttach (dJointID, dBodyID body1, dBodyID body2); - -/** - * @brief Manually enable a joint. - * @param dJointID identification of joint. - * @ingroup joints - */ -ODE_API void dJointEnable (dJointID); - -/** - * @brief Manually disable a joint. - * @ingroup joints - * @remarks - * A disabled joint will not affect the simulation, but will maintain the anchors and - * axes so it can be enabled later. - */ -ODE_API void dJointDisable (dJointID); - -/** - * @brief Check wether a joint is enabled. - * @ingroup joints - * @return 1 if a joint is currently enabled or 0 if it is disabled. - */ -ODE_API int dJointIsEnabled (dJointID); - -/** - * @brief Set the user-data pointer - * @ingroup joints - */ -ODE_API void dJointSetData (dJointID, void *data); - -/** - * @brief Get the user-data pointer - * @ingroup joints - */ -ODE_API void *dJointGetData (dJointID); - -/** - * @brief Get the type of the joint - * @ingroup joints - * @return the type, being one of these: - * \li dJointTypeBall - * \li dJointTypeHinge - * \li dJointTypeSlider - * \li dJointTypeContact - * \li dJointTypeUniversal - * \li dJointTypeHinge2 - * \li dJointTypeFixed - * \li dJointTypeNull - * \li dJointTypeAMotor - * \li dJointTypeLMotor - * \li dJointTypePlane2D - * \li dJointTypePR - * \li dJointTypePU - * \li dJointTypePiston - */ -ODE_API dJointType dJointGetType (dJointID); - -/** - * @brief Return the bodies that this joint connects. - * @ingroup joints - * @param index return the first (0) or second (1) body. - * @remarks - * If one of these returned body IDs is zero, the joint connects the other body - * to the static environment. - * If both body IDs are zero, the joint is in ``limbo'' and has no effect on - * the simulation. - */ -ODE_API dBodyID dJointGetBody (dJointID, int index); - -/** - * @brief Sets the datastructure that is to receive the feedback. - * - * The feedback can be used by the user, so that it is known how - * much force an individual joint exerts. - * @ingroup joints - */ -ODE_API void dJointSetFeedback (dJointID, dJointFeedback *); - -/** - * @brief Gets the datastructure that is to receive the feedback. - * @ingroup joints - */ -ODE_API dJointFeedback *dJointGetFeedback (dJointID); - -/** - * @brief Set the joint anchor point. - * @ingroup joints - * - * The joint will try to keep this point on each body - * together. The input is specified in world coordinates. - */ -ODE_API void dJointSetBallAnchor (dJointID, dReal x, dReal y, dReal z); - -/** - * @brief Set the joint anchor point. - * @ingroup joints - */ -ODE_API void dJointSetBallAnchor2 (dJointID, dReal x, dReal y, dReal z); - -/** - * @brief Param setting for Ball joints - * @ingroup joints - */ -ODE_API void dJointSetBallParam (dJointID, int parameter, dReal value); - -/** - * @brief Set hinge anchor parameter. - * @ingroup joints - */ -ODE_API void dJointSetHingeAnchor (dJointID, dReal x, dReal y, dReal z); - -ODE_API void dJointSetHingeAnchorDelta (dJointID, dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az); - -/** - * @brief Set hinge axis. - * @ingroup joints - */ -ODE_API void dJointSetHingeAxis (dJointID, dReal x, dReal y, dReal z); - -/** - * @brief Set the Hinge axis as if the 2 bodies were already at angle appart. - * @ingroup joints - * - * This function initialize the Axis and the relative orientation of each body - * as if body1 was rotated around the axis by the angle value. \br - * Ex: - *
- * dJointSetHingeAxis(jId, 1, 0, 0);
- * // If you request the position you will have: dJointGetHingeAngle(jId) == 0
- * dJointSetHingeAxisDelta(jId, 1, 0, 0, 0.23);
- * // If you request the position you will have: dJointGetHingeAngle(jId) == 0.23
- * 
- - * @param j The Hinge joint ID for which the axis will be set - * @param x The X component of the axis in world frame - * @param y The Y component of the axis in world frame - * @param z The Z component of the axis in world frame - * @param angle The angle for the offset of the relative orientation. - * As if body1 was rotated by angle when the Axis was set (see below). - * The rotation is around the new Hinge axis. - * - * @note Usually the function dJointSetHingeAxis set the current position of body1 - * and body2 as the zero angle position. This function set the current position - * as the if the 2 bodies where \b angle appart. - * @warning Calling dJointSetHingeAnchor or dJointSetHingeAxis will reset the "zero" - * angle position. - */ -ODE_API void dJointSetHingeAxisOffset (dJointID j, dReal x, dReal y, dReal z, dReal angle); - -/** - * @brief set joint parameter - * @ingroup joints - */ -ODE_API void dJointSetHingeParam (dJointID, int parameter, dReal value); - -/** - * @brief Applies the torque about the hinge axis. - * - * That is, it applies a torque with specified magnitude in the direction - * of the hinge axis, to body 1, and with the same magnitude but in opposite - * direction to body 2. This function is just a wrapper for dBodyAddTorque()} - * @ingroup joints - */ -ODE_API void dJointAddHingeTorque(dJointID joint, dReal torque); - -/** - * @brief set the joint axis - * @ingroup joints - */ -ODE_API void dJointSetSliderAxis (dJointID, dReal x, dReal y, dReal z); - -/** - * @ingroup joints - */ -ODE_API void dJointSetSliderAxisDelta (dJointID, dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az); - -/** - * @brief set joint parameter - * @ingroup joints - */ -ODE_API void dJointSetSliderParam (dJointID, int parameter, dReal value); - -/** - * @brief Applies the given force in the slider's direction. - * - * That is, it applies a force with specified magnitude, in the direction of - * slider's axis, to body1, and with the same magnitude but opposite - * direction to body2. This function is just a wrapper for dBodyAddForce(). - * @ingroup joints - */ -ODE_API void dJointAddSliderForce(dJointID joint, dReal force); - -/** - * @brief set anchor - * @ingroup joints - */ -ODE_API void dJointSetHinge2Anchor (dJointID, dReal x, dReal y, dReal z); - -/** - * @brief set axis - * @ingroup joints - */ -ODE_API void dJointSetHinge2Axis1 (dJointID, dReal x, dReal y, dReal z); - -/** - * @brief set axis - * @ingroup joints - */ -ODE_API void dJointSetHinge2Axis2 (dJointID, dReal x, dReal y, dReal z); - -/** - * @brief set joint parameter - * @ingroup joints - */ -ODE_API void dJointSetHinge2Param (dJointID, int parameter, dReal value); - -/** - * @brief Applies torque1 about the hinge2's axis 1, torque2 about the - * hinge2's axis 2. - * @remarks This function is just a wrapper for dBodyAddTorque(). - * @ingroup joints - */ -ODE_API void dJointAddHinge2Torques(dJointID joint, dReal torque1, dReal torque2); - -/** - * @brief set anchor - * @ingroup joints - */ -ODE_API void dJointSetUniversalAnchor (dJointID, dReal x, dReal y, dReal z); - -/** - * @brief set axis - * @ingroup joints - */ -ODE_API void dJointSetUniversalAxis1 (dJointID, dReal x, dReal y, dReal z); - -/** - * @brief Set the Universal axis1 as if the 2 bodies were already at - * offset1 and offset2 appart with respect to axis1 and axis2. - * @ingroup joints - * - * This function initialize the axis1 and the relative orientation of - * each body as if body1 was rotated around the new axis1 by the offset1 - * value and as if body2 was rotated around the axis2 by offset2. \br - * Ex: -*
- * dJointSetHuniversalAxis1(jId, 1, 0, 0);
- * // If you request the position you will have: dJointGetUniversalAngle1(jId) == 0
- * // If you request the position you will have: dJointGetUniversalAngle2(jId) == 0
- * dJointSetHuniversalAxis1Offset(jId, 1, 0, 0, 0.2, 0.17);
- * // If you request the position you will have: dJointGetUniversalAngle1(jId) == 0.2
- * // If you request the position you will have: dJointGetUniversalAngle2(jId) == 0.17
- * 
- * - * @param j The Hinge joint ID for which the axis will be set - * @param x The X component of the axis in world frame - * @param y The Y component of the axis in world frame - * @param z The Z component of the axis in world frame - * @param angle The angle for the offset of the relative orientation. - * As if body1 was rotated by angle when the Axis was set (see below). - * The rotation is around the new Hinge axis. - * - * @note Usually the function dJointSetHingeAxis set the current position of body1 - * and body2 as the zero angle position. This function set the current position - * as the if the 2 bodies where \b offsets appart. - * - * @note Any previous offsets are erased. - * - * @warning Calling dJointSetUniversalAnchor, dJointSetUnivesalAxis1, - * dJointSetUniversalAxis2, dJointSetUniversalAxis2Offset - * will reset the "zero" angle position. - */ -ODE_API void dJointSetUniversalAxis1Offset (dJointID, dReal x, dReal y, dReal z, - dReal offset1, dReal offset2); - -/** - * @brief set axis - * @ingroup joints - */ -ODE_API void dJointSetUniversalAxis2 (dJointID, dReal x, dReal y, dReal z); - -/** - * @brief Set the Universal axis2 as if the 2 bodies were already at - * offset1 and offset2 appart with respect to axis1 and axis2. - * @ingroup joints - * - * This function initialize the axis2 and the relative orientation of - * each body as if body1 was rotated around the axis1 by the offset1 - * value and as if body2 was rotated around the new axis2 by offset2. \br - * Ex: - *
- * dJointSetHuniversalAxis2(jId, 0, 1, 0);
- * // If you request the position you will have: dJointGetUniversalAngle1(jId) == 0
- * // If you request the position you will have: dJointGetUniversalAngle2(jId) == 0
- * dJointSetHuniversalAxis2Offset(jId, 0, 1, 0, 0.2, 0.17);
- * // If you request the position you will have: dJointGetUniversalAngle1(jId) == 0.2
- * // If you request the position you will have: dJointGetUniversalAngle2(jId) == 0.17
- * 
- - * @param j The Hinge joint ID for which the axis will be set - * @param x The X component of the axis in world frame - * @param y The Y component of the axis in world frame - * @param z The Z component of the axis in world frame - * @param angle The angle for the offset of the relative orientation. - * As if body1 was rotated by angle when the Axis was set (see below). - * The rotation is around the new Hinge axis. - * - * @note Usually the function dJointSetHingeAxis set the current position of body1 - * and body2 as the zero angle position. This function set the current position - * as the if the 2 bodies where \b offsets appart. - * - * @note Any previous offsets are erased. - * - * @warning Calling dJointSetUniversalAnchor, dJointSetUnivesalAxis1, - * dJointSetUniversalAxis2, dJointSetUniversalAxis2Offset - * will reset the "zero" angle position. - */ - - -ODE_API void dJointSetUniversalAxis2Offset (dJointID, dReal x, dReal y, dReal z, - dReal offset1, dReal offset2); - -/** - * @brief set joint parameter - * @ingroup joints - */ -ODE_API void dJointSetUniversalParam (dJointID, int parameter, dReal value); - -/** - * @brief Applies torque1 about the universal's axis 1, torque2 about the - * universal's axis 2. - * @remarks This function is just a wrapper for dBodyAddTorque(). - * @ingroup joints - */ -ODE_API void dJointAddUniversalTorques(dJointID joint, dReal torque1, dReal torque2); - - -/** - * @brief set anchor - * @ingroup joints - */ -ODE_API void dJointSetPRAnchor (dJointID, dReal x, dReal y, dReal z); - -/** - * @brief set the axis for the prismatic articulation - * @ingroup joints - */ -ODE_API void dJointSetPRAxis1 (dJointID, dReal x, dReal y, dReal z); - -/** - * @brief set the axis for the rotoide articulation - * @ingroup joints - */ -ODE_API void dJointSetPRAxis2 (dJointID, dReal x, dReal y, dReal z); - -/** - * @brief set joint parameter - * @ingroup joints - * - * @note parameterX where X equal 2 refer to parameter for the rotoide articulation - */ -ODE_API void dJointSetPRParam (dJointID, int parameter, dReal value); - -/** - * @brief Applies the torque about the rotoide axis of the PR joint - * - * That is, it applies a torque with specified magnitude in the direction - * of the rotoide axis, to body 1, and with the same magnitude but in opposite - * direction to body 2. This function is just a wrapper for dBodyAddTorque()} - * @ingroup joints - */ -ODE_API void dJointAddPRTorque (dJointID j, dReal torque); - - - /** - * @brief set anchor - * @ingroup joints - */ - ODE_API void dJointSetPUAnchor (dJointID, dReal x, dReal y, dReal z); - - /** - * @brief set anchor - * @ingroup joints - */ - ODE_API_DEPRECATED ODE_API void dJointSetPUAnchorDelta (dJointID, dReal x, dReal y, dReal z, - dReal dx, dReal dy, dReal dz); - - /** - * @brief Set the PU anchor as if the 2 bodies were already at [dx, dy, dz] appart. - * @ingroup joints - * - * This function initialize the anchor and the relative position of each body - * as if the position between body1 and body2 was already the projection of [dx, dy, dz] - * along the Piston axis. (i.e as if the body1 was at its current position - [dx,dy,dy] when the - * axis is set). - * Ex: - *
-   * dReal offset = 3;
-   * dVector3 axis;
-   * dJointGetPUAxis(jId, axis);
-   * dJointSetPUAnchor(jId, 0, 0, 0);
-   * // If you request the position you will have: dJointGetPUPosition(jId) == 0
-   * dJointSetPUAnchorOffset(jId, 0, 0, 0, axis[X]*offset, axis[Y]*offset, axis[Z]*offset);
-   * // If you request the position you will have: dJointGetPUPosition(jId) == offset
-   * 
- * @param j The PU joint for which the anchor point will be set - * @param x The X position of the anchor point in world frame - * @param y The Y position of the anchor point in world frame - * @param z The Z position of the anchor point in world frame - * @param dx A delta to be substracted to the X position as if the anchor was set - * when body1 was at current_position[X] - dx - * @param dx A delta to be substracted to the Y position as if the anchor was set - * when body1 was at current_position[Y] - dy - * @param dx A delta to be substracted to the Z position as if the anchor was set - * when body1 was at current_position[Z] - dz - */ - ODE_API void dJointSetPUAnchorOffset (dJointID, dReal x, dReal y, dReal z, - dReal dx, dReal dy, dReal dz); - - /** - * @brief set the axis for the first axis or the universal articulation - * @ingroup joints - */ - ODE_API void dJointSetPUAxis1 (dJointID, dReal x, dReal y, dReal z); - - /** - * @brief set the axis for the second axis or the universal articulation - * @ingroup joints - */ - ODE_API void dJointSetPUAxis2 (dJointID, dReal x, dReal y, dReal z); - - /** - * @brief set the axis for the prismatic articulation - * @ingroup joints - */ - ODE_API void dJointSetPUAxis3 (dJointID, dReal x, dReal y, dReal z); - - /** - * @brief set the axis for the prismatic articulation - * @ingroup joints - * @note This function was added for convenience it is the same as - * dJointSetPUAxis3 - */ - ODE_API void dJointSetPUAxisP (dJointID id, dReal x, dReal y, dReal z); - - - - /** - * @brief set joint parameter - * @ingroup joints - * - * @note parameterX where X equal 2 refer to parameter for second axis of the - * universal articulation - * @note parameterX where X equal 3 refer to parameter for prismatic - * articulation - */ - ODE_API void dJointSetPUParam (dJointID, int parameter, dReal value); - - /** - * @brief Applies the torque about the rotoide axis of the PU joint - * - * That is, it applies a torque with specified magnitude in the direction - * of the rotoide axis, to body 1, and with the same magnitude but in opposite - * direction to body 2. This function is just a wrapper for dBodyAddTorque()} - * @ingroup joints - */ - ODE_API void dJointAddPUTorque (dJointID j, dReal torque); - - - - - /** - * @brief set the joint anchor - * @ingroup joints - */ - ODE_API void dJointSetPistonAnchor (dJointID, dReal x, dReal y, dReal z); - - /** - * @brief Set the Piston anchor as if the 2 bodies were already at [dx,dy, dz] appart. - * @ingroup joints - * - * This function initialize the anchor and the relative position of each body - * as if the position between body1 and body2 was already the projection of [dx, dy, dz] - * along the Piston axis. (i.e as if the body1 was at its current position - [dx,dy,dy] when the - * axis is set). - * Ex: - *
-   * dReal offset = 3;
-   * dVector3 axis;
-   * dJointGetPistonAxis(jId, axis);
-   * dJointSetPistonAnchor(jId, 0, 0, 0);
-   * // If you request the position you will have: dJointGetPistonPosition(jId) == 0
-   * dJointSetPistonAnchorOffset(jId, 0, 0, 0, axis[X]*offset, axis[Y]*offset, axis[Z]*offset);
-   * // If you request the position you will have: dJointGetPistonPosition(jId) == offset
-   * 
- * @param j The Piston joint for which the anchor point will be set - * @param x The X position of the anchor point in world frame - * @param y The Y position of the anchor point in world frame - * @param z The Z position of the anchor point in world frame - * @param dx A delta to be substracted to the X position as if the anchor was set - * when body1 was at current_position[X] - dx - * @param dx A delta to be substracted to the Y position as if the anchor was set - * when body1 was at current_position[Y] - dy - * @param dx A delta to be substracted to the Z position as if the anchor was set - * when body1 was at current_position[Z] - dz - */ - ODE_API void dJointSetPistonAnchorOffset(dJointID j, dReal x, dReal y, dReal z, - dReal dx, dReal dy, dReal dz); - - /** - * @brief set the joint axis - * @ingroup joints - */ - ODE_API void dJointSetPistonAxis (dJointID, dReal x, dReal y, dReal z); - - /** - * This function set prismatic axis of the joint and also set the position - * of the joint. - * - * @ingroup joints - * @param j The joint affected by this function - * @param x The x component of the axis - * @param y The y component of the axis - * @param z The z component of the axis - * @param dx The Initial position of the prismatic join in the x direction - * @param dy The Initial position of the prismatic join in the y direction - * @param dz The Initial position of the prismatic join in the z direction - */ - ODE_API_DEPRECATED ODE_API void dJointSetPistonAxisDelta (dJointID j, dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az); - - /** - * @brief set joint parameter - * @ingroup joints - */ - ODE_API void dJointSetPistonParam (dJointID, int parameter, dReal value); - - /** - * @brief Applies the given force in the slider's direction. - * - * That is, it applies a force with specified magnitude, in the direction of - * prismatic's axis, to body1, and with the same magnitude but opposite - * direction to body2. This function is just a wrapper for dBodyAddForce(). - * @ingroup joints - */ - ODE_API void dJointAddPistonForce (dJointID joint, dReal force); - - -/** - * @brief Call this on the fixed joint after it has been attached to - * remember the current desired relative offset and desired relative - * rotation between the bodies. - * @ingroup joints - */ -ODE_API void dJointSetFixed (dJointID); - -/* - * @brief Sets joint parameter - * - * @ingroup joints - */ -ODE_API void dJointSetFixedParam (dJointID, int parameter, dReal value); - -/** - * @brief set the nr of axes - * @param num 0..3 - * @ingroup joints - */ -ODE_API void dJointSetAMotorNumAxes (dJointID, int num); - -/** - * @brief set axis - * @ingroup joints - */ -ODE_API void dJointSetAMotorAxis (dJointID, int anum, int rel, - dReal x, dReal y, dReal z); - -/** - * @brief Tell the AMotor what the current angle is along axis anum. - * - * This function should only be called in dAMotorUser mode, because in this - * mode the AMotor has no other way of knowing the joint angles. - * The angle information is needed if stops have been set along the axis, - * but it is not needed for axis motors. - * @ingroup joints - */ -ODE_API void dJointSetAMotorAngle (dJointID, int anum, dReal angle); - -/** - * @brief set joint parameter - * @ingroup joints - */ -ODE_API void dJointSetAMotorParam (dJointID, int parameter, dReal value); - -/** - * @brief set mode - * @ingroup joints - */ -ODE_API void dJointSetAMotorMode (dJointID, int mode); - -/** - * @brief Applies torque0 about the AMotor's axis 0, torque1 about the - * AMotor's axis 1, and torque2 about the AMotor's axis 2. - * @remarks - * If the motor has fewer than three axes, the higher torques are ignored. - * This function is just a wrapper for dBodyAddTorque(). - * @ingroup joints - */ -ODE_API void dJointAddAMotorTorques (dJointID, dReal torque1, dReal torque2, dReal torque3); - -/** - * @brief Set the number of axes that will be controlled by the LMotor. - * @param num can range from 0 (which effectively deactivates the joint) to 3. - * @ingroup joints - */ -ODE_API void dJointSetLMotorNumAxes (dJointID, int num); - -/** - * @brief Set the AMotor axes. - * @param anum selects the axis to change (0,1 or 2). - * @param rel Each axis can have one of three ``relative orientation'' modes - * \li 0: The axis is anchored to the global frame. - * \li 1: The axis is anchored to the first body. - * \li 2: The axis is anchored to the second body. - * @remarks The axis vector is always specified in global coordinates - * regardless of the setting of rel. - * @ingroup joints - */ -ODE_API void dJointSetLMotorAxis (dJointID, int anum, int rel, dReal x, dReal y, dReal z); - -/** - * @brief set joint parameter - * @ingroup joints - */ -ODE_API void dJointSetLMotorParam (dJointID, int parameter, dReal value); - -/** - * @ingroup joints - */ -ODE_API void dJointSetPlane2DXParam (dJointID, int parameter, dReal value); - -/** - * @ingroup joints - */ - -ODE_API void dJointSetPlane2DYParam (dJointID, int parameter, dReal value); - -/** - * @ingroup joints - */ -ODE_API void dJointSetPlane2DAngleParam (dJointID, int parameter, dReal value); - -/** - * @brief Get the joint anchor point, in world coordinates. - * - * This returns the point on body 1. If the joint is perfectly satisfied, - * this will be the same as the point on body 2. - */ -ODE_API void dJointGetBallAnchor (dJointID, dVector3 result); - -/** - * @brief Get the joint anchor point, in world coordinates. - * - * This returns the point on body 2. You can think of a ball and socket - * joint as trying to keep the result of dJointGetBallAnchor() and - * dJointGetBallAnchor2() the same. If the joint is perfectly satisfied, - * this function will return the same value as dJointGetBallAnchor() to - * within roundoff errors. dJointGetBallAnchor2() can be used, along with - * dJointGetBallAnchor(), to see how far the joint has come apart. - */ -ODE_API void dJointGetBallAnchor2 (dJointID, dVector3 result); - -/** - * @brief get joint parameter - * @ingroup joints - */ -ODE_API dReal dJointGetBallParam (dJointID, int parameter); - -/** - * @brief Get the hinge anchor point, in world coordinates. - * - * This returns the point on body 1. If the joint is perfectly satisfied, - * this will be the same as the point on body 2. - * @ingroup joints - */ -ODE_API void dJointGetHingeAnchor (dJointID, dVector3 result); - -/** - * @brief Get the joint anchor point, in world coordinates. - * @return The point on body 2. If the joint is perfectly satisfied, - * this will return the same value as dJointGetHingeAnchor(). - * If not, this value will be slightly different. - * This can be used, for example, to see how far the joint has come apart. - * @ingroup joints - */ -ODE_API void dJointGetHingeAnchor2 (dJointID, dVector3 result); - -/** - * @brief get axis - * @ingroup joints - */ -ODE_API void dJointGetHingeAxis (dJointID, dVector3 result); - -/** - * @brief get joint parameter - * @ingroup joints - */ -ODE_API dReal dJointGetHingeParam (dJointID, int parameter); - -/** - * @brief Get the hinge angle. - * - * The angle is measured between the two bodies, or between the body and - * the static environment. - * The angle will be between -pi..pi. - * Give the relative rotation with respect to the Hinge axis of Body 1 with - * respect to Body 2. - * When the hinge anchor or axis is set, the current position of the attached - * bodies is examined and that position will be the zero angle. - * @ingroup joints - */ -ODE_API dReal dJointGetHingeAngle (dJointID); - -/** - * @brief Get the hinge angle time derivative. - * @ingroup joints - */ -ODE_API dReal dJointGetHingeAngleRate (dJointID); - -/** - * @brief Get the slider linear position (i.e. the slider's extension) - * - * When the axis is set, the current position of the attached bodies is - * examined and that position will be the zero position. - - * The position is the distance, with respect to the zero position, - * along the slider axis of body 1 with respect to - * body 2. (A NULL body is replaced by the world). - * @ingroup joints - */ -ODE_API dReal dJointGetSliderPosition (dJointID); - -/** - * @brief Get the slider linear position's time derivative. - * @ingroup joints - */ -ODE_API dReal dJointGetSliderPositionRate (dJointID); - -/** - * @brief Get the slider axis - * @ingroup joints - */ -ODE_API void dJointGetSliderAxis (dJointID, dVector3 result); - -/** - * @brief get joint parameter - * @ingroup joints - */ -ODE_API dReal dJointGetSliderParam (dJointID, int parameter); - -/** - * @brief Get the joint anchor point, in world coordinates. - * @return the point on body 1. If the joint is perfectly satisfied, - * this will be the same as the point on body 2. - * @ingroup joints - */ -ODE_API void dJointGetHinge2Anchor (dJointID, dVector3 result); - -/** - * @brief Get the joint anchor point, in world coordinates. - * This returns the point on body 2. If the joint is perfectly satisfied, - * this will return the same value as dJointGetHinge2Anchor. - * If not, this value will be slightly different. - * This can be used, for example, to see how far the joint has come apart. - * @ingroup joints - */ -ODE_API void dJointGetHinge2Anchor2 (dJointID, dVector3 result); - -/** - * @brief Get joint axis - * @ingroup joints - */ -ODE_API void dJointGetHinge2Axis1 (dJointID, dVector3 result); - -/** - * @brief Get joint axis - * @ingroup joints - */ -ODE_API void dJointGetHinge2Axis2 (dJointID, dVector3 result); - -/** - * @brief get joint parameter - * @ingroup joints - */ -ODE_API dReal dJointGetHinge2Param (dJointID, int parameter); - -/** - * @brief Get angle - * @ingroup joints - */ -ODE_API dReal dJointGetHinge2Angle1 (dJointID); - -/** - * @brief Get time derivative of angle - * @ingroup joints - */ -ODE_API dReal dJointGetHinge2Angle1Rate (dJointID); - -/** - * @brief Get time derivative of angle - * @ingroup joints - */ -ODE_API dReal dJointGetHinge2Angle2Rate (dJointID); - -/** - * @brief Get the joint anchor point, in world coordinates. - * @return the point on body 1. If the joint is perfectly satisfied, - * this will be the same as the point on body 2. - * @ingroup joints - */ -ODE_API void dJointGetUniversalAnchor (dJointID, dVector3 result); - -/** - * @brief Get the joint anchor point, in world coordinates. - * @return This returns the point on body 2. - * @remarks - * You can think of the ball and socket part of a universal joint as - * trying to keep the result of dJointGetBallAnchor() and - * dJointGetBallAnchor2() the same. If the joint is - * perfectly satisfied, this function will return the same value - * as dJointGetUniversalAnchor() to within roundoff errors. - * dJointGetUniversalAnchor2() can be used, along with - * dJointGetUniversalAnchor(), to see how far the joint has come apart. - * @ingroup joints - */ -ODE_API void dJointGetUniversalAnchor2 (dJointID, dVector3 result); - -/** - * @brief Get axis - * @ingroup joints - */ -ODE_API void dJointGetUniversalAxis1 (dJointID, dVector3 result); - -/** - * @brief Get axis - * @ingroup joints - */ -ODE_API void dJointGetUniversalAxis2 (dJointID, dVector3 result); - - -/** - * @brief get joint parameter - * @ingroup joints - */ -ODE_API dReal dJointGetUniversalParam (dJointID, int parameter); - -/** - * @brief Get both angles at the same time. - * @ingroup joints - * - * @param joint The universal joint for which we want to calculate the angles - * @param angle1 The angle between the body1 and the axis 1 - * @param angle2 The angle between the body2 and the axis 2 - * - * @note This function combine getUniversalAngle1 and getUniversalAngle2 together - * and try to avoid redundant calculation - */ -ODE_API void dJointGetUniversalAngles (dJointID, dReal *angle1, dReal *angle2); - -/** - * @brief Get angle - * @ingroup joints - */ -ODE_API dReal dJointGetUniversalAngle1 (dJointID); - -/** - * @brief Get angle - * @ingroup joints - */ -ODE_API dReal dJointGetUniversalAngle2 (dJointID); - -/** - * @brief Get time derivative of angle - * @ingroup joints - */ -ODE_API dReal dJointGetUniversalAngle1Rate (dJointID); - -/** - * @brief Get time derivative of angle - * @ingroup joints - */ -ODE_API dReal dJointGetUniversalAngle2Rate (dJointID); - - - -/** - * @brief Get the joint anchor point, in world coordinates. - * @return the point on body 1. If the joint is perfectly satisfied, - * this will be the same as the point on body 2. - * @ingroup joints - */ -ODE_API void dJointGetPRAnchor (dJointID, dVector3 result); - -/** - * @brief Get the PR linear position (i.e. the prismatic's extension) - * - * When the axis is set, the current position of the attached bodies is - * examined and that position will be the zero position. - * - * The position is the "oriented" length between the - * position = (Prismatic axis) dot_product [(body1 + offset) - (body2 + anchor2)] - * - * @ingroup joints - */ -ODE_API dReal dJointGetPRPosition (dJointID); - -/** - * @brief Get the PR linear position's time derivative - * - * @ingroup joints - */ -ODE_API dReal dJointGetPRPositionRate (dJointID); - - -/** - * @brief Get the PR angular position (i.e. the twist between the 2 bodies) - * - * When the axis is set, the current position of the attached bodies is - * examined and that position will be the zero position. - * @ingroup joints - */ -ODE_API dReal dJointGetPRAngle (dJointID); - -/** - * @brief Get the PR angular position's time derivative - * - * @ingroup joints - */ -ODE_API dReal dJointGetPRAngleRate (dJointID); - - -/** - * @brief Get the prismatic axis - * @ingroup joints - */ -ODE_API void dJointGetPRAxis1 (dJointID, dVector3 result); - -/** - * @brief Get the Rotoide axis - * @ingroup joints - */ -ODE_API void dJointGetPRAxis2 (dJointID, dVector3 result); - -/** - * @brief get joint parameter - * @ingroup joints - */ -ODE_API dReal dJointGetPRParam (dJointID, int parameter); - - - - /** - * @brief Get the joint anchor point, in world coordinates. - * @return the point on body 1. If the joint is perfectly satisfied, - * this will be the same as the point on body 2. - * @ingroup joints - */ - ODE_API void dJointGetPUAnchor (dJointID, dVector3 result); - - /** - * @brief Get the PU linear position (i.e. the prismatic's extension) - * - * When the axis is set, the current position of the attached bodies is - * examined and that position will be the zero position. - * - * The position is the "oriented" length between the - * position = (Prismatic axis) dot_product [(body1 + offset) - (body2 + anchor2)] - * - * @ingroup joints - */ - ODE_API dReal dJointGetPUPosition (dJointID); - - /** - * @brief Get the PR linear position's time derivative - * - * @ingroup joints - */ - ODE_API dReal dJointGetPUPositionRate (dJointID); - - /** - * @brief Get the first axis of the universal component of the joint - * @ingroup joints - */ - ODE_API void dJointGetPUAxis1 (dJointID, dVector3 result); - - /** - * @brief Get the second axis of the Universal component of the joint - * @ingroup joints - */ - ODE_API void dJointGetPUAxis2 (dJointID, dVector3 result); - - /** - * @brief Get the prismatic axis - * @ingroup joints - */ - ODE_API void dJointGetPUAxis3 (dJointID, dVector3 result); - - /** - * @brief Get the prismatic axis - * @ingroup joints - * - * @note This function was added for convenience it is the same as - * dJointGetPUAxis3 - */ - ODE_API void dJointGetPUAxisP (dJointID id, dVector3 result); - - - - - /** - * @brief Get both angles at the same time. - * @ingroup joints - * - * @param joint The Prismatic universal joint for which we want to calculate the angles - * @param angle1 The angle between the body1 and the axis 1 - * @param angle2 The angle between the body2 and the axis 2 - * - * @note This function combine dJointGetPUAngle1 and dJointGetPUAngle2 together - * and try to avoid redundant calculation - */ - ODE_API void dJointGetPUAngles (dJointID, dReal *angle1, dReal *angle2); - - /** - * @brief Get angle - * @ingroup joints - */ - ODE_API dReal dJointGetPUAngle1 (dJointID); - - /** - * @brief * @brief Get time derivative of angle1 - * - * @ingroup joints - */ - ODE_API dReal dJointGetPUAngle1Rate (dJointID); - - - /** - * @brief Get angle - * @ingroup joints - */ - ODE_API dReal dJointGetPUAngle2 (dJointID); - - /** - * @brief * @brief Get time derivative of angle2 - * - * @ingroup joints - */ - ODE_API dReal dJointGetPUAngle2Rate (dJointID); - - /** - * @brief get joint parameter - * @ingroup joints - */ - ODE_API dReal dJointGetPUParam (dJointID, int parameter); - - - - - -/** - * @brief Get the Piston linear position (i.e. the piston's extension) - * - * When the axis is set, the current position of the attached bodies is - * examined and that position will be the zero position. - * @ingroup joints - */ - ODE_API dReal dJointGetPistonPosition (dJointID); - - /** - * @brief Get the piston linear position's time derivative. - * @ingroup joints - */ - ODE_API dReal dJointGetPistonPositionRate (dJointID); - -/** - * @brief Get the Piston angular position (i.e. the twist between the 2 bodies) - * - * When the axis is set, the current position of the attached bodies is - * examined and that position will be the zero position. - * @ingroup joints - */ - ODE_API dReal dJointGetPistonAngle (dJointID); - - /** - * @brief Get the piston angular position's time derivative. - * @ingroup joints - */ - ODE_API dReal dJointGetPistonAngleRate (dJointID); - - - /** - * @brief Get the joint anchor - * - * This returns the point on body 1. If the joint is perfectly satisfied, - * this will be the same as the point on body 2 in direction perpendicular - * to the prismatic axis. - * - * @ingroup joints - */ - ODE_API void dJointGetPistonAnchor (dJointID, dVector3 result); - - /** - * @brief Get the joint anchor w.r.t. body 2 - * - * This returns the point on body 2. You can think of a Piston - * joint as trying to keep the result of dJointGetPistonAnchor() and - * dJointGetPistonAnchor2() the same in the direction perpendicular to the - * pirsmatic axis. If the joint is perfectly satisfied, - * this function will return the same value as dJointGetPistonAnchor() to - * within roundoff errors. dJointGetPistonAnchor2() can be used, along with - * dJointGetPistonAnchor(), to see how far the joint has come apart. - * - * @ingroup joints - */ - ODE_API void dJointGetPistonAnchor2 (dJointID, dVector3 result); - - /** - * @brief Get the prismatic axis (This is also the rotoide axis. - * @ingroup joints - */ - ODE_API void dJointGetPistonAxis (dJointID, dVector3 result); - - /** - * @brief get joint parameter - * @ingroup joints - */ - ODE_API dReal dJointGetPistonParam (dJointID, int parameter); - - - /** - * @brief Get the number of angular axes that will be controlled by the - * AMotor. - * @param num can range from 0 (which effectively deactivates the - * joint) to 3. - * This is automatically set to 3 in dAMotorEuler mode. - * @ingroup joints - */ -ODE_API int dJointGetAMotorNumAxes (dJointID); - -/** - * @brief Get the AMotor axes. - * @param anum selects the axis to change (0,1 or 2). - * @param rel Each axis can have one of three ``relative orientation'' modes. - * \li 0: The axis is anchored to the global frame. - * \li 1: The axis is anchored to the first body. - * \li 2: The axis is anchored to the second body. - * @ingroup joints - */ -ODE_API void dJointGetAMotorAxis (dJointID, int anum, dVector3 result); - -/** - * @brief Get axis - * @remarks - * The axis vector is always specified in global coordinates regardless - * of the setting of rel. - * There are two GetAMotorAxis functions, one to return the axis and one to - * return the relative mode. - * - * For dAMotorEuler mode: - * \li Only axes 0 and 2 need to be set. Axis 1 will be determined - automatically at each time step. - * \li Axes 0 and 2 must be perpendicular to each other. - * \li Axis 0 must be anchored to the first body, axis 2 must be anchored - to the second body. - * @ingroup joints - */ -ODE_API int dJointGetAMotorAxisRel (dJointID, int anum); - -/** - * @brief Get the current angle for axis. - * @remarks - * In dAMotorUser mode this is simply the value that was set with - * dJointSetAMotorAngle(). - * In dAMotorEuler mode this is the corresponding euler angle. - * @ingroup joints - */ -ODE_API dReal dJointGetAMotorAngle (dJointID, int anum); - -/** - * @brief Get the current angle rate for axis anum. - * @remarks - * In dAMotorUser mode this is always zero, as not enough information is - * available. - * In dAMotorEuler mode this is the corresponding euler angle rate. - * @ingroup joints - */ -ODE_API dReal dJointGetAMotorAngleRate (dJointID, int anum); - -/** - * @brief get joint parameter - * @ingroup joints - */ -ODE_API dReal dJointGetAMotorParam (dJointID, int parameter); - -/** - * @brief Get the angular motor mode. - * @param mode must be one of the following constants: - * \li dAMotorUser The AMotor axes and joint angle settings are entirely - * controlled by the user. This is the default mode. - * \li dAMotorEuler Euler angles are automatically computed. - * The axis a1 is also automatically computed. - * The AMotor axes must be set correctly when in this mode, - * as described below. - * When this mode is initially set the current relative orientations - * of the bodies will correspond to all euler angles at zero. - * @ingroup joints - */ -ODE_API int dJointGetAMotorMode (dJointID); - -/** - * @brief Get nr of axes. - * @ingroup joints - */ -ODE_API int dJointGetLMotorNumAxes (dJointID); - -/** - * @brief Get axis. - * @ingroup joints - */ -ODE_API void dJointGetLMotorAxis (dJointID, int anum, dVector3 result); - -/** - * @brief get joint parameter - * @ingroup joints - */ -ODE_API dReal dJointGetLMotorParam (dJointID, int parameter); - -/** - * @brief get joint parameter - * @ingroup joints - */ -ODE_API dReal dJointGetFixedParam (dJointID, int parameter); - - -/** - * @ingroup joints - */ -ODE_API dJointID dConnectingJoint (dBodyID, dBodyID); - -/** - * @ingroup joints - */ -ODE_API int dConnectingJointList (dBodyID, dBodyID, dJointID*); - -/** - * @brief Utility function - * @return 1 if the two bodies are connected together by - * a joint, otherwise return 0. - * @ingroup joints - */ -ODE_API int dAreConnected (dBodyID, dBodyID); - -/** - * @brief Utility function - * @return 1 if the two bodies are connected together by - * a joint that does not have type @arg{joint_type}, otherwise return 0. - * @param body1 A body to check. - * @param body2 A body to check. - * @param joint_type is a dJointTypeXXX constant. - * This is useful for deciding whether to add contact joints between two bodies: - * if they are already connected by non-contact joints then it may not be - * appropriate to add contacts, however it is okay to add more contact between- - * bodies that already have contacts. - * @ingroup joints - */ -ODE_API int dAreConnectedExcluding (dBodyID body1, dBodyID body2, int joint_type); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/misc/builddeps/linux64/ode/include/ode/ode.h b/misc/builddeps/linux64/ode/include/ode/ode.h deleted file mode 100644 index af74e50f..00000000 --- a/misc/builddeps/linux64/ode/include/ode/ode.h +++ /dev/null @@ -1,48 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#ifndef _ODE_ODE_H_ -#define _ODE_ODE_H_ - -/* include *everything* here */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif diff --git a/misc/builddeps/linux64/ode/include/ode/odeconfig.h b/misc/builddeps/linux64/ode/include/ode/odeconfig.h deleted file mode 100644 index 6e32fc65..00000000 --- a/misc/builddeps/linux64/ode/include/ode/odeconfig.h +++ /dev/null @@ -1,93 +0,0 @@ -#ifndef ODECONFIG_H -#define ODECONFIG_H - -/* Pull in the standard headers */ -#include -#include -#include -#include -#include -#include -#include -#include - - -#if defined(ODE_DLL) || defined(ODE_LIB) -#define __ODE__ -#endif - -/* Define a DLL export symbol for those platforms that need it */ -#if defined(_MSC_VER) - #if defined(ODE_DLL) - #define ODE_API __declspec(dllexport) - #elif !defined(ODE_LIB) - #define ODE_DLL_API __declspec(dllimport) - #endif -#endif - -#if !defined(ODE_API) - #define ODE_API -#endif - -#if defined(_MSC_VER) -# define ODE_API_DEPRECATED __declspec(deprecated) -#elif defined (__GNUC__) && ( (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)) ) -# define ODE_API_DEPRECATED __attribute__((__deprecated__)) -#else -# define ODE_API_DEPRECATED -#endif - -/* Well-defined common data types...need to define for 64 bit systems */ -#if defined(_M_IA64) || defined(__ia64__) || defined(_M_AMD64) || defined(__x86_64__) - #define X86_64_SYSTEM 1 - typedef int int32; - typedef unsigned int uint32; - typedef short int16; - typedef unsigned short uint16; - typedef signed char int8; - typedef unsigned char uint8; -#else - typedef int int32; - typedef unsigned int uint32; - typedef short int16; - typedef unsigned short uint16; - typedef signed char int8; - typedef unsigned char uint8; -#endif - -/* Visual C does not define these functions */ -#if defined(_MSC_VER) - #define copysignf(x, y) ((float)_copysign(x, y)) - #define copysign(x, y) _copysign(x, y) - #define nextafterf(x, y) _nextafterf(x, y) - #define nextafter(x, y) _nextafter(x, y) - #if !defined(_WIN64) - #define _ODE__NEXTAFTERF_REQUIRED - #endif -#endif - - - -/* Define the dInfinity macro */ -#ifdef INFINITY - #define dInfinity INFINITY -#elif defined(HUGE_VAL) - #ifdef dSINGLE - #ifdef HUGE_VALF - #define dInfinity HUGE_VALF - #else - #define dInfinity ((float)HUGE_VAL) - #endif - #else - #define dInfinity HUGE_VAL - #endif -#else - #ifdef dSINGLE - #define dInfinity ((float)(1.0/0.0)) - #else - #define dInfinity (1.0/0.0) - #endif -#endif - - -#endif diff --git a/misc/builddeps/linux64/ode/include/ode/odecpp.h b/misc/builddeps/linux64/ode/include/ode/odecpp.h deleted file mode 100644 index f7348925..00000000 --- a/misc/builddeps/linux64/ode/include/ode/odecpp.h +++ /dev/null @@ -1,1353 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001, 2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -/* C++ interface for non-collision stuff */ - - -#ifndef _ODE_ODECPP_H_ -#define _ODE_ODECPP_H_ -#ifdef __cplusplus - - - - -//namespace ode { - - -class dWorldSimpleIDContainer { -protected: - dWorldID _id; - - dWorldSimpleIDContainer(): _id(0) {} - ~dWorldSimpleIDContainer() { destroy(); } - - void destroy() { - if (_id) { - dWorldDestroy(_id); - _id = 0; - } - } -}; - -class dWorldDynamicIDContainer: public dWorldSimpleIDContainer { -protected: - virtual ~dWorldDynamicIDContainer() {} -}; - -template -class dWorldTemplate: public dWorldTemplateBase { - // intentionally undefined, don't use these - dWorldTemplate (const dWorldTemplate &); - void operator= (const dWorldTemplate &); - -protected: - dWorldID get_id() const { return dWorldTemplateBase::_id; } - void set_id(dWorldID value) { dWorldTemplateBase::_id = value; } - -public: - dWorldTemplate() - { set_id(dWorldCreate()); } - - dWorldID id() const - { return get_id(); } - operator dWorldID() const - { return get_id(); } - - void setGravity (dReal x, dReal y, dReal z) - { dWorldSetGravity (get_id(), x, y, z); } - void setGravity (const dVector3 g) - { setGravity (g[0], g[1], g[2]); } - void getGravity (dVector3 g) const - { dWorldGetGravity (get_id(), g); } - - void setERP (dReal erp) - { dWorldSetERP(get_id(), erp); } - dReal getERP() const - { return dWorldGetERP(get_id()); } - - void setCFM (dReal cfm) - { dWorldSetCFM(get_id(), cfm); } - dReal getCFM() const - { return dWorldGetCFM(get_id()); } - - void step (dReal stepsize) - { dWorldStep (get_id(), stepsize); } - - void quickStep(dReal stepsize) - { dWorldQuickStep (get_id(), stepsize); } - void setQuickStepNumIterations(int num) - { dWorldSetQuickStepNumIterations (get_id(), num); } - int getQuickStepNumIterations() const - { return dWorldGetQuickStepNumIterations (get_id()); } - void setQuickStepW(dReal over_relaxation) - { dWorldSetQuickStepW (get_id(), over_relaxation); } - dReal getQuickStepW() const - { return dWorldGetQuickStepW (get_id()); } - - void setAutoDisableLinearThreshold (dReal threshold) - { dWorldSetAutoDisableLinearThreshold (get_id(), threshold); } - dReal getAutoDisableLinearThreshold() const - { return dWorldGetAutoDisableLinearThreshold (get_id()); } - void setAutoDisableAngularThreshold (dReal threshold) - { dWorldSetAutoDisableAngularThreshold (get_id(), threshold); } - dReal getAutoDisableAngularThreshold() const - { return dWorldGetAutoDisableAngularThreshold (get_id()); } - void setAutoDisableSteps (int steps) - { dWorldSetAutoDisableSteps (get_id(), steps); } - int getAutoDisableSteps() const - { return dWorldGetAutoDisableSteps (get_id()); } - void setAutoDisableTime (dReal time) - { dWorldSetAutoDisableTime (get_id(), time); } - dReal getAutoDisableTime() const - { return dWorldGetAutoDisableTime (get_id()); } - void setAutoDisableFlag (int do_auto_disable) - { dWorldSetAutoDisableFlag (get_id(), do_auto_disable); } - int getAutoDisableFlag() const - { return dWorldGetAutoDisableFlag (get_id()); } - - dReal getLinearDampingThreshold() const - { return dWorldGetLinearDampingThreshold(get_id()); } - void setLinearDampingThreshold(dReal threshold) - { dWorldSetLinearDampingThreshold(get_id(), threshold); } - dReal getAngularDampingThreshold() const - { return dWorldGetAngularDampingThreshold(get_id()); } - void setAngularDampingThreshold(dReal threshold) - { dWorldSetAngularDampingThreshold(get_id(), threshold); } - dReal getLinearDamping() const - { return dWorldGetLinearDamping(get_id()); } - void setLinearDamping(dReal scale) - { dWorldSetLinearDamping(get_id(), scale); } - dReal getAngularDamping() const - { return dWorldGetAngularDamping(get_id()); } - void setAngularDamping(dReal scale) - { dWorldSetAngularDamping(get_id(), scale); } - void setDamping(dReal linear_scale, dReal angular_scale) - { dWorldSetDamping(get_id(), linear_scale, angular_scale); } - - dReal getMaxAngularSpeed() const - { return dWorldGetMaxAngularSpeed(get_id()); } - void setMaxAngularSpeed(dReal max_speed) - { dWorldSetMaxAngularSpeed(get_id(), max_speed); } - - void setContactSurfaceLayer(dReal depth) - { dWorldSetContactSurfaceLayer (get_id(), depth); } - dReal getContactSurfaceLayer() const - { return dWorldGetContactSurfaceLayer (get_id()); } - - void impulseToForce (dReal stepsize, dReal ix, dReal iy, dReal iz, - dVector3 force) - { dWorldImpulseToForce (get_id(), stepsize, ix, iy, iz, force); } -}; - - -class dBodySimpleIDContainer { -protected: - dBodyID _id; - - dBodySimpleIDContainer(): _id(0) {} - ~dBodySimpleIDContainer() { destroy(); } - - void destroy() { - if (_id) { - dBodyDestroy(_id); - _id = 0; - } - } -}; - -class dBodyDynamicIDContainer: public dBodySimpleIDContainer { -protected: - virtual ~dBodyDynamicIDContainer() {} -}; - -template -class dBodyTemplate: public dBodyTemplateBase { - // intentionally undefined, don't use these - dBodyTemplate (const dBodyTemplate &); - void operator= (const dBodyTemplate &); - -protected: - dBodyID get_id() const { return dBodyTemplateBase::_id; } - void set_id(dBodyID value) { dBodyTemplateBase::_id = value; } - - void destroy() { dBodyTemplateBase::destroy(); } - -public: - dBodyTemplate() - { } - dBodyTemplate (dWorldID world) - { set_id(dBodyCreate(world)); } - dBodyTemplate (dWorldTemplate& world) - { set_id(dBodyCreate(world.id())); } - - void create (dWorldID world) { - destroy(); - set_id(dBodyCreate(world)); - } - void create (dWorldTemplate& world) { - create(world.id()); - } - - dBodyID id() const - { return get_id(); } - operator dBodyID() const - { return get_id(); } - - void setData (void *data) - { dBodySetData (get_id(), data); } - void *getData() const - { return dBodyGetData (get_id()); } - - void setPosition (dReal x, dReal y, dReal z) - { dBodySetPosition (get_id(), x, y, z); } - void setPosition (const dVector3 p) - { setPosition(p[0], p[1], p[2]); } - - void setRotation (const dMatrix3 R) - { dBodySetRotation (get_id(), R); } - void setQuaternion (const dQuaternion q) - { dBodySetQuaternion (get_id(), q); } - void setLinearVel (dReal x, dReal y, dReal z) - { dBodySetLinearVel (get_id(), x, y, z); } - void setLinearVel (const dVector3 v) - { setLinearVel(v[0], v[1], v[2]); } - void setAngularVel (dReal x, dReal y, dReal z) - { dBodySetAngularVel (get_id(), x, y, z); } - void setAngularVel (const dVector3 v) - { setAngularVel (v[0], v[1], v[2]); } - - const dReal * getPosition() const - { return dBodyGetPosition (get_id()); } - const dReal * getRotation() const - { return dBodyGetRotation (get_id()); } - const dReal * getQuaternion() const - { return dBodyGetQuaternion (get_id()); } - const dReal * getLinearVel() const - { return dBodyGetLinearVel (get_id()); } - const dReal * getAngularVel() const - { return dBodyGetAngularVel (get_id()); } - - void setMass (const dMass *mass) - { dBodySetMass (get_id(), mass); } - void setMass (const dMass &mass) - { setMass (&mass); } - dMass getMass () const - { dMass mass; dBodyGetMass (get_id(), &mass); return mass; } - - void addForce (dReal fx, dReal fy, dReal fz) - { dBodyAddForce (get_id(), fx, fy, fz); } - void addForce (const dVector3 f) - { addForce (f[0], f[1], f[2]); } - void addTorque (dReal fx, dReal fy, dReal fz) - { dBodyAddTorque (get_id(), fx, fy, fz); } - void addTorque (const dVector3 t) - { addTorque(t[0], t[1], t[2]); } - - void addRelForce (dReal fx, dReal fy, dReal fz) - { dBodyAddRelForce (get_id(), fx, fy, fz); } - void addRelForce (const dVector3 f) - { addRelForce (f[0], f[1], f[2]); } - void addRelTorque (dReal fx, dReal fy, dReal fz) - { dBodyAddRelTorque (get_id(), fx, fy, fz); } - void addRelTorque (const dVector3 t) - { addRelTorque (t[0], t[1], t[2]); } - - void addForceAtPos (dReal fx, dReal fy, dReal fz, - dReal px, dReal py, dReal pz) - { dBodyAddForceAtPos (get_id(), fx, fy, fz, px, py, pz); } - void addForceAtPos (const dVector3 f, const dVector3 p) - { addForceAtPos (f[0], f[1], f[2], p[0], p[1], p[2]); } - - void addForceAtRelPos (dReal fx, dReal fy, dReal fz, - dReal px, dReal py, dReal pz) - { dBodyAddForceAtRelPos (get_id(), fx, fy, fz, px, py, pz); } - void addForceAtRelPos (const dVector3 f, const dVector3 p) - { addForceAtRelPos (f[0], f[1], f[2], p[0], p[1], p[2]); } - - void addRelForceAtPos (dReal fx, dReal fy, dReal fz, - dReal px, dReal py, dReal pz) - { dBodyAddRelForceAtPos (get_id(), fx, fy, fz, px, py, pz); } - void addRelForceAtPos (const dVector3 f, const dVector3 p) - { addRelForceAtPos (f[0], f[1], f[2], p[0], p[1], p[2]); } - - void addRelForceAtRelPos (dReal fx, dReal fy, dReal fz, - dReal px, dReal py, dReal pz) - { dBodyAddRelForceAtRelPos (get_id(), fx, fy, fz, px, py, pz); } - void addRelForceAtRelPos (const dVector3 f, const dVector3 p) - { addRelForceAtRelPos (f[0], f[1], f[2], p[0], p[1], p[2]); } - - const dReal * getForce() const - { return dBodyGetForce(get_id()); } - const dReal * getTorque() const - { return dBodyGetTorque(get_id()); } - void setForce (dReal x, dReal y, dReal z) - { dBodySetForce (get_id(), x, y, z); } - void setForce (const dVector3 f) - { setForce (f[0], f[1], f[2]); } - void setTorque (dReal x, dReal y, dReal z) - { dBodySetTorque (get_id(), x, y, z); } - void setTorque (const dVector3 t) - { setTorque (t[0], t[1], t[2]); } - - void setDynamic() - { dBodySetDynamic (get_id()); } - void setKinematic() - { dBodySetKinematic (get_id()); } - bool isKinematic() const - { return dBodyIsKinematic (get_id()) != 0; } - - void enable() - { dBodyEnable (get_id()); } - void disable() - { dBodyDisable (get_id()); } - bool isEnabled() const - { return dBodyIsEnabled (get_id()) != 0; } - - void getRelPointPos (dReal px, dReal py, dReal pz, dVector3 result) const - { dBodyGetRelPointPos (get_id(), px, py, pz, result); } - void getRelPointPos (const dVector3 p, dVector3 result) const - { getRelPointPos (p[0], p[1], p[2], result); } - - void getRelPointVel (dReal px, dReal py, dReal pz, dVector3 result) const - { dBodyGetRelPointVel (get_id(), px, py, pz, result); } - void getRelPointVel (const dVector3 p, dVector3 result) const - { getRelPointVel (p[0], p[1], p[2], result); } - - void getPointVel (dReal px, dReal py, dReal pz, dVector3 result) const - { dBodyGetPointVel (get_id(), px, py, pz, result); } - void getPointVel (const dVector3 p, dVector3 result) const - { getPointVel (p[0], p[1], p[2], result); } - - void getPosRelPoint (dReal px, dReal py, dReal pz, dVector3 result) const - { dBodyGetPosRelPoint (get_id(), px, py, pz, result); } - void getPosRelPoint (const dVector3 p, dVector3 result) const - { getPosRelPoint (p[0], p[1], p[2], result); } - - void vectorToWorld (dReal px, dReal py, dReal pz, dVector3 result) const - { dBodyVectorToWorld (get_id(), px, py, pz, result); } - void vectorToWorld (const dVector3 p, dVector3 result) const - { vectorToWorld (p[0], p[1], p[2], result); } - - void vectorFromWorld (dReal px, dReal py, dReal pz, dVector3 result) const - { dBodyVectorFromWorld (get_id(), px, py, pz, result); } - void vectorFromWorld (const dVector3 p, dVector3 result) const - { vectorFromWorld (p[0], p[1], p[2], result); } - - void setFiniteRotationMode (bool mode) - { dBodySetFiniteRotationMode (get_id(), mode); } - - void setFiniteRotationAxis (dReal x, dReal y, dReal z) - { dBodySetFiniteRotationAxis (get_id(), x, y, z); } - void setFiniteRotationAxis (const dVector3 a) - { setFiniteRotationAxis (a[0], a[1], a[2]); } - - bool getFiniteRotationMode() const - { return dBodyGetFiniteRotationMode (get_id()) != 0; } - void getFiniteRotationAxis (dVector3 result) const - { dBodyGetFiniteRotationAxis (get_id(), result); } - - int getNumJoints() const - { return dBodyGetNumJoints (get_id()); } - dJointID getJoint (int index) const - { return dBodyGetJoint (get_id(), index); } - - void setGravityMode (bool mode) - { dBodySetGravityMode (get_id(), mode); } - bool getGravityMode() const - { return dBodyGetGravityMode (get_id()) != 0; } - - bool isConnectedTo (dBodyID body) const - { return dAreConnected (get_id(), body) != 0; } - - void setAutoDisableLinearThreshold (dReal threshold) - { dBodySetAutoDisableLinearThreshold (get_id(), threshold); } - dReal getAutoDisableLinearThreshold() const - { return dBodyGetAutoDisableLinearThreshold (get_id()); } - void setAutoDisableAngularThreshold (dReal threshold) - { dBodySetAutoDisableAngularThreshold (get_id(), threshold); } - dReal getAutoDisableAngularThreshold() const - { return dBodyGetAutoDisableAngularThreshold (get_id()); } - void setAutoDisableSteps (int steps) - { dBodySetAutoDisableSteps (get_id(), steps); } - int getAutoDisableSteps() const - { return dBodyGetAutoDisableSteps (get_id()); } - void setAutoDisableTime (dReal time) - { dBodySetAutoDisableTime (get_id(), time); } - dReal getAutoDisableTime() const - { return dBodyGetAutoDisableTime (get_id()); } - void setAutoDisableFlag (bool do_auto_disable) - { dBodySetAutoDisableFlag (get_id(), do_auto_disable); } - bool getAutoDisableFlag() const - { return dBodyGetAutoDisableFlag (get_id()) != 0; } - - dReal getLinearDamping() const - { return dBodyGetLinearDamping(get_id()); } - void setLinearDamping(dReal scale) - { dBodySetLinearDamping(get_id(), scale); } - dReal getAngularDamping() const - { return dBodyGetAngularDamping(get_id()); } - void setAngularDamping(dReal scale) - { dBodySetAngularDamping(get_id(), scale); } - void setDamping(dReal linear_scale, dReal angular_scale) - { dBodySetDamping(get_id(), linear_scale, angular_scale); } - dReal getLinearDampingThreshold() const - { return dBodyGetLinearDampingThreshold(get_id()); } - void setLinearDampingThreshold(dReal threshold) const - { dBodySetLinearDampingThreshold(get_id(), threshold); } - dReal getAngularDampingThreshold() const - { return dBodyGetAngularDampingThreshold(get_id()); } - void setAngularDampingThreshold(dReal threshold) - { dBodySetAngularDampingThreshold(get_id(), threshold); } - void setDampingDefaults() - { dBodySetDampingDefaults(get_id()); } - - dReal getMaxAngularSpeed() const - { return dBodyGetMaxAngularSpeed(get_id()); } - void setMaxAngularSpeed(dReal max_speed) - { dBodySetMaxAngularSpeed(get_id(), max_speed); } - - bool getGyroscopicMode() const - { return dBodyGetGyroscopicMode(get_id()) != 0; } - void setGyroscopicMode(bool mode) - { dBodySetGyroscopicMode(get_id(), mode); } - -}; - - -class dJointGroupSimpleIDContainer { -protected: - dJointGroupID _id; - - dJointGroupSimpleIDContainer(): _id(0) {} - ~dJointGroupSimpleIDContainer() { destroy(); } - - void destroy() { - if (_id) { - dJointGroupDestroy(_id); - _id = 0; - } - } -}; - -class dJointGroupDynamicIDContainer: public dJointGroupSimpleIDContainer { -protected: - virtual ~dJointGroupDynamicIDContainer() {} -}; - -template -class dJointGroupTemplate: public dJointGroupTemplateBase { - // intentionally undefined, don't use these - dJointGroupTemplate (const dJointGroupTemplate &); - void operator= (const dJointGroupTemplate &); - -protected: - dJointGroupID get_id() const { return dJointGroupTemplateBase::_id; } - void set_id(dJointGroupID value) { dJointGroupTemplateBase::_id = value; } - - void destroy() { dJointGroupTemplateBase::destroy(); } - -public: - dJointGroupTemplate () - { set_id(dJointGroupCreate(0)); } - - void create () { - destroy(); - set_id(dJointGroupCreate(0)); - } - - dJointGroupID id() const - { return get_id(); } - operator dJointGroupID() const - { return get_id(); } - - void empty() - { dJointGroupEmpty (get_id()); } - void clear() - { empty(); } -}; - - -class dJointSimpleIDContainer { -protected: - dJointID _id; - - dJointSimpleIDContainer(): _id(0) {} - ~dJointSimpleIDContainer() { destroy(); } - - void destroy() { - if (_id) { - dJointDestroy (_id); - _id = 0; - } - } -}; - -class dJointDynamicIDContainer: public dJointSimpleIDContainer { -protected: - virtual ~dJointDynamicIDContainer() {} -}; - -template -class dJointTemplate: public dJointTemplateBase { -private: - // intentionally undefined, don't use these - dJointTemplate (const dJointTemplate &) ; - void operator= (const dJointTemplate &); - -protected: - dJointID get_id() const { return dJointTemplateBase::_id; } - void set_id(dJointID value) { dJointTemplateBase::_id = value; } - - void destroy() { dJointTemplateBase::destroy(); } - -protected: - dJointTemplate() // don't let user construct pure dJointTemplate objects - { } - -public: - dJointID id() const - { return get_id(); } - operator dJointID() const - { return get_id(); } - - int getNumBodies() const - { return dJointGetNumBodies(get_id()); } - - void attach (dBodyID body1, dBodyID body2) - { dJointAttach (get_id(), body1, body2); } - void attach (dBodyTemplate& body1, dBodyTemplate& body2) - { attach(body1.id(), body2.id()); } - - void enable() - { dJointEnable (get_id()); } - void disable() - { dJointDisable (get_id()); } - bool isEnabled() const - { return dJointIsEnabled (get_id()) != 0; } - - void setData (void *data) - { dJointSetData (get_id(), data); } - void *getData() const - { return dJointGetData (get_id()); } - - dJointType getType() const - { return dJointGetType (get_id()); } - - dBodyID getBody (int index) const - { return dJointGetBody (get_id(), index); } - - void setFeedback(dJointFeedback *fb) - { dJointSetFeedback(get_id(), fb); } - dJointFeedback *getFeedback() const - { return dJointGetFeedback(get_id()); } - - // If not implemented it will do nothing as describe in the doc - virtual void setParam (int, dReal) {}; - virtual dReal getParam (int) const { return 0; } -}; - - -template -class dBallJointTemplate : public dJointTemplate { -private: - // intentionally undefined, don't use these - dBallJointTemplate (const dBallJointTemplate &); - void operator= (const dBallJointTemplate &); - -protected: - typedef dJointTemplate dBaseTemplate; - - dJointID get_id() const { return dBaseTemplate::get_id(); } - void set_id(dJointID value) { dBaseTemplate::set_id(value); } - - void destroy() { dBaseTemplate::destroy(); } - -public: - dBallJointTemplate() { } - dBallJointTemplate (dWorldID world, dJointGroupID group=0) - { set_id(dJointCreateBall(world, group)); } - dBallJointTemplate (dWorldTemplate& world, dJointGroupID group=0) - { set_id(dJointCreateBall(world.id(), group)); } - - void create (dWorldID world, dJointGroupID group=0) { - destroy(); - set_id(dJointCreateBall(world, group)); - } - void create (dWorldTemplate& world, dJointGroupID group=0) - { create(world.id(), group); } - - void setAnchor (dReal x, dReal y, dReal z) - { dJointSetBallAnchor (get_id(), x, y, z); } - void setAnchor (const dVector3 a) - { setAnchor (a[0], a[1], a[2]); } - void getAnchor (dVector3 result) const - { dJointGetBallAnchor (get_id(), result); } - void getAnchor2 (dVector3 result) const - { dJointGetBallAnchor2 (get_id(), result); } - virtual void setParam (int parameter, dReal value) - { dJointSetBallParam (get_id(), parameter, value); } - virtual dReal getParam (int parameter) const - { return dJointGetBallParam (get_id(), parameter); } - // TODO: expose params through methods -} ; - - -template -class dHingeJointTemplate : public dJointTemplate { -private: - // intentionally undefined, don't use these - dHingeJointTemplate (const dHingeJointTemplate &); - void operator = (const dHingeJointTemplate &); - -protected: - typedef dJointTemplate dBaseTemplate; - - dJointID get_id() const { return dBaseTemplate::get_id(); } - void set_id(dJointID value) { dBaseTemplate::set_id(value); } - - void destroy() { dBaseTemplate::destroy(); } - -public: - dHingeJointTemplate() { } - dHingeJointTemplate (dWorldID world, dJointGroupID group=0) - { set_id(dJointCreateHinge(world, group)); } - dHingeJointTemplate (dWorldTemplate& world, dJointGroupID group=0) - { set_id(dJointCreateHinge(world.id(), group)); } - - void create (dWorldID world, dJointGroupID group=0) { - destroy(); - set_id(dJointCreateHinge (world, group)); - } - void create (dWorldTemplate& world, dJointGroupID group=0) - { create(world.id(), group); } - - void setAnchor (dReal x, dReal y, dReal z) - { dJointSetHingeAnchor (get_id(), x, y, z); } - void setAnchor (const dVector3 a) - { setAnchor (a[0], a[1], a[2]); } - void getAnchor (dVector3 result) const - { dJointGetHingeAnchor (get_id(), result); } - void getAnchor2 (dVector3 result) const - { dJointGetHingeAnchor2 (get_id(), result); } - - void setAxis (dReal x, dReal y, dReal z) - { dJointSetHingeAxis (get_id(), x, y, z); } - void setAxis (const dVector3 a) - { setAxis(a[0], a[1], a[2]); } - void getAxis (dVector3 result) const - { dJointGetHingeAxis (get_id(), result); } - - dReal getAngle() const - { return dJointGetHingeAngle (get_id()); } - dReal getAngleRate() const - { return dJointGetHingeAngleRate (get_id()); } - - virtual void setParam (int parameter, dReal value) - { dJointSetHingeParam (get_id(), parameter, value); } - virtual dReal getParam (int parameter) const - { return dJointGetHingeParam (get_id(), parameter); } - // TODO: expose params through methods - - void addTorque (dReal torque) - { dJointAddHingeTorque(get_id(), torque); } -}; - - -template -class dSliderJointTemplate : public dJointTemplate { -private: - // intentionally undefined, don't use these - dSliderJointTemplate (const dSliderJointTemplate &); - void operator = (const dSliderJointTemplate &); - -protected: - typedef dJointTemplate dBaseTemplate; - - dJointID get_id() const { return dBaseTemplate::get_id(); } - void set_id(dJointID value) { dBaseTemplate::set_id(value); } - - void destroy() { dBaseTemplate::destroy(); } - -public: - dSliderJointTemplate() { } - dSliderJointTemplate (dWorldID world, dJointGroupID group=0) - { set_id(dJointCreateSlider(world, group)); } - dSliderJointTemplate (dWorldTemplate& world, dJointGroupID group=0) - { set_id(dJointCreateSlider(world.id(), group)); } - - void create (dWorldID world, dJointGroupID group=0) { - destroy(); - set_id(dJointCreateSlider(world, group)); - } - void create (dWorldTemplate& world, dJointGroupID group=0) - { create(world.id(), group); } - - void setAxis (dReal x, dReal y, dReal z) - { dJointSetSliderAxis (get_id(), x, y, z); } - void setAxis (const dVector3 a) - { setAxis (a[0], a[1], a[2]); } - void getAxis (dVector3 result) const - { dJointGetSliderAxis (get_id(), result); } - - dReal getPosition() const - { return dJointGetSliderPosition (get_id()); } - dReal getPositionRate() const - { return dJointGetSliderPositionRate (get_id()); } - - virtual void setParam (int parameter, dReal value) - { dJointSetSliderParam (get_id(), parameter, value); } - virtual dReal getParam (int parameter) const - { return dJointGetSliderParam (get_id(), parameter); } - // TODO: expose params through methods - - void addForce (dReal force) - { dJointAddSliderForce(get_id(), force); } -}; - - -template -class dUniversalJointTemplate : public dJointTemplate { -private: - // intentionally undefined, don't use these - dUniversalJointTemplate (const dUniversalJointTemplate &); - void operator = (const dUniversalJointTemplate &); - -protected: - typedef dJointTemplate dBaseTemplate; - - dJointID get_id() const { return dBaseTemplate::get_id(); } - void set_id(dJointID value) { dBaseTemplate::set_id(value); } - - void destroy() { dBaseTemplate::destroy(); } - -public: - dUniversalJointTemplate() { } - dUniversalJointTemplate (dWorldID world, dJointGroupID group=0) - { set_id(dJointCreateUniversal(world, group)); } - dUniversalJointTemplate (dWorldTemplate& world, dJointGroupID group=0) - { set_id(dJointCreateUniversal(world.id(), group)); } - - void create (dWorldID world, dJointGroupID group=0) { - destroy(); - set_id(dJointCreateUniversal(world, group)); - } - void create (dWorldTemplate& world, dJointGroupID group=0) - { create(world.id(), group); } - - void setAnchor (dReal x, dReal y, dReal z) - { dJointSetUniversalAnchor (get_id(), x, y, z); } - void setAnchor (const dVector3 a) - { setAnchor(a[0], a[1], a[2]); } - void setAxis1 (dReal x, dReal y, dReal z) - { dJointSetUniversalAxis1 (get_id(), x, y, z); } - void setAxis1 (const dVector3 a) - { setAxis1 (a[0], a[1], a[2]); } - void setAxis2 (dReal x, dReal y, dReal z) - { dJointSetUniversalAxis2 (get_id(), x, y, z); } - void setAxis2 (const dVector3 a) - { setAxis2 (a[0], a[1], a[2]); } - - void getAnchor (dVector3 result) const - { dJointGetUniversalAnchor (get_id(), result); } - void getAnchor2 (dVector3 result) const - { dJointGetUniversalAnchor2 (get_id(), result); } - void getAxis1 (dVector3 result) const - { dJointGetUniversalAxis1 (get_id(), result); } - void getAxis2 (dVector3 result) const - { dJointGetUniversalAxis2 (get_id(), result); } - - virtual void setParam (int parameter, dReal value) - { dJointSetUniversalParam (get_id(), parameter, value); } - virtual dReal getParam (int parameter) const - { return dJointGetUniversalParam (get_id(), parameter); } - // TODO: expose params through methods - - void getAngles(dReal *angle1, dReal *angle2) const - { dJointGetUniversalAngles (get_id(), angle1, angle2); } - - dReal getAngle1() const - { return dJointGetUniversalAngle1 (get_id()); } - dReal getAngle1Rate() const - { return dJointGetUniversalAngle1Rate (get_id()); } - dReal getAngle2() const - { return dJointGetUniversalAngle2 (get_id()); } - dReal getAngle2Rate() const - { return dJointGetUniversalAngle2Rate (get_id()); } - - void addTorques (dReal torque1, dReal torque2) - { dJointAddUniversalTorques(get_id(), torque1, torque2); } -}; - - -template -class dHinge2JointTemplate : public dJointTemplate { -private: - // intentionally undefined, don't use these - dHinge2JointTemplate (const dHinge2JointTemplate &); - void operator = (const dHinge2JointTemplate &); - -protected: - typedef dJointTemplate dBaseTemplate; - - dJointID get_id() const { return dBaseTemplate::get_id(); } - void set_id(dJointID value) { dBaseTemplate::set_id(value); } - - void destroy() { dBaseTemplate::destroy(); } - -public: - dHinge2JointTemplate() { } - dHinge2JointTemplate (dWorldID world, dJointGroupID group=0) - { set_id(dJointCreateHinge2(world, group)); } - dHinge2JointTemplate (dWorldTemplate& world, dJointGroupID group=0) - { set_id(dJointCreateHinge2(world.id(), group)); } - - void create (dWorldID world, dJointGroupID group=0) { - destroy(); - set_id(dJointCreateHinge2(world, group)); - } - void create (dWorldTemplate& world, dJointGroupID group=0) - { create(world.id(), group); } - - void setAnchor (dReal x, dReal y, dReal z) - { dJointSetHinge2Anchor (get_id(), x, y, z); } - void setAnchor (const dVector3 a) - { setAnchor(a[0], a[1], a[2]); } - void setAxis1 (dReal x, dReal y, dReal z) - { dJointSetHinge2Axis1 (get_id(), x, y, z); } - void setAxis1 (const dVector3 a) - { setAxis1 (a[0], a[1], a[2]); } - void setAxis2 (dReal x, dReal y, dReal z) - { dJointSetHinge2Axis2 (get_id(), x, y, z); } - void setAxis2 (const dVector3 a) - { setAxis2 (a[0], a[1], a[2]); } - - void getAnchor (dVector3 result) const - { dJointGetHinge2Anchor (get_id(), result); } - void getAnchor2 (dVector3 result) const - { dJointGetHinge2Anchor2 (get_id(), result); } - void getAxis1 (dVector3 result) const - { dJointGetHinge2Axis1 (get_id(), result); } - void getAxis2 (dVector3 result) const - { dJointGetHinge2Axis2 (get_id(), result); } - - dReal getAngle1() const - { return dJointGetHinge2Angle1 (get_id()); } - dReal getAngle1Rate() const - { return dJointGetHinge2Angle1Rate (get_id()); } - dReal getAngle2Rate() const - { return dJointGetHinge2Angle2Rate (get_id()); } - - virtual void setParam (int parameter, dReal value) - { dJointSetHinge2Param (get_id(), parameter, value); } - virtual dReal getParam (int parameter) const - { return dJointGetHinge2Param (get_id(), parameter); } - // TODO: expose params through methods - - void addTorques(dReal torque1, dReal torque2) - { dJointAddHinge2Torques(get_id(), torque1, torque2); } -}; - - -template -class dPRJointTemplate : public dJointTemplate { -private: - // intentionally undefined, don't use these - dPRJointTemplate (const dPRJointTemplate &); - void operator = (const dPRJointTemplate &); - -protected: - typedef dJointTemplate dBaseTemplate; - - dJointID get_id() const { return dBaseTemplate::get_id(); } - void set_id(dJointID value) { dBaseTemplate::set_id(value); } - - void destroy() { dBaseTemplate::destroy(); } - -public: - dPRJointTemplate() { } - dPRJointTemplate (dWorldID world, dJointGroupID group=0) - { set_id(dJointCreatePR(world, group)); } - dPRJointTemplate (dWorldTemplate& world, dJointGroupID group=0) - { set_id(dJointCreatePR(world.id(), group)); } - - void create (dWorldID world, dJointGroupID group=0) { - destroy(); - set_id(dJointCreatePR(world, group)); - } - void create (dWorldTemplate& world, dJointGroupID group=0) - { create(world.id(), group); } - - void setAnchor (dReal x, dReal y, dReal z) - { dJointSetPRAnchor (get_id(), x, y, z); } - void setAnchor (const dVector3 a) - { setAnchor (a[0], a[1], a[2]); } - void setAxis1 (dReal x, dReal y, dReal z) - { dJointSetPRAxis1 (get_id(), x, y, z); } - void setAxis1 (const dVector3 a) - { setAxis1(a[0], a[1], a[2]); } - void setAxis2 (dReal x, dReal y, dReal z) - { dJointSetPRAxis2 (get_id(), x, y, z); } - void setAxis2 (const dVector3 a) - { setAxis2(a[0], a[1], a[2]); } - - void getAnchor (dVector3 result) const - { dJointGetPRAnchor (get_id(), result); } - void getAxis1 (dVector3 result) const - { dJointGetPRAxis1 (get_id(), result); } - void getAxis2 (dVector3 result) const - { dJointGetPRAxis2 (get_id(), result); } - - dReal getPosition() const - { return dJointGetPRPosition (get_id()); } - dReal getPositionRate() const - { return dJointGetPRPositionRate (get_id()); } - - dReal getAngle() const - { return dJointGetPRAngle (get_id()); } - dReal getAngleRate() const - { return dJointGetPRAngleRate (get_id()); } - - virtual void setParam (int parameter, dReal value) - { dJointSetPRParam (get_id(), parameter, value); } - virtual dReal getParam (int parameter) const - { return dJointGetPRParam (get_id(), parameter); } -}; - - - -template -class dPUJointTemplate : public dJointTemplate -{ -private: - // intentionally undefined, don't use these - dPUJointTemplate (const dPUJointTemplate &); - void operator = (const dPUJointTemplate &); - -protected: - typedef dJointTemplate dBaseTemplate; - - dJointID get_id() const { return dBaseTemplate::get_id(); } - void set_id(dJointID value) { dBaseTemplate::set_id(value); } - - void destroy() { dBaseTemplate::destroy(); } - -public: - dPUJointTemplate() { } - dPUJointTemplate (dWorldID world, dJointGroupID group=0) - { set_id(dJointCreatePU(world, group)); } - dPUJointTemplate (dWorldTemplate& world, dJointGroupID group=0) - { set_id(dJointCreatePU(world.id(), group)); } - - void create (dWorldID world, dJointGroupID group=0) - { - destroy(); - set_id(dJointCreatePU(world, group)); - } - void create (dWorldTemplate& world, dJointGroupID group=0) - { create(world.id(), group); } - - void setAnchor (dReal x, dReal y, dReal z) - { dJointSetPUAnchor (get_id(), x, y, z); } - void setAnchor (const dVector3 a) - { setAnchor (a[0], a[1], a[2]); } - void setAxis1 (dReal x, dReal y, dReal z) - { dJointSetPUAxis1 (get_id(), x, y, z); } - void setAxis1 (const dVector3 a) - { setAxis1(a[0], a[1], a[2]); } - void setAxis2 (dReal x, dReal y, dReal z) - { dJointSetPUAxis2 (get_id(), x, y, z); } - void setAxis3 (dReal x, dReal y, dReal z) - { dJointSetPUAxis3 (get_id(), x, y, z); } - void setAxis3 (const dVector3 a) - { setAxis3(a[0], a[1], a[2]); } - void setAxisP (dReal x, dReal y, dReal z) - { dJointSetPUAxis3 (get_id(), x, y, z); } - void setAxisP (const dVector3 a) - { setAxisP(a[0], a[1], a[2]); } - - virtual void getAnchor (dVector3 result) const - { dJointGetPUAnchor (get_id(), result); } - void getAxis1 (dVector3 result) const - { dJointGetPUAxis1 (get_id(), result); } - void getAxis2 (dVector3 result) const - { dJointGetPUAxis2 (get_id(), result); } - void getAxis3 (dVector3 result) const - { dJointGetPUAxis3 (get_id(), result); } - void getAxisP (dVector3 result) const - { dJointGetPUAxis3 (get_id(), result); } - - dReal getAngle1() const - { return dJointGetPUAngle1 (get_id()); } - dReal getAngle1Rate() const - { return dJointGetPUAngle1Rate (get_id()); } - dReal getAngle2() const - { return dJointGetPUAngle2 (get_id()); } - dReal getAngle2Rate() const - { return dJointGetPUAngle2Rate (get_id()); } - - dReal getPosition() const - { return dJointGetPUPosition (get_id()); } - dReal getPositionRate() const - { return dJointGetPUPositionRate (get_id()); } - - virtual void setParam (int parameter, dReal value) - { dJointSetPUParam (get_id(), parameter, value); } - virtual dReal getParam (int parameter) const - { return dJointGetPUParam (get_id(), parameter); } - // TODO: expose params through methods -}; - - - - - -template -class dPistonJointTemplate : public dJointTemplate -{ -private: - // intentionally undefined, don't use these - dPistonJointTemplate (const dPistonJointTemplate &); - void operator = (const dPistonJointTemplate &); - -protected: - typedef dJointTemplate dBaseTemplate; - - dJointID get_id() const { return dBaseTemplate::get_id(); } - void set_id(dJointID value) { dBaseTemplate::set_id(value); } - - void destroy() { dBaseTemplate::destroy(); } - -public: - dPistonJointTemplate() { } - dPistonJointTemplate (dWorldID world, dJointGroupID group=0) - { set_id(dJointCreatePiston(world, group)); } - dPistonJointTemplate (dWorldTemplate& world, dJointGroupID group=0) - { set_id(dJointCreatePiston(world, group)); } - - void create (dWorldID world, dJointGroupID group=0) - { - destroy(); - set_id(dJointCreatePiston(world, group)); - } - void create (dWorldTemplate& world, dJointGroupID group=0) - { create(world.id(), group); } - - void setAnchor (dReal x, dReal y, dReal z) - { dJointSetPistonAnchor (get_id(), x, y, z); } - void setAnchor (const dVector3 a) - { setAnchor (a[0], a[1], a[2]); } - void getAnchor (dVector3 result) const - { dJointGetPistonAnchor (get_id(), result); } - void getAnchor2 (dVector3 result) const - { dJointGetPistonAnchor2 (get_id(), result); } - - void setAxis (dReal x, dReal y, dReal z) - { dJointSetPistonAxis (get_id(), x, y, z); } - void setAxis (const dVector3 a) - { setAxis(a[0], a[1], a[2]); } - void getAxis (dVector3 result) const - { dJointGetPistonAxis (get_id(), result); } - - dReal getPosition() const - { return dJointGetPistonPosition (get_id()); } - dReal getPositionRate() const - { return dJointGetPistonPositionRate (get_id()); } - - virtual void setParam (int parameter, dReal value) - { dJointSetPistonParam (get_id(), parameter, value); } - virtual dReal getParam (int parameter) const - { return dJointGetPistonParam (get_id(), parameter); } - // TODO: expose params through methods - - void addForce (dReal force) - { dJointAddPistonForce (get_id(), force); } -}; - - - -template -class dFixedJointTemplate : public dJointTemplate -{ -private: - // intentionally undefined, don't use these - dFixedJointTemplate (const dFixedJointTemplate &); - void operator = (const dFixedJointTemplate &); - -protected: - typedef dJointTemplate dBaseTemplate; - - dJointID get_id() const { return dBaseTemplate::get_id(); } - void set_id(dJointID value) { dBaseTemplate::set_id(value); } - - void destroy() { dBaseTemplate::destroy(); } - -public: - dFixedJointTemplate() { } - dFixedJointTemplate (dWorldID world, dJointGroupID group=0) - { set_id(dJointCreateFixed(world, group)); } - dFixedJointTemplate (dWorldTemplate& world, dJointGroupID group=0) - { set_id(dJointCreateFixed(world, group)); } - - void create (dWorldID world, dJointGroupID group=0) { - destroy(); - set_id(dJointCreateFixed(world, group)); - } - void create (dWorldTemplate& world, dJointGroupID group=0) - { create(world.id(), group); } - - void set() - { dJointSetFixed (get_id()); } - - virtual void setParam (int parameter, dReal value) - { dJointSetFixedParam (get_id(), parameter, value); } - - virtual dReal getParam (int parameter) const - { return dJointGetFixedParam (get_id(), parameter); } - // TODO: expose params through methods -}; - - -template -class dContactJointTemplate : public dJointTemplate { -private: - // intentionally undefined, don't use these - dContactJointTemplate (const dContactJointTemplate &); - void operator = (const dContactJointTemplate &); - -protected: - typedef dJointTemplate dBaseTemplate; - - dJointID get_id() const { return dBaseTemplate::get_id(); } - void set_id(dJointID value) { dBaseTemplate::set_id(value); } - - void destroy() { dBaseTemplate::destroy(); } - -public: - dContactJointTemplate() { } - dContactJointTemplate (dWorldID world, dJointGroupID group, dContact *contact) - { set_id(dJointCreateContact(world, group, contact)); } - dContactJointTemplate (dWorldTemplate& world, dJointGroupID group, dContact *contact) - { set_id(dJointCreateContact(world.id(), group, contact)); } - - void create (dWorldID world, dJointGroupID group, dContact *contact) { - destroy(); - set_id(dJointCreateContact(world, group, contact)); - } - - void create (dWorldTemplate& world, dJointGroupID group, dContact *contact) - { create(world.id(), group, contact); } -}; - - -template -class dNullJointTemplate : public dJointTemplate { -private: - // intentionally undefined, don't use these - dNullJointTemplate (const dNullJointTemplate &); - void operator = (const dNullJointTemplate &); - -protected: - typedef dJointTemplate dBaseTemplate; - - dJointID get_id() const { return dBaseTemplate::get_id(); } - void set_id(dJointID value) { dBaseTemplate::set_id(value); } - - void destroy() { dBaseTemplate::destroy(); } - -public: - dNullJointTemplate() { } - dNullJointTemplate (dWorldID world, dJointGroupID group=0) - { set_id(dJointCreateNull(world, group)); } - dNullJointTemplate (dWorldTemplate& world, dJointGroupID group=0) - { set_id(dJointCreateNull (world.id(), group)); } - - void create (dWorldID world, dJointGroupID group=0) { - destroy(); - set_id(dJointCreateNull(world, group)); - } - void create (dWorldTemplate& world, dJointGroupID group=0) - { create(world.id(), group); } -}; - - -template -class dAMotorJointTemplate : public dJointTemplate { -private: - // intentionally undefined, don't use these - dAMotorJointTemplate (const dAMotorJointTemplate &); - void operator = (const dAMotorJointTemplate &); - -protected: - typedef dJointTemplate dBaseTemplate; - - dJointID get_id() const { return dBaseTemplate::get_id(); } - void set_id(dJointID value) { dBaseTemplate::set_id(value); } - - void destroy() { dBaseTemplate::destroy(); } - -public: - dAMotorJointTemplate() { } - dAMotorJointTemplate (dWorldID world, dJointGroupID group=0) - { set_id(dJointCreateAMotor(world, group)); } - dAMotorJointTemplate (dWorldTemplate& world, dJointGroupID group=0) - { set_id(dJointCreateAMotor(world.id(), group)); } - - void create (dWorldID world, dJointGroupID group=0) { - destroy(); - set_id(dJointCreateAMotor(world, group)); - } - void create (dWorldTemplate& world, dJointGroupID group=0) - { create(world.id(), group); } - - void setMode (int mode) - { dJointSetAMotorMode (get_id(), mode); } - int getMode() const - { return dJointGetAMotorMode (get_id()); } - - void setNumAxes (int num) - { dJointSetAMotorNumAxes (get_id(), num); } - int getNumAxes() const - { return dJointGetAMotorNumAxes (get_id()); } - - void setAxis (int anum, int rel, dReal x, dReal y, dReal z) - { dJointSetAMotorAxis (get_id(), anum, rel, x, y, z); } - void setAxis (int anum, int rel, const dVector3 a) - { setAxis(anum, rel, a[0], a[1], a[2]); } - void getAxis (int anum, dVector3 result) const - { dJointGetAMotorAxis (get_id(), anum, result); } - int getAxisRel (int anum) const - { return dJointGetAMotorAxisRel (get_id(), anum); } - - void setAngle (int anum, dReal angle) - { dJointSetAMotorAngle (get_id(), anum, angle); } - dReal getAngle (int anum) const - { return dJointGetAMotorAngle (get_id(), anum); } - dReal getAngleRate (int anum) - { return dJointGetAMotorAngleRate (get_id(), anum); } - - void setParam (int parameter, dReal value) - { dJointSetAMotorParam (get_id(), parameter, value); } - dReal getParam (int parameter) const - { return dJointGetAMotorParam (get_id(), parameter); } - // TODO: expose params through methods - - void addTorques(dReal torque1, dReal torque2, dReal torque3) - { dJointAddAMotorTorques(get_id(), torque1, torque2, torque3); } -}; - - -template -class dLMotorJointTemplate : public dJointTemplate { -private: - // intentionally undefined, don't use these - dLMotorJointTemplate (const dLMotorJointTemplate &); - void operator = (const dLMotorJointTemplate &); - -protected: - typedef dJointTemplate dBaseTemplate; - - dJointID get_id() const { return dBaseTemplate::get_id(); } - void set_id(dJointID value) { dBaseTemplate::set_id(value); } - - void destroy() { dBaseTemplate::destroy(); } - -public: - dLMotorJointTemplate() { } - dLMotorJointTemplate (dWorldID world, dJointGroupID group=0) - { set_id(dJointCreateLMotor(world, group)); } - dLMotorJointTemplate (dWorldTemplate& world, dJointGroupID group=0) - { set_id(dJointCreateLMotor(world.id(), group)); } - - void create (dWorldID world, dJointGroupID group=0) { - destroy(); - set_id(dJointCreateLMotor(world, group)); - } - void create (dWorldTemplate& world, dJointGroupID group=0) - { create(world.id(), group); } - - void setNumAxes (int num) - { dJointSetLMotorNumAxes (get_id(), num); } - int getNumAxes() const - { return dJointGetLMotorNumAxes (get_id()); } - - void setAxis (int anum, int rel, dReal x, dReal y, dReal z) - { dJointSetLMotorAxis (get_id(), anum, rel, x, y, z); } - void setAxis (int anum, int rel, const dVector3 a) - { setAxis(anum, rel, a[0], a[1], a[2]); } - void getAxis (int anum, dVector3 result) const - { dJointGetLMotorAxis (get_id(), anum, result); } - - void setParam (int parameter, dReal value) - { dJointSetLMotorParam (get_id(), parameter, value); } - dReal getParam (int parameter) const - { return dJointGetLMotorParam (get_id(), parameter); } - // TODO: expose params through methods -}; - -//} - -#if !defined(dODECPP_WORLD_TEMPLATE_BASE) - -#if defined(dODECPP_BODY_TEMPLATE_BASE) || defined(dODECPP_JOINTGROUP_TEMPLATE_BASE) || defined(dODECPP_JOINT_TEMPLATE_BASE) -#error All the odecpp template bases must be defined or not defined together -#endif - -#define dODECPP_WORLD_TEMPLATE_BASE dWorldDynamicIDContainer -#define dODECPP_BODY_TEMPLATE_BASE dBodyDynamicIDContainer -#define dODECPP_JOINTGROUP_TEMPLATE_BASE dJointGroupDynamicIDContainer -#define dODECPP_JOINT_TEMPLATE_BASE dJointDynamicIDContainer - -#else // #if defined(dODECPP_WORLD_TEMPLATE_BASE) - -#if !defined(dODECPP_BODY_TEMPLATE_BASE) || !defined(dODECPP_JOINTGROUP_TEMPLATE_BASE) || !defined(dODECPP_JOINT_TEMPLATE_BASE) -#error All the odecpp template bases must be defined or not defined together -#endif - -#endif // #if defined(dODECPP_WORLD_TEMPLATE_BASE) - - -typedef dWorldTemplate dWorld; -typedef dBodyTemplate dBody; -typedef dJointGroupTemplate dJointGroup; -typedef dJointTemplate dJoint; -typedef dBallJointTemplate dBallJoint; -typedef dHingeJointTemplate dHingeJoint; -typedef dSliderJointTemplate dSliderJoint; -typedef dUniversalJointTemplate dUniversalJoint; -typedef dHinge2JointTemplate dHinge2Joint; -typedef dPRJointTemplate dPRJoint; -typedef dPUJointTemplate dPUJoint; -typedef dPistonJointTemplate dPistonJoint; -typedef dFixedJointTemplate dFixedJoint; -typedef dContactJointTemplate dContactJoint; -typedef dNullJointTemplate dNullJoint; -typedef dAMotorJointTemplate dAMotorJoint; -typedef dLMotorJointTemplate dLMotorJoint; - - -#endif -#endif - -// Local variables: -// mode:c++ -// c-basic-offset:2 -// End: diff --git a/misc/builddeps/linux64/ode/include/ode/odecpp_collision.h b/misc/builddeps/linux64/ode/include/ode/odecpp_collision.h deleted file mode 100644 index 2377a5ef..00000000 --- a/misc/builddeps/linux64/ode/include/ode/odecpp_collision.h +++ /dev/null @@ -1,429 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -/* C++ interface for new collision API */ - - -#ifndef _ODE_ODECPP_COLLISION_H_ -#define _ODE_ODECPP_COLLISION_H_ -#ifdef __cplusplus - -//#include - -//namespace ode { - -class dGeom { - // intentionally undefined, don't use these - dGeom (dGeom &); - void operator= (dGeom &); - -protected: - dGeomID _id; - - dGeom() - { _id = 0; } -public: - ~dGeom() - { if (_id) dGeomDestroy (_id); } - - dGeomID id() const - { return _id; } - operator dGeomID() const - { return _id; } - - void destroy() { - if (_id) dGeomDestroy (_id); - _id = 0; - } - - int getClass() const - { return dGeomGetClass (_id); } - - dSpaceID getSpace() const - { return dGeomGetSpace (_id); } - - void setData (void *data) - { dGeomSetData (_id,data); } - void *getData() const - { return dGeomGetData (_id); } - - void setBody (dBodyID b) - { dGeomSetBody (_id,b); } - dBodyID getBody() const - { return dGeomGetBody (_id); } - - void setPosition (dReal x, dReal y, dReal z) - { dGeomSetPosition (_id,x,y,z); } - const dReal * getPosition() const - { return dGeomGetPosition (_id); } - - void setRotation (const dMatrix3 R) - { dGeomSetRotation (_id,R); } - const dReal * getRotation() const - { return dGeomGetRotation (_id); } - - void setQuaternion (const dQuaternion quat) - { dGeomSetQuaternion (_id,quat); } - void getQuaternion (dQuaternion quat) const - { dGeomGetQuaternion (_id,quat); } - - void getAABB (dReal aabb[6]) const - { dGeomGetAABB (_id, aabb); } - - int isSpace() - { return dGeomIsSpace (_id); } - - void setCategoryBits (unsigned long bits) - { dGeomSetCategoryBits (_id, bits); } - void setCollideBits (unsigned long bits) - { dGeomSetCollideBits (_id, bits); } - unsigned long getCategoryBits() - { return dGeomGetCategoryBits (_id); } - unsigned long getCollideBits() - { return dGeomGetCollideBits (_id); } - - void enable() - { dGeomEnable (_id); } - void disable() - { dGeomDisable (_id); } - int isEnabled() - { return dGeomIsEnabled (_id); } - - void getRelPointPos (dReal px, dReal py, dReal pz, dVector3 result) const - { dGeomGetRelPointPos (_id, px, py, pz, result); } - void getRelPointPos (const dVector3 p, dVector3 result) const - { getRelPointPos (p[0], p[1], p[2], result); } - - void getPosRelPoint (dReal px, dReal py, dReal pz, dVector3 result) const - { dGeomGetPosRelPoint (_id, px, py, pz, result); } - void getPosRelPoint (const dVector3 p, dVector3 result) const - { getPosRelPoint (p[0], p[1], p[2], result); } - - void vectorToWorld (dReal px, dReal py, dReal pz, dVector3 result) const - { dGeomVectorToWorld (_id, px, py, pz, result); } - void vectorToWorld (const dVector3 p, dVector3 result) const - { vectorToWorld (p[0], p[1], p[2], result); } - - void vectorFromWorld (dReal px, dReal py, dReal pz, dVector3 result) const - { dGeomVectorFromWorld (_id, px, py, pz, result); } - void vectorFromWorld (const dVector3 p, dVector3 result) const - { vectorFromWorld (p[0], p[1], p[2], result); } - - void collide2 (dGeomID g, void *data, dNearCallback *callback) - { dSpaceCollide2 (_id,g,data,callback); } -}; - - -class dSpace : public dGeom { - // intentionally undefined, don't use these - dSpace (dSpace &); - void operator= (dSpace &); - -protected: - // the default constructor is protected so that you - // can't instance this class. you must instance one - // of its subclasses instead. - dSpace () { _id = 0; } - -public: - dSpaceID id() const - { return (dSpaceID) _id; } - operator dSpaceID() const - { return (dSpaceID) _id; } - - void setCleanup (int mode) - { dSpaceSetCleanup (id(), mode); } - int getCleanup() - { return dSpaceGetCleanup (id()); } - - void add (dGeomID x) - { dSpaceAdd (id(), x); } - void remove (dGeomID x) - { dSpaceRemove (id(), x); } - int query (dGeomID x) - { return dSpaceQuery (id(),x); } - - int getNumGeoms() - { return dSpaceGetNumGeoms (id()); } - dGeomID getGeom (int i) - { return dSpaceGetGeom (id(),i); } - - void collide (void *data, dNearCallback *callback) - { dSpaceCollide (id(),data,callback); } -}; - - -class dSimpleSpace : public dSpace { - // intentionally undefined, don't use these - dSimpleSpace (dSimpleSpace &); - void operator= (dSimpleSpace &); - -public: - dSimpleSpace () - { _id = (dGeomID) dSimpleSpaceCreate (0); } - dSimpleSpace (dSpace &space) - { _id = (dGeomID) dSimpleSpaceCreate (space.id()); } - dSimpleSpace (dSpaceID space) - { _id = (dGeomID) dSimpleSpaceCreate (space); } -}; - - -class dHashSpace : public dSpace { - // intentionally undefined, don't use these - dHashSpace (dHashSpace &); - void operator= (dHashSpace &); - -public: - dHashSpace () - { _id = (dGeomID) dHashSpaceCreate (0); } - dHashSpace (dSpace &space) - { _id = (dGeomID) dHashSpaceCreate (space.id()); } - dHashSpace (dSpaceID space) - { _id = (dGeomID) dHashSpaceCreate (space); } - - void setLevels (int minlevel, int maxlevel) - { dHashSpaceSetLevels (id(),minlevel,maxlevel); } -}; - - -class dQuadTreeSpace : public dSpace { - // intentionally undefined, don't use these - dQuadTreeSpace (dQuadTreeSpace &); - void operator= (dQuadTreeSpace &); - -public: - dQuadTreeSpace (const dVector3 center, const dVector3 extents, int depth) - { _id = (dGeomID) dQuadTreeSpaceCreate (0,center,extents,depth); } - dQuadTreeSpace (dSpace &space, const dVector3 center, const dVector3 extents, int depth) - { _id = (dGeomID) dQuadTreeSpaceCreate (space.id(),center,extents,depth); } - dQuadTreeSpace (dSpaceID space, const dVector3 center, const dVector3 extents, int depth) - { _id = (dGeomID) dQuadTreeSpaceCreate (space,center,extents,depth); } -}; - - -class dSphere : public dGeom { - // intentionally undefined, don't use these - dSphere (dSphere &); - void operator= (dSphere &); - -public: - dSphere () { } - dSphere (dReal radius) - { _id = dCreateSphere (0, radius); } - dSphere (dSpace &space, dReal radius) - { _id = dCreateSphere (space.id(), radius); } - dSphere (dSpaceID space, dReal radius) - { _id = dCreateSphere (space, radius); } - - void create (dSpaceID space, dReal radius) { - if (_id) dGeomDestroy (_id); - _id = dCreateSphere (space, radius); - } - - void setRadius (dReal radius) - { dGeomSphereSetRadius (_id, radius); } - dReal getRadius() const - { return dGeomSphereGetRadius (_id); } -}; - - -class dBox : public dGeom { - // intentionally undefined, don't use these - dBox (dBox &); - void operator= (dBox &); - -public: - dBox () { } - dBox (dReal lx, dReal ly, dReal lz) - { _id = dCreateBox (0,lx,ly,lz); } - dBox (dSpace &space, dReal lx, dReal ly, dReal lz) - { _id = dCreateBox (space,lx,ly,lz); } - dBox (dSpaceID space, dReal lx, dReal ly, dReal lz) - { _id = dCreateBox (space,lx,ly,lz); } - - void create (dSpaceID space, dReal lx, dReal ly, dReal lz) { - if (_id) dGeomDestroy (_id); - _id = dCreateBox (space,lx,ly,lz); - } - - void setLengths (dReal lx, dReal ly, dReal lz) - { dGeomBoxSetLengths (_id, lx, ly, lz); } - void getLengths (dVector3 result) const - { dGeomBoxGetLengths (_id,result); } -}; - - -class dPlane : public dGeom { - // intentionally undefined, don't use these - dPlane (dPlane &); - void operator= (dPlane &); - -public: - dPlane() { } - dPlane (dReal a, dReal b, dReal c, dReal d) - { _id = dCreatePlane (0,a,b,c,d); } - dPlane (dSpace &space, dReal a, dReal b, dReal c, dReal d) - { _id = dCreatePlane (space.id(),a,b,c,d); } - dPlane (dSpaceID space, dReal a, dReal b, dReal c, dReal d) - { _id = dCreatePlane (space,a,b,c,d); } - - void create (dSpaceID space, dReal a, dReal b, dReal c, dReal d) { - if (_id) dGeomDestroy (_id); - _id = dCreatePlane (space,a,b,c,d); - } - - void setParams (dReal a, dReal b, dReal c, dReal d) - { dGeomPlaneSetParams (_id, a, b, c, d); } - void getParams (dVector4 result) const - { dGeomPlaneGetParams (_id,result); } -}; - - -class dCapsule : public dGeom { - // intentionally undefined, don't use these - dCapsule (dCapsule &); - void operator= (dCapsule &); - -public: - dCapsule() { } - dCapsule (dReal radius, dReal length) - { _id = dCreateCapsule (0,radius,length); } - dCapsule (dSpace &space, dReal radius, dReal length) - { _id = dCreateCapsule (space.id(),radius,length); } - dCapsule (dSpaceID space, dReal radius, dReal length) - { _id = dCreateCapsule (space,radius,length); } - - void create (dSpaceID space, dReal radius, dReal length) { - if (_id) dGeomDestroy (_id); - _id = dCreateCapsule (space,radius,length); - } - - void setParams (dReal radius, dReal length) - { dGeomCapsuleSetParams (_id, radius, length); } - void getParams (dReal *radius, dReal *length) const - { dGeomCapsuleGetParams (_id,radius,length); } -}; - - -class dCylinder : public dGeom { - // intentionally undefined, don't use these - dCylinder (dCylinder &); - void operator= (dCylinder &); - -public: - dCylinder() { } - dCylinder (dReal radius, dReal length) - { _id = dCreateCylinder (0,radius,length); } - dCylinder (dSpace &space, dReal radius, dReal length) - { _id = dCreateCylinder (space.id(),radius,length); } - dCylinder (dSpaceID space, dReal radius, dReal length) - { _id = dCreateCylinder (space,radius,length); } - - void create (dSpaceID space, dReal radius, dReal length) { - if (_id) dGeomDestroy (_id); - _id = dCreateCylinder (space,radius,length); - } - - void setParams (dReal radius, dReal length) - { dGeomCylinderSetParams (_id, radius, length); } - void getParams (dReal *radius, dReal *length) const - { dGeomCylinderGetParams (_id,radius,length); } -}; - - -class dRay : public dGeom { - // intentionally undefined, don't use these - dRay (dRay &); - void operator= (dRay &); - -public: - dRay() { } - dRay (dReal length) - { _id = dCreateRay (0,length); } - dRay (dSpace &space, dReal length) - { _id = dCreateRay (space.id(),length); } - dRay (dSpaceID space, dReal length) - { _id = dCreateRay (space,length); } - - void create (dSpaceID space, dReal length) { - if (_id) dGeomDestroy (_id); - _id = dCreateRay (space,length); - } - - void setLength (dReal length) - { dGeomRaySetLength (_id, length); } - dReal getLength() - { return dGeomRayGetLength (_id); } - - void set (dReal px, dReal py, dReal pz, dReal dx, dReal dy, dReal dz) - { dGeomRaySet (_id, px, py, pz, dx, dy, dz); } - void get (dVector3 start, dVector3 dir) - { dGeomRayGet (_id, start, dir); } - - void setParams (int firstContact, int backfaceCull) - { dGeomRaySetParams (_id, firstContact, backfaceCull); } - void getParams (int *firstContact, int *backfaceCull) - { dGeomRayGetParams (_id, firstContact, backfaceCull); } - void setClosestHit (int closestHit) - { dGeomRaySetClosestHit (_id, closestHit); } - int getClosestHit() - { return dGeomRayGetClosestHit (_id); } -}; - - -class dGeomTransform : public dGeom { - // intentionally undefined, don't use these - dGeomTransform (dGeomTransform &); - void operator= (dGeomTransform &); - -public: - dGeomTransform() { } - dGeomTransform (dSpace &space) - { _id = dCreateGeomTransform (space.id()); } - dGeomTransform (dSpaceID space) - { _id = dCreateGeomTransform (space); } - - void create (dSpaceID space=0) { - if (_id) dGeomDestroy (_id); - _id = dCreateGeomTransform (space); - } - - void setGeom (dGeomID geom) - { dGeomTransformSetGeom (_id, geom); } - dGeomID getGeom() const - { return dGeomTransformGetGeom (_id); } - - void setCleanup (int mode) - { dGeomTransformSetCleanup (_id,mode); } - int getCleanup () - { return dGeomTransformGetCleanup (_id); } - - void setInfo (int mode) - { dGeomTransformSetInfo (_id,mode); } - int getInfo() - { return dGeomTransformGetInfo (_id); } -}; - -//} - -#endif -#endif diff --git a/misc/builddeps/linux64/ode/include/ode/odeinit.h b/misc/builddeps/linux64/ode/include/ode/odeinit.h deleted file mode 100644 index bb430c8f..00000000 --- a/misc/builddeps/linux64/ode/include/ode/odeinit.h +++ /dev/null @@ -1,236 +0,0 @@ -/************************************************************************* -* * -* Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * -* All rights reserved. Email: russ@q12.org Web: www.q12.org * -* * -* This library is free software; you can redistribute it and/or * -* modify it under the terms of EITHER: * -* (1) The GNU Lesser General Public License as published by the Free * -* Software Foundation; either version 2.1 of the License, or (at * -* your option) any later version. The text of the GNU Lesser * -* General Public License is included with this library in the * -* file LICENSE.TXT. * -* (2) The BSD-style license that is included with this library in * -* the file LICENSE-BSD.TXT. * -* * -* This library is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * -* LICENSE.TXT and LICENSE-BSD.TXT for more details. * -* * -*************************************************************************/ - -/* Library initialization/finalization functions. */ - -#ifndef _ODE_ODEINIT_H_ -#define _ODE_ODEINIT_H_ - -#include - - -#ifdef __cplusplus -extern "C" { -#endif - - -/* ************************************************************************ */ -/* Library initialization */ - -/** - * @defgroup init Library Initialization - * - * Library initialization functions prepare ODE internal data structures for use - * and release allocated resources after ODE is not needed any more. - */ - - -/** - * @brief Library initialization flags. - * - * These flags define ODE library initialization options. - * - * @c dInitFlagManualThreadCleanup indicates that resources allocated in TLS for threads - * using ODE are to be cleared by library client with explicit call to @c dCleanupODEAllDataForThread. - * If this flag is not specified the automatic resource tracking algorithm is used. - * - * With automatic resource tracking, On Windows, memory allocated for a thread may - * remain not freed for some time after the thread exits. The resources may be - * released when one of other threads calls @c dAllocateODEDataForThread. Ultimately, - * the resources are released when library is closed with @c dCloseODE. On other - * operating systems resources are always released by the thread itself on its exit - * or on library closure with @c dCloseODE. - * - * With manual thread data cleanup mode every collision space object must be - * explicitly switched to manual cleanup mode with @c dSpaceSetManualCleanup - * after creation. See description of the function for more details. - * - * If @c dInitFlagManualThreadCleanup was not specified during initialization, - * calls to @c dCleanupODEAllDataForThread are not allowed. - * - * @see dInitODE2 - * @see dAllocateODEDataForThread - * @see dSpaceSetManualCleanup - * @see dCloseODE - * @ingroup init - */ -enum dInitODEFlags { - dInitFlagManualThreadCleanup = 0x00000001 //@< Thread local data is to be cleared explicitly on @c dCleanupODEAllDataForThread function call -}; - -/** - * @brief Initializes ODE library. - * - * @c dInitODE is obsolete. @c dInitODE2 is to be used for library initialization. - * - * A call to @c dInitODE is equal to the following initialization sequence - * @code - * dInitODE2(0); - * dAllocateODEDataForThread(dAllocateMaskAll); - * @endcode - * - * @see dInitODE2 - * @see dAllocateODEDataForThread - * @ingroup init - */ -ODE_API void dInitODE(void); - -/** - * @brief Initializes ODE library. - * @param uiInitFlags Initialization options bitmask - * @return A nonzero if initialization succeeded and zero otherwise. - * - * This function must be called to initialize ODE library before first use. If - * initialization succeeds the function may not be called again until library is - * closed with a call to @c dCloseODE. - * - * The @a uiInitFlags parameter specifies initialization options to be used. These - * can be combination of zero or more @c dInitODEFlags flags. - * - * @note - * If @c dInitFlagManualThreadCleanup flag is used for initialization, - * @c dSpaceSetManualCleanup must be called to set manual cleanup mode for every - * space object right after creation. Failure to do so may lead to resource leaks. - * - * @see dInitODEFlags - * @see dCloseODE - * @see dSpaceSetManualCleanup - * @ingroup init - */ -ODE_API int dInitODE2(unsigned int uiInitFlags/*=0*/); - - -/** - * @brief ODE data allocation flags. - * - * These flags are used to indicate which data is to be pre-allocated in call to - * @c dAllocateODEDataForThread. - * - * @c dAllocateFlagBasicData tells to allocate the basic data set required for - * normal library operation. This flag is equal to zero and is always implicitly - * included. - * - * @c dAllocateFlagCollisionData tells that collision detection data is to be allocated. - * Collision detection functions may not be called if the data has not be allocated - * in advance. If collision detection is not going to be used, it is not necessary - * to specify this flag. - * - * @c dAllocateMaskAll is a mask that can be used for for allocating all possible - * data in cases when it is not known what exactly features of ODE will be used. - * The mask may not be used in combination with other flags. It is guaranteed to - * include all the current and future legal allocation flags. However, mature - * applications should use explicit flags they need rather than allocating everything. - * - * @see dAllocateODEDataForThread - * @ingroup init - */ -enum dAllocateODEDataFlags { - dAllocateFlagBasicData = 0, //@< Allocate basic data required for library to operate - - dAllocateFlagCollisionData = 0x00000001, //@< Allocate data for collision detection - - dAllocateMaskAll = ~0U //@< Allocate all the possible data that is currently defined or will be defined in the future. -}; - -/** - * @brief Allocate thread local data to allow the thread calling ODE. - * @param uiAllocateFlags Allocation options bitmask. - * @return A nonzero if allocation succeeded and zero otherwise. - * - * The function is required to be called for every thread that is going to use - * ODE. This function allocates the data that is required for accessing ODE from - * current thread along with optional data required for particular ODE subsystems. - * - * @a uiAllocateFlags parameter can contain zero or more flags from @c dAllocateODEDataFlags - * enumerated type. Multiple calls with different allocation flags are allowed. - * The flags that are already allocated are ignored in subsequent calls. If zero - * is passed as the parameter, it means to only allocate the set of most important - * data the library can not operate without. - * - * If the function returns failure status it means that none of the requested - * data has been allocated. The client may retry allocation attempt with the same - * flags when more system resources are available. - * - * @see dAllocateODEDataFlags - * @see dCleanupODEAllDataForThread - * @ingroup init - */ -ODE_API int dAllocateODEDataForThread(unsigned int uiAllocateFlags); - -/** - * @brief Free thread local data that was allocated for current thread. - * - * If library was initialized with @c dInitFlagManualThreadCleanup flag the function - * is required to be called on exit of every thread that was calling @c dAllocateODEDataForThread. - * Failure to call @c dCleanupODEAllDataForThread may result in some resources remaining - * not freed until program exit. The function may also be called when ODE is still - * being used to release resources allocated for all the current subsystems and - * possibly proceed with data pre-allocation for other subsystems. - * - * The function can safely be called several times in a row. The function can be - * called without prior invocation of @c dAllocateODEDataForThread. The function - * may not be called before ODE is initialized with @c dInitODE2 or after library - * has been closed with @c dCloseODE. A call to @c dCloseODE implicitly releases - * all the thread local resources that might be allocated for all the threads that - * were using ODE. - * - * If library was initialized without @c dInitFlagManualThreadCleanup flag - * @c dCleanupODEAllDataForThread must not be called. - * - * @see dAllocateODEDataForThread - * @see dInitODE2 - * @see dCloseODE - * @ingroup init - */ -ODE_API void dCleanupODEAllDataForThread(); - - -/** - * @brief Close ODE after it is not needed any more. - * - * The function is required to be called when program does not need ODE features any more. - * The call to @c dCloseODE releases all the resources allocated for library - * including all the thread local data that might be allocated for all the threads - * that were using ODE. - * - * @c dCloseODE is a paired function for @c dInitODE2 and must only be called - * after successful library initialization. - * - * @note Important! - * Make sure that all the threads that were using ODE have already terminated - * before calling @c dCloseODE. In particular it is not allowed to call - * @c dCleanupODEAllDataForThread after @c dCloseODE. - * - * @see dInitODE2 - * @see dCleanupODEAllDataForThread - * @ingroup init - */ -ODE_API void dCloseODE(void); - - - -#ifdef __cplusplus -} // extern "C" -#endif - - -#endif // _ODE_ODEINIT_H_ diff --git a/misc/builddeps/linux64/ode/include/ode/odemath.h b/misc/builddeps/linux64/ode/include/ode/odemath.h deleted file mode 100644 index 2e689dbf..00000000 --- a/misc/builddeps/linux64/ode/include/ode/odemath.h +++ /dev/null @@ -1,473 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#ifndef _ODE_ODEMATH_H_ -#define _ODE_ODEMATH_H_ - -#include - -/* - * macro to access elements i,j in an NxM matrix A, independent of the - * matrix storage convention. - */ -#define dACCESS33(A,i,j) ((A)[(i)*4+(j)]) - -/* - * Macro to test for valid floating point values - */ -#define dVALIDVEC3(v) (!(dIsNan(v[0]) || dIsNan(v[1]) || dIsNan(v[2]))) -#define dVALIDVEC4(v) (!(dIsNan(v[0]) || dIsNan(v[1]) || dIsNan(v[2]) || dIsNan(v[3]))) -#define dVALIDMAT3(m) (!(dIsNan(m[0]) || dIsNan(m[1]) || dIsNan(m[2]) || dIsNan(m[3]) || dIsNan(m[4]) || dIsNan(m[5]) || dIsNan(m[6]) || dIsNan(m[7]) || dIsNan(m[8]) || dIsNan(m[9]) || dIsNan(m[10]) || dIsNan(m[11]))) -#define dVALIDMAT4(m) (!(dIsNan(m[0]) || dIsNan(m[1]) || dIsNan(m[2]) || dIsNan(m[3]) || dIsNan(m[4]) || dIsNan(m[5]) || dIsNan(m[6]) || dIsNan(m[7]) || dIsNan(m[8]) || dIsNan(m[9]) || dIsNan(m[10]) || dIsNan(m[11]) || dIsNan(m[12]) || dIsNan(m[13]) || dIsNan(m[14]) || dIsNan(m[15]) )) - - - -// Some vector math -PURE_INLINE void dAddVectors3(dReal *res, const dReal *a, const dReal *b) -{ - dReal res_0, res_1, res_2; - res_0 = a[0] + b[0]; - res_1 = a[1] + b[1]; - res_2 = a[2] + b[2]; - // Only assign after all the calculations are over to avoid incurring memory aliasing - res[0] = res_0; res[1] = res_1; res[2] = res_2; -} - -PURE_INLINE void dSubtractVectors3(dReal *res, const dReal *a, const dReal *b) -{ - dReal res_0, res_1, res_2; - res_0 = a[0] - b[0]; - res_1 = a[1] - b[1]; - res_2 = a[2] - b[2]; - // Only assign after all the calculations are over to avoid incurring memory aliasing - res[0] = res_0; res[1] = res_1; res[2] = res_2; -} - -PURE_INLINE void dAddScaledVectors3(dReal *res, const dReal *a, const dReal *b, dReal a_scale, dReal b_scale) -{ - dReal res_0, res_1, res_2; - res_0 = a_scale * a[0] + b_scale * b[0]; - res_1 = a_scale * a[1] + b_scale * b[1]; - res_2 = a_scale * a[2] + b_scale * b[2]; - // Only assign after all the calculations are over to avoid incurring memory aliasing - res[0] = res_0; res[1] = res_1; res[2] = res_2; -} - -PURE_INLINE void dScaleVector3(dReal *res, dReal nScale) -{ - res[0] *= nScale ; - res[1] *= nScale ; - res[2] *= nScale ; -} - -PURE_INLINE void dNegateVector3(dReal *res) -{ - res[0] = -res[0]; - res[1] = -res[1]; - res[2] = -res[2]; -} - -PURE_INLINE void dCopyVector3(dReal *res, const dReal *a) -{ - dReal res_0, res_1, res_2; - res_0 = a[0]; - res_1 = a[1]; - res_2 = a[2]; - // Only assign after all the calculations are over to avoid incurring memory aliasing - res[0] = res_0; res[1] = res_1; res[2] = res_2; -} - -PURE_INLINE void dCopyScaledVector3(dReal *res, const dReal *a, dReal nScale) -{ - dReal res_0, res_1, res_2; - res_0 = a[0] * nScale; - res_1 = a[1] * nScale; - res_2 = a[2] * nScale; - // Only assign after all the calculations are over to avoid incurring memory aliasing - res[0] = res_0; res[1] = res_1; res[2] = res_2; -} - -PURE_INLINE void dCopyNegatedVector3(dReal *res, const dReal *a) -{ - dReal res_0, res_1, res_2; - res_0 = -a[0]; - res_1 = -a[1]; - res_2 = -a[2]; - // Only assign after all the calculations are over to avoid incurring memory aliasing - res[0] = res_0; res[1] = res_1; res[2] = res_2; -} - -PURE_INLINE void dCopyVector4(dReal *res, const dReal *a) -{ - dReal res_0, res_1, res_2, res_3; - res_0 = a[0]; - res_1 = a[1]; - res_2 = a[2]; - res_3 = a[3]; - // Only assign after all the calculations are over to avoid incurring memory aliasing - res[0] = res_0; res[1] = res_1; res[2] = res_2; res[3] = res_3; -} - -PURE_INLINE void dCopyMatrix4x4(dReal *res, const dReal *a) -{ - dCopyVector4(res + 0, a + 0); - dCopyVector4(res + 4, a + 4); - dCopyVector4(res + 8, a + 8); -} - -PURE_INLINE void dCopyMatrix4x3(dReal *res, const dReal *a) -{ - dCopyVector3(res + 0, a + 0); - dCopyVector3(res + 4, a + 4); - dCopyVector3(res + 8, a + 8); -} - -PURE_INLINE void dGetMatrixColumn3(dReal *res, const dReal *a, unsigned n) -{ - dReal res_0, res_1, res_2; - res_0 = a[n + 0]; - res_1 = a[n + 4]; - res_2 = a[n + 8]; - // Only assign after all the calculations are over to avoid incurring memory aliasing - res[0] = res_0; res[1] = res_1; res[2] = res_2; -} - -PURE_INLINE dReal dCalcVectorLength3(const dReal *a) -{ - return dSqrt(a[0] * a[0] + a[1] * a[1] + a[2] * a[2]); -} - -PURE_INLINE dReal dCalcVectorLengthSquare3(const dReal *a) -{ - return (a[0] * a[0] + a[1] * a[1] + a[2] * a[2]); -} - -PURE_INLINE dReal dCalcPointDepth3(const dReal *test_p, const dReal *plane_p, const dReal *plane_n) -{ - return (plane_p[0] - test_p[0]) * plane_n[0] + (plane_p[1] - test_p[1]) * plane_n[1] + (plane_p[2] - test_p[2]) * plane_n[2]; -} - - -/* -* 3-way dot product. _dCalcVectorDot3 means that elements of `a' and `b' are spaced -* step_a and step_b indexes apart respectively. dCalcVectorDot3() means dDot311. -*/ - -PURE_INLINE dReal _dCalcVectorDot3(const dReal *a, const dReal *b, unsigned step_a, unsigned step_b) -{ - return a[0] * b[0] + a[step_a] * b[step_b] + a[2 * step_a] * b[2 * step_b]; -} - - -PURE_INLINE dReal dCalcVectorDot3 (const dReal *a, const dReal *b) { return _dCalcVectorDot3(a,b,1,1); } -PURE_INLINE dReal dCalcVectorDot3_13 (const dReal *a, const dReal *b) { return _dCalcVectorDot3(a,b,1,3); } -PURE_INLINE dReal dCalcVectorDot3_31 (const dReal *a, const dReal *b) { return _dCalcVectorDot3(a,b,3,1); } -PURE_INLINE dReal dCalcVectorDot3_33 (const dReal *a, const dReal *b) { return _dCalcVectorDot3(a,b,3,3); } -PURE_INLINE dReal dCalcVectorDot3_14 (const dReal *a, const dReal *b) { return _dCalcVectorDot3(a,b,1,4); } -PURE_INLINE dReal dCalcVectorDot3_41 (const dReal *a, const dReal *b) { return _dCalcVectorDot3(a,b,4,1); } -PURE_INLINE dReal dCalcVectorDot3_44 (const dReal *a, const dReal *b) { return _dCalcVectorDot3(a,b,4,4); } - - -/* - * cross product, set res = a x b. _dCalcVectorCross3 means that elements of `res', `a' - * and `b' are spaced step_res, step_a and step_b indexes apart respectively. - * dCalcVectorCross3() means dCross3111. - */ - -PURE_INLINE void _dCalcVectorCross3(dReal *res, const dReal *a, const dReal *b, unsigned step_res, unsigned step_a, unsigned step_b) -{ - dReal res_0, res_1, res_2; - res_0 = a[ step_a]*b[2*step_b] - a[2*step_a]*b[ step_b]; - res_1 = a[2*step_a]*b[ 0] - a[ 0]*b[2*step_b]; - res_2 = a[ 0]*b[ step_b] - a[ step_a]*b[ 0]; - // Only assign after all the calculations are over to avoid incurring memory aliasing - res[ 0] = res_0; - res[ step_res] = res_1; - res[2*step_res] = res_2; -} - -PURE_INLINE void dCalcVectorCross3 (dReal *res, const dReal *a, const dReal *b) { _dCalcVectorCross3(res, a, b, 1, 1, 1); } -PURE_INLINE void dCalcVectorCross3_114(dReal *res, const dReal *a, const dReal *b) { _dCalcVectorCross3(res, a, b, 1, 1, 4); } -PURE_INLINE void dCalcVectorCross3_141(dReal *res, const dReal *a, const dReal *b) { _dCalcVectorCross3(res, a, b, 1, 4, 1); } -PURE_INLINE void dCalcVectorCross3_144(dReal *res, const dReal *a, const dReal *b) { _dCalcVectorCross3(res, a, b, 1, 4, 4); } -PURE_INLINE void dCalcVectorCross3_411(dReal *res, const dReal *a, const dReal *b) { _dCalcVectorCross3(res, a, b, 4, 1, 1); } -PURE_INLINE void dCalcVectorCross3_414(dReal *res, const dReal *a, const dReal *b) { _dCalcVectorCross3(res, a, b, 4, 1, 4); } -PURE_INLINE void dCalcVectorCross3_441(dReal *res, const dReal *a, const dReal *b) { _dCalcVectorCross3(res, a, b, 4, 4, 1); } -PURE_INLINE void dCalcVectorCross3_444(dReal *res, const dReal *a, const dReal *b) { _dCalcVectorCross3(res, a, b, 4, 4, 4); } - -PURE_INLINE void dAddVectorCross3(dReal *res, const dReal *a, const dReal *b) -{ - dReal tmp[3]; - dCalcVectorCross3(tmp, a, b); - dAddVectors3(res, res, tmp); -} - -PURE_INLINE void dSubtractVectorCross3(dReal *res, const dReal *a, const dReal *b) -{ - dReal tmp[3]; - dCalcVectorCross3(tmp, a, b); - dSubtractVectors3(res, res, tmp); -} - - -/* - * set a 3x3 submatrix of A to a matrix such that submatrix(A)*b = a x b. - * A is stored by rows, and has `skip' elements per row. the matrix is - * assumed to be already zero, so this does not write zero elements! - * if (plus,minus) is (+,-) then a positive version will be written. - * if (plus,minus) is (-,+) then a negative version will be written. - */ - -PURE_INLINE void dSetCrossMatrixPlus(dReal *res, const dReal *a, unsigned skip) -{ - const dReal a_0 = a[0], a_1 = a[1], a_2 = a[2]; - res[1] = -a_2; - res[2] = +a_1; - res[skip+0] = +a_2; - res[skip+2] = -a_0; - res[2*skip+0] = -a_1; - res[2*skip+1] = +a_0; -} - -PURE_INLINE void dSetCrossMatrixMinus(dReal *res, const dReal *a, unsigned skip) -{ - const dReal a_0 = a[0], a_1 = a[1], a_2 = a[2]; - res[1] = +a_2; - res[2] = -a_1; - res[skip+0] = -a_2; - res[skip+2] = +a_0; - res[2*skip+0] = +a_1; - res[2*skip+1] = -a_0; -} - - -/* - * compute the distance between two 3D-vectors - */ - -PURE_INLINE dReal dCalcPointsDistance3(const dReal *a, const dReal *b) -{ - dReal res; - dReal tmp[3]; - dSubtractVectors3(tmp, a, b); - res = dCalcVectorLength3(tmp); - return res; -} - -/* - * special case matrix multiplication, with operator selection - */ - -PURE_INLINE void dMultiplyHelper0_331(dReal *res, const dReal *a, const dReal *b) -{ - dReal res_0, res_1, res_2; - res_0 = dCalcVectorDot3(a, b); - res_1 = dCalcVectorDot3(a + 4, b); - res_2 = dCalcVectorDot3(a + 8, b); - // Only assign after all the calculations are over to avoid incurring memory aliasing - res[0] = res_0; res[1] = res_1; res[2] = res_2; -} - -PURE_INLINE void dMultiplyHelper1_331(dReal *res, const dReal *a, const dReal *b) -{ - dReal res_0, res_1, res_2; - res_0 = dCalcVectorDot3_41(a, b); - res_1 = dCalcVectorDot3_41(a + 1, b); - res_2 = dCalcVectorDot3_41(a + 2, b); - // Only assign after all the calculations are over to avoid incurring memory aliasing - res[0] = res_0; res[1] = res_1; res[2] = res_2; -} - -PURE_INLINE void dMultiplyHelper0_133(dReal *res, const dReal *a, const dReal *b) -{ - dMultiplyHelper1_331(res, b, a); -} - -PURE_INLINE void dMultiplyHelper1_133(dReal *res, const dReal *a, const dReal *b) -{ - dReal res_0, res_1, res_2; - res_0 = dCalcVectorDot3_44(a, b); - res_1 = dCalcVectorDot3_44(a + 1, b); - res_2 = dCalcVectorDot3_44(a + 2, b); - // Only assign after all the calculations are over to avoid incurring memory aliasing - res[0] = res_0; res[1] = res_1; res[2] = res_2; -} - -/* -Note: NEVER call any of these functions/macros with the same variable for A and C, -it is not equivalent to A*=B. -*/ - -PURE_INLINE void dMultiply0_331(dReal *res, const dReal *a, const dReal *b) -{ - dMultiplyHelper0_331(res, a, b); -} - -PURE_INLINE void dMultiply1_331(dReal *res, const dReal *a, const dReal *b) -{ - dMultiplyHelper1_331(res, a, b); -} - -PURE_INLINE void dMultiply0_133(dReal *res, const dReal *a, const dReal *b) -{ - dMultiplyHelper0_133(res, a, b); -} - -PURE_INLINE void dMultiply0_333(dReal *res, const dReal *a, const dReal *b) -{ - dMultiplyHelper0_133(res + 0, a + 0, b); - dMultiplyHelper0_133(res + 4, a + 4, b); - dMultiplyHelper0_133(res + 8, a + 8, b); -} - -PURE_INLINE void dMultiply1_333(dReal *res, const dReal *a, const dReal *b) -{ - dMultiplyHelper1_133(res + 0, b, a + 0); - dMultiplyHelper1_133(res + 4, b, a + 1); - dMultiplyHelper1_133(res + 8, b, a + 2); -} - -PURE_INLINE void dMultiply2_333(dReal *res, const dReal *a, const dReal *b) -{ - dMultiplyHelper0_331(res + 0, b, a + 0); - dMultiplyHelper0_331(res + 4, b, a + 4); - dMultiplyHelper0_331(res + 8, b, a + 8); -} - -PURE_INLINE void dMultiplyAdd0_331(dReal *res, const dReal *a, const dReal *b) -{ - dReal tmp[3]; - dMultiplyHelper0_331(tmp, a, b); - dAddVectors3(res, res, tmp); -} - -PURE_INLINE void dMultiplyAdd1_331(dReal *res, const dReal *a, const dReal *b) -{ - dReal tmp[3]; - dMultiplyHelper1_331(tmp, a, b); - dAddVectors3(res, res, tmp); -} - -PURE_INLINE void dMultiplyAdd0_133(dReal *res, const dReal *a, const dReal *b) -{ - dReal tmp[3]; - dMultiplyHelper0_133(tmp, a, b); - dAddVectors3(res, res, tmp); -} - -PURE_INLINE void dMultiplyAdd0_333(dReal *res, const dReal *a, const dReal *b) -{ - dReal tmp[3]; - dMultiplyHelper0_133(tmp, a + 0, b); - dAddVectors3(res+ 0, res + 0, tmp); - dMultiplyHelper0_133(tmp, a + 4, b); - dAddVectors3(res + 4, res + 4, tmp); - dMultiplyHelper0_133(tmp, a + 8, b); - dAddVectors3(res + 8, res + 8, tmp); -} - -PURE_INLINE void dMultiplyAdd1_333(dReal *res, const dReal *a, const dReal *b) -{ - dReal tmp[3]; - dMultiplyHelper1_133(tmp, b, a + 0); - dAddVectors3(res + 0, res + 0, tmp); - dMultiplyHelper1_133(tmp, b, a + 1); - dAddVectors3(res + 4, res + 4, tmp); - dMultiplyHelper1_133(tmp, b, a + 2); - dAddVectors3(res + 8, res + 8, tmp); -} - -PURE_INLINE void dMultiplyAdd2_333(dReal *res, const dReal *a, const dReal *b) -{ - dReal tmp[3]; - dMultiplyHelper0_331(tmp, b, a + 0); - dAddVectors3(res + 0, res + 0, tmp); - dMultiplyHelper0_331(tmp, b, a + 4); - dAddVectors3(res + 4, res + 4, tmp); - dMultiplyHelper0_331(tmp, b, a + 8); - dAddVectors3(res + 8, res + 8, tmp); -} - - -// Include legacy macros here -#include - - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * normalize 3x1 and 4x1 vectors (i.e. scale them to unit length) - */ - -// For DLL export -ODE_API int dSafeNormalize3 (dVector3 a); -ODE_API int dSafeNormalize4 (dVector4 a); -ODE_API void dNormalize3 (dVector3 a); // Potentially asserts on zero vec -ODE_API void dNormalize4 (dVector4 a); // Potentially asserts on zero vec - -#if defined(__ODE__) - -int _dSafeNormalize3 (dVector3 a); -int _dSafeNormalize4 (dVector4 a); - -PURE_INLINE void _dNormalize3(dVector3 a) -{ - int bNormalizationResult = _dSafeNormalize3(a); - dIVERIFY(bNormalizationResult); -} - -PURE_INLINE void _dNormalize4(dVector4 a) -{ - int bNormalizationResult = _dSafeNormalize4(a); - dIVERIFY(bNormalizationResult); -} - -// For internal use -#define dSafeNormalize3(a) _dSafeNormalize3(a) -#define dSafeNormalize4(a) _dSafeNormalize4(a) -#define dNormalize3(a) _dNormalize3(a) -#define dNormalize4(a) _dNormalize4(a) - -#endif // defined(__ODE__) - -/* - * given a unit length "normal" vector n, generate vectors p and q vectors - * that are an orthonormal basis for the plane space perpendicular to n. - * i.e. this makes p,q such that n,p,q are all perpendicular to each other. - * q will equal n x p. if n is not unit length then p will be unit length but - * q wont be. - */ - -ODE_API void dPlaneSpace (const dVector3 n, dVector3 p, dVector3 q); -/* Makes sure the matrix is a proper rotation */ -ODE_API void dOrthogonalizeR(dMatrix3 m); - - - -#ifdef __cplusplus -} -#endif - - -#endif diff --git a/misc/builddeps/linux64/ode/include/ode/odemath_legacy.h b/misc/builddeps/linux64/ode/include/ode/odemath_legacy.h deleted file mode 100644 index b7426380..00000000 --- a/misc/builddeps/linux64/ode/include/ode/odemath_legacy.h +++ /dev/null @@ -1,181 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#ifndef _ODE_ODEMATH_LEGACY_H_ -#define _ODE_ODEMATH_LEGACY_H_ - - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -/* -* These macros are not used any more inside of ODE -* They are kept for backward compatibility with external code that -* might still be using them. -*/ -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// - -/* -* General purpose vector operations with other vectors or constants. -*/ - -#define dOP(a,op,b,c) do { \ - (a)[0] = ((b)[0]) op ((c)[0]); \ - (a)[1] = ((b)[1]) op ((c)[1]); \ - (a)[2] = ((b)[2]) op ((c)[2]); \ -} while (0) -#define dOPC(a,op,b,c) do { \ - (a)[0] = ((b)[0]) op (c); \ - (a)[1] = ((b)[1]) op (c); \ - (a)[2] = ((b)[2]) op (c); \ -} while (0) -#define dOPE(a,op,b) do {\ - (a)[0] op ((b)[0]); \ - (a)[1] op ((b)[1]); \ - (a)[2] op ((b)[2]); \ -} while (0) -#define dOPEC(a,op,c) do { \ - (a)[0] op (c); \ - (a)[1] op (c); \ - (a)[2] op (c); \ -} while (0) - -/// Define an equation with operators -/// For example this function can be used to replace -///
-/// for (int i=0; i<3; ++i)
-///   a[i] += b[i] + c[i];
-/// 
-#define dOPE2(a,op1,b,op2,c) do { \ - (a)[0] op1 ((b)[0]) op2 ((c)[0]); \ - (a)[1] op1 ((b)[1]) op2 ((c)[1]); \ - (a)[2] op1 ((b)[2]) op2 ((c)[2]); \ -} while (0) - - -#define dLENGTHSQUARED(a) dCalcVectorLengthSquare3(a) -#define dLENGTH(a) dCalcVectorLength3(a) -#define dDISTANCE(a, b) dCalcPointsDistance3(a, b) - - -#define dDOT(a, b) dCalcVectorDot3(a, b) -#define dDOT13(a, b) dCalcVectorDot3_13(a, b) -#define dDOT31(a, b) dCalcVectorDot3_31(a, b) -#define dDOT33(a, b) dCalcVectorDot3_33(a, b) -#define dDOT14(a, b) dCalcVectorDot3_14(a, b) -#define dDOT41(a, b) dCalcVectorDot3_41(a, b) -#define dDOT44(a, b) dCalcVectorDot3_44(a, b) - - -/* -* cross product, set a = b x c. dCROSSpqr means that elements of `a', `b' -* and `c' are spaced p, q and r indexes apart respectively. -* dCROSS() means dCROSS111. `op' is normally `=', but you can set it to -* +=, -= etc to get other effects. -*/ - -#define dCROSS(a,op,b,c) \ - do { \ - (a)[0] op ((b)[1]*(c)[2] - (b)[2]*(c)[1]); \ - (a)[1] op ((b)[2]*(c)[0] - (b)[0]*(c)[2]); \ - (a)[2] op ((b)[0]*(c)[1] - (b)[1]*(c)[0]); \ - } while(0) -#define dCROSSpqr(a,op,b,c,p,q,r) \ - do { \ - (a)[ 0] op ((b)[ q]*(c)[2*r] - (b)[2*q]*(c)[ r]); \ - (a)[ p] op ((b)[2*q]*(c)[ 0] - (b)[ 0]*(c)[2*r]); \ - (a)[2*p] op ((b)[ 0]*(c)[ r] - (b)[ q]*(c)[ 0]); \ - } while(0) -#define dCROSS114(a,op,b,c) dCROSSpqr(a,op,b,c,1,1,4) -#define dCROSS141(a,op,b,c) dCROSSpqr(a,op,b,c,1,4,1) -#define dCROSS144(a,op,b,c) dCROSSpqr(a,op,b,c,1,4,4) -#define dCROSS411(a,op,b,c) dCROSSpqr(a,op,b,c,4,1,1) -#define dCROSS414(a,op,b,c) dCROSSpqr(a,op,b,c,4,1,4) -#define dCROSS441(a,op,b,c) dCROSSpqr(a,op,b,c,4,4,1) -#define dCROSS444(a,op,b,c) dCROSSpqr(a,op,b,c,4,4,4) - - -/* -* set a 3x3 submatrix of A to a matrix such that submatrix(A)*b = a x b. -* A is stored by rows, and has `skip' elements per row. the matrix is -* assumed to be already zero, so this does not write zero elements! -* if (plus,minus) is (+,-) then a positive version will be written. -* if (plus,minus) is (-,+) then a negative version will be written. -*/ - -#define dCROSSMAT(A,a,skip,plus,minus) \ - do { \ - (A)[1] = minus (a)[2]; \ - (A)[2] = plus (a)[1]; \ - (A)[(skip)+0] = plus (a)[2]; \ - (A)[(skip)+2] = minus (a)[0]; \ - (A)[2*(skip)+0] = minus (a)[1]; \ - (A)[2*(skip)+1] = plus (a)[0]; \ - } while(0) - - - - -/* -Note: NEVER call any of these functions/macros with the same variable for A and C, -it is not equivalent to A*=B. -*/ - -#define dMULTIPLY0_331(A, B, C) dMultiply0_331(A, B, C) -#define dMULTIPLY1_331(A, B, C) dMultiply1_331(A, B, C) -#define dMULTIPLY0_133(A, B, C) dMultiply0_133(A, B, C) -#define dMULTIPLY0_333(A, B, C) dMultiply0_333(A, B, C) -#define dMULTIPLY1_333(A, B, C) dMultiply1_333(A, B, C) -#define dMULTIPLY2_333(A, B, C) dMultiply2_333(A, B, C) - -#define dMULTIPLYADD0_331(A, B, C) dMultiplyAdd0_331(A, B, C) -#define dMULTIPLYADD1_331(A, B, C) dMultiplyAdd1_331(A, B, C) -#define dMULTIPLYADD0_133(A, B, C) dMultiplyAdd0_133(A, B, C) -#define dMULTIPLYADD0_333(A, B, C) dMultiplyAdd0_333(A, B, C) -#define dMULTIPLYADD1_333(A, B, C) dMultiplyAdd1_333(A, B, C) -#define dMULTIPLYADD2_333(A, B, C) dMultiplyAdd2_333(A, B, C) - - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -/* -* These macros are not used any more inside of ODE -* They are kept for backward compatibility with external code that -* might still be using them. -*/ -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// - - -#endif // #ifndef _ODE_ODEMATH_LEGACY_H_ diff --git a/misc/builddeps/linux64/ode/include/ode/rotation.h b/misc/builddeps/linux64/ode/include/ode/rotation.h deleted file mode 100644 index a72be27f..00000000 --- a/misc/builddeps/linux64/ode/include/ode/rotation.h +++ /dev/null @@ -1,70 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#ifndef _ODE_ROTATION_H_ -#define _ODE_ROTATION_H_ - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - - -ODE_API void dRSetIdentity (dMatrix3 R); - -ODE_API void dRFromAxisAndAngle (dMatrix3 R, dReal ax, dReal ay, dReal az, - dReal angle); - -ODE_API void dRFromEulerAngles (dMatrix3 R, dReal phi, dReal theta, dReal psi); - -ODE_API void dRFrom2Axes (dMatrix3 R, dReal ax, dReal ay, dReal az, - dReal bx, dReal by, dReal bz); - -ODE_API void dRFromZAxis (dMatrix3 R, dReal ax, dReal ay, dReal az); - -ODE_API void dQSetIdentity (dQuaternion q); - -ODE_API void dQFromAxisAndAngle (dQuaternion q, dReal ax, dReal ay, dReal az, - dReal angle); - -/* Quaternion multiplication, analogous to the matrix multiplication routines. */ -/* qa = rotate by qc, then qb */ -ODE_API void dQMultiply0 (dQuaternion qa, const dQuaternion qb, const dQuaternion qc); -/* qa = rotate by qc, then by inverse of qb */ -ODE_API void dQMultiply1 (dQuaternion qa, const dQuaternion qb, const dQuaternion qc); -/* qa = rotate by inverse of qc, then by qb */ -ODE_API void dQMultiply2 (dQuaternion qa, const dQuaternion qb, const dQuaternion qc); -/* qa = rotate by inverse of qc, then by inverse of qb */ -ODE_API void dQMultiply3 (dQuaternion qa, const dQuaternion qb, const dQuaternion qc); - -ODE_API void dRfromQ (dMatrix3 R, const dQuaternion q); -ODE_API void dQfromR (dQuaternion q, const dMatrix3 R); -ODE_API void dDQfromW (dReal dq[4], const dVector3 w, const dQuaternion q); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/misc/builddeps/linux64/ode/include/ode/timer.h b/misc/builddeps/linux64/ode/include/ode/timer.h deleted file mode 100644 index fe1483f7..00000000 --- a/misc/builddeps/linux64/ode/include/ode/timer.h +++ /dev/null @@ -1,76 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#ifndef _ODE_TIMER_H_ -#define _ODE_TIMER_H_ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - - -/* stop watch objects */ - -typedef struct dStopwatch { - double time; /* total clock count */ - unsigned long cc[2]; /* clock count since last `start' */ -} dStopwatch; - -ODE_API void dStopwatchReset (dStopwatch *); -ODE_API void dStopwatchStart (dStopwatch *); -ODE_API void dStopwatchStop (dStopwatch *); -ODE_API double dStopwatchTime (dStopwatch *); /* returns total time in secs */ - - -/* code timers */ - -ODE_API void dTimerStart (const char *description); /* pass a static string here */ -ODE_API void dTimerNow (const char *description); /* pass a static string here */ -ODE_API void dTimerEnd(void); - -/* print out a timer report. if `average' is nonzero, print out the average - * time for each slot (this is only meaningful if the same start-now-end - * calls are being made repeatedly. - */ -ODE_API void dTimerReport (FILE *fout, int average); - - -/* resolution */ - -/* returns the timer ticks per second implied by the timing hardware or API. - * the actual timer resolution may not be this great. - */ -ODE_API double dTimerTicksPerSecond(void); - -/* returns an estimate of the actual timer resolution, in seconds. this may - * be greater than 1/ticks_per_second. - */ -ODE_API double dTimerResolution(void); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/misc/builddeps/linux64/ode/lib/libode.a b/misc/builddeps/linux64/ode/lib/libode.a deleted file mode 100644 index 7da69ea1..00000000 Binary files a/misc/builddeps/linux64/ode/lib/libode.a and /dev/null differ diff --git a/misc/builddeps/linux64/ode/lib/libode.la b/misc/builddeps/linux64/ode/lib/libode.la deleted file mode 100755 index 7cabb97b..00000000 --- a/misc/builddeps/linux64/ode/lib/libode.la +++ /dev/null @@ -1,41 +0,0 @@ -# libode.la - a libtool library file -# Generated by libtool (GNU libtool) 2.4 -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='' - -# Names of this library. -library_names='' - -# The name of the static archive. -old_library='libode.a' - -# Linker flags that can not go in dependency_libs. -inherited_linker_flags='' - -# Libraries that this one depends upon. -dependency_libs=' -L/tmp/ode-0.12.deps/lib/ -lpthread' - -# Names of additional weak libraries provided by this library -weak_library_names='' - -# Version information for libode. -current=3 -age=0 -revision=0 - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=no - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/usr/local/lib' diff --git a/misc/builddeps/linux64/ode/lib/pkgconfig/ode.pc b/misc/builddeps/linux64/ode/lib/pkgconfig/ode.pc deleted file mode 100644 index 7be9daa0..00000000 --- a/misc/builddeps/linux64/ode/lib/pkgconfig/ode.pc +++ /dev/null @@ -1,11 +0,0 @@ -prefix=/usr/local -exec_prefix=${prefix} -libdir=${exec_prefix}/lib -includedir=${prefix}/include - -Name: ode -Description: Open Dynamics Engine -Version: 0.12 -Libs: -L${libdir} -lode -Libs.private: -lstdc++ -lm -Cflags: -I${includedir} -DdDOUBLE diff --git a/misc/tools/all/release.subr b/misc/tools/all/release.subr index 3999ff7e..21faca47 100644 --- a/misc/tools/all/release.subr +++ b/misc/tools/all/release.subr @@ -304,7 +304,7 @@ case "$cmd" in #verbose "$SELF" release-getbinary Xonotic/xonotic-linux64-dedicated || good=false #$good verbose "$SELF" release-compile linux64 \ - 'STRIP=: CC="gcc -m64 -g1 -I../../../.deps/include -L../../../.deps/lib -DSUPPORTIPV6" DP_LINK_CRYPTO=shared LIB_CRYPTO="../../../.deps/lib/libd0_blind_id.a ../../../.deps/lib/libgmp.a" DP_LINK_CRYPTO_RIJNDAEL=dlopen DP_LINK_JPEG=shared LIB_JPEG=../../../.deps/lib/libjpeg.a DP_LINK_ODE=shared CFLAGS_ODE="-DUSEODE -DLINK_TO_LIBODE -DdDOUBLE" LIB_ODE="../../../.deps/lib/libode.a -lstdc++" DP_LINK_ZLIB=shared' \ + 'STRIP=: CC="gcc -m64 -g1 -I../../../.deps/include -L../../../.deps/lib -DSUPPORTIPV6" DP_LINK_CRYPTO=shared LIB_CRYPTO="../../../.deps/lib/libd0_blind_id.a ../../../.deps/lib/libgmp.a" DP_LINK_CRYPTO_RIJNDAEL=dlopen DP_LINK_JPEG=shared LIB_JPEG=/usr/lib/x86_64-linux-gnu/libjpeg.a DP_LINK_ODE=shared CFLAGS_ODE="-DUSEODE -DLINK_TO_LIBODE -DdDOUBLE" LIB_ODE="/usr/lib/x86_64-linux-gnu/libode.a -lstdc++" DP_LINK_ZLIB=shared' \ release 'darkplaces-glx:Xonotic/xonotic-linux64-glx darkplaces-sdl:Xonotic/xonotic-linux64-sdl darkplaces-dedicated:Xonotic/xonotic-linux64-dedicated' ;; release-engine)