diff --git a/Demos/MovingConcaveDemo/CMakeLists.txt b/Demos/MovingConcaveDemo/CMakeLists.txt index 3c264fdd8..7c85b6d6c 100644 --- a/Demos/MovingConcaveDemo/CMakeLists.txt +++ b/Demos/MovingConcaveDemo/CMakeLists.txt @@ -48,11 +48,11 @@ ELSE (WIN32) ENDIF (WIN32) INCLUDE_DIRECTORIES( -${BULLET_PHYSICS_SOURCE_DIR}/src ${BULLET_PHYSICS_SOURCE_DIR}/Demos/OpenGL } +${BULLET_PHYSICS_SOURCE_DIR}/Extras/GIMPACT/include ${BULLET_PHYSICS_SOURCE_DIR}/src ${BULLET_PHYSICS_SOURCE_DIR}/Demos/OpenGL } ) LINK_LIBRARIES( -LibGIMPACTBullet LibGIMPACT LibOpenGLSupport LibBulletDynamics LibBulletCollision LibLinearMath ${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} +LibGIMPACT LibOpenGLSupport LibBulletDynamics LibBulletCollision LibLinearMath ${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ) ADD_EXECUTABLE(MovingConcaveDemo diff --git a/Demos/MovingConcaveDemo/ConcaveDemo.h b/Demos/MovingConcaveDemo/ConcaveDemo.h index f6f736ba7..d16e54d30 100644 --- a/Demos/MovingConcaveDemo/ConcaveDemo.h +++ b/Demos/MovingConcaveDemo/ConcaveDemo.h @@ -24,10 +24,11 @@ struct btCollisionAlgorithmCreateFunc; class ConcaveDemo : public DemoApplication { - btCollisionAlgorithmCreateFunc* m_gimpactCollisionCreateFunc; + btCollisionShape * m_trimeshShape; public: + void initGImpactCollision(); void initPhysics(); virtual void clientMoveAndDisplay(); diff --git a/Demos/MovingConcaveDemo/ConcavePhysicsDemo.cpp b/Demos/MovingConcaveDemo/ConcavePhysicsDemo.cpp index e3b0247c2..0c335854b 100644 --- a/Demos/MovingConcaveDemo/ConcavePhysicsDemo.cpp +++ b/Demos/MovingConcaveDemo/ConcavePhysicsDemo.cpp @@ -20,13 +20,8 @@ subject to the following restrictions: #include "LinearMath/btIDebugDraw.h" #include "LinearMath/btQuickprof.h" #include "LinearMath/btDefaultMotionState.h" -#include "../Extras/GIMPACTBullet/btGIMPACTMeshShape.h" -#include "../Extras/GIMPACTBullet/btConcaveConcaveCollisionAlgorithm.h" - -//#define USE_PARALLEL_DISPATCHER 1 -#ifdef USE_PARALLEL_DISPATCHER -#include "../../Extras/BulletMultiThreaded/SpuGatheringCollisionDispatcher.h" -#endif//USE_PARALLEL_DISPATCHER +#include "GIMPACT/Bullet/btGImpactShape.h" +#include "GIMPACT/Bullet/btGImpactCollisionAlgorithm.h" @@ -1409,11 +1404,12 @@ int gIndices[NUM_TRIANGLES][3] = { {452,450,449} }; -//TRIMESH GLOBAL -btGIMPACTMeshData * g_trimeshData; //***************************THE END OF FAMOUS BUNNY TRIMESH********************************************// +//****GLOBALS + +//****GLOBALS ///User can override this material combiner by implementing gContactAddedCallback and setting body0->m_collisionFlags |= btCollisionObject::customMaterialCallback; inline btScalar calculateCombinedFriction(float friction0,float friction1) @@ -1615,7 +1611,7 @@ void ConcaveDemo::renderme() sprintf(buf,"+- shooting speed = %10.2f",m_ShootBoxInitialSpeed); BMF_DrawString(BMF_GetFont(BMF_kHelvetica10),buf); yStart += yIncr; - + resetPerspectiveProjection(); @@ -1624,26 +1620,33 @@ void ConcaveDemo::renderme() } -void ConcaveDemo::initPhysics() -{ +void ConcaveDemo::initGImpactCollision() +{ + // create trimesh btTriangleIndexVertexArray* indexVertexArrays = new btTriangleIndexVertexArray(NUM_TRIANGLES, &gIndices[0][0], 3*sizeof(int), - NUM_VERTICES,(REAL*) &gVertices[0],sizeof(REAL)*3); + NUM_VERTICES,(REAL*) &gVertices[0],sizeof(REAL)*3); + + btGImpactMeshShape * trimesh = new btGImpactMeshShape(indexVertexArrays); + trimesh->setLocalScaling(btVector3(4.f,4.f,4.f)); + trimesh->updateBound(); + m_trimeshShape = trimesh; + + //register algorithm + + btCollisionDispatcher * dispatcher = static_cast(m_dynamicsWorld ->getDispatcher()); + btGImpactCollisionAlgorithm::registerAlgorithm(dispatcher); + +} + +void ConcaveDemo::initPhysics() +{ - g_trimeshData = new btGIMPACTMeshData(indexVertexArrays); //btConstraintSolver* solver = new btSequentialImpulseConstraintSolver; - -#ifdef USE_PARALLEL_DISPATCHER - btCollisionDispatcher* dispatcher = new SpuGatheringCollisionDispatcher(); -#else - btCollisionDispatcher* dispatcher = new btCollisionDispatcher(); -#endif//USE_PARALLEL_DISPATCHER - - - + btCollisionDispatcher* dispatcher = new btCollisionDispatcher(); //btOverlappingPairCache* broadphase = new btSimpleBroadphase(); btOverlappingPairCache* broadphase = new btSimpleBroadphase(); @@ -1651,12 +1654,10 @@ void ConcaveDemo::initPhysics() m_dynamicsWorld = new btDiscreteDynamicsWorld(dispatcher,broadphase,constraintSolver); - m_gimpactCollisionCreateFunc = new btConcaveConcaveCollisionAlgorithm::CreateFunc; - dispatcher->registerCollisionCreateFunc(GIMPACT_SHAPE_PROXYTYPE,GIMPACT_SHAPE_PROXYTYPE,m_gimpactCollisionCreateFunc); - dispatcher->registerCollisionCreateFunc(TRIANGLE_MESH_SHAPE_PROXYTYPE,GIMPACT_SHAPE_PROXYTYPE,m_gimpactCollisionCreateFunc); - dispatcher->registerCollisionCreateFunc(GIMPACT_SHAPE_PROXYTYPE,TRIANGLE_MESH_SHAPE_PROXYTYPE,m_gimpactCollisionCreateFunc); - dispatcher->registerCollisionCreateFunc(STATIC_PLANE_PROXYTYPE,GIMPACT_SHAPE_PROXYTYPE,m_gimpactCollisionCreateFunc); - dispatcher->registerCollisionCreateFunc(GIMPACT_SHAPE_PROXYTYPE,STATIC_PLANE_PROXYTYPE,m_gimpactCollisionCreateFunc); + //create trimesh model and shape + initGImpactCollision(); + + float mass = 0.f; btTransform startTransform; @@ -1685,19 +1686,33 @@ void ConcaveDemo::initPhysics() btRigidBody* staticBody = localCreateRigidBody(mass, startTransform,staticScenario); + staticBody->setCollisionFlags(staticBody->getCollisionFlags()|btCollisionObject::CF_STATIC_OBJECT); + //enable custom material callback - staticBody->setCollisionFlags(staticBody->getCollisionFlags() | btCollisionObject::CF_STATIC_OBJECT | btCollisionObject::CF_CUSTOM_MATERIAL_CALLBACK); + staticBody->setCollisionFlags(staticBody->getCollisionFlags()|btCollisionObject::CF_CUSTOM_MATERIAL_CALLBACK); + + + //static plane + btVector3 normal(0.4,1.5,-0.4); + normal.normalize(); + btCollisionShape* staticplaneShape6 = new btStaticPlaneShape(normal,0.0);// A plane + + startTransform.setOrigin(btVector3(0,0,0)); + + btRigidBody* staticBody2 = localCreateRigidBody(mass, startTransform,staticplaneShape6 ); + + staticBody2->setCollisionFlags(staticBody2->getCollisionFlags()|btCollisionObject::CF_STATIC_OBJECT); { - for (int i=0;i<10;i++) + for (int i=0;i<9;i++) { btCollisionShape* boxShape = new btBoxShape(btVector3(1,1,1)); - startTransform.setOrigin(btVector3(2*i,2,1)); + startTransform.setOrigin(btVector3(2*i-5,2,-3)); localCreateRigidBody(1, startTransform,boxShape); } } - m_debugMode |= btIDebugDraw::DBG_DrawWireframe; + //m_debugMode |= btIDebugDraw::DBG_DrawWireframe; } @@ -1842,17 +1857,9 @@ void ConcaveDemo::keyboardCallback(unsigned char key, int x, int y) } -btGIMPACTMeshShape * createMesh() -{ - btGIMPACTMeshShape * newtrimeshShape = new btGIMPACTMeshShape(g_trimeshData ); - newtrimeshShape->setLocalScaling(btVector3(4.f,4.f,4.f)); -// OGL_displaylist_register_shape(newtrimeshShape); - return newtrimeshShape; -} - void ConcaveDemo::shootTrimesh(const btVector3& destination) { - + if (m_dynamicsWorld) { float mass = 4.f; @@ -1861,9 +1868,7 @@ void ConcaveDemo::shootTrimesh(const btVector3& destination) btVector3 camPos = getCameraPosition(); startTransform.setOrigin(camPos); - btGIMPACTMeshShape * newtrimeshShape = createMesh(); - - btRigidBody* body = this->localCreateRigidBody(mass, startTransform,newtrimeshShape); + btRigidBody* body = this->localCreateRigidBody(mass, startTransform,m_trimeshShape); btVector3 linVel(destination[0]-camPos[0],destination[1]-camPos[1],destination[2]-camPos[2]); linVel.normalize(); diff --git a/Demos/MovingConcaveDemo/Jamfile b/Demos/MovingConcaveDemo/Jamfile index 1eba954c7..5757da7a7 100644 --- a/Demos/MovingConcaveDemo/Jamfile +++ b/Demos/MovingConcaveDemo/Jamfile @@ -6,18 +6,16 @@ SubDir TOP Demos MovingConcaveDemo ; { Application $(<) : $(>) : noinstall console nomanifest ; - LinkWith $(<) : GIMPACTBullet GIMPACT bulletopenglsupport bulletdynamics bulletcollision bulletmath ; + LinkWith $(<) : GIMPACT bulletopenglsupport bulletdynamics bulletcollision bulletmath ; CFlags $(<) : [ FIncludes $(TOP)/Demos/OpenGL ] [ FIncludes $(TOP)/Extras/GIMPACT/include ] - [ FIncludes $(TOP)/Extras/GIMPACTBullet ] ; MsvcIncDirs $(<) : "../../Demos/OpenGL" - "../../Extras/GIMPACT/include" - "../../Extras/GIMPACTBullet" ; + "../../Extras/GIMPACT/include" ; } ExtraDemo1 MovingConcaveDemo : [ Wildcard *.h *.cpp ] ; diff --git a/Extras/CMakeLists.txt b/Extras/CMakeLists.txt index a4570883d..b118f73b5 100644 --- a/Extras/CMakeLists.txt +++ b/Extras/CMakeLists.txt @@ -1 +1 @@ -SUBDIRS( LibXML COLLADA_DOM GIMPACT GIMPACTBullet ) +SUBDIRS( LibXML COLLADA_DOM GIMPACT ) diff --git a/Extras/GIMPACT/BULLET_PHYSICS.build/Debug/libLibGIMPACT.a.build/Objects-normal/i386/LibGIMPACT.LinkFileList b/Extras/GIMPACT/BULLET_PHYSICS.build/Debug/libLibGIMPACT.a.build/Objects-normal/i386/LibGIMPACT.LinkFileList new file mode 100644 index 000000000..1662bab32 --- /dev/null +++ b/Extras/GIMPACT/BULLET_PHYSICS.build/Debug/libLibGIMPACT.a.build/Objects-normal/i386/LibGIMPACT.LinkFileList @@ -0,0 +1,6 @@ +/Users/erwincoumans/develop/sf/bullet-2.54/Extras/GIMPACT/BULLET_PHYSICS.build/Debug/libLibGIMPACT.a.build/Objects-normal/i386/btGImpactCollisionAlgorithm.o +/Users/erwincoumans/develop/sf/bullet-2.54/Extras/GIMPACT/BULLET_PHYSICS.build/Debug/libLibGIMPACT.a.build/Objects-normal/i386/btGImpactShape.o +/Users/erwincoumans/develop/sf/bullet-2.54/Extras/GIMPACT/BULLET_PHYSICS.build/Debug/libLibGIMPACT.a.build/Objects-normal/i386/gim_box_set.o +/Users/erwincoumans/develop/sf/bullet-2.54/Extras/GIMPACT/BULLET_PHYSICS.build/Debug/libLibGIMPACT.a.build/Objects-normal/i386/gim_contact.o +/Users/erwincoumans/develop/sf/bullet-2.54/Extras/GIMPACT/BULLET_PHYSICS.build/Debug/libLibGIMPACT.a.build/Objects-normal/i386/gim_memory.o +/Users/erwincoumans/develop/sf/bullet-2.54/Extras/GIMPACT/BULLET_PHYSICS.build/Debug/libLibGIMPACT.a.build/Objects-normal/i386/gim_tri_collision.o diff --git a/Extras/GIMPACT/BULLET_PHYSICS.build/Debug/libLibGIMPACT.a.build/Script-13302F013302F013302F0000.sh b/Extras/GIMPACT/BULLET_PHYSICS.build/Debug/libLibGIMPACT.a.build/Script-13302F013302F013302F0000.sh new file mode 100755 index 000000000..bb791c2b6 --- /dev/null +++ b/Extras/GIMPACT/BULLET_PHYSICS.build/Debug/libLibGIMPACT.a.build/Script-13302F013302F013302F0000.sh @@ -0,0 +1,2 @@ +#!/bin/sh +make -C /Users/erwincoumans/develop/sf/bullet-2.54 -f /Users/erwincoumans/develop/sf/bullet-2.54/CMakeScripts/ReRunCMake.make diff --git a/Extras/GIMPACT/BULLET_PHYSICS.build/Debug/libLibGIMPACT.a.build/Script-1330B401330B401330B40000.sh b/Extras/GIMPACT/BULLET_PHYSICS.build/Debug/libLibGIMPACT.a.build/Script-1330B401330B401330B40000.sh new file mode 100755 index 000000000..bb791c2b6 --- /dev/null +++ b/Extras/GIMPACT/BULLET_PHYSICS.build/Debug/libLibGIMPACT.a.build/Script-1330B401330B401330B40000.sh @@ -0,0 +1,2 @@ +#!/bin/sh +make -C /Users/erwincoumans/develop/sf/bullet-2.54 -f /Users/erwincoumans/develop/sf/bullet-2.54/CMakeScripts/ReRunCMake.make diff --git a/Extras/GIMPACT/BULLET_PHYSICS.build/Debug/libLibGIMPACT.a.build/Script-133CA50133CA50133CA50000.sh b/Extras/GIMPACT/BULLET_PHYSICS.build/Debug/libLibGIMPACT.a.build/Script-133CA50133CA50133CA50000.sh new file mode 100755 index 000000000..bb791c2b6 --- /dev/null +++ b/Extras/GIMPACT/BULLET_PHYSICS.build/Debug/libLibGIMPACT.a.build/Script-133CA50133CA50133CA50000.sh @@ -0,0 +1,2 @@ +#!/bin/sh +make -C /Users/erwincoumans/develop/sf/bullet-2.54 -f /Users/erwincoumans/develop/sf/bullet-2.54/CMakeScripts/ReRunCMake.make diff --git a/Extras/GIMPACT/BULLET_PHYSICS.build/Debug/libLibGIMPACT.a.build/libLibGIMPACT.a.dep b/Extras/GIMPACT/BULLET_PHYSICS.build/Debug/libLibGIMPACT.a.build/libLibGIMPACT.a.dep new file mode 100644 index 000000000..8d690e35d --- /dev/null +++ b/Extras/GIMPACT/BULLET_PHYSICS.build/Debug/libLibGIMPACT.a.build/libLibGIMPACT.a.dep @@ -0,0 +1,7 @@ +00000000002a1016000000000000944b 582e883c151ba574c0f5b6085732499b ffffffffffffffffffffffffffffffff 61676 /Users/erwincoumans/develop/sf/bullet-2.54/Extras/GIMPACT/BULLET_PHYSICS.build/Debug/libLibGIMPACT.a.build/Objects-normal/i386/gim_tri_collision.o +0000000044427ffb000000000000cc2e fadb4c71fc3b509301f1b79175fc75b7 ffffffffffffffffffffffffffffffff 6748 /Users/erwincoumans/develop/sf/bullet-2.54/Extras/GIMPACT/BULLET_PHYSICS.build/Debug/libLibGIMPACT.a.build/Objects-normal/i386/gim_memory.o +00000000464e4b6e000000000000af12 54d6f4ff7c506f1e8f42a617b21b1f30 ffffffffffffffffffffffffffffffff 48500 /Users/erwincoumans/develop/sf/bullet-2.54/Extras/GIMPACT/BULLET_PHYSICS.build/Debug/libLibGIMPACT.a.build/Objects-normal/i386/gim_contact.o +00000000001ce1140000000000005087 8abd5fd65e40fdff4b616094d8f3a471 ffffffffffffffffffffffffffffffff 54688 /Users/erwincoumans/develop/sf/bullet-2.54/Extras/GIMPACT/BULLET_PHYSICS.build/Debug/libLibGIMPACT.a.build/Objects-normal/i386/gim_box_set.o +00000000467d375200000000000039ed d7bf46a0db97844dd677c02246b8f3a8 ffffffffffffffffffffffffffffffff 235632 /Users/erwincoumans/develop/sf/bullet-2.54/Extras/GIMPACT/BULLET_PHYSICS.build/Debug/libLibGIMPACT.a.build/Objects-normal/i386/btGImpactShape.o +0000000000200129000000000000dc1f 70e1b343c97824104bf5cf6ce036c670 ffffffffffffffffffffffffffffffff 385580 /Users/erwincoumans/develop/sf/bullet-2.54/Extras/GIMPACT/BULLET_PHYSICS.build/Debug/libLibGIMPACT.a.build/Objects-normal/i386/btGImpactCollisionAlgorithm.o +dbc09a87dbc430ff98a5c854eea8f3d1 32e74142d5c8ece00339d5418a5668e7 ffffffffffffffffffffffffffffffff 834284 /Users/erwincoumans/develop/sf/bullet-2.54/Extras/GIMPACT/Debug/libLibGIMPACT.a diff --git a/Extras/GIMPACT/BULLET_PHYSICS.build/Debug/libLibGIMPACT.a.build/libLibGIMPACT.a~.dep b/Extras/GIMPACT/BULLET_PHYSICS.build/Debug/libLibGIMPACT.a.build/libLibGIMPACT.a~.dep new file mode 100644 index 000000000..bea22095a --- /dev/null +++ b/Extras/GIMPACT/BULLET_PHYSICS.build/Debug/libLibGIMPACT.a.build/libLibGIMPACT.a~.dep @@ -0,0 +1,7 @@ +000000000006c8220000000000000a61 c31f0b6300cb69efef1695286a9967cf ffffffffffffffffffffffffffffffff 0 /Users/erwincoumans/develop/sf/bullet-2.54/Extras/GIMPACT/BULLET_PHYSICS.build/Debug/libLibGIMPACT.a.build/Objects-normal/i386/btGImpactShape.o +0000000000200136000000000000fb47 ae54f1915d207c2d451efd532699d45f ffffffffffffffffffffffffffffffff 0 /Users/erwincoumans/develop/sf/bullet-2.54/Extras/GIMPACT/BULLET_PHYSICS.build/Debug/libLibGIMPACT.a.build/Objects-normal/i386/btGImpactCollisionAlgorithm.o +ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 0 /Users/erwincoumans/develop/sf/bullet-2.54/Extras/GIMPACT/Debug/libLibGIMPACT.a +ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 0 /Users/erwincoumans/develop/sf/bullet-2.54/Extras/GIMPACT/BULLET_PHYSICS.build/Debug/libLibGIMPACT.a.build/Objects-normal/i386/gim_tri_collision.o +ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 0 /Users/erwincoumans/develop/sf/bullet-2.54/Extras/GIMPACT/BULLET_PHYSICS.build/Debug/libLibGIMPACT.a.build/Objects-normal/i386/gim_memory.o +ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 0 /Users/erwincoumans/develop/sf/bullet-2.54/Extras/GIMPACT/BULLET_PHYSICS.build/Debug/libLibGIMPACT.a.build/Objects-normal/i386/gim_contact.o +ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 0 /Users/erwincoumans/develop/sf/bullet-2.54/Extras/GIMPACT/BULLET_PHYSICS.build/Debug/libLibGIMPACT.a.build/Objects-normal/i386/gim_box_set.o diff --git a/Extras/GIMPACT/CMakeLists.txt b/Extras/GIMPACT/CMakeLists.txt new file mode 100644 index 000000000..be295fe9c --- /dev/null +++ b/Extras/GIMPACT/CMakeLists.txt @@ -0,0 +1,13 @@ +INCLUDE_DIRECTORIES( +${BULLET_PHYSICS_SOURCE_DIR}/Extras/GIMPACT/include +${BULLET_PHYSICS_SOURCE_DIR}/src +) + +ADD_LIBRARY(LibGIMPACT + src/Bullet/btGImpactCollisionAlgorithm.cpp + src/Bullet/btGImpactShape.cpp + src/core/gim_box_set.cpp + src/core/gim_contact.cpp + src/core/gim_memory.cpp + src/core/gim_tri_collision.cpp +) diff --git a/Extras/GIMPACT/Debug/libLibGIMPACT.a b/Extras/GIMPACT/Debug/libLibGIMPACT.a new file mode 100644 index 000000000..cda36bf70 Binary files /dev/null and b/Extras/GIMPACT/Debug/libLibGIMPACT.a differ diff --git a/Extras/GIMPACT/Doxyfile b/Extras/GIMPACT/Doxyfile new file mode 100755 index 000000000..e37623ac0 --- /dev/null +++ b/Extras/GIMPACT/Doxyfile @@ -0,0 +1,263 @@ +# Doxyfile 1.5.2 + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- +DOXYFILE_ENCODING = UTF-8 +PROJECT_NAME = GIMPACT +PROJECT_NUMBER = 0.2 +OUTPUT_DIRECTORY = docs +CREATE_SUBDIRS = NO +OUTPUT_LANGUAGE = English +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = YES +STRIP_FROM_PATH = "C:/Documents and Settings/Administrador/" +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = NO +MULTILINE_CPP_IS_BRIEF = NO +DETAILS_AT_TOP = NO +INHERIT_DOCS = YES +SEPARATE_MEMBER_PAGES = NO +TAB_SIZE = 8 +ALIASES = +OPTIMIZE_OUTPUT_FOR_C = NO +OPTIMIZE_OUTPUT_JAVA = NO +BUILTIN_STL_SUPPORT = NO +CPP_CLI_SUPPORT = NO +DISTRIBUTE_GROUP_DOC = NO +SUBGROUPING = YES +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- +EXTRACT_ALL = YES +EXTRACT_PRIVATE = YES +EXTRACT_STATIC = YES +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = NO +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = NO +CASE_SENSE_NAMES = NO +HIDE_SCOPE_NAMES = NO +SHOW_INCLUDE_FILES = YES +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +SORT_BRIEF_DOCS = NO +SORT_BY_SCOPE_NAME = NO +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES +SHOW_DIRECTORIES = NO +FILE_VERSION_FILTER = +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = NO +WARN_FORMAT = "$file:$line: $text" +WARN_LOGFILE = +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = include +INPUT_ENCODING = UTF-8 +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.cpp \ + *.c++ \ + *.d \ + *.java \ + *.ii \ + *.ixx \ + *.ipp \ + *.i++ \ + *.inl \ + *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ \ + *.idl \ + *.odl \ + *.cs \ + *.php \ + *.php3 \ + *.inc \ + *.m \ + *.mm \ + *.dox \ + *.py +RECURSIVE = YES +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXCLUDE_SYMBOLS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = * +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = NO +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = NO +REFERENCES_RELATION = NO +REFERENCES_LINK_SOURCE = YES +USE_HTAGS = NO +VERBATIM_HEADERS = NO +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = NO +COLS_IN_ALPHA_INDEX = 5 +IGNORE_PREFIX = +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = html +HTML_FILE_EXTENSION = .html +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_ALIGN_MEMBERS = YES +GENERATE_HTMLHELP = NO +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +BINARY_TOC = NO +TOC_EXPAND = NO +DISABLE_INDEX = NO +ENUM_VALUES_PER_LINE = 4 +GENERATE_TREEVIEW = NO +TREEVIEW_WIDTH = 250 +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = YES +LATEX_OUTPUT = latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = a4wide +EXTRA_PACKAGES = +LATEX_HEADER = +PDF_HYPERLINKS = NO +USE_PDFLATEX = NO +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = NO +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = NO +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_LINKS = NO +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = NO +XML_OUTPUT = xml +XML_SCHEMA = +XML_DTD = +XML_PROGRAMLISTING = YES +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- +TAGFILES = +GENERATE_TAGFILE = +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +PERL_PATH = /usr/bin/perl +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = YES +MSCGEN_PATH = +HIDE_UNDOC_RELATIONS = YES +HAVE_DOT = NO +CLASS_GRAPH = YES +COLLABORATION_GRAPH = YES +GROUP_GRAPHS = YES +UML_LOOK = NO +TEMPLATE_RELATIONS = NO +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = YES +CALL_GRAPH = NO +CALLER_GRAPH = NO +GRAPHICAL_HIERARCHY = YES +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = png +DOT_PATH = +DOTFILE_DIRS = +DOT_GRAPH_MAX_NODES = 50 +DOT_TRANSPARENT = NO +DOT_MULTI_TARGETS = NO +GENERATE_LEGEND = YES +DOT_CLEANUP = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- +SEARCHENGINE = NO diff --git a/Extras/GIMPACT/GIMPACT-LICENSE-BSD.TXT b/Extras/GIMPACT/GIMPACT-LICENSE-BSD.TXT new file mode 100755 index 000000000..95545aac2 --- /dev/null +++ b/Extras/GIMPACT/GIMPACT-LICENSE-BSD.TXT @@ -0,0 +1,29 @@ +GIMPACT : Geometric tools for VR. + +Copyright (c) 2006 , Francisco León. +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this list of + conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, this list + of conditions and the following disclaimer in the documentation and/or other materials + provided with the distribution. + + * Neither the name of the GIMPACT nor the names of its contributors may be used + to endorse or promote products derived from this software without specific prior + written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH + DAMAGE. \ No newline at end of file diff --git a/Extras/GIMPACT/GIMPACT-LICENSE-LGPL.TXT b/Extras/GIMPACT/GIMPACT-LICENSE-LGPL.TXT new file mode 100755 index 000000000..60b81560d --- /dev/null +++ b/Extras/GIMPACT/GIMPACT-LICENSE-LGPL.TXT @@ -0,0 +1,502 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of 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. + + 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 GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/Extras/GIMPACT/GIMPACT-LICENSE-ZLIB.TXT b/Extras/GIMPACT/GIMPACT-LICENSE-ZLIB.TXT new file mode 100755 index 000000000..616f33f7c --- /dev/null +++ b/Extras/GIMPACT/GIMPACT-LICENSE-ZLIB.TXT @@ -0,0 +1,23 @@ +GIMPACT : Geometric tools for VR. + +Copyright (c) 2006 , Francisco León. +All rights reserved. + + +This software is provided 'as-is', without any express or implied warranty. In no +event will the authors be held liable for any damages arising from the use of this +software. + +Permission is granted to anyone to use this software for any purpose, including commercial +applications, and to alter it and redistribute it freely, subject to the following +restrictions: + + 1. The origin of this software must not be misrepresented; you must not claim that + you wrote the original software. If you use this software in a product, an + acknowledgment in the product documentation would be appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source distribution. + diff --git a/Extras/GIMPACT/Jamfile b/Extras/GIMPACT/Jamfile new file mode 100644 index 000000000..4a6ac654b --- /dev/null +++ b/Extras/GIMPACT/Jamfile @@ -0,0 +1,12 @@ +SubDir TOP Extras GIMPACT ; + +#IncludeDir Extras/GIMPACT/include ; + +Library GIMPACT : [ Wildcard src/Bullet : */.h *.cpp ] [ Wildcard src/core : *.cpp ] : noinstall ; +CFlags GIMPACT : [ FIncludes $(TOP)/Extras/GIMPACT/include ] ; +LibDepends GIMPACT : ; + + MsvcIncDirs GIMPACT : + "../../Extras/GIMPACT/include" ; + +InstallHeader [ Wildcard *.h ] : GIMPACT ; diff --git a/Extras/GIMPACT/cmake_install.cmake b/Extras/GIMPACT/cmake_install.cmake new file mode 100644 index 000000000..609da2a62 --- /dev/null +++ b/Extras/GIMPACT/cmake_install.cmake @@ -0,0 +1,29 @@ +# Install script for directory: /Users/erwincoumans/develop/sf/bullet-2.54/Extras/GIMPACT + +# Set the install prefix +IF(NOT DEFINED CMAKE_INSTALL_PREFIX) + SET(CMAKE_INSTALL_PREFIX "/usr/local") +ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) +STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +IF(NOT CMAKE_INSTALL_CONFIG_NAME) + IF(BUILD_TYPE) + STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + ELSE(BUILD_TYPE) + SET(CMAKE_INSTALL_CONFIG_NAME "Release") + ENDIF(BUILD_TYPE) + MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +ENDIF(NOT CMAKE_INSTALL_CONFIG_NAME) + +# Set the component getting installed. +IF(NOT CMAKE_INSTALL_COMPONENT) + IF(COMPONENT) + MESSAGE(STATUS "Install component: \"${COMPONENT}\"") + SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + ELSE(COMPONENT) + SET(CMAKE_INSTALL_COMPONENT) + ENDIF(COMPONENT) +ENDIF(NOT CMAKE_INSTALL_COMPONENT) + diff --git a/Extras/GIMPACT/docs/html/annotated.html b/Extras/GIMPACT/docs/html/annotated.html new file mode 100755 index 000000000..06df1ba70 --- /dev/null +++ b/Extras/GIMPACT/docs/html/annotated.html @@ -0,0 +1,70 @@ + + +GIMPACT: Class List + + + + + + +

GIMPACT Class List

Here are the classes, structs, unions and interfaces with brief descriptions: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
btGImpactCollisionAlgorithmCollision Algorithm for GImpact Shapes
btGImpactCollisionAlgorithm::CreateFunc
btGImpactCompoundShapeBtGIMPACTCompoundShape allows to handle multiple btCollisionShape objects at once
btGImpactCompoundShape::BoxSetClass
btGImpactCompoundShape::CompoundPrimitiveManagerCompound primitive manager
btGImpactMeshShapeThis class manages a mesh supplied by the btStridingMeshInterface interface
btGImpactMeshShapePartThis class manages a sub part of a mesh supplied by the btStridingMeshInterface interface
btGImpactMeshShapePart::BoxSetClass
btGImpactMeshShapePart::TrimeshPrimitiveManagerTrimesh primitive manager
btGImpactShapeInterfaceBase class for gimpact shapes
btTriangleShapeExHelper class for colliding Bullet Triangle Shapes
copy_elements_funcPrototype for copying elements
DISTANCE_PLANE_3D_FUNCThis function calcs the distance from a 3D plane
GIM_AABBAxis aligned box
GIM_AABB_DATA
gim_array< T >Very simple array container with fast access and simd memory
gim_bitset
GIM_BOX_BOX_TRANSFORM_CACHEClass for transforming a model1 to the space of model0
GIM_BOX_TREEBasic Box tree structure
GIM_BOX_TREE_NODENode Structure for trees
GIM_BOX_TREE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE >Class for Box Tree Sets
GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE >Generic Box Tree Template
GIM_CONTACTStructure for collision results
gim_contact_array
GIM_HASH_NODE_CMP_KEY_MACROMacro for comparing the key and the element
GIM_HASH_NODE_CMP_MACROMacro for comparing Hash nodes
GIM_HASH_NODE_GET_KEYMacro for getting the key
gim_hash_table< T >A compact hash table implementation
GIM_HASH_TABLE_NODE< T >
GIM_PAIROverlapping pair
gim_pair_setA pairset array
GIM_PRIMITIVE_MANAGER_PROTOTYPEPrototype Base class for primitive classification
GIM_RSORT_TOKEN
GIM_RSORT_TOKEN_COMPARATORPrototype for comparators
GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >GIM_BOX_SET collision methods
GIM_TRIANGLEClass for colliding triangles
GIM_TRIANGLE_CONTACT_DATAStructure for collision
integer_comparatorPrototype for comparators
less_comparatorPrototype for comparators
memcopy_elements_funcPrototype for copying elements
uint_key_funcPrototype for getting the integer representation of an object
+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/bt_g_impact_collision_algorithm_8h.html b/Extras/GIMPACT/docs/html/bt_g_impact_collision_algorithm_8h.html new file mode 100755 index 000000000..9f3beab59 --- /dev/null +++ b/Extras/GIMPACT/docs/html/bt_g_impact_collision_algorithm_8h.html @@ -0,0 +1,47 @@ + + +GIMPACT: C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/Bullet/btGImpactCollisionAlgorithm.h File Reference + + + + + + +

C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/Bullet/btGImpactCollisionAlgorithm.h File Reference

#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h"
+#include "BulletCollision/BroadphaseCollision/btDispatcher.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseInterface.h"
+#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
+#include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h"
+#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h"
+#include "LinearMath/btAlignedObjectArray.h"
+#include "GIMPACT/Bullet/btGImpactShape.h"
+#include "BulletCollision/CollisionShapes/btStaticPlaneShape.h"
+#include "BulletCollision/CollisionShapes/btCompoundShape.h"
+#include "BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h"
+ + + + + + + + +

Classes

class  btGImpactCollisionAlgorithm
 Collision Algorithm for GImpact Shapes. More...
struct  btGImpactCollisionAlgorithm::CreateFunc
+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/bt_g_impact_mass_util_8h.html b/Extras/GIMPACT/docs/html/bt_g_impact_mass_util_8h.html new file mode 100755 index 000000000..e1d9b75af --- /dev/null +++ b/Extras/GIMPACT/docs/html/bt_g_impact_mass_util_8h.html @@ -0,0 +1,102 @@ + + +GIMPACT: C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/Bullet/btGImpactMassUtil.h File Reference + + + + + + +

C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/Bullet/btGImpactMassUtil.h File Reference

#include "LinearMath/btTransform.h"
+ + + + + + + +

Functions

SIMD_FORCE_INLINE btVector3 gim_inertia_add_transformed (const btVector3 &source_inertia, const btVector3 &added_inertia, const btTransform &transform)
SIMD_FORCE_INLINE btVector3 gim_get_point_inertia (const btVector3 &point, btScalar mass)
+

Detailed Description

+
Author:
Francisco León Nájera
+

Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE btVector3 gim_get_point_inertia (const btVector3 &  point,
btScalar  mass 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE btVector3 gim_inertia_add_transformed (const btVector3 &  source_inertia,
const btVector3 &  added_inertia,
const btTransform &  transform 
)
+
+
+ +

+ +

+

+


Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/bt_g_impact_shape_8h.html b/Extras/GIMPACT/docs/html/bt_g_impact_shape_8h.html new file mode 100755 index 000000000..71f791ee3 --- /dev/null +++ b/Extras/GIMPACT/docs/html/bt_g_impact_shape_8h.html @@ -0,0 +1,100 @@ + + +GIMPACT: C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/Bullet/btGImpactShape.h File Reference + + + + + + +

C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/Bullet/btGImpactShape.h File Reference

#include "BulletCollision/CollisionShapes/btCollisionShape.h"
+#include "BulletCollision/CollisionShapes/btTriangleShape.h"
+#include "BulletCollision/CollisionShapes/btStridingMeshInterface.h"
+#include "BulletCollision/CollisionShapes/btCollisionMargin.h"
+#include "BulletCollision/CollisionDispatch/btCollisionWorld.h"
+#include "BulletCollision/CollisionShapes/btConcaveShape.h"
+#include "LinearMath/btVector3.h"
+#include "LinearMath/btTransform.h"
+#include "LinearMath/btMatrix3x3.h"
+#include "LinearMath/btAlignedObjectArray.h"
+#include "GIMPACT/core/gim_box_set.h"
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Classes

class  btGImpactShapeInterface
 Base class for gimpact shapes. More...
class  btGImpactCompoundShape
 btGIMPACTCompoundShape allows to handle multiple btCollisionShape objects at once More...
class  btGImpactCompoundShape::CompoundPrimitiveManager
 compound primitive manager More...
class  btGImpactCompoundShape::BoxSetClass
class  btTriangleShapeEx
 Helper class for colliding Bullet Triangle Shapes. More...
class  btGImpactMeshShapePart
 This class manages a sub part of a mesh supplied by the btStridingMeshInterface interface. More...
class  btGImpactMeshShapePart::TrimeshPrimitiveManager
 Trimesh primitive manager. More...
class  btGImpactMeshShapePart::BoxSetClass
class  btGImpactMeshShape
 This class manages a mesh supplied by the btStridingMeshInterface interface. More...

Enumerations

enum  eGIMPACT_SHAPE_TYPE { CONST_GIMPACT_COMPOUND_SHAPE = 0, +CONST_GIMPACT_TRIMESH_SHAPE_PART, +CONST_GIMPACT_TRIMESH_SHAPE + }
+

Detailed Description

+
Author:
Francisco León Nájera
+

Enumeration Type Documentation

+ +
+
+ + + + +
enum eGIMPACT_SHAPE_TYPE
+
+
+ +

+

Enumerator:
+ + + + +
CONST_GIMPACT_COMPOUND_SHAPE  +
CONST_GIMPACT_TRIMESH_SHAPE_PART  +
CONST_GIMPACT_TRIMESH_SHAPE  +
+
+ +
+

+


Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/class_d_i_s_t_a_n_c_e___p_l_a_n_e__3_d___f_u_n_c-members.html b/Extras/GIMPACT/docs/html/class_d_i_s_t_a_n_c_e___p_l_a_n_e__3_d___f_u_n_c-members.html new file mode 100755 index 000000000..8e5955bb1 --- /dev/null +++ b/Extras/GIMPACT/docs/html/class_d_i_s_t_a_n_c_e___p_l_a_n_e__3_d___f_u_n_c-members.html @@ -0,0 +1,29 @@ + + +GIMPACT: Member List + + + + + + +

DISTANCE_PLANE_3D_FUNC Member List

This is the complete list of members for DISTANCE_PLANE_3D_FUNC, including all inherited members.

+ +
operator()(const CLASS_PLANE &plane, const CLASS_POINT &point)DISTANCE_PLANE_3D_FUNC [inline]


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/class_d_i_s_t_a_n_c_e___p_l_a_n_e__3_d___f_u_n_c.html b/Extras/GIMPACT/docs/html/class_d_i_s_t_a_n_c_e___p_l_a_n_e__3_d___f_u_n_c.html new file mode 100755 index 000000000..cdbde0df6 --- /dev/null +++ b/Extras/GIMPACT/docs/html/class_d_i_s_t_a_n_c_e___p_l_a_n_e__3_d___f_u_n_c.html @@ -0,0 +1,79 @@ + + +GIMPACT: DISTANCE_PLANE_3D_FUNC Class Reference + + + + + + +

DISTANCE_PLANE_3D_FUNC Class Reference
+ +[GEOMETRIC_OPERATIONS] +

This function calcs the distance from a 3D plane. +More... +

+#include <gim_clip_polygon.h> +

+List of all members. + + + + + +

Public Member Functions

template<typename CLASS_POINT, typename CLASS_PLANE>
GREAL operator() (const CLASS_PLANE &plane, const CLASS_POINT &point)
+


Detailed Description

+This function calcs the distance from a 3D plane. +

+


Member Function Documentation

+ +
+
+
+template<typename CLASS_POINT, typename CLASS_PLANE>
+ + + + + + + + + + + + + + + + + + +
GREAL DISTANCE_PLANE_3D_FUNC::operator() (const CLASS_PLANE &  plane,
const CLASS_POINT &  point 
) [inline]
+
+
+ +

+ +

+

+


The documentation for this class was generated from the following file: +
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/class_g_i_m___a_a_b_b-members.html b/Extras/GIMPACT/docs/html/class_g_i_m___a_a_b_b-members.html new file mode 100755 index 000000000..12d9fc017 --- /dev/null +++ b/Extras/GIMPACT/docs/html/class_g_i_m___a_a_b_b-members.html @@ -0,0 +1,53 @@ + + +GIMPACT: Member List + + + + + + +

GIM_AABB Member List

This is the complete list of members for GIM_AABB, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + +
appy_transform(const btTransform &trans)GIM_AABB [inline]
calc_from_triangle(const CLASS_POINT &V1, const CLASS_POINT &V2, const CLASS_POINT &V3)GIM_AABB [inline]
calc_from_triangle_margin(const CLASS_POINT &V1, const CLASS_POINT &V2, const CLASS_POINT &V3, btScalar margin)GIM_AABB [inline]
collide_plane(const btVector4 &plane)GIM_AABB [inline]
collide_ray(const btVector3 &vorigin, const btVector3 &vdir)GIM_AABB [inline]
collide_triangle_exact(const btVector3 &p1, const btVector3 &p2, const btVector3 &p3, const btVector4 &triangle_plane)GIM_AABB [inline]
copy_with_margin(const GIM_AABB &other, btScalar margin)GIM_AABB [inline]
find_intersection(const GIM_AABB &other, GIM_AABB &intersection) const GIM_AABB [inline]
get_center_extend(btVector3 &center, btVector3 &extend) const GIM_AABB [inline]
GIM_AABB()GIM_AABB [inline]
GIM_AABB(const btVector3 &V1, const btVector3 &V2, const btVector3 &V3)GIM_AABB [inline]
GIM_AABB(const btVector3 &V1, const btVector3 &V2, const btVector3 &V3, GREAL margin)GIM_AABB [inline]
GIM_AABB(const GIM_AABB &other)GIM_AABB [inline]
GIM_AABB(const GIM_AABB &other, btScalar margin)GIM_AABB [inline]
has_collision(const GIM_AABB &other) const GIM_AABB [inline]
increment_margin(btScalar margin)GIM_AABB [inline]
invalidate()GIM_AABB [inline]
m_maxGIM_AABB
m_minGIM_AABB
merge(const GIM_AABB &box)GIM_AABB [inline]
merge_point(const CLASS_POINT &point)GIM_AABB [inline]
overlapping_trans_cache(const GIM_AABB &box, const GIM_BOX_BOX_TRANSFORM_CACHE &transcache, bool fulltest)GIM_AABB [inline]
overlapping_trans_conservative(const GIM_AABB &box, btTransform &trans1_to_0)GIM_AABB [inline]
plane_classify(const btVector4 &plane) const GIM_AABB [inline]
projection_interval(const btVector3 &direction, btScalar &vmin, btScalar &vmax) constGIM_AABB [inline]


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/class_g_i_m___a_a_b_b.html b/Extras/GIMPACT/docs/html/class_g_i_m___a_a_b_b.html new file mode 100755 index 000000000..263945014 --- /dev/null +++ b/Extras/GIMPACT/docs/html/class_g_i_m___a_a_b_b.html @@ -0,0 +1,806 @@ + + +GIMPACT: GIM_AABB Class Reference + + + + + + +

GIM_AABB Class Reference
+ +[BOUND_AABB_OPERATIONS] +

Axis aligned box. +More... +

+#include <gim_box_collision.h> +

+List of all members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

 GIM_AABB ()
 GIM_AABB (const btVector3 &V1, const btVector3 &V2, const btVector3 &V3)
 GIM_AABB (const btVector3 &V1, const btVector3 &V2, const btVector3 &V3, GREAL margin)
 GIM_AABB (const GIM_AABB &other)
 GIM_AABB (const GIM_AABB &other, btScalar margin)
SIMD_FORCE_INLINE void invalidate ()
SIMD_FORCE_INLINE void increment_margin (btScalar margin)
SIMD_FORCE_INLINE void copy_with_margin (const GIM_AABB &other, btScalar margin)
template<typename CLASS_POINT>
SIMD_FORCE_INLINE void calc_from_triangle (const CLASS_POINT &V1, const CLASS_POINT &V2, const CLASS_POINT &V3)
template<typename CLASS_POINT>
SIMD_FORCE_INLINE void calc_from_triangle_margin (const CLASS_POINT &V1, const CLASS_POINT &V2, const CLASS_POINT &V3, btScalar margin)
SIMD_FORCE_INLINE void appy_transform (const btTransform &trans)
 Apply a transform to an AABB.
SIMD_FORCE_INLINE void merge (const GIM_AABB &box)
 Merges a Box.
template<typename CLASS_POINT>
SIMD_FORCE_INLINE void merge_point (const CLASS_POINT &point)
 Merges a point.
SIMD_FORCE_INLINE void get_center_extend (btVector3 &center, btVector3 &extend) const
 Gets the extend and center.
SIMD_FORCE_INLINE void find_intersection (const GIM_AABB &other, GIM_AABB &intersection) const
 Finds the intersecting box between this box and the other.
SIMD_FORCE_INLINE bool has_collision (const GIM_AABB &other) const
SIMD_FORCE_INLINE bool collide_ray (const btVector3 &vorigin, const btVector3 &vdir)
 Finds the Ray intersection parameter.
SIMD_FORCE_INLINE void projection_interval (const btVector3 &direction, btScalar &vmin, btScalar &vmax) const
SIMD_FORCE_INLINE ePLANE_INTERSECTION_TYPE plane_classify (const btVector4 &plane) const
SIMD_FORCE_INLINE bool overlapping_trans_conservative (const GIM_AABB &box, btTransform &trans1_to_0)
SIMD_FORCE_INLINE bool overlapping_trans_cache (const GIM_AABB &box, const GIM_BOX_BOX_TRANSFORM_CACHE &transcache, bool fulltest)
 transcache is the transformation cache from box to this AABB
SIMD_FORCE_INLINE bool collide_plane (const btVector4 &plane)
 Simple test for planes.
SIMD_FORCE_INLINE bool collide_triangle_exact (const btVector3 &p1, const btVector3 &p2, const btVector3 &p3, const btVector4 &triangle_plane)
 test for a triangle, with edges

Public Attributes

btVector3 m_min
btVector3 m_max
+


Detailed Description

+Axis aligned box. +

+


Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
GIM_AABB::GIM_AABB (  )  [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GIM_AABB::GIM_AABB (const btVector3 &  V1,
const btVector3 &  V2,
const btVector3 &  V3 
) [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GIM_AABB::GIM_AABB (const btVector3 &  V1,
const btVector3 &  V2,
const btVector3 &  V3,
GREAL  margin 
) [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
GIM_AABB::GIM_AABB (const GIM_AABB other  )  [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
GIM_AABB::GIM_AABB (const GIM_AABB other,
btScalar  margin 
) [inline]
+
+
+ +

+ +

+

+


Member Function Documentation

+ +
+
+ + + + + + + + +
SIMD_FORCE_INLINE void GIM_AABB::invalidate (  )  [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
SIMD_FORCE_INLINE void GIM_AABB::increment_margin (btScalar  margin  )  [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE void GIM_AABB::copy_with_margin (const GIM_AABB other,
btScalar  margin 
) [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename CLASS_POINT>
+ + + + + + + + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE void GIM_AABB::calc_from_triangle (const CLASS_POINT &  V1,
const CLASS_POINT &  V2,
const CLASS_POINT &  V3 
) [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename CLASS_POINT>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE void GIM_AABB::calc_from_triangle_margin (const CLASS_POINT &  V1,
const CLASS_POINT &  V2,
const CLASS_POINT &  V3,
btScalar  margin 
) [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
SIMD_FORCE_INLINE void GIM_AABB::appy_transform (const btTransform &  trans  )  [inline]
+
+
+ +

+Apply a transform to an AABB. +

+ +

+

+ +

+
+ + + + + + + + + +
SIMD_FORCE_INLINE void GIM_AABB::merge (const GIM_AABB box  )  [inline]
+
+
+ +

+Merges a Box. +

+ +

+

+ +

+
+
+template<typename CLASS_POINT>
+ + + + + + + + + +
SIMD_FORCE_INLINE void GIM_AABB::merge_point (const CLASS_POINT &  point  )  [inline]
+
+
+ +

+Merges a point. +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE void GIM_AABB::get_center_extend (btVector3 &  center,
btVector3 &  extend 
) const [inline]
+
+
+ +

+Gets the extend and center. +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE void GIM_AABB::find_intersection (const GIM_AABB other,
GIM_AABB intersection 
) const [inline]
+
+
+ +

+Finds the intersecting box between this box and the other. +

+ +

+

+ +

+
+ + + + + + + + + +
SIMD_FORCE_INLINE bool GIM_AABB::has_collision (const GIM_AABB other  )  const [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE bool GIM_AABB::collide_ray (const btVector3 &  vorigin,
const btVector3 &  vdir 
) [inline]
+
+
+ +

+Finds the Ray intersection parameter. +

+

Parameters:
+ + + + +
aabb Aligned box
vorigin A vec3f with the origin of the ray
vdir A vec3f with the direction of the ray
+
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE void GIM_AABB::projection_interval (const btVector3 &  direction,
btScalar &  vmin,
btScalar &  vmax 
) const [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
SIMD_FORCE_INLINE ePLANE_INTERSECTION_TYPE GIM_AABB::plane_classify (const btVector4 &  plane  )  const [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE bool GIM_AABB::overlapping_trans_conservative (const GIM_AABB box,
btTransform &  trans1_to_0 
) [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE bool GIM_AABB::overlapping_trans_cache (const GIM_AABB box,
const GIM_BOX_BOX_TRANSFORM_CACHE transcache,
bool  fulltest 
) [inline]
+
+
+ +

+transcache is the transformation cache from box to this AABB +

+ +

+

+ +

+
+ + + + + + + + + +
SIMD_FORCE_INLINE bool GIM_AABB::collide_plane (const btVector4 &  plane  )  [inline]
+
+
+ +

+Simple test for planes. +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE bool GIM_AABB::collide_triangle_exact (const btVector3 &  p1,
const btVector3 &  p2,
const btVector3 &  p3,
const btVector4 &  triangle_plane 
) [inline]
+
+
+ +

+test for a triangle, with edges +

+ +

+

+


Member Data Documentation

+ +
+
+ + + + +
btVector3 GIM_AABB::m_min
+
+
+ +

+ +

+

+ +

+
+ + + + +
btVector3 GIM_AABB::m_max
+
+
+ +

+ +

+

+


The documentation for this class was generated from the following file: +
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/class_g_i_m___b_o_x___b_o_x___t_r_a_n_s_f_o_r_m___c_a_c_h_e-members.html b/Extras/GIMPACT/docs/html/class_g_i_m___b_o_x___b_o_x___t_r_a_n_s_f_o_r_m___c_a_c_h_e-members.html new file mode 100755 index 000000000..4830d9cee --- /dev/null +++ b/Extras/GIMPACT/docs/html/class_g_i_m___b_o_x___b_o_x___t_r_a_n_s_f_o_r_m___c_a_c_h_e-members.html @@ -0,0 +1,37 @@ + + +GIMPACT: Member List + + + + + + +

GIM_BOX_BOX_TRANSFORM_CACHE Member List

This is the complete list of members for GIM_BOX_BOX_TRANSFORM_CACHE, including all inherited members.

+ + + + + + + + + +
calc_absolute_matrix()GIM_BOX_BOX_TRANSFORM_CACHE [inline]
calc_from_full_invert(const btTransform &trans0, const btTransform &trans1)GIM_BOX_BOX_TRANSFORM_CACHE [inline]
calc_from_homogenic(const btTransform &trans0, const btTransform &trans1)GIM_BOX_BOX_TRANSFORM_CACHE [inline]
GIM_BOX_BOX_TRANSFORM_CACHE()GIM_BOX_BOX_TRANSFORM_CACHE [inline]
GIM_BOX_BOX_TRANSFORM_CACHE(mat4f trans1_to_0)GIM_BOX_BOX_TRANSFORM_CACHE [inline]
m_ARGIM_BOX_BOX_TRANSFORM_CACHE
m_R1to0GIM_BOX_BOX_TRANSFORM_CACHE
m_T1to0GIM_BOX_BOX_TRANSFORM_CACHE
transform(const btVector3 &point)GIM_BOX_BOX_TRANSFORM_CACHE [inline]


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/class_g_i_m___b_o_x___b_o_x___t_r_a_n_s_f_o_r_m___c_a_c_h_e.html b/Extras/GIMPACT/docs/html/class_g_i_m___b_o_x___b_o_x___t_r_a_n_s_f_o_r_m___c_a_c_h_e.html new file mode 100755 index 000000000..ca8bf6c38 --- /dev/null +++ b/Extras/GIMPACT/docs/html/class_g_i_m___b_o_x___b_o_x___t_r_a_n_s_f_o_r_m___c_a_c_h_e.html @@ -0,0 +1,262 @@ + + +GIMPACT: GIM_BOX_BOX_TRANSFORM_CACHE Class Reference + + + + + + +

GIM_BOX_BOX_TRANSFORM_CACHE Class Reference
+ +[BOUND_AABB_OPERATIONS] +

Class for transforming a model1 to the space of model0. +More... +

+#include <gim_box_collision.h> +

+List of all members. + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

SIMD_FORCE_INLINE void calc_absolute_matrix ()
 GIM_BOX_BOX_TRANSFORM_CACHE ()
 GIM_BOX_BOX_TRANSFORM_CACHE (mat4f trans1_to_0)
SIMD_FORCE_INLINE void calc_from_homogenic (const btTransform &trans0, const btTransform &trans1)
 Calc the transformation relative 1 to 0. Inverts matrics by transposing.
SIMD_FORCE_INLINE void calc_from_full_invert (const btTransform &trans0, const btTransform &trans1)
 Calcs the full invertion of the matrices. Useful for scaling matrices.
SIMD_FORCE_INLINE btVector3 transform (const btVector3 &point)

Public Attributes

btVector3 m_T1to0
 Transforms translation of model1 to model 0.
btMatrix3x3 m_R1to0
 Transforms Rotation of model1 to model 0, equal to R0' * R1.
btMatrix3x3 m_AR
 Absolute value of m_R1to0.
+


Detailed Description

+Class for transforming a model1 to the space of model0. +

+


Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
GIM_BOX_BOX_TRANSFORM_CACHE::GIM_BOX_BOX_TRANSFORM_CACHE (  )  [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
GIM_BOX_BOX_TRANSFORM_CACHE::GIM_BOX_BOX_TRANSFORM_CACHE (mat4f  trans1_to_0  )  [inline]
+
+
+ +

+ +

+

+


Member Function Documentation

+ +
+
+ + + + + + + + +
SIMD_FORCE_INLINE void GIM_BOX_BOX_TRANSFORM_CACHE::calc_absolute_matrix (  )  [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE void GIM_BOX_BOX_TRANSFORM_CACHE::calc_from_homogenic (const btTransform &  trans0,
const btTransform &  trans1 
) [inline]
+
+
+ +

+Calc the transformation relative 1 to 0. Inverts matrics by transposing. +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE void GIM_BOX_BOX_TRANSFORM_CACHE::calc_from_full_invert (const btTransform &  trans0,
const btTransform &  trans1 
) [inline]
+
+
+ +

+Calcs the full invertion of the matrices. Useful for scaling matrices. +

+ +

+

+ +

+
+ + + + + + + + + +
SIMD_FORCE_INLINE btVector3 GIM_BOX_BOX_TRANSFORM_CACHE::transform (const btVector3 &  point  )  [inline]
+
+
+ +

+ +

+

+


Member Data Documentation

+ +
+ +
+ +

+Transforms translation of model1 to model 0. +

+ +

+

+ +

+
+ + + + +
btMatrix3x3 GIM_BOX_BOX_TRANSFORM_CACHE::m_R1to0
+
+
+ +

+Transforms Rotation of model1 to model 0, equal to R0' * R1. +

+ +

+

+ +

+
+ + + + +
btMatrix3x3 GIM_BOX_BOX_TRANSFORM_CACHE::m_AR
+
+
+ +

+Absolute value of m_R1to0. +

+ +

+

+


The documentation for this class was generated from the following file: +
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/class_g_i_m___b_o_x___t_r_e_e-members.html b/Extras/GIMPACT/docs/html/class_g_i_m___b_o_x___t_r_e_e-members.html new file mode 100755 index 000000000..6dca38737 --- /dev/null +++ b/Extras/GIMPACT/docs/html/class_g_i_m___b_o_x___t_r_e_e-members.html @@ -0,0 +1,44 @@ + + +GIMPACT: Member List + + + + + + +

GIM_BOX_TREE Member List

This is the complete list of members for GIM_BOX_TREE, including all inherited members.

+ + + + + + + + + + + + + + + + +
_build_sub_tree(gim_array< GIM_AABB_DATA > &primitive_boxes, GUINT startIndex, GUINT endIndex)GIM_BOX_TREE [protected]
_calc_splitting_axis(gim_array< GIM_AABB_DATA > &primitive_boxes, GUINT startIndex, GUINT endIndex)GIM_BOX_TREE [protected]
_sort_and_calc_splitting_index(gim_array< GIM_AABB_DATA > &primitive_boxes, GUINT startIndex, GUINT endIndex, GUINT splitAxis)GIM_BOX_TREE [protected]
build_tree(gim_array< GIM_AABB_DATA > &primitive_boxes)GIM_BOX_TREE
clearNodes()GIM_BOX_TREE [inline]
getLeftNodeIndex(GUINT nodeindex) const GIM_BOX_TREE [inline]
getNodeBound(GUINT nodeindex, GIM_AABB &bound) const GIM_BOX_TREE [inline]
getNodeCount() constGIM_BOX_TREE [inline]
getNodeData(GUINT nodeindex) const GIM_BOX_TREE [inline]
getRightNodeIndex(GUINT nodeindex) const GIM_BOX_TREE [inline]
getScapeNodeIndex(GUINT nodeindex) const GIM_BOX_TREE [inline]
GIM_BOX_TREE()GIM_BOX_TREE [inline]
isLeafNode(GUINT nodeindex) const GIM_BOX_TREE [inline]
m_node_arrayGIM_BOX_TREE [protected]
m_num_nodesGIM_BOX_TREE [protected]
setNodeBound(GUINT nodeindex, const GIM_AABB &bound)GIM_BOX_TREE [inline]


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/class_g_i_m___b_o_x___t_r_e_e.html b/Extras/GIMPACT/docs/html/class_g_i_m___b_o_x___t_r_e_e.html new file mode 100755 index 000000000..5a9c504c1 --- /dev/null +++ b/Extras/GIMPACT/docs/html/class_g_i_m___b_o_x___t_r_e_e.html @@ -0,0 +1,97 @@ + + +GIMPACT: GIM_BOX_TREE Class Reference + + + + + + +

GIM_BOX_TREE Class Reference
+ +[BOX_PRUNNING] +

Basic Box tree structure. +More... +

+#include <gim_box_set.h> +

+List of all members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

 GIM_BOX_TREE ()
void build_tree (gim_array< GIM_AABB_DATA > &primitive_boxes)
SIMD_FORCE_INLINE void clearNodes ()
SIMD_FORCE_INLINE GUINT getNodeCount () const
 node count
SIMD_FORCE_INLINE bool isLeafNode (GUINT nodeindex) const
 tells if the node is a leaf
SIMD_FORCE_INLINE GUINT getNodeData (GUINT nodeindex) const
SIMD_FORCE_INLINE void getNodeBound (GUINT nodeindex, GIM_AABB &bound) const
SIMD_FORCE_INLINE void setNodeBound (GUINT nodeindex, const GIM_AABB &bound)
SIMD_FORCE_INLINE GUINT getLeftNodeIndex (GUINT nodeindex) const
SIMD_FORCE_INLINE GUINT getRightNodeIndex (GUINT nodeindex) const
SIMD_FORCE_INLINE GUINT getScapeNodeIndex (GUINT nodeindex) const

Protected Member Functions

GUINT _sort_and_calc_splitting_index (gim_array< GIM_AABB_DATA > &primitive_boxes, GUINT startIndex, GUINT endIndex, GUINT splitAxis)
GUINT _calc_splitting_axis (gim_array< GIM_AABB_DATA > &primitive_boxes, GUINT startIndex, GUINT endIndex)
void _build_sub_tree (gim_array< GIM_AABB_DATA > &primitive_boxes, GUINT startIndex, GUINT endIndex)

Protected Attributes

GUINT m_num_nodes
gim_array< GIM_BOX_TREE_NODEm_node_array
+


Detailed Description

+Basic Box tree structure. +

+


Member Data Documentation

+ +
+
+ + + + +
GUINT GIM_BOX_TREE::m_num_nodes [protected]
+
+
+ +

+ +

+

+


The documentation for this class was generated from the following file:
    +
  • C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_box_set.h
+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/class_g_i_m___b_o_x___t_r_e_e___s_e_t-members.html b/Extras/GIMPACT/docs/html/class_g_i_m___b_o_x___t_r_e_e___s_e_t-members.html new file mode 100755 index 000000000..0cdeb6b95 --- /dev/null +++ b/Extras/GIMPACT/docs/html/class_g_i_m___b_o_x___t_r_e_e___s_e_t-members.html @@ -0,0 +1,52 @@ + + +GIMPACT: Member List + + + + + + +

GIM_BOX_TREE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE > Member List

This is the complete list of members for GIM_BOX_TREE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE >, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + +
boxQuery(const GIM_AABB &box, gim_array< GUINT > &collided_results) const GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, GIM_BOX_TREE > [inline]
boxQueryTrans(const GIM_AABB &box, const btTransform &transform, gim_array< GUINT > &collided_results) constGIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, GIM_BOX_TREE > [inline]
buildSet()GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, GIM_BOX_TREE > [inline]
getGlobalBox() constGIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, GIM_BOX_TREE > [inline]
getLeftNodeIndex(GUINT nodeindex) const GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, GIM_BOX_TREE > [inline]
getNodeBound(GUINT nodeindex, GIM_AABB &bound) const GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, GIM_BOX_TREE > [inline]
getNodeCount() constGIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, GIM_BOX_TREE > [inline]
getNodeData(GUINT nodeindex) const GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, GIM_BOX_TREE > [inline]
getNodeTriangle(GUINT nodeindex, GIM_TRIANGLE &triangle) const GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, GIM_BOX_TREE > [inline]
getPrimitiveManager() constGIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, GIM_BOX_TREE > [inline]
getPrimitiveManager()GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, GIM_BOX_TREE > [inline]
getRightNodeIndex(GUINT nodeindex) const GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, GIM_BOX_TREE > [inline]
getScapeNodeIndex(GUINT nodeindex) const GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, GIM_BOX_TREE > [inline]
GIM_BOX_TREE_TEMPLATE_SET()GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, GIM_BOX_TREE > [inline]
hasHierarchy() constGIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, GIM_BOX_TREE > [inline]
isLeafNode(GUINT nodeindex) const GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, GIM_BOX_TREE > [inline]
isTrimesh() constGIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, GIM_BOX_TREE > [inline]
m_box_treeGIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, GIM_BOX_TREE > [protected]
m_primitive_managerGIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, GIM_BOX_TREE > [protected]
rayQuery(const btVector3 &ray_dir, const btVector3 &ray_origin, gim_array< GUINT > &collided_results) constGIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, GIM_BOX_TREE > [inline]
refit()GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, GIM_BOX_TREE > [inline, protected]
setNodeBound(GUINT nodeindex, const GIM_AABB &bound)GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, GIM_BOX_TREE > [inline]
setPrimitiveManager(const _GIM_PRIMITIVE_MANAGER_PROTOTYPE &primitive_manager)GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, GIM_BOX_TREE > [inline]
update()GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, GIM_BOX_TREE > [inline]


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/class_g_i_m___b_o_x___t_r_e_e___s_e_t.html b/Extras/GIMPACT/docs/html/class_g_i_m___b_o_x___t_r_e_e___s_e_t.html new file mode 100755 index 000000000..ee4f82e1c --- /dev/null +++ b/Extras/GIMPACT/docs/html/class_g_i_m___b_o_x___t_r_e_e___s_e_t.html @@ -0,0 +1,53 @@ + + +GIMPACT: GIM_BOX_TREE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE > Class Template Reference + + + + + + +

GIM_BOX_TREE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE > Class Template Reference
+ +[BOX_PRUNNING] +

Class for Box Tree Sets. +More... +

+#include <gim_box_set.h> +

+

Inheritance diagram for GIM_BOX_TREE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE >: +

+ +GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, GIM_BOX_TREE > + +List of all members. + +
+

Detailed Description

+

template<typename _GIM_PRIMITIVE_MANAGER_PROTOTYPE>
+ class GIM_BOX_TREE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE >

+ +Class for Box Tree Sets. +

+this has the GIM_BOX_TREE implementation for bounding boxes. +

+


The documentation for this class was generated from the following file:
    +
  • C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_box_set.h
+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/class_g_i_m___b_o_x___t_r_e_e___s_e_t.png b/Extras/GIMPACT/docs/html/class_g_i_m___b_o_x___t_r_e_e___s_e_t.png new file mode 100755 index 000000000..f2ac82972 Binary files /dev/null and b/Extras/GIMPACT/docs/html/class_g_i_m___b_o_x___t_r_e_e___s_e_t.png differ diff --git a/Extras/GIMPACT/docs/html/class_g_i_m___b_o_x___t_r_e_e___t_e_m_p_l_a_t_e___s_e_t-members.html b/Extras/GIMPACT/docs/html/class_g_i_m___b_o_x___t_r_e_e___t_e_m_p_l_a_t_e___s_e_t-members.html new file mode 100755 index 000000000..d69920c51 --- /dev/null +++ b/Extras/GIMPACT/docs/html/class_g_i_m___b_o_x___t_r_e_e___t_e_m_p_l_a_t_e___s_e_t-members.html @@ -0,0 +1,52 @@ + + +GIMPACT: Member List + + + + + + +

GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE > Member List

This is the complete list of members for GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE >, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + +
boxQuery(const GIM_AABB &box, gim_array< GUINT > &collided_results) const GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE > [inline]
boxQueryTrans(const GIM_AABB &box, const btTransform &transform, gim_array< GUINT > &collided_results) constGIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE > [inline]
buildSet()GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE > [inline]
getGlobalBox() constGIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE > [inline]
getLeftNodeIndex(GUINT nodeindex) const GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE > [inline]
getNodeBound(GUINT nodeindex, GIM_AABB &bound) const GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE > [inline]
getNodeCount() constGIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE > [inline]
getNodeData(GUINT nodeindex) const GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE > [inline]
getNodeTriangle(GUINT nodeindex, GIM_TRIANGLE &triangle) const GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE > [inline]
getPrimitiveManager() constGIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE > [inline]
getPrimitiveManager()GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE > [inline]
getRightNodeIndex(GUINT nodeindex) const GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE > [inline]
getScapeNodeIndex(GUINT nodeindex) const GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE > [inline]
GIM_BOX_TREE_TEMPLATE_SET()GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE > [inline]
hasHierarchy() constGIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE > [inline]
isLeafNode(GUINT nodeindex) const GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE > [inline]
isTrimesh() constGIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE > [inline]
m_box_treeGIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE > [protected]
m_primitive_managerGIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE > [protected]
rayQuery(const btVector3 &ray_dir, const btVector3 &ray_origin, gim_array< GUINT > &collided_results) constGIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE > [inline]
refit()GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE > [inline, protected]
setNodeBound(GUINT nodeindex, const GIM_AABB &bound)GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE > [inline]
setPrimitiveManager(const _GIM_PRIMITIVE_MANAGER_PROTOTYPE &primitive_manager)GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE > [inline]
update()GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE > [inline]


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/class_g_i_m___b_o_x___t_r_e_e___t_e_m_p_l_a_t_e___s_e_t.html b/Extras/GIMPACT/docs/html/class_g_i_m___b_o_x___t_r_e_e___t_e_m_p_l_a_t_e___s_e_t.html new file mode 100755 index 000000000..fdf0d77e5 --- /dev/null +++ b/Extras/GIMPACT/docs/html/class_g_i_m___b_o_x___t_r_e_e___t_e_m_p_l_a_t_e___s_e_t.html @@ -0,0 +1,127 @@ + + +GIMPACT: GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE > Class Template Reference + + + + + + +

GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE > Class Template Reference
+ +[BOX_PRUNNING] +

Generic Box Tree Template. +More... +

+#include <gim_box_set.h> +

+List of all members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

 GIM_BOX_TREE_TEMPLATE_SET ()
SIMD_FORCE_INLINE GIM_AABB getGlobalBox () const
SIMD_FORCE_INLINE void setPrimitiveManager (const _GIM_PRIMITIVE_MANAGER_PROTOTYPE &primitive_manager)
const _GIM_PRIMITIVE_MANAGER_PROTOTYPE & getPrimitiveManager () const
_GIM_PRIMITIVE_MANAGER_PROTOTYPE & getPrimitiveManager ()
SIMD_FORCE_INLINE void update ()
 this attemps to refit the box set.
SIMD_FORCE_INLINE void buildSet ()
 this rebuild the entire set
SIMD_FORCE_INLINE bool boxQuery (const GIM_AABB &box, gim_array< GUINT > &collided_results) const
 returns the indices of the primitives in the m_primitive_manager
SIMD_FORCE_INLINE bool boxQueryTrans (const GIM_AABB &box, const btTransform &transform, gim_array< GUINT > &collided_results) const
 returns the indices of the primitives in the m_primitive_manager
SIMD_FORCE_INLINE bool rayQuery (const btVector3 &ray_dir, const btVector3 &ray_origin, gim_array< GUINT > &collided_results) const
 returns the indices of the primitives in the m_primitive_manager
SIMD_FORCE_INLINE bool hasHierarchy () const
 tells if this set has hierarcht
SIMD_FORCE_INLINE bool isTrimesh () const
 tells if this set is a trimesh
SIMD_FORCE_INLINE GUINT getNodeCount () const
 node count
SIMD_FORCE_INLINE bool isLeafNode (GUINT nodeindex) const
 tells if the node is a leaf
SIMD_FORCE_INLINE GUINT getNodeData (GUINT nodeindex) const
SIMD_FORCE_INLINE void getNodeBound (GUINT nodeindex, GIM_AABB &bound) const
SIMD_FORCE_INLINE void setNodeBound (GUINT nodeindex, const GIM_AABB &bound)
SIMD_FORCE_INLINE GUINT getLeftNodeIndex (GUINT nodeindex) const
SIMD_FORCE_INLINE GUINT getRightNodeIndex (GUINT nodeindex) const
SIMD_FORCE_INLINE GUINT getScapeNodeIndex (GUINT nodeindex) const
SIMD_FORCE_INLINE void getNodeTriangle (GUINT nodeindex, GIM_TRIANGLE &triangle) const

Protected Member Functions

SIMD_FORCE_INLINE void refit ()

Protected Attributes

_GIM_PRIMITIVE_MANAGER_PROTOTYPE m_primitive_manager
_GIM_BOX_TREE_PROTOTYPE m_box_tree
+


Detailed Description

+

template<typename _GIM_PRIMITIVE_MANAGER_PROTOTYPE, typename _GIM_BOX_TREE_PROTOTYPE>
+ class GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE >

+ +Generic Box Tree Template. +

+This class offers an structure for managing a box tree of primitives. Requires a Primitive prototype (like GIM_PRIMITIVE_MANAGER_PROTOTYPE ) and a Box tree structure ( like GIM_BOX_TREE). +

+


Member Data Documentation

+ +
+
+
+template<typename _GIM_PRIMITIVE_MANAGER_PROTOTYPE, typename _GIM_BOX_TREE_PROTOTYPE>
+ + + + +
_GIM_PRIMITIVE_MANAGER_PROTOTYPE GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE >::m_primitive_manager [protected]
+
+
+ +

+ +

+

+


The documentation for this class was generated from the following file:
    +
  • C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_box_set.h
+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/class_g_i_m___c_o_n_t_a_c_t-members.html b/Extras/GIMPACT/docs/html/class_g_i_m___c_o_n_t_a_c_t-members.html new file mode 100755 index 000000000..72db31b03 --- /dev/null +++ b/Extras/GIMPACT/docs/html/class_g_i_m___c_o_n_t_a_c_t-members.html @@ -0,0 +1,39 @@ + + +GIMPACT: Member List + + + + + + +

GIM_CONTACT Member List

This is the complete list of members for GIM_CONTACT, including all inherited members.

+ + + + + + + + + + + +
calc_key_contact() constGIM_CONTACT [inline]
GIM_CONTACT()GIM_CONTACT [inline]
GIM_CONTACT(const GIM_CONTACT &contact)GIM_CONTACT [inline]
GIM_CONTACT(const btVector3 &point, const btVector3 &normal, GREAL depth, GUINT feature1, GUINT feature2)GIM_CONTACT [inline]
interpolate_normals(btVector3 *normals, GUINT normal_count)GIM_CONTACT [inline]
m_depthGIM_CONTACT
m_distanceGIM_CONTACT
m_feature1GIM_CONTACT
m_feature2GIM_CONTACT
m_normalGIM_CONTACT
m_pointGIM_CONTACT


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/class_g_i_m___c_o_n_t_a_c_t.html b/Extras/GIMPACT/docs/html/class_g_i_m___c_o_n_t_a_c_t.html new file mode 100755 index 000000000..d96f2d194 --- /dev/null +++ b/Extras/GIMPACT/docs/html/class_g_i_m___c_o_n_t_a_c_t.html @@ -0,0 +1,297 @@ + + +GIMPACT: GIM_CONTACT Class Reference + + + + + + +

GIM_CONTACT Class Reference
+ +[CONTACTS] +

Structure for collision results. +More... +

+#include <gim_contact.h> +

+List of all members. + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

 GIM_CONTACT ()
 GIM_CONTACT (const GIM_CONTACT &contact)
 GIM_CONTACT (const btVector3 &point, const btVector3 &normal, GREAL depth, GUINT feature1, GUINT feature2)
SIMD_FORCE_INLINE GUINT calc_key_contact () const
 Calcs key for coord classification.
SIMD_FORCE_INLINE void interpolate_normals (btVector3 *normals, GUINT normal_count)

Public Attributes

btVector3 m_point
btVector3 m_normal
GREAL m_depth
GREAL m_distance
GUINT m_feature1
GUINT m_feature2
+


Detailed Description

+Structure for collision results. +

+


Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
GIM_CONTACT::GIM_CONTACT (  )  [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
GIM_CONTACT::GIM_CONTACT (const GIM_CONTACT contact  )  [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GIM_CONTACT::GIM_CONTACT (const btVector3 &  point,
const btVector3 &  normal,
GREAL  depth,
GUINT  feature1,
GUINT  feature2 
) [inline]
+
+
+ +

+ +

+

+


Member Function Documentation

+ +
+
+ + + + + + + + +
SIMD_FORCE_INLINE GUINT GIM_CONTACT::calc_key_contact (  )  const [inline]
+
+
+ +

+Calcs key for coord classification. +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE void GIM_CONTACT::interpolate_normals (btVector3 *  normals,
GUINT  normal_count 
) [inline]
+
+
+ +

+ +

+

+


Member Data Documentation

+ +
+
+ + + + +
btVector3 GIM_CONTACT::m_point
+
+
+ +

+ +

+

+ +

+
+ + + + +
btVector3 GIM_CONTACT::m_normal
+
+
+ +

+ +

+

+ +

+
+ + + + +
GREAL GIM_CONTACT::m_depth
+
+
+ +

+ +

+

+ +

+
+ + + + +
GREAL GIM_CONTACT::m_distance
+
+
+ +

+ +

+

+ +

+
+ + + + +
GUINT GIM_CONTACT::m_feature1
+
+
+ +

+ +

+

+ +

+
+ + + + +
GUINT GIM_CONTACT::m_feature2
+
+
+ +

+ +

+

+


The documentation for this class was generated from the following file:
    +
  • C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_contact.h
+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/class_g_i_m___h_a_s_h___n_o_d_e___c_m_p___k_e_y___m_a_c_r_o-members.html b/Extras/GIMPACT/docs/html/class_g_i_m___h_a_s_h___n_o_d_e___c_m_p___k_e_y___m_a_c_r_o-members.html new file mode 100755 index 000000000..c74a27f0c --- /dev/null +++ b/Extras/GIMPACT/docs/html/class_g_i_m___h_a_s_h___n_o_d_e___c_m_p___k_e_y___m_a_c_r_o-members.html @@ -0,0 +1,29 @@ + + +GIMPACT: Member List + + + + + + +

GIM_HASH_NODE_CMP_KEY_MACRO Member List

This is the complete list of members for GIM_HASH_NODE_CMP_KEY_MACRO, including all inherited members.

+ +
operator()(const T &a, GUINT key)GIM_HASH_NODE_CMP_KEY_MACRO [inline]


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/class_g_i_m___h_a_s_h___n_o_d_e___c_m_p___k_e_y___m_a_c_r_o.html b/Extras/GIMPACT/docs/html/class_g_i_m___h_a_s_h___n_o_d_e___c_m_p___k_e_y___m_a_c_r_o.html new file mode 100755 index 000000000..b354d3c90 --- /dev/null +++ b/Extras/GIMPACT/docs/html/class_g_i_m___h_a_s_h___n_o_d_e___c_m_p___k_e_y___m_a_c_r_o.html @@ -0,0 +1,79 @@ + + +GIMPACT: GIM_HASH_NODE_CMP_KEY_MACRO Class Reference + + + + + + +

GIM_HASH_NODE_CMP_KEY_MACRO Class Reference
+ +[CONTAINERS] +

Macro for comparing the key and the element. +More... +

+#include <gim_hash_table.h> +

+List of all members. + + + + + +

Public Member Functions

template<class T>
int operator() (const T &a, GUINT key)
+


Detailed Description

+Macro for comparing the key and the element. +

+


Member Function Documentation

+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
int GIM_HASH_NODE_CMP_KEY_MACRO::operator() (const T &  a,
GUINT  key 
) [inline]
+
+
+ +

+ +

+

+


The documentation for this class was generated from the following file: +
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/class_g_i_m___h_a_s_h___n_o_d_e___c_m_p___m_a_c_r_o-members.html b/Extras/GIMPACT/docs/html/class_g_i_m___h_a_s_h___n_o_d_e___c_m_p___m_a_c_r_o-members.html new file mode 100755 index 000000000..49c017f69 --- /dev/null +++ b/Extras/GIMPACT/docs/html/class_g_i_m___h_a_s_h___n_o_d_e___c_m_p___m_a_c_r_o-members.html @@ -0,0 +1,29 @@ + + +GIMPACT: Member List + + + + + + +

GIM_HASH_NODE_CMP_MACRO Member List

This is the complete list of members for GIM_HASH_NODE_CMP_MACRO, including all inherited members.

+ +
operator()(const T &a, const T &b)GIM_HASH_NODE_CMP_MACRO [inline]


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/class_g_i_m___h_a_s_h___n_o_d_e___c_m_p___m_a_c_r_o.html b/Extras/GIMPACT/docs/html/class_g_i_m___h_a_s_h___n_o_d_e___c_m_p___m_a_c_r_o.html new file mode 100755 index 000000000..05cf898ad --- /dev/null +++ b/Extras/GIMPACT/docs/html/class_g_i_m___h_a_s_h___n_o_d_e___c_m_p___m_a_c_r_o.html @@ -0,0 +1,79 @@ + + +GIMPACT: GIM_HASH_NODE_CMP_MACRO Class Reference + + + + + + +

GIM_HASH_NODE_CMP_MACRO Class Reference
+ +[CONTAINERS] +

Macro for comparing Hash nodes. +More... +

+#include <gim_hash_table.h> +

+List of all members. + + + + + +

Public Member Functions

template<class T>
int operator() (const T &a, const T &b)
+


Detailed Description

+Macro for comparing Hash nodes. +

+


Member Function Documentation

+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
int GIM_HASH_NODE_CMP_MACRO::operator() (const T &  a,
const T &  b 
) [inline]
+
+
+ +

+ +

+

+


The documentation for this class was generated from the following file: +
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/class_g_i_m___h_a_s_h___n_o_d_e___g_e_t___k_e_y-members.html b/Extras/GIMPACT/docs/html/class_g_i_m___h_a_s_h___n_o_d_e___g_e_t___k_e_y-members.html new file mode 100755 index 000000000..afe6db67c --- /dev/null +++ b/Extras/GIMPACT/docs/html/class_g_i_m___h_a_s_h___n_o_d_e___g_e_t___k_e_y-members.html @@ -0,0 +1,29 @@ + + +GIMPACT: Member List + + + + + + +

GIM_HASH_NODE_GET_KEY Member List

This is the complete list of members for GIM_HASH_NODE_GET_KEY, including all inherited members.

+ +
operator()(const T &a)GIM_HASH_NODE_GET_KEY [inline]


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/class_g_i_m___h_a_s_h___n_o_d_e___g_e_t___k_e_y.html b/Extras/GIMPACT/docs/html/class_g_i_m___h_a_s_h___n_o_d_e___g_e_t___k_e_y.html new file mode 100755 index 000000000..085942cef --- /dev/null +++ b/Extras/GIMPACT/docs/html/class_g_i_m___h_a_s_h___n_o_d_e___g_e_t___k_e_y.html @@ -0,0 +1,70 @@ + + +GIMPACT: GIM_HASH_NODE_GET_KEY Class Reference + + + + + + +

GIM_HASH_NODE_GET_KEY Class Reference
+ +[CONTAINERS] +

Macro for getting the key. +More... +

+#include <gim_hash_table.h> +

+List of all members. + + + + + +

Public Member Functions

template<class T>
GUINT operator() (const T &a)
+


Detailed Description

+Macro for getting the key. +

+


Member Function Documentation

+ +
+
+
+template<class T>
+ + + + + + + + + +
GUINT GIM_HASH_NODE_GET_KEY::operator() (const T &  a  )  [inline]
+
+
+ +

+ +

+

+


The documentation for this class was generated from the following file: +
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/class_g_i_m___p_r_i_m_i_t_i_v_e___m_a_n_a_g_e_r___p_r_o_t_o_t_y_p_e-members.html b/Extras/GIMPACT/docs/html/class_g_i_m___p_r_i_m_i_t_i_v_e___m_a_n_a_g_e_r___p_r_o_t_o_t_y_p_e-members.html new file mode 100755 index 000000000..384c094ea --- /dev/null +++ b/Extras/GIMPACT/docs/html/class_g_i_m___p_r_i_m_i_t_i_v_e___m_a_n_a_g_e_r___p_r_o_t_o_t_y_p_e-members.html @@ -0,0 +1,32 @@ + + +GIMPACT: Member List + + + + + + +

GIM_PRIMITIVE_MANAGER_PROTOTYPE Member List

This is the complete list of members for GIM_PRIMITIVE_MANAGER_PROTOTYPE, including all inherited members.

+ + + + +
get_primitive_box(GUINT prim_index, GIM_AABB &primbox)=0GIM_PRIMITIVE_MANAGER_PROTOTYPE [pure virtual]
get_primitive_count()=0GIM_PRIMITIVE_MANAGER_PROTOTYPE [pure virtual]
get_primitive_triangle(GUINT prim_index, GIM_TRIANGLE &triangle)=0GIM_PRIMITIVE_MANAGER_PROTOTYPE [pure virtual]
is_trimesh()=0GIM_PRIMITIVE_MANAGER_PROTOTYPE [pure virtual]


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/class_g_i_m___p_r_i_m_i_t_i_v_e___m_a_n_a_g_e_r___p_r_o_t_o_t_y_p_e.html b/Extras/GIMPACT/docs/html/class_g_i_m___p_r_i_m_i_t_i_v_e___m_a_n_a_g_e_r___p_r_o_t_o_t_y_p_e.html new file mode 100755 index 000000000..cedcd6ff9 --- /dev/null +++ b/Extras/GIMPACT/docs/html/class_g_i_m___p_r_i_m_i_t_i_v_e___m_a_n_a_g_e_r___p_r_o_t_o_t_y_p_e.html @@ -0,0 +1,77 @@ + + +GIMPACT: GIM_PRIMITIVE_MANAGER_PROTOTYPE Class Reference + + + + + + +

GIM_PRIMITIVE_MANAGER_PROTOTYPE Class Reference
+ +[BOX_PRUNNING] +

Prototype Base class for primitive classification. +More... +

+#include <gim_box_set.h> +

+List of all members. + + + + + + + + + + + +

Public Member Functions

virtual bool is_trimesh ()=0
 determines if this manager consist on only triangles, which special case will be optimized
virtual GUINT get_primitive_count ()=0
virtual void get_primitive_box (GUINT prim_index, GIM_AABB &primbox)=0
virtual void get_primitive_triangle (GUINT prim_index, GIM_TRIANGLE &triangle)=0
+


Detailed Description

+Prototype Base class for primitive classification. +

+This class is a wrapper for primitive collections. This tells relevant info for the Bounding Box set classes, which take care of space classification. This class can manage Compound shapes and trimeshes, and if it is managing trimesh then the Hierarchy Bounding Box classes will take advantage of primitive Vs Box overlapping tests for getting optimal results and less Per Box compairisons. +

+


Member Function Documentation

+ +
+
+ + + + + + + + +
virtual bool GIM_PRIMITIVE_MANAGER_PROTOTYPE::is_trimesh (  )  [pure virtual]
+
+
+ +

+determines if this manager consist on only triangles, which special case will be optimized +

+ +

+

+


The documentation for this class was generated from the following file:
    +
  • C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_box_set.h
+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/class_g_i_m___r_s_o_r_t___t_o_k_e_n___c_o_m_p_a_r_a_t_o_r-members.html b/Extras/GIMPACT/docs/html/class_g_i_m___r_s_o_r_t___t_o_k_e_n___c_o_m_p_a_r_a_t_o_r-members.html new file mode 100755 index 000000000..6ecacb6d7 --- /dev/null +++ b/Extras/GIMPACT/docs/html/class_g_i_m___r_s_o_r_t___t_o_k_e_n___c_o_m_p_a_r_a_t_o_r-members.html @@ -0,0 +1,29 @@ + + +GIMPACT: Member List + + + + + + +

GIM_RSORT_TOKEN_COMPARATOR Member List

This is the complete list of members for GIM_RSORT_TOKEN_COMPARATOR, including all inherited members.

+ +
operator()(const GIM_RSORT_TOKEN &a, const GIM_RSORT_TOKEN &b)GIM_RSORT_TOKEN_COMPARATOR [inline]


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/class_g_i_m___r_s_o_r_t___t_o_k_e_n___c_o_m_p_a_r_a_t_o_r.html b/Extras/GIMPACT/docs/html/class_g_i_m___r_s_o_r_t___t_o_k_e_n___c_o_m_p_a_r_a_t_o_r.html new file mode 100755 index 000000000..a78f6c0cc --- /dev/null +++ b/Extras/GIMPACT/docs/html/class_g_i_m___r_s_o_r_t___t_o_k_e_n___c_o_m_p_a_r_a_t_o_r.html @@ -0,0 +1,76 @@ + + +GIMPACT: GIM_RSORT_TOKEN_COMPARATOR Class Reference + + + + + + +

GIM_RSORT_TOKEN_COMPARATOR Class Reference
+ +[SORTING] +

Prototype for comparators. +More... +

+#include <gim_radixsort.h> +

+List of all members. + + + + +

Public Member Functions

int operator() (const GIM_RSORT_TOKEN &a, const GIM_RSORT_TOKEN &b)
+


Detailed Description

+Prototype for comparators. +

+


Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
int GIM_RSORT_TOKEN_COMPARATOR::operator() (const GIM_RSORT_TOKEN a,
const GIM_RSORT_TOKEN b 
) [inline]
+
+
+ +

+ +

+

+


The documentation for this class was generated from the following file: +
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/class_g_i_m___t_r_e_e___t_r_e_e___c_o_l_l_i_d_e_r-members.html b/Extras/GIMPACT/docs/html/class_g_i_m___t_r_e_e___t_r_e_e___c_o_l_l_i_d_e_r-members.html new file mode 100755 index 000000000..681621fc3 --- /dev/null +++ b/Extras/GIMPACT/docs/html/class_g_i_m___t_r_e_e___t_r_e_e___c_o_l_l_i_d_e_r-members.html @@ -0,0 +1,55 @@ + + +GIMPACT: Member List + + + + + + +

GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 > Member List

This is the complete list of members for GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
current_node0GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >
current_node1GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >
find_collision(BOX_SET_CLASS0 *boxset1, const btTransform &trans1, BOX_SET_CLASS1 *boxset2, const btTransform &trans2, gim_pair_set &collision_pairs, bool complete_primitive_tests=true)GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 > [inline]
find_collision_pairs()GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 > [inline, protected]
GIM_TREE_TREE_COLLIDER()GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 > [inline]
m_box0GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >
m_box1GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >
m_boxset0GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >
m_boxset1GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >
m_collision_pairsGIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >
m_tri0GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >
m_tri0_planeGIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >
m_tri1GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >
m_tri1_planeGIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >
node0_has_triangleGIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >
node0_is_leafGIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >
node1_has_triangleGIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >
node1_is_leafGIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >
node_collision(GUINT node0, GUINT node1)GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 > [inline, protected]
retrieve_node0_info(GUINT node0)GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 > [inline, protected]
retrieve_node0_triangle(GUINT node0)GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 > [inline, protected]
retrieve_node1_info(GUINT node1)GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 > [inline, protected]
retrieve_node1_triangle(GUINT node1)GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 > [inline, protected]
t0_is_trimeshGIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >
t1_is_trimeshGIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >
trans_cache_0to1GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >
trans_cache_1to0GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/class_g_i_m___t_r_e_e___t_r_e_e___c_o_l_l_i_d_e_r.html b/Extras/GIMPACT/docs/html/class_g_i_m___t_r_e_e___t_r_e_e___c_o_l_l_i_d_e_r.html new file mode 100755 index 000000000..02db9fd5c --- /dev/null +++ b/Extras/GIMPACT/docs/html/class_g_i_m___t_r_e_e___t_r_e_e___c_o_l_l_i_d_e_r.html @@ -0,0 +1,121 @@ + + +GIMPACT: GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 > Class Template Reference + + + + + + +

GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 > Class Template Reference
+ +[BOX_PRUNNING] +

GIM_BOX_SET collision methods. +More... +

+#include <gim_box_set.h> +

+List of all members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

 GIM_TREE_TREE_COLLIDER ()
void find_collision (BOX_SET_CLASS0 *boxset1, const btTransform &trans1, BOX_SET_CLASS1 *boxset2, const btTransform &trans2, gim_pair_set &collision_pairs, bool complete_primitive_tests=true)

Public Attributes

gim_pair_setm_collision_pairs
BOX_SET_CLASS0 * m_boxset0
BOX_SET_CLASS1 * m_boxset1
GUINT current_node0
GUINT current_node1
bool node0_is_leaf
bool node1_is_leaf
bool t0_is_trimesh
bool t1_is_trimesh
bool node0_has_triangle
bool node1_has_triangle
GIM_AABB m_box0
GIM_AABB m_box1
GIM_BOX_BOX_TRANSFORM_CACHE trans_cache_1to0
btTransform trans_cache_0to1
GIM_TRIANGLE m_tri0
btVector4 m_tri0_plane
GIM_TRIANGLE m_tri1
btVector4 m_tri1_plane

Protected Member Functions

SIMD_FORCE_INLINE void retrieve_node0_triangle (GUINT node0)
SIMD_FORCE_INLINE void retrieve_node1_triangle (GUINT node1)
SIMD_FORCE_INLINE void retrieve_node0_info (GUINT node0)
SIMD_FORCE_INLINE void retrieve_node1_info (GUINT node1)
SIMD_FORCE_INLINE bool node_collision (GUINT node0, GUINT node1)
void find_collision_pairs ()
+


Detailed Description

+

template<typename BOX_SET_CLASS0, typename BOX_SET_CLASS1>
+ class GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >

+ +GIM_BOX_SET collision methods. +

+


Member Data Documentation

+ +
+
+
+template<typename BOX_SET_CLASS0, typename BOX_SET_CLASS1>
+ + + + +
gim_pair_set* GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >::m_collision_pairs
+
+
+ +

+ +

+

+


The documentation for this class was generated from the following file:
    +
  • C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_box_set.h
+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/class_g_i_m___t_r_i_a_n_g_l_e-members.html b/Extras/GIMPACT/docs/html/class_g_i_m___t_r_i_a_n_g_l_e-members.html new file mode 100755 index 000000000..eec94db53 --- /dev/null +++ b/Extras/GIMPACT/docs/html/class_g_i_m___t_r_i_a_n_g_l_e-members.html @@ -0,0 +1,43 @@ + + +GIMPACT: Member List + + + + + + +

GIM_TRIANGLE Member List

This is the complete list of members for GIM_TRIANGLE, including all inherited members.

+ + + + + + + + + + + + + + + +
apply_transform(const btTransform &trans)GIM_TRIANGLE [inline]
collide_triangle(const GIM_TRIANGLE &other, GIM_TRIANGLE_CONTACT_DATA &contact_data) constGIM_TRIANGLE [inline]
collide_triangle_hard_test(const GIM_TRIANGLE &other, GIM_TRIANGLE_CONTACT_DATA &contact_data) constGIM_TRIANGLE
get_box() constGIM_TRIANGLE [inline]
get_edge_plane(GUINT edge_index, const btVector3 &triangle_normal, btVector4 &plane) constGIM_TRIANGLE [inline]
get_normal(btVector3 &normal) const GIM_TRIANGLE [inline]
get_plane(btVector4 &plane) const GIM_TRIANGLE [inline]
get_triangle_transform(btTransform &triangle_transform) const GIM_TRIANGLE [inline]
get_uv_parameters(const btVector3 &point, const btVector3 &tri_plane, GREAL &u, GREAL &v) constGIM_TRIANGLE [inline]
GIM_TRIANGLE()GIM_TRIANGLE [inline]
is_point_inside(const btVector3 &point, const btVector3 &tri_normal) const GIM_TRIANGLE [inline]
m_marginGIM_TRIANGLE
m_verticesGIM_TRIANGLE
ray_collision(const btVector3 &vPoint, const btVector3 &vDir, btVector3 &pout, btVector3 &triangle_normal, GREAL &tparam, GREAL tmax=G_REAL_INFINITY)GIM_TRIANGLE [inline]
ray_collision_front_side(const btVector3 &vPoint, const btVector3 &vDir, btVector3 &pout, btVector3 &triangle_normal, GREAL &tparam, GREAL tmax=G_REAL_INFINITY)GIM_TRIANGLE [inline]


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/class_g_i_m___t_r_i_a_n_g_l_e.html b/Extras/GIMPACT/docs/html/class_g_i_m___t_r_i_a_n_g_l_e.html new file mode 100755 index 000000000..b26214da7 --- /dev/null +++ b/Extras/GIMPACT/docs/html/class_g_i_m___t_r_i_a_n_g_l_e.html @@ -0,0 +1,539 @@ + + +GIMPACT: GIM_TRIANGLE Class Reference + + + + + + +

GIM_TRIANGLE Class Reference
+ +[GEOMETRIC_OPERATIONS] +

Class for colliding triangles. +More... +

+#include <gim_tri_collision.h> +

+List of all members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

 GIM_TRIANGLE ()
SIMD_FORCE_INLINE GIM_AABB get_box () const
SIMD_FORCE_INLINE void get_normal (btVector3 &normal) const
SIMD_FORCE_INLINE void get_plane (btVector4 &plane) const
SIMD_FORCE_INLINE void apply_transform (const btTransform &trans)
SIMD_FORCE_INLINE void get_edge_plane (GUINT edge_index, const btVector3 &triangle_normal, btVector4 &plane) const
SIMD_FORCE_INLINE void get_triangle_transform (btTransform &triangle_transform) const
 Gets the relative transformation of this triangle.
bool collide_triangle_hard_test (const GIM_TRIANGLE &other, GIM_TRIANGLE_CONTACT_DATA &contact_data) const
 Test triangles by finding separating axis.
SIMD_FORCE_INLINE bool collide_triangle (const GIM_TRIANGLE &other, GIM_TRIANGLE_CONTACT_DATA &contact_data) const
 Test boxes before doing hard test.
SIMD_FORCE_INLINE bool get_uv_parameters (const btVector3 &point, const btVector3 &tri_plane, GREAL &u, GREAL &v) const
SIMD_FORCE_INLINE bool is_point_inside (const btVector3 &point, const btVector3 &tri_normal) const
 is point in triangle beam?
SIMD_FORCE_INLINE bool ray_collision (const btVector3 &vPoint, const btVector3 &vDir, btVector3 &pout, btVector3 &triangle_normal, GREAL &tparam, GREAL tmax=G_REAL_INFINITY)
 Bidireccional ray collision.
SIMD_FORCE_INLINE bool ray_collision_front_side (const btVector3 &vPoint, const btVector3 &vDir, btVector3 &pout, btVector3 &triangle_normal, GREAL &tparam, GREAL tmax=G_REAL_INFINITY)
 one direccion ray collision

Public Attributes

btScalar m_margin
btVector3 m_vertices [3]
+


Detailed Description

+Class for colliding triangles. +

+


Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
GIM_TRIANGLE::GIM_TRIANGLE (  )  [inline]
+
+
+ +

+ +

+

+


Member Function Documentation

+ +
+
+ + + + + + + + +
SIMD_FORCE_INLINE GIM_AABB GIM_TRIANGLE::get_box (  )  const [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
SIMD_FORCE_INLINE void GIM_TRIANGLE::get_normal (btVector3 &  normal  )  const [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
SIMD_FORCE_INLINE void GIM_TRIANGLE::get_plane (btVector4 &  plane  )  const [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
SIMD_FORCE_INLINE void GIM_TRIANGLE::apply_transform (const btTransform &  trans  )  [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE void GIM_TRIANGLE::get_edge_plane (GUINT  edge_index,
const btVector3 &  triangle_normal,
btVector4 &  plane 
) const [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
SIMD_FORCE_INLINE void GIM_TRIANGLE::get_triangle_transform (btTransform &  triangle_transform  )  const [inline]
+
+
+ +

+Gets the relative transformation of this triangle. +

+The transformation is oriented to the triangle normal , and aligned to the 1st edge of this triangle. The position corresponds to vertice 0:

    +
  • triangle normal corresponds to Z axis.
  • 1st normalized edge corresponds to X axis,
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
bool GIM_TRIANGLE::collide_triangle_hard_test (const GIM_TRIANGLE other,
GIM_TRIANGLE_CONTACT_DATA contact_data 
) const
+
+
+ +

+Test triangles by finding separating axis. +

+

Parameters:
+ + + +
other Triangle for collide
contact_data Structure for holding contact points, normal and penetration depth; The normal is pointing toward this triangle from the other triangle
+
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE bool GIM_TRIANGLE::collide_triangle (const GIM_TRIANGLE other,
GIM_TRIANGLE_CONTACT_DATA contact_data 
) const [inline]
+
+
+ +

+Test boxes before doing hard test. +

+

Parameters:
+ + + +
other Triangle for collide
contact_data Structure for holding contact points, normal and penetration depth; The normal is pointing toward this triangle from the other triangle \
+
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE bool GIM_TRIANGLE::get_uv_parameters (const btVector3 &  point,
const btVector3 &  tri_plane,
GREAL &  u,
GREAL &  v 
) const [inline]
+
+
+ +

+Solve the System for u,v parameters:

+u*axe1[i1] + v*axe2[i1] = vecproj[i1] u*axe1[i2] + v*axe2[i2] = vecproj[i2]

+sustitute: v = (vecproj[i2] - u*axe1[i2])/axe2[i2]

+then the first equation in terms of 'u':

+--> u*axe1[i1] + ((vecproj[i2] - u*axe1[i2])/axe2[i2])*axe2[i1] = vecproj[i1]

+--> u*axe1[i1] + vecproj[i2]*axe2[i1]/axe2[i2] - u*axe1[i2]*axe2[i1]/axe2[i2] = vecproj[i1]

+--> u*(axe1[i1] - axe1[i2]*axe2[i1]/axe2[i2]) = vecproj[i1] - vecproj[i2]*axe2[i1]/axe2[i2]

+--> u*((axe1[i1]*axe2[i2] - axe1[i2]*axe2[i1])/axe2[i2]) = (vecproj[i1]*axe2[i2] - vecproj[i2]*axe2[i1])/axe2[i2]

+--> u*(axe1[i1]*axe2[i2] - axe1[i2]*axe2[i1]) = vecproj[i1]*axe2[i2] - vecproj[i2]*axe2[i1]

+--> u = (vecproj[i1]*axe2[i2] - vecproj[i2]*axe2[i1]) /(axe1[i1]*axe2[i2] - axe1[i2]*axe2[i1])

+if 0.0<= u+v <=1.0 then they are inside of triangle

+

Returns:
false if the point is outside of triangle.This function doesn't take the margin
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE bool GIM_TRIANGLE::is_point_inside (const btVector3 &  point,
const btVector3 &  tri_normal 
) const [inline]
+
+
+ +

+is point in triangle beam? +

+Test if point is in triangle, with m_margin tolerance +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE bool GIM_TRIANGLE::ray_collision (const btVector3 &  vPoint,
const btVector3 &  vDir,
btVector3 &  pout,
btVector3 &  triangle_normal,
GREAL &  tparam,
GREAL  tmax = G_REAL_INFINITY 
) [inline]
+
+
+ +

+Bidireccional ray collision. +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE bool GIM_TRIANGLE::ray_collision_front_side (const btVector3 &  vPoint,
const btVector3 &  vDir,
btVector3 &  pout,
btVector3 &  triangle_normal,
GREAL &  tparam,
GREAL  tmax = G_REAL_INFINITY 
) [inline]
+
+
+ +

+one direccion ray collision +

+ +

+

+


Member Data Documentation

+ +
+
+ + + + +
btScalar GIM_TRIANGLE::m_margin
+
+
+ +

+ +

+

+ +

+
+ + + + +
btVector3 GIM_TRIANGLE::m_vertices[3]
+
+
+ +

+ +

+

+


The documentation for this class was generated from the following file: +
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classbt_g_impact_collision_algorithm-members.html b/Extras/GIMPACT/docs/html/classbt_g_impact_collision_algorithm-members.html new file mode 100755 index 000000000..696749cb2 --- /dev/null +++ b/Extras/GIMPACT/docs/html/classbt_g_impact_collision_algorithm-members.html @@ -0,0 +1,67 @@ + + +GIMPACT: Member List + + + + + + +

btGImpactCollisionAlgorithm Member List

This is the complete list of members for btGImpactCollisionAlgorithm, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addContactPoint(btCollisionObject *body0, btCollisionObject *body1, const btVector3 &point, const btVector3 &normal, btScalar distance)btGImpactCollisionAlgorithm [inline, protected]
btGImpactCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo &ci, btCollisionObject *body0, btCollisionObject *body1)btGImpactCollisionAlgorithm
calculateTimeOfImpact(btCollisionObject *body0, btCollisionObject *body1, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut)btGImpactCollisionAlgorithm
checkConvexAlgorithm(btCollisionObject *body0, btCollisionObject *body1)btGImpactCollisionAlgorithm [inline, protected]
checkManifold(btCollisionObject *body0, btCollisionObject *body1)btGImpactCollisionAlgorithm [inline, protected]
clearCache()btGImpactCollisionAlgorithm [inline, protected]
convex_vs_convex_collision(btCollisionObject *body0, btCollisionObject *body1, btCollisionShape *shape0, btCollisionShape *shape1)btGImpactCollisionAlgorithm
destroyConvexAlgorithm()btGImpactCollisionAlgorithm [inline, protected]
gimpact_vs_compoundshape(btCollisionObject *body0, btCollisionObject *body1, btGImpactShapeInterface *shape0, btCompoundShape *shape1, bool swapped)btGImpactCollisionAlgorithm
gimpact_vs_gimpact(btCollisionObject *body0, btCollisionObject *body1, btGImpactShapeInterface *shape0, btGImpactShapeInterface *shape1)btGImpactCollisionAlgorithm
gimpact_vs_shape(btCollisionObject *body0, btCollisionObject *body1, btGImpactShapeInterface *shape0, btCollisionShape *shape1, bool swapped)btGImpactCollisionAlgorithm
gimpactcompound_vs_gimpactcompound_collision(btCollisionObject *body0, btCollisionObject *body1, btGImpactCompoundShape *shape0, btGImpactCompoundShape *shape1)btGImpactCollisionAlgorithm
gimpactcompound_vs_gimpactcompound_find_pairs(const btTransform &trans0, const btTransform &trans1, btGImpactCompoundShape *shape0, btGImpactCompoundShape *shape1, gim_pair_set &pairset) constbtGImpactCollisionAlgorithm [protected]
gimpactcompound_vs_gimpacttrimeshpart_collision(btCollisionObject *body0, btCollisionObject *body1, btGImpactCompoundShape *shape0, btGImpactMeshShapePart *shape1, bool swapped)btGImpactCollisionAlgorithm
gimpactcompound_vs_gimpacttrimeshpart_find_pairs(const btTransform &trans0, const btTransform &trans1, btGImpactCompoundShape *shape0, btGImpactMeshShapePart *shape1, gim_pair_set &pairset) constbtGImpactCollisionAlgorithm [protected]
gimpactcompound_vs_shape_collision(btCollisionObject *body0, btCollisionObject *body1, btGImpactCompoundShape *shape0, btCollisionShape *shape1, bool swapped)btGImpactCollisionAlgorithm
gimpacttrimesh_vs_gimpactcompound(btCollisionObject *body0, btCollisionObject *body1, btGImpactMeshShape *shape0, btGImpactCompoundShape *shape1, bool swapped)btGImpactCollisionAlgorithm
gimpacttrimesh_vs_gimpacttrimesh(btCollisionObject *body0, btCollisionObject *body1, btGImpactMeshShape *shape0, btGImpactMeshShape *shape1)btGImpactCollisionAlgorithm
gimpacttrimesh_vs_shape_collision(btCollisionObject *body0, btCollisionObject *body1, btGImpactMeshShape *shape0, btCollisionShape *shape1, bool swapped)btGImpactCollisionAlgorithm
gimpacttrimesh_vs_trimeshpart(btCollisionObject *body0, btCollisionObject *body1, btGImpactMeshShape *shape0, btGImpactMeshShapePart *shape1, bool swapped)btGImpactCollisionAlgorithm
gimpacttrimeshpart_vs_concave_collision(btCollisionObject *body0, btCollisionObject *body1, btGImpactMeshShapePart *shape0, btConcaveShape *shape1, bool swapped)btGImpactCollisionAlgorithm
gimpacttrimeshpart_vs_gimpacttrimeshpart_collision(btCollisionObject *body0, btCollisionObject *body1, btGImpactMeshShapePart *shape0, btGImpactMeshShapePart *shape1, bool swapped)btGImpactCollisionAlgorithm
gimpacttrimeshpart_vs_gimpacttrimeshpart_find_pairs(const btTransform &trans0, const btTransform &trans1, btGImpactMeshShapePart *shape0, btGImpactMeshShapePart *shape1, gim_pair_set &pairset) constbtGImpactCollisionAlgorithm [protected]
gimpacttrimeshpart_vs_plane_collision(btCollisionObject *body0, btCollisionObject *body1, btGImpactMeshShapePart *shape0, btStaticPlaneShape *shape1, bool swapped)btGImpactCollisionAlgorithm
gimpacttrimeshpart_vs_shape_collision(btCollisionObject *body0, btCollisionObject *body1, btGImpactMeshShapePart *shape0, btCollisionShape *shape1, bool swapped)btGImpactCollisionAlgorithm
m_convex_algorithmbtGImpactCollisionAlgorithm [protected]
m_dispatchInfobtGImpactCollisionAlgorithm [protected]
m_manifoldPtrbtGImpactCollisionAlgorithm [protected]
m_part0btGImpactCollisionAlgorithm [protected]
m_part1btGImpactCollisionAlgorithm [protected]
m_resultOutbtGImpactCollisionAlgorithm [protected]
m_triface0btGImpactCollisionAlgorithm [protected]
m_triface1btGImpactCollisionAlgorithm [protected]
newAlgorithm(btCollisionObject *body0, btCollisionObject *body1)btGImpactCollisionAlgorithm [inline, protected]
newContactManifold(btCollisionObject *body0, btCollisionObject *body1)btGImpactCollisionAlgorithm [inline, protected]
processCollision(btCollisionObject *body0, btCollisionObject *body1, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut)btGImpactCollisionAlgorithm [virtual]
registerAlgorithm(btCollisionDispatcher *dispatcher)btGImpactCollisionAlgorithm [static]
shape_vs_shape_collision(btCollisionObject *body0, btCollisionObject *body1, btCollisionShape *shape0, btCollisionShape *shape1, bool swapped)btGImpactCollisionAlgorithm
~btGImpactCollisionAlgorithm()btGImpactCollisionAlgorithm [virtual]


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classbt_g_impact_collision_algorithm.html b/Extras/GIMPACT/docs/html/classbt_g_impact_collision_algorithm.html new file mode 100755 index 000000000..5adbb6d40 --- /dev/null +++ b/Extras/GIMPACT/docs/html/classbt_g_impact_collision_algorithm.html @@ -0,0 +1,1482 @@ + + +GIMPACT: btGImpactCollisionAlgorithm Class Reference + + + + + + +

btGImpactCollisionAlgorithm Class Reference

Collision Algorithm for GImpact Shapes. +More... +

+#include <btGImpactCollisionAlgorithm.h> +

+List of all members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

 btGImpactCollisionAlgorithm (const btCollisionAlgorithmConstructionInfo &ci, btCollisionObject *body0, btCollisionObject *body1)
virtual ~btGImpactCollisionAlgorithm ()
virtual void processCollision (btCollisionObject *body0, btCollisionObject *body1, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut)
btScalar calculateTimeOfImpact (btCollisionObject *body0, btCollisionObject *body1, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut)
void shape_vs_shape_collision (btCollisionObject *body0, btCollisionObject *body1, btCollisionShape *shape0, btCollisionShape *shape1, bool swapped)
void convex_vs_convex_collision (btCollisionObject *body0, btCollisionObject *body1, btCollisionShape *shape0, btCollisionShape *shape1)
void gimpacttrimesh_vs_shape_collision (btCollisionObject *body0, btCollisionObject *body1, btGImpactMeshShape *shape0, btCollisionShape *shape1, bool swapped)
void gimpacttrimesh_vs_gimpacttrimesh (btCollisionObject *body0, btCollisionObject *body1, btGImpactMeshShape *shape0, btGImpactMeshShape *shape1)
void gimpacttrimesh_vs_gimpactcompound (btCollisionObject *body0, btCollisionObject *body1, btGImpactMeshShape *shape0, btGImpactCompoundShape *shape1, bool swapped)
void gimpacttrimesh_vs_trimeshpart (btCollisionObject *body0, btCollisionObject *body1, btGImpactMeshShape *shape0, btGImpactMeshShapePart *shape1, bool swapped)
void gimpactcompound_vs_gimpactcompound_collision (btCollisionObject *body0, btCollisionObject *body1, btGImpactCompoundShape *shape0, btGImpactCompoundShape *shape1)
void gimpactcompound_vs_gimpacttrimeshpart_collision (btCollisionObject *body0, btCollisionObject *body1, btGImpactCompoundShape *shape0, btGImpactMeshShapePart *shape1, bool swapped)
void gimpactcompound_vs_shape_collision (btCollisionObject *body0, btCollisionObject *body1, btGImpactCompoundShape *shape0, btCollisionShape *shape1, bool swapped)
void gimpacttrimeshpart_vs_gimpacttrimeshpart_collision (btCollisionObject *body0, btCollisionObject *body1, btGImpactMeshShapePart *shape0, btGImpactMeshShapePart *shape1, bool swapped)
void gimpacttrimeshpart_vs_plane_collision (btCollisionObject *body0, btCollisionObject *body1, btGImpactMeshShapePart *shape0, btStaticPlaneShape *shape1, bool swapped)
void gimpacttrimeshpart_vs_concave_collision (btCollisionObject *body0, btCollisionObject *body1, btGImpactMeshShapePart *shape0, btConcaveShape *shape1, bool swapped)
void gimpacttrimeshpart_vs_shape_collision (btCollisionObject *body0, btCollisionObject *body1, btGImpactMeshShapePart *shape0, btCollisionShape *shape1, bool swapped)
void gimpact_vs_compoundshape (btCollisionObject *body0, btCollisionObject *body1, btGImpactShapeInterface *shape0, btCompoundShape *shape1, bool swapped)
void gimpact_vs_shape (btCollisionObject *body0, btCollisionObject *body1, btGImpactShapeInterface *shape0, btCollisionShape *shape1, bool swapped)
void gimpact_vs_gimpact (btCollisionObject *body0, btCollisionObject *body1, btGImpactShapeInterface *shape0, btGImpactShapeInterface *shape1)

Static Public Member Functions

static void registerAlgorithm (btCollisionDispatcher *dispatcher)
 Use this function for register the algorithm externally.

Protected Member Functions

SIMD_FORCE_INLINE btPersistentManifold * newContactManifold (btCollisionObject *body0, btCollisionObject *body1)
SIMD_FORCE_INLINE void destroyConvexAlgorithm ()
SIMD_FORCE_INLINE void clearCache ()
SIMD_FORCE_INLINE void checkManifold (btCollisionObject *body0, btCollisionObject *body1)
SIMD_FORCE_INLINE btCollisionAlgorithm * newAlgorithm (btCollisionObject *body0, btCollisionObject *body1)
SIMD_FORCE_INLINE void checkConvexAlgorithm (btCollisionObject *body0, btCollisionObject *body1)
SIMD_FORCE_INLINE void addContactPoint (btCollisionObject *body0, btCollisionObject *body1, const btVector3 &point, const btVector3 &normal, btScalar distance)
void gimpactcompound_vs_gimpactcompound_find_pairs (const btTransform &trans0, const btTransform &trans1, btGImpactCompoundShape *shape0, btGImpactCompoundShape *shape1, gim_pair_set &pairset) const
void gimpacttrimeshpart_vs_gimpacttrimeshpart_find_pairs (const btTransform &trans0, const btTransform &trans1, btGImpactMeshShapePart *shape0, btGImpactMeshShapePart *shape1, gim_pair_set &pairset) const
void gimpactcompound_vs_gimpacttrimeshpart_find_pairs (const btTransform &trans0, const btTransform &trans1, btGImpactCompoundShape *shape0, btGImpactMeshShapePart *shape1, gim_pair_set &pairset) const

Protected Attributes

btCollisionAlgorithm * m_convex_algorithm
btPersistentManifold * m_manifoldPtr
btManifoldResult * m_resultOut
const btDispatcherInfo * m_dispatchInfo
int m_triface0
int m_part0
int m_triface1
int m_part1

Classes

struct  CreateFunc
+


Detailed Description

+Collision Algorithm for GImpact Shapes. +

+For register this algorithm in Bullet, proceed as following:

btCollisionDispatcher * dispatcher = static_cast<btCollisionDispatcher *>(m_dynamicsWorld ->getDispatcher());
+btGImpactCollisionAlgorithm::registerAlgorithm(dispatcher);
+
+

+


Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
btGImpactCollisionAlgorithm::btGImpactCollisionAlgorithm (const btCollisionAlgorithmConstructionInfo &  ci,
btCollisionObject *  body0,
btCollisionObject *  body1 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
virtual btGImpactCollisionAlgorithm::~btGImpactCollisionAlgorithm (  )  [virtual]
+
+
+ +

+ +

+

+


Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE btPersistentManifold* btGImpactCollisionAlgorithm::newContactManifold (btCollisionObject *  body0,
btCollisionObject *  body1 
) [inline, protected]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
SIMD_FORCE_INLINE void btGImpactCollisionAlgorithm::destroyConvexAlgorithm (  )  [inline, protected]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
SIMD_FORCE_INLINE void btGImpactCollisionAlgorithm::clearCache (  )  [inline, protected]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE void btGImpactCollisionAlgorithm::checkManifold (btCollisionObject *  body0,
btCollisionObject *  body1 
) [inline, protected]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE btCollisionAlgorithm* btGImpactCollisionAlgorithm::newAlgorithm (btCollisionObject *  body0,
btCollisionObject *  body1 
) [inline, protected]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE void btGImpactCollisionAlgorithm::checkConvexAlgorithm (btCollisionObject *  body0,
btCollisionObject *  body1 
) [inline, protected]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE void btGImpactCollisionAlgorithm::addContactPoint (btCollisionObject *  body0,
btCollisionObject *  body1,
const btVector3 &  point,
const btVector3 &  normal,
btScalar  distance 
) [inline, protected]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void btGImpactCollisionAlgorithm::gimpactcompound_vs_gimpactcompound_find_pairs (const btTransform &  trans0,
const btTransform &  trans1,
btGImpactCompoundShape shape0,
btGImpactCompoundShape shape1,
gim_pair_set pairset 
) const [protected]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void btGImpactCollisionAlgorithm::gimpacttrimeshpart_vs_gimpacttrimeshpart_find_pairs (const btTransform &  trans0,
const btTransform &  trans1,
btGImpactMeshShapePart shape0,
btGImpactMeshShapePart shape1,
gim_pair_set pairset 
) const [protected]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void btGImpactCollisionAlgorithm::gimpactcompound_vs_gimpacttrimeshpart_find_pairs (const btTransform &  trans0,
const btTransform &  trans1,
btGImpactCompoundShape shape0,
btGImpactMeshShapePart shape1,
gim_pair_set pairset 
) const [protected]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void btGImpactCollisionAlgorithm::processCollision (btCollisionObject *  body0,
btCollisionObject *  body1,
const btDispatcherInfo &  dispatchInfo,
btManifoldResult *  resultOut 
) [virtual]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
btScalar btGImpactCollisionAlgorithm::calculateTimeOfImpact (btCollisionObject *  body0,
btCollisionObject *  body1,
const btDispatcherInfo &  dispatchInfo,
btManifoldResult *  resultOut 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
static void btGImpactCollisionAlgorithm::registerAlgorithm (btCollisionDispatcher *  dispatcher  )  [static]
+
+
+ +

+Use this function for register the algorithm externally. +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void btGImpactCollisionAlgorithm::shape_vs_shape_collision (btCollisionObject *  body0,
btCollisionObject *  body1,
btCollisionShape *  shape0,
btCollisionShape *  shape1,
bool  swapped 
)
+
+
+ +

+Collision algorithms +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void btGImpactCollisionAlgorithm::convex_vs_convex_collision (btCollisionObject *  body0,
btCollisionObject *  body1,
btCollisionShape *  shape0,
btCollisionShape *  shape1 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void btGImpactCollisionAlgorithm::gimpacttrimesh_vs_shape_collision (btCollisionObject *  body0,
btCollisionObject *  body1,
btGImpactMeshShape shape0,
btCollisionShape *  shape1,
bool  swapped 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void btGImpactCollisionAlgorithm::gimpacttrimesh_vs_gimpacttrimesh (btCollisionObject *  body0,
btCollisionObject *  body1,
btGImpactMeshShape shape0,
btGImpactMeshShape shape1 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void btGImpactCollisionAlgorithm::gimpacttrimesh_vs_gimpactcompound (btCollisionObject *  body0,
btCollisionObject *  body1,
btGImpactMeshShape shape0,
btGImpactCompoundShape shape1,
bool  swapped 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void btGImpactCollisionAlgorithm::gimpacttrimesh_vs_trimeshpart (btCollisionObject *  body0,
btCollisionObject *  body1,
btGImpactMeshShape shape0,
btGImpactMeshShapePart shape1,
bool  swapped 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void btGImpactCollisionAlgorithm::gimpactcompound_vs_gimpactcompound_collision (btCollisionObject *  body0,
btCollisionObject *  body1,
btGImpactCompoundShape shape0,
btGImpactCompoundShape shape1 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void btGImpactCollisionAlgorithm::gimpactcompound_vs_gimpacttrimeshpart_collision (btCollisionObject *  body0,
btCollisionObject *  body1,
btGImpactCompoundShape shape0,
btGImpactMeshShapePart shape1,
bool  swapped 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void btGImpactCollisionAlgorithm::gimpactcompound_vs_shape_collision (btCollisionObject *  body0,
btCollisionObject *  body1,
btGImpactCompoundShape shape0,
btCollisionShape *  shape1,
bool  swapped 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void btGImpactCollisionAlgorithm::gimpacttrimeshpart_vs_gimpacttrimeshpart_collision (btCollisionObject *  body0,
btCollisionObject *  body1,
btGImpactMeshShapePart shape0,
btGImpactMeshShapePart shape1,
bool  swapped 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void btGImpactCollisionAlgorithm::gimpacttrimeshpart_vs_plane_collision (btCollisionObject *  body0,
btCollisionObject *  body1,
btGImpactMeshShapePart shape0,
btStaticPlaneShape *  shape1,
bool  swapped 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void btGImpactCollisionAlgorithm::gimpacttrimeshpart_vs_concave_collision (btCollisionObject *  body0,
btCollisionObject *  body1,
btGImpactMeshShapePart shape0,
btConcaveShape *  shape1,
bool  swapped 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void btGImpactCollisionAlgorithm::gimpacttrimeshpart_vs_shape_collision (btCollisionObject *  body0,
btCollisionObject *  body1,
btGImpactMeshShapePart shape0,
btCollisionShape *  shape1,
bool  swapped 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void btGImpactCollisionAlgorithm::gimpact_vs_compoundshape (btCollisionObject *  body0,
btCollisionObject *  body1,
btGImpactShapeInterface shape0,
btCompoundShape *  shape1,
bool  swapped 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void btGImpactCollisionAlgorithm::gimpact_vs_shape (btCollisionObject *  body0,
btCollisionObject *  body1,
btGImpactShapeInterface shape0,
btCollisionShape *  shape1,
bool  swapped 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void btGImpactCollisionAlgorithm::gimpact_vs_gimpact (btCollisionObject *  body0,
btCollisionObject *  body1,
btGImpactShapeInterface shape0,
btGImpactShapeInterface shape1 
)
+
+
+ +

+ +

+

+


Member Data Documentation

+ +
+
+ + + + +
btCollisionAlgorithm* btGImpactCollisionAlgorithm::m_convex_algorithm [protected]
+
+
+ +

+ +

+

+ +

+
+ + + + +
btPersistentManifold* btGImpactCollisionAlgorithm::m_manifoldPtr [protected]
+
+
+ +

+ +

+

+ +

+
+ + + + +
btManifoldResult* btGImpactCollisionAlgorithm::m_resultOut [protected]
+
+
+ +

+ +

+

+ +

+
+ + + + +
const btDispatcherInfo* btGImpactCollisionAlgorithm::m_dispatchInfo [protected]
+
+
+ +

+ +

+

+ +

+
+ + + + +
int btGImpactCollisionAlgorithm::m_triface0 [protected]
+
+
+ +

+ +

+

+ +

+
+ + + + +
int btGImpactCollisionAlgorithm::m_part0 [protected]
+
+
+ +

+ +

+

+ +

+
+ + + + +
int btGImpactCollisionAlgorithm::m_triface1 [protected]
+
+
+ +

+ +

+

+ +

+
+ + + + +
int btGImpactCollisionAlgorithm::m_part1 [protected]
+
+
+ +

+ +

+

+


The documentation for this class was generated from the following file: +
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classbt_g_impact_compound_shape-members.html b/Extras/GIMPACT/docs/html/classbt_g_impact_compound_shape-members.html new file mode 100755 index 000000000..778a984cf --- /dev/null +++ b/Extras/GIMPACT/docs/html/classbt_g_impact_compound_shape-members.html @@ -0,0 +1,59 @@ + + +GIMPACT: Member List + + + + + + +

btGImpactCompoundShape Member List

This is the complete list of members for btGImpactCompoundShape, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addChildShape(const btTransform &localTransform, btCollisionShape *shape)btGImpactCompoundShape [inline]
btGImpactCompoundShape()btGImpactCompoundShape [inline]
btGImpactShapeInterface()btGImpactShapeInterface [inline]
calcLocalAABB()btGImpactCompoundShape [inline, protected, virtual]
calculateLocalInertia(btScalar mass, btVector3 &inertia)btGImpactCompoundShape [virtual]
getAabb(const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) constbtGImpactShapeInterface [inline]
getBoxSet()btGImpactCompoundShape [inline]
getChildShape(int index)btGImpactCompoundShape [inline]
getChildShape(int index) constbtGImpactCompoundShape [inline]
getChildTransform(int index) constbtGImpactCompoundShape [inline]
getGImpactShapeType()btGImpactCompoundShape [inline, virtual]
getLocalBox()btGImpactShapeInterface [inline]
getLocalScaling() constbtGImpactShapeInterface [inline, virtual]
getName() constbtGImpactCompoundShape [inline, virtual]
getNumChildShapes() constbtGImpactCompoundShape [inline]
getPrimitiveManager() constbtGImpactCompoundShape [inline]
getShapeType() constbtGImpactShapeInterface [inline, virtual]
hasBoxSet() constbtGImpactCompoundShape [inline, virtual]
localScalingbtGImpactShapeInterface [protected]
m_box_setbtGImpactCompoundShape [protected]
m_childShapesbtGImpactCompoundShape [protected]
m_childTransformsbtGImpactCompoundShape [protected]
m_localAABBbtGImpactShapeInterface [protected]
m_needs_updatebtGImpactShapeInterface [protected]
postUpdate()btGImpactShapeInterface [inline, virtual]
processAllTriangles(btTriangleCallback *callback, const btVector3 &aabbMin, const btVector3 &aabbMax) const btGImpactShapeInterface [inline, virtual]
rayTest(const btVector3 &rayFrom, const btVector3 &rayTo, btCollisionWorld::RayResultCallback &resultCallback) const btGImpactCompoundShape [virtual]
setChildTransform(int index, const btTransform &transform)btGImpactCompoundShape [inline]
setLocalScaling(const btVector3 &scaling)btGImpactShapeInterface [inline, virtual]
updateBound()btGImpactShapeInterface [inline]
~btGImpactCompoundShape()btGImpactCompoundShape [inline, virtual]


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classbt_g_impact_compound_shape.html b/Extras/GIMPACT/docs/html/classbt_g_impact_compound_shape.html new file mode 100755 index 000000000..e3e14e75d --- /dev/null +++ b/Extras/GIMPACT/docs/html/classbt_g_impact_compound_shape.html @@ -0,0 +1,540 @@ + + +GIMPACT: btGImpactCompoundShape Class Reference + + + + + + +

btGImpactCompoundShape Class Reference

btGIMPACTCompoundShape allows to handle multiple btCollisionShape objects at once +More... +

+#include <btGImpactShape.h> +

+

Inheritance diagram for btGImpactCompoundShape: +

+ +btGImpactShapeInterface + +List of all members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

 btGImpactCompoundShape ()
virtual ~btGImpactCompoundShape ()
SIMD_FORCE_INLINE const CompoundPrimitiveManagergetPrimitiveManager () const
 Obtains the primitive manager.
void addChildShape (const btTransform &localTransform, btCollisionShape *shape)
 Use this method for adding children.
int getNumChildShapes () const
 Gets the number of children.
btCollisionShape * getChildShape (int index)
 Gets the children.
const btCollisionShape * getChildShape (int index) const
 Gets the children.
btTransform getChildTransform (int index) const
 Gets the children transform.
void setChildTransform (int index, const btTransform &transform)
 Sets the children transform.
virtual void calculateLocalInertia (btScalar mass, btVector3 &inertia)
 Calculates the exact inertia tensor for this shape.
BoxSetClassgetBoxSet ()
virtual char * getName () const
virtual eGIMPACT_SHAPE_TYPE getGImpactShapeType ()
 Base method for determinig which kind of GIMPACT shape we get.
virtual bool hasBoxSet () const
 Determines if this class has a hierarchy structure for sorting its primitives.
virtual void rayTest (const btVector3 &rayFrom, const btVector3 &rayTo, btCollisionWorld::RayResultCallback &resultCallback) const
 virtual method for ray collision

Protected Member Functions

virtual void calcLocalAABB ()
 use this function for perfofm refit in bounding boxes

Protected Attributes

BoxSetClass m_box_set
btAlignedObjectArray< btTransform > m_childTransforms
btAlignedObjectArray< btCollisionShape * > m_childShapes

Classes

class  BoxSetClass
class  CompoundPrimitiveManager
 compound primitive manager More...
+

Detailed Description

+btGIMPACTCompoundShape allows to handle multiple btCollisionShape objects at once +

+This allows for concave collision objects. This is more general then the Static Concave btTriangleMeshShape. +

+


Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
btGImpactCompoundShape::btGImpactCompoundShape (  )  [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
virtual btGImpactCompoundShape::~btGImpactCompoundShape (  )  [inline, virtual]
+
+
+ +

+ +

+

+


Member Function Documentation

+ +
+
+ + + + + + + + +
virtual void btGImpactCompoundShape::calcLocalAABB (  )  [inline, protected, virtual]
+
+
+ +

+use this function for perfofm refit in bounding boxes +

+ +

+Implements btGImpactShapeInterface. +

+

+ +

+
+ + + + + + + + +
SIMD_FORCE_INLINE const CompoundPrimitiveManager& btGImpactCompoundShape::getPrimitiveManager (  )  const [inline]
+
+
+ +

+Obtains the primitive manager. +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void btGImpactCompoundShape::addChildShape (const btTransform &  localTransform,
btCollisionShape *  shape 
) [inline]
+
+
+ +

+Use this method for adding children. +

+ +

+

+ +

+
+ + + + + + + + +
int btGImpactCompoundShape::getNumChildShapes (  )  const [inline]
+
+
+ +

+Gets the number of children. +

+ +

+

+ +

+
+ + + + + + + + + +
btCollisionShape* btGImpactCompoundShape::getChildShape (int  index  )  [inline]
+
+
+ +

+Gets the children. +

+ +

+

+ +

+
+ + + + + + + + + +
const btCollisionShape* btGImpactCompoundShape::getChildShape (int  index  )  const [inline]
+
+
+ +

+Gets the children. +

+ +

+

+ +

+
+ + + + + + + + + +
btTransform btGImpactCompoundShape::getChildTransform (int  index  )  const [inline]
+
+
+ +

+Gets the children transform. +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void btGImpactCompoundShape::setChildTransform (int  index,
const btTransform &  transform 
) [inline]
+
+
+ +

+Sets the children transform. +

+

Postcondition:
You must call updateBound() for update the box set.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
virtual void btGImpactCompoundShape::calculateLocalInertia (btScalar  mass,
btVector3 &  inertia 
) [virtual]
+
+
+ +

+Calculates the exact inertia tensor for this shape. +

+ +

+

+ +

+
+ + + + + + + + +
BoxSetClass* btGImpactCompoundShape::getBoxSet (  )  [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
virtual char* btGImpactCompoundShape::getName (  )  const [inline, virtual]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
virtual eGIMPACT_SHAPE_TYPE btGImpactCompoundShape::getGImpactShapeType (  )  [inline, virtual]
+
+
+ +

+Base method for determinig which kind of GIMPACT shape we get. +

+ +

+Implements btGImpactShapeInterface. +

+

+ +

+
+ + + + + + + + +
virtual bool btGImpactCompoundShape::hasBoxSet (  )  const [inline, virtual]
+
+
+ +

+Determines if this class has a hierarchy structure for sorting its primitives. +

+ +

+Implements btGImpactShapeInterface. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void btGImpactCompoundShape::rayTest (const btVector3 &  rayFrom,
const btVector3 &  rayTo,
btCollisionWorld::RayResultCallback &  resultCallback 
) const [virtual]
+
+
+ +

+virtual method for ray collision +

+ +

+Reimplemented from btGImpactShapeInterface. +

+

+


Member Data Documentation

+ +
+ +
+ +

+ +

+

+ +

+
+ + + + +
btAlignedObjectArray<btTransform> btGImpactCompoundShape::m_childTransforms [protected]
+
+
+ +

+ +

+

+ +

+
+ + + + +
btAlignedObjectArray<btCollisionShape*> btGImpactCompoundShape::m_childShapes [protected]
+
+
+ +

+ +

+

+


The documentation for this class was generated from the following file: +
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classbt_g_impact_compound_shape.png b/Extras/GIMPACT/docs/html/classbt_g_impact_compound_shape.png new file mode 100755 index 000000000..49a798119 Binary files /dev/null and b/Extras/GIMPACT/docs/html/classbt_g_impact_compound_shape.png differ diff --git a/Extras/GIMPACT/docs/html/classbt_g_impact_compound_shape_1_1_box_set_class-members.html b/Extras/GIMPACT/docs/html/classbt_g_impact_compound_shape_1_1_box_set_class-members.html new file mode 100755 index 000000000..8454813fc --- /dev/null +++ b/Extras/GIMPACT/docs/html/classbt_g_impact_compound_shape_1_1_box_set_class-members.html @@ -0,0 +1,52 @@ + + +GIMPACT: Member List + + + + + + +

btGImpactCompoundShape::BoxSetClass Member List

This is the complete list of members for btGImpactCompoundShape::BoxSetClass, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + +
boxQuery(const GIM_AABB &box, gim_array< GUINT > &collided_results) const GIM_BOX_TREE_TEMPLATE_SET< CompoundPrimitiveManager, GIM_BOX_TREE > [inline]
boxQueryTrans(const GIM_AABB &box, const btTransform &transform, gim_array< GUINT > &collided_results) constGIM_BOX_TREE_TEMPLATE_SET< CompoundPrimitiveManager, GIM_BOX_TREE > [inline]
buildSet()GIM_BOX_TREE_TEMPLATE_SET< CompoundPrimitiveManager, GIM_BOX_TREE > [inline]
getGlobalBox() constGIM_BOX_TREE_TEMPLATE_SET< CompoundPrimitiveManager, GIM_BOX_TREE > [inline]
getLeftNodeIndex(GUINT nodeindex) const GIM_BOX_TREE_TEMPLATE_SET< CompoundPrimitiveManager, GIM_BOX_TREE > [inline]
getNodeBound(GUINT nodeindex, GIM_AABB &bound) const GIM_BOX_TREE_TEMPLATE_SET< CompoundPrimitiveManager, GIM_BOX_TREE > [inline]
getNodeCount() constGIM_BOX_TREE_TEMPLATE_SET< CompoundPrimitiveManager, GIM_BOX_TREE > [inline]
getNodeData(GUINT nodeindex) const GIM_BOX_TREE_TEMPLATE_SET< CompoundPrimitiveManager, GIM_BOX_TREE > [inline]
getNodeTriangle(GUINT nodeindex, GIM_TRIANGLE &triangle) const GIM_BOX_TREE_TEMPLATE_SET< CompoundPrimitiveManager, GIM_BOX_TREE > [inline]
getPrimitiveManager() constGIM_BOX_TREE_TEMPLATE_SET< CompoundPrimitiveManager, GIM_BOX_TREE > [inline]
getPrimitiveManager()GIM_BOX_TREE_TEMPLATE_SET< CompoundPrimitiveManager, GIM_BOX_TREE > [inline]
getRightNodeIndex(GUINT nodeindex) const GIM_BOX_TREE_TEMPLATE_SET< CompoundPrimitiveManager, GIM_BOX_TREE > [inline]
getScapeNodeIndex(GUINT nodeindex) const GIM_BOX_TREE_TEMPLATE_SET< CompoundPrimitiveManager, GIM_BOX_TREE > [inline]
GIM_BOX_TREE_TEMPLATE_SET()GIM_BOX_TREE_TEMPLATE_SET< CompoundPrimitiveManager, GIM_BOX_TREE > [inline]
hasHierarchy() constGIM_BOX_TREE_TEMPLATE_SET< CompoundPrimitiveManager, GIM_BOX_TREE > [inline]
isLeafNode(GUINT nodeindex) const GIM_BOX_TREE_TEMPLATE_SET< CompoundPrimitiveManager, GIM_BOX_TREE > [inline]
isTrimesh() constGIM_BOX_TREE_TEMPLATE_SET< CompoundPrimitiveManager, GIM_BOX_TREE > [inline]
m_box_treeGIM_BOX_TREE_TEMPLATE_SET< CompoundPrimitiveManager, GIM_BOX_TREE > [protected]
m_primitive_managerGIM_BOX_TREE_TEMPLATE_SET< CompoundPrimitiveManager, GIM_BOX_TREE > [protected]
rayQuery(const btVector3 &ray_dir, const btVector3 &ray_origin, gim_array< GUINT > &collided_results) constGIM_BOX_TREE_TEMPLATE_SET< CompoundPrimitiveManager, GIM_BOX_TREE > [inline]
refit()GIM_BOX_TREE_TEMPLATE_SET< CompoundPrimitiveManager, GIM_BOX_TREE > [inline, protected]
setNodeBound(GUINT nodeindex, const GIM_AABB &bound)GIM_BOX_TREE_TEMPLATE_SET< CompoundPrimitiveManager, GIM_BOX_TREE > [inline]
setPrimitiveManager(const CompoundPrimitiveManager &primitive_manager)GIM_BOX_TREE_TEMPLATE_SET< CompoundPrimitiveManager, GIM_BOX_TREE > [inline]
update()GIM_BOX_TREE_TEMPLATE_SET< CompoundPrimitiveManager, GIM_BOX_TREE > [inline]


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classbt_g_impact_compound_shape_1_1_box_set_class.html b/Extras/GIMPACT/docs/html/classbt_g_impact_compound_shape_1_1_box_set_class.html new file mode 100755 index 000000000..f98449ca2 --- /dev/null +++ b/Extras/GIMPACT/docs/html/classbt_g_impact_compound_shape_1_1_box_set_class.html @@ -0,0 +1,42 @@ + + +GIMPACT: btGImpactCompoundShape::BoxSetClass Class Reference + + + + + + + +

btGImpactCompoundShape::BoxSetClass Class Reference

#include <btGImpactShape.h> +

+

Inheritance diagram for btGImpactCompoundShape::BoxSetClass: +

+ +GIM_BOX_TREE_SET< CompoundPrimitiveManager > +GIM_BOX_TREE_TEMPLATE_SET< CompoundPrimitiveManager, GIM_BOX_TREE > + +List of all members. + +
+
The documentation for this class was generated from the following file: +
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classbt_g_impact_compound_shape_1_1_box_set_class.png b/Extras/GIMPACT/docs/html/classbt_g_impact_compound_shape_1_1_box_set_class.png new file mode 100755 index 000000000..34d5b5e28 Binary files /dev/null and b/Extras/GIMPACT/docs/html/classbt_g_impact_compound_shape_1_1_box_set_class.png differ diff --git a/Extras/GIMPACT/docs/html/classbt_g_impact_compound_shape_1_1_compound_primitive_manager-members.html b/Extras/GIMPACT/docs/html/classbt_g_impact_compound_shape_1_1_compound_primitive_manager-members.html new file mode 100755 index 000000000..2719cefe5 --- /dev/null +++ b/Extras/GIMPACT/docs/html/classbt_g_impact_compound_shape_1_1_compound_primitive_manager-members.html @@ -0,0 +1,36 @@ + + +GIMPACT: Member List + + + + + + +

btGImpactCompoundShape::CompoundPrimitiveManager Member List

This is the complete list of members for btGImpactCompoundShape::CompoundPrimitiveManager, including all inherited members.

+ + + + + + + + +
CompoundPrimitiveManager(const CompoundPrimitiveManager &compound)btGImpactCompoundShape::CompoundPrimitiveManager [inline]
CompoundPrimitiveManager(btGImpactCompoundShape *compoundShape)btGImpactCompoundShape::CompoundPrimitiveManager [inline]
CompoundPrimitiveManager()btGImpactCompoundShape::CompoundPrimitiveManager [inline]
get_primitive_box(GUINT prim_index, GIM_AABB &primbox) constbtGImpactCompoundShape::CompoundPrimitiveManager [inline]
get_primitive_count() constbtGImpactCompoundShape::CompoundPrimitiveManager [inline]
get_primitive_triangle(GUINT prim_index, GIM_TRIANGLE &triangle) const btGImpactCompoundShape::CompoundPrimitiveManager [inline]
is_trimesh() constbtGImpactCompoundShape::CompoundPrimitiveManager [inline]
m_compoundShapebtGImpactCompoundShape::CompoundPrimitiveManager


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classbt_g_impact_compound_shape_1_1_compound_primitive_manager.html b/Extras/GIMPACT/docs/html/classbt_g_impact_compound_shape_1_1_compound_primitive_manager.html new file mode 100755 index 000000000..b15854b04 --- /dev/null +++ b/Extras/GIMPACT/docs/html/classbt_g_impact_compound_shape_1_1_compound_primitive_manager.html @@ -0,0 +1,233 @@ + + +GIMPACT: btGImpactCompoundShape::CompoundPrimitiveManager Class Reference + + + + + + + +

btGImpactCompoundShape::CompoundPrimitiveManager Class Reference

compound primitive manager +More... +

+#include <btGImpactShape.h> +

+List of all members. + + + + + + + + + + + + + + + + + + + +

Public Member Functions

 CompoundPrimitiveManager (const CompoundPrimitiveManager &compound)
 CompoundPrimitiveManager (btGImpactCompoundShape *compoundShape)
 CompoundPrimitiveManager ()
SIMD_FORCE_INLINE bool is_trimesh () const
SIMD_FORCE_INLINE GUINT get_primitive_count () const
SIMD_FORCE_INLINE void get_primitive_box (GUINT prim_index, GIM_AABB &primbox) const
SIMD_FORCE_INLINE void get_primitive_triangle (GUINT prim_index, GIM_TRIANGLE &triangle) const

Public Attributes

btGImpactCompoundShapem_compoundShape
+


Detailed Description

+compound primitive manager +

+


Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + +
btGImpactCompoundShape::CompoundPrimitiveManager::CompoundPrimitiveManager (const CompoundPrimitiveManager compound  )  [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
btGImpactCompoundShape::CompoundPrimitiveManager::CompoundPrimitiveManager (btGImpactCompoundShape compoundShape  )  [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
btGImpactCompoundShape::CompoundPrimitiveManager::CompoundPrimitiveManager (  )  [inline]
+
+
+ +

+ +

+

+


Member Function Documentation

+ +
+
+ + + + + + + + +
SIMD_FORCE_INLINE bool btGImpactCompoundShape::CompoundPrimitiveManager::is_trimesh (  )  const [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
SIMD_FORCE_INLINE GUINT btGImpactCompoundShape::CompoundPrimitiveManager::get_primitive_count (  )  const [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE void btGImpactCompoundShape::CompoundPrimitiveManager::get_primitive_box (GUINT  prim_index,
GIM_AABB primbox 
) const [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE void btGImpactCompoundShape::CompoundPrimitiveManager::get_primitive_triangle (GUINT  prim_index,
GIM_TRIANGLE triangle 
) const [inline]
+
+
+ +

+ +

+

+


Member Data Documentation

+ +

+


The documentation for this class was generated from the following file: +
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classbt_g_impact_mesh_shape-members.html b/Extras/GIMPACT/docs/html/classbt_g_impact_mesh_shape-members.html new file mode 100755 index 000000000..6d26ad5e2 --- /dev/null +++ b/Extras/GIMPACT/docs/html/classbt_g_impact_mesh_shape-members.html @@ -0,0 +1,53 @@ + + +GIMPACT: Member List + + + + + + +

btGImpactMeshShape Member List

This is the complete list of members for btGImpactMeshShape, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + +
btGImpactMeshShape(btStridingMeshInterface *meshInterface)btGImpactMeshShape [inline]
btGImpactShapeInterface()btGImpactShapeInterface [inline]
buildMeshParts(btStridingMeshInterface *meshInterface)btGImpactMeshShape [inline, protected]
calcLocalAABB()btGImpactMeshShape [inline, protected, virtual]
calculateLocalInertia(btScalar mass, btVector3 &inertia)btGImpactMeshShape [virtual]
getAabb(const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) constbtGImpactShapeInterface [inline]
getGImpactShapeType()btGImpactMeshShape [inline, virtual]
getLocalBox()btGImpactShapeInterface [inline]
getLocalScaling() constbtGImpactShapeInterface [inline, virtual]
getMeshPart(int index)btGImpactMeshShape [inline]
getMeshPart(int index) constbtGImpactMeshShape [inline]
getMeshPartCount()btGImpactMeshShape [inline]
getName() constbtGImpactMeshShape [inline, virtual]
getShapeType() constbtGImpactShapeInterface [inline, virtual]
hasBoxSet() constbtGImpactMeshShape [inline, virtual]
localScalingbtGImpactShapeInterface [protected]
m_localAABBbtGImpactShapeInterface [protected]
m_mesh_partsbtGImpactMeshShape [protected]
m_needs_updatebtGImpactShapeInterface [protected]
postUpdate()btGImpactMeshShape [inline, virtual]
processAllTriangles(btTriangleCallback *callback, const btVector3 &aabbMin, const btVector3 &aabbMax) const btGImpactMeshShape [virtual]
rayTest(const btVector3 &rayFrom, const btVector3 &rayTo, btCollisionWorld::RayResultCallback &resultCallback) const btGImpactMeshShape [virtual]
setLocalScaling(const btVector3 &scaling)btGImpactMeshShape [inline, virtual]
updateBound()btGImpactShapeInterface [inline]
~btGImpactMeshShape()btGImpactMeshShape [inline, virtual]


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classbt_g_impact_mesh_shape.html b/Extras/GIMPACT/docs/html/classbt_g_impact_mesh_shape.html new file mode 100755 index 000000000..f58c0028e --- /dev/null +++ b/Extras/GIMPACT/docs/html/classbt_g_impact_mesh_shape.html @@ -0,0 +1,470 @@ + + +GIMPACT: btGImpactMeshShape Class Reference + + + + + + +

btGImpactMeshShape Class Reference

This class manages a mesh supplied by the btStridingMeshInterface interface. +More... +

+#include <btGImpactShape.h> +

+

Inheritance diagram for btGImpactMeshShape: +

+ +btGImpactShapeInterface + +List of all members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

 btGImpactMeshShape (btStridingMeshInterface *meshInterface)
virtual ~btGImpactMeshShape ()
int getMeshPartCount ()
btGImpactMeshShapePartgetMeshPart (int index)
const btGImpactMeshShapePartgetMeshPart (int index) const
virtual void setLocalScaling (const btVector3 &scaling)
virtual void postUpdate ()
 Tells to this object that is needed to refit all the meshes.
virtual void calculateLocalInertia (btScalar mass, btVector3 &inertia)
virtual eGIMPACT_SHAPE_TYPE getGImpactShapeType ()
 Base method for determinig which kind of GIMPACT shape we get.
virtual bool hasBoxSet () const
 Determines if this class has a hierarchy structure for sorting its primitives.
virtual char * getName () const
virtual void rayTest (const btVector3 &rayFrom, const btVector3 &rayTo, btCollisionWorld::RayResultCallback &resultCallback) const
 virtual method for ray collision
virtual void processAllTriangles (btTriangleCallback *callback, const btVector3 &aabbMin, const btVector3 &aabbMax) const
 Function for retrieve triangles.

Protected Member Functions

void buildMeshParts (btStridingMeshInterface *meshInterface)
virtual void calcLocalAABB ()
 use this function for perfofm refit in bounding boxes

Protected Attributes

btAlignedObjectArray< btGImpactMeshShapePart * > m_mesh_parts
+

Detailed Description

+This class manages a mesh supplied by the btStridingMeshInterface interface. +

+Set of btGImpactMeshShapePart parts

    +
  • Simply create this shape by passing the btStridingMeshInterface to the constructor btGImpactMeshShape, then you must call updateBound() after creating the mesh
+

+

    +
  • You can handle deformable meshes with this shape, by calling postUpdate() every time when changing the mesh vertices.
+ +

+


Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + +
btGImpactMeshShape::btGImpactMeshShape (btStridingMeshInterface *  meshInterface  )  [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
virtual btGImpactMeshShape::~btGImpactMeshShape (  )  [inline, virtual]
+
+
+ +

+ +

+

+


Member Function Documentation

+ +
+
+ + + + + + + + + +
void btGImpactMeshShape::buildMeshParts (btStridingMeshInterface *  meshInterface  )  [inline, protected]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
virtual void btGImpactMeshShape::calcLocalAABB (  )  [inline, protected, virtual]
+
+
+ +

+use this function for perfofm refit in bounding boxes +

+ +

+Implements btGImpactShapeInterface. +

+

+ +

+
+ + + + + + + + +
int btGImpactMeshShape::getMeshPartCount (  )  [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
btGImpactMeshShapePart* btGImpactMeshShape::getMeshPart (int  index  )  [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
const btGImpactMeshShapePart* btGImpactMeshShape::getMeshPart (int  index  )  const [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
virtual void btGImpactMeshShape::setLocalScaling (const btVector3 &  scaling  )  [inline, virtual]
+
+
+ +

+

Postcondition:
You must call updateBound() for update the box set.
+ +

+Reimplemented from btGImpactShapeInterface. +

+

+ +

+
+ + + + + + + + +
virtual void btGImpactMeshShape::postUpdate (  )  [inline, virtual]
+
+
+ +

+Tells to this object that is needed to refit all the meshes. +

+ +

+Reimplemented from btGImpactShapeInterface. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
virtual void btGImpactMeshShape::calculateLocalInertia (btScalar  mass,
btVector3 &  inertia 
) [virtual]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
virtual eGIMPACT_SHAPE_TYPE btGImpactMeshShape::getGImpactShapeType (  )  [inline, virtual]
+
+
+ +

+Base method for determinig which kind of GIMPACT shape we get. +

+ +

+Implements btGImpactShapeInterface. +

+

+ +

+
+ + + + + + + + +
virtual bool btGImpactMeshShape::hasBoxSet (  )  const [inline, virtual]
+
+
+ +

+Determines if this class has a hierarchy structure for sorting its primitives. +

+ +

+Implements btGImpactShapeInterface. +

+

+ +

+
+ + + + + + + + +
virtual char* btGImpactMeshShape::getName (  )  const [inline, virtual]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void btGImpactMeshShape::rayTest (const btVector3 &  rayFrom,
const btVector3 &  rayTo,
btCollisionWorld::RayResultCallback &  resultCallback 
) const [virtual]
+
+
+ +

+virtual method for ray collision +

+ +

+Reimplemented from btGImpactShapeInterface. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void btGImpactMeshShape::processAllTriangles (btTriangleCallback *  callback,
const btVector3 &  aabbMin,
const btVector3 &  aabbMax 
) const [virtual]
+
+
+ +

+Function for retrieve triangles. +

+It gives the triangles in local space +

+Reimplemented from btGImpactShapeInterface. +

+

+


Member Data Documentation

+ +
+
+ + + + +
btAlignedObjectArray<btGImpactMeshShapePart*> btGImpactMeshShape::m_mesh_parts [protected]
+
+
+ +

+ +

+

+


The documentation for this class was generated from the following file: +
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classbt_g_impact_mesh_shape.png b/Extras/GIMPACT/docs/html/classbt_g_impact_mesh_shape.png new file mode 100755 index 000000000..91b6b2ea1 Binary files /dev/null and b/Extras/GIMPACT/docs/html/classbt_g_impact_mesh_shape.png differ diff --git a/Extras/GIMPACT/docs/html/classbt_g_impact_mesh_shape_part-members.html b/Extras/GIMPACT/docs/html/classbt_g_impact_mesh_shape_part-members.html new file mode 100755 index 000000000..e377f4911 --- /dev/null +++ b/Extras/GIMPACT/docs/html/classbt_g_impact_mesh_shape_part-members.html @@ -0,0 +1,63 @@ + + +GIMPACT: Member List + + + + + + +

btGImpactMeshShapePart Member List

This is the complete list of members for btGImpactMeshShapePart, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
btGImpactMeshShapePart()btGImpactMeshShapePart [inline]
btGImpactMeshShapePart(const btGImpactMeshShapePart &meshpart)btGImpactMeshShapePart [inline]
btGImpactMeshShapePart(btStridingMeshInterface *meshInterface, int part)btGImpactMeshShapePart [inline]
btGImpactShapeInterface()btGImpactShapeInterface [inline]
calcLocalAABB()btGImpactMeshShapePart [inline, protected, virtual]
calculateLocalInertia(btScalar mass, btVector3 &inertia)btGImpactMeshShapePart [virtual]
getAabb(const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) constbtGImpactShapeInterface [inline]
getBoxSet()btGImpactMeshShapePart [inline]
getBulletTriangle(GUINT prim_index, btTriangleShapeEx &triangle) const btGImpactMeshShapePart [inline]
getGImpactShapeType()btGImpactMeshShapePart [inline, virtual]
getLocalBox()btGImpactShapeInterface [inline]
getLocalScaling() constbtGImpactMeshShapePart [inline, virtual]
getMargin() constbtGImpactMeshShapePart [inline]
getName() constbtGImpactMeshShapePart [inline, virtual]
getPart() constbtGImpactMeshShapePart [inline]
getPrimitiveManager() constbtGImpactMeshShapePart [inline]
getShapeType() constbtGImpactShapeInterface [inline, virtual]
getTriangle(GUINT triangle_index, GIM_TRIANGLE &triangle) const btGImpactMeshShapePart [inline]
getTriangleCount() constbtGImpactMeshShapePart [inline]
getVertex(GUINT vertex_index, btVector3 &vertex) constbtGImpactMeshShapePart [inline]
getVertexCount() constbtGImpactMeshShapePart [inline]
hasBoxSet() constbtGImpactMeshShapePart [inline, virtual]
localScalingbtGImpactShapeInterface [protected]
lock() constbtGImpactMeshShapePart [inline]
m_box_setbtGImpactMeshShapePart [protected]
m_localAABBbtGImpactShapeInterface [protected]
m_needs_updatebtGImpactShapeInterface [protected]
postUpdate()btGImpactShapeInterface [inline, virtual]
processAllTriangles(btTriangleCallback *callback, const btVector3 &aabbMin, const btVector3 &aabbMax) const btGImpactMeshShapePart [virtual]
rayTest(const btVector3 &rayFrom, const btVector3 &rayTo, btCollisionWorld::RayResultCallback &resultCallback) const btGImpactMeshShapePart [virtual]
setLocalScaling(const btVector3 &scaling)btGImpactMeshShapePart [inline, virtual]
setMargin(btScalar margin)btGImpactMeshShapePart [inline]
unlock() constbtGImpactMeshShapePart [inline]
updateBound()btGImpactShapeInterface [inline]
~btGImpactMeshShapePart()btGImpactMeshShapePart [inline, virtual]


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classbt_g_impact_mesh_shape_part.html b/Extras/GIMPACT/docs/html/classbt_g_impact_mesh_shape_part.html new file mode 100755 index 000000000..5f3dcc879 --- /dev/null +++ b/Extras/GIMPACT/docs/html/classbt_g_impact_mesh_shape_part.html @@ -0,0 +1,718 @@ + + +GIMPACT: btGImpactMeshShapePart Class Reference + + + + + + +

btGImpactMeshShapePart Class Reference

This class manages a sub part of a mesh supplied by the btStridingMeshInterface interface. +More... +

+#include <btGImpactShape.h> +

+

Inheritance diagram for btGImpactMeshShapePart: +

+ +btGImpactShapeInterface + +List of all members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

 btGImpactMeshShapePart ()
 btGImpactMeshShapePart (const btGImpactMeshShapePart &meshpart)
 btGImpactMeshShapePart (btStridingMeshInterface *meshInterface, int part)
virtual ~btGImpactMeshShapePart ()
SIMD_FORCE_INLINE const TrimeshPrimitiveManagergetPrimitiveManager () const
SIMD_FORCE_INLINE void lock () const
SIMD_FORCE_INLINE void unlock () const
virtual void calculateLocalInertia (btScalar mass, btVector3 &inertia)
SIMD_FORCE_INLINE BoxSetClassgetBoxSet ()
virtual char * getName () const
virtual eGIMPACT_SHAPE_TYPE getGImpactShapeType ()
 Base method for determinig which kind of GIMPACT shape we get.
virtual bool hasBoxSet () const
 Determines if this class has a hierarchy structure for sorting its primitives.
SIMD_FORCE_INLINE GUINT getTriangleCount () const
SIMD_FORCE_INLINE void getTriangle (GUINT triangle_index, GIM_TRIANGLE &triangle) const
SIMD_FORCE_INLINE void getBulletTriangle (GUINT prim_index, btTriangleShapeEx &triangle) const
SIMD_FORCE_INLINE GUINT getVertexCount () const
SIMD_FORCE_INLINE void getVertex (GUINT vertex_index, btVector3 &vertex) const
SIMD_FORCE_INLINE void setMargin (btScalar margin)
SIMD_FORCE_INLINE btScalar getMargin () const
virtual void setLocalScaling (const btVector3 &scaling)
virtual const btVector3 & getLocalScaling () const
SIMD_FORCE_INLINE GUINT getPart () const
virtual void rayTest (const btVector3 &rayFrom, const btVector3 &rayTo, btCollisionWorld::RayResultCallback &resultCallback) const
 virtual method for ray collision
virtual void processAllTriangles (btTriangleCallback *callback, const btVector3 &aabbMin, const btVector3 &aabbMax) const
 Function for retrieve triangles.

Protected Member Functions

virtual void calcLocalAABB ()
 use this function for perfofm refit in bounding boxes

Protected Attributes

BoxSetClass m_box_set

Classes

class  BoxSetClass
class  TrimeshPrimitiveManager
 Trimesh primitive manager. More...
+

Detailed Description

+This class manages a sub part of a mesh supplied by the btStridingMeshInterface interface. +

+

    +
  • Simply create this shape by passing the btStridingMeshInterface to the constructor btGImpactMeshShapePart, then you must call updateBound() after creating the mesh
  • When making operations with this shape, you must call lock before accessing to the trimesh primitives, and then call unlock
  • You can handle deformable meshes with this shape, by calling postUpdate() every time when changing the mesh vertices.
+ +

+


Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
btGImpactMeshShapePart::btGImpactMeshShapePart (  )  [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
btGImpactMeshShapePart::btGImpactMeshShapePart (const btGImpactMeshShapePart meshpart  )  [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
btGImpactMeshShapePart::btGImpactMeshShapePart (btStridingMeshInterface *  meshInterface,
int  part 
) [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
virtual btGImpactMeshShapePart::~btGImpactMeshShapePart (  )  [inline, virtual]
+
+
+ +

+ +

+

+


Member Function Documentation

+ +
+
+ + + + + + + + +
virtual void btGImpactMeshShapePart::calcLocalAABB (  )  [inline, protected, virtual]
+
+
+ +

+use this function for perfofm refit in bounding boxes +

+ +

+Implements btGImpactShapeInterface. +

+

+ +

+
+ + + + + + + + +
SIMD_FORCE_INLINE const TrimeshPrimitiveManager& btGImpactMeshShapePart::getPrimitiveManager (  )  const [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
SIMD_FORCE_INLINE void btGImpactMeshShapePart::lock (  )  const [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
SIMD_FORCE_INLINE void btGImpactMeshShapePart::unlock (  )  const [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
virtual void btGImpactMeshShapePart::calculateLocalInertia (btScalar  mass,
btVector3 &  inertia 
) [virtual]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
SIMD_FORCE_INLINE BoxSetClass* btGImpactMeshShapePart::getBoxSet (  )  [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
virtual char* btGImpactMeshShapePart::getName (  )  const [inline, virtual]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
virtual eGIMPACT_SHAPE_TYPE btGImpactMeshShapePart::getGImpactShapeType (  )  [inline, virtual]
+
+
+ +

+Base method for determinig which kind of GIMPACT shape we get. +

+ +

+Implements btGImpactShapeInterface. +

+

+ +

+
+ + + + + + + + +
virtual bool btGImpactMeshShapePart::hasBoxSet (  )  const [inline, virtual]
+
+
+ +

+Determines if this class has a hierarchy structure for sorting its primitives. +

+ +

+Implements btGImpactShapeInterface. +

+

+ +

+
+ + + + + + + + +
SIMD_FORCE_INLINE GUINT btGImpactMeshShapePart::getTriangleCount (  )  const [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE void btGImpactMeshShapePart::getTriangle (GUINT  triangle_index,
GIM_TRIANGLE triangle 
) const [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE void btGImpactMeshShapePart::getBulletTriangle (GUINT  prim_index,
btTriangleShapeEx triangle 
) const [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
SIMD_FORCE_INLINE GUINT btGImpactMeshShapePart::getVertexCount (  )  const [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE void btGImpactMeshShapePart::getVertex (GUINT  vertex_index,
btVector3 &  vertex 
) const [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
SIMD_FORCE_INLINE void btGImpactMeshShapePart::setMargin (btScalar  margin  )  [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
SIMD_FORCE_INLINE btScalar btGImpactMeshShapePart::getMargin (  )  const [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
virtual void btGImpactMeshShapePart::setLocalScaling (const btVector3 &  scaling  )  [inline, virtual]
+
+
+ +

+

Postcondition:
You must call updateBound() for update the box set.
+ +

+Reimplemented from btGImpactShapeInterface. +

+

+ +

+
+ + + + + + + + +
virtual const btVector3& btGImpactMeshShapePart::getLocalScaling (  )  const [inline, virtual]
+
+
+ +

+ +

+Reimplemented from btGImpactShapeInterface. +

+

+ +

+
+ + + + + + + + +
SIMD_FORCE_INLINE GUINT btGImpactMeshShapePart::getPart (  )  const [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void btGImpactMeshShapePart::rayTest (const btVector3 &  rayFrom,
const btVector3 &  rayTo,
btCollisionWorld::RayResultCallback &  resultCallback 
) const [virtual]
+
+
+ +

+virtual method for ray collision +

+ +

+Reimplemented from btGImpactShapeInterface. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void btGImpactMeshShapePart::processAllTriangles (btTriangleCallback *  callback,
const btVector3 &  aabbMin,
const btVector3 &  aabbMax 
) const [virtual]
+
+
+ +

+Function for retrieve triangles. +

+It gives the triangles in local space +

+Reimplemented from btGImpactShapeInterface. +

+

+


Member Data Documentation

+ +
+ +
+ +

+ +

+

+


The documentation for this class was generated from the following file: +
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classbt_g_impact_mesh_shape_part.png b/Extras/GIMPACT/docs/html/classbt_g_impact_mesh_shape_part.png new file mode 100755 index 000000000..c84e10e16 Binary files /dev/null and b/Extras/GIMPACT/docs/html/classbt_g_impact_mesh_shape_part.png differ diff --git a/Extras/GIMPACT/docs/html/classbt_g_impact_mesh_shape_part_1_1_box_set_class-members.html b/Extras/GIMPACT/docs/html/classbt_g_impact_mesh_shape_part_1_1_box_set_class-members.html new file mode 100755 index 000000000..53cbf1aa8 --- /dev/null +++ b/Extras/GIMPACT/docs/html/classbt_g_impact_mesh_shape_part_1_1_box_set_class-members.html @@ -0,0 +1,52 @@ + + +GIMPACT: Member List + + + + + + +

btGImpactMeshShapePart::BoxSetClass Member List

This is the complete list of members for btGImpactMeshShapePart::BoxSetClass, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + +
boxQuery(const GIM_AABB &box, gim_array< GUINT > &collided_results) const GIM_BOX_TREE_TEMPLATE_SET< TrimeshPrimitiveManager, GIM_BOX_TREE > [inline]
boxQueryTrans(const GIM_AABB &box, const btTransform &transform, gim_array< GUINT > &collided_results) constGIM_BOX_TREE_TEMPLATE_SET< TrimeshPrimitiveManager, GIM_BOX_TREE > [inline]
buildSet()GIM_BOX_TREE_TEMPLATE_SET< TrimeshPrimitiveManager, GIM_BOX_TREE > [inline]
getGlobalBox() constGIM_BOX_TREE_TEMPLATE_SET< TrimeshPrimitiveManager, GIM_BOX_TREE > [inline]
getLeftNodeIndex(GUINT nodeindex) const GIM_BOX_TREE_TEMPLATE_SET< TrimeshPrimitiveManager, GIM_BOX_TREE > [inline]
getNodeBound(GUINT nodeindex, GIM_AABB &bound) const GIM_BOX_TREE_TEMPLATE_SET< TrimeshPrimitiveManager, GIM_BOX_TREE > [inline]
getNodeCount() constGIM_BOX_TREE_TEMPLATE_SET< TrimeshPrimitiveManager, GIM_BOX_TREE > [inline]
getNodeData(GUINT nodeindex) const GIM_BOX_TREE_TEMPLATE_SET< TrimeshPrimitiveManager, GIM_BOX_TREE > [inline]
getNodeTriangle(GUINT nodeindex, GIM_TRIANGLE &triangle) const GIM_BOX_TREE_TEMPLATE_SET< TrimeshPrimitiveManager, GIM_BOX_TREE > [inline]
getPrimitiveManager() constGIM_BOX_TREE_TEMPLATE_SET< TrimeshPrimitiveManager, GIM_BOX_TREE > [inline]
getPrimitiveManager()GIM_BOX_TREE_TEMPLATE_SET< TrimeshPrimitiveManager, GIM_BOX_TREE > [inline]
getRightNodeIndex(GUINT nodeindex) const GIM_BOX_TREE_TEMPLATE_SET< TrimeshPrimitiveManager, GIM_BOX_TREE > [inline]
getScapeNodeIndex(GUINT nodeindex) const GIM_BOX_TREE_TEMPLATE_SET< TrimeshPrimitiveManager, GIM_BOX_TREE > [inline]
GIM_BOX_TREE_TEMPLATE_SET()GIM_BOX_TREE_TEMPLATE_SET< TrimeshPrimitiveManager, GIM_BOX_TREE > [inline]
hasHierarchy() constGIM_BOX_TREE_TEMPLATE_SET< TrimeshPrimitiveManager, GIM_BOX_TREE > [inline]
isLeafNode(GUINT nodeindex) const GIM_BOX_TREE_TEMPLATE_SET< TrimeshPrimitiveManager, GIM_BOX_TREE > [inline]
isTrimesh() constGIM_BOX_TREE_TEMPLATE_SET< TrimeshPrimitiveManager, GIM_BOX_TREE > [inline]
m_box_treeGIM_BOX_TREE_TEMPLATE_SET< TrimeshPrimitiveManager, GIM_BOX_TREE > [protected]
m_primitive_managerGIM_BOX_TREE_TEMPLATE_SET< TrimeshPrimitiveManager, GIM_BOX_TREE > [protected]
rayQuery(const btVector3 &ray_dir, const btVector3 &ray_origin, gim_array< GUINT > &collided_results) constGIM_BOX_TREE_TEMPLATE_SET< TrimeshPrimitiveManager, GIM_BOX_TREE > [inline]
refit()GIM_BOX_TREE_TEMPLATE_SET< TrimeshPrimitiveManager, GIM_BOX_TREE > [inline, protected]
setNodeBound(GUINT nodeindex, const GIM_AABB &bound)GIM_BOX_TREE_TEMPLATE_SET< TrimeshPrimitiveManager, GIM_BOX_TREE > [inline]
setPrimitiveManager(const TrimeshPrimitiveManager &primitive_manager)GIM_BOX_TREE_TEMPLATE_SET< TrimeshPrimitiveManager, GIM_BOX_TREE > [inline]
update()GIM_BOX_TREE_TEMPLATE_SET< TrimeshPrimitiveManager, GIM_BOX_TREE > [inline]


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classbt_g_impact_mesh_shape_part_1_1_box_set_class.html b/Extras/GIMPACT/docs/html/classbt_g_impact_mesh_shape_part_1_1_box_set_class.html new file mode 100755 index 000000000..cfed1e267 --- /dev/null +++ b/Extras/GIMPACT/docs/html/classbt_g_impact_mesh_shape_part_1_1_box_set_class.html @@ -0,0 +1,42 @@ + + +GIMPACT: btGImpactMeshShapePart::BoxSetClass Class Reference + + + + + + + +

btGImpactMeshShapePart::BoxSetClass Class Reference

#include <btGImpactShape.h> +

+

Inheritance diagram for btGImpactMeshShapePart::BoxSetClass: +

+ +GIM_BOX_TREE_SET< TrimeshPrimitiveManager > +GIM_BOX_TREE_TEMPLATE_SET< TrimeshPrimitiveManager, GIM_BOX_TREE > + +List of all members. + +
+
The documentation for this class was generated from the following file: +
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classbt_g_impact_mesh_shape_part_1_1_box_set_class.png b/Extras/GIMPACT/docs/html/classbt_g_impact_mesh_shape_part_1_1_box_set_class.png new file mode 100755 index 000000000..c21cbb8eb Binary files /dev/null and b/Extras/GIMPACT/docs/html/classbt_g_impact_mesh_shape_part_1_1_box_set_class.png differ diff --git a/Extras/GIMPACT/docs/html/classbt_g_impact_mesh_shape_part_1_1_trimesh_primitive_manager-members.html b/Extras/GIMPACT/docs/html/classbt_g_impact_mesh_shape_part_1_1_trimesh_primitive_manager-members.html new file mode 100755 index 000000000..2d78dbf28 --- /dev/null +++ b/Extras/GIMPACT/docs/html/classbt_g_impact_mesh_shape_part_1_1_trimesh_primitive_manager-members.html @@ -0,0 +1,54 @@ + + +GIMPACT: Member List + + + + + + +

btGImpactMeshShapePart::TrimeshPrimitiveManager Member List

This is the complete list of members for btGImpactMeshShapePart::TrimeshPrimitiveManager, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
get_bullet_triangle(GUINT prim_index, btTriangleShapeEx &triangle) const btGImpactMeshShapePart::TrimeshPrimitiveManager [inline]
get_indices(GUINT face_index, GUINT &i0, GUINT &i1, GUINT &i2) constbtGImpactMeshShapePart::TrimeshPrimitiveManager [inline]
get_primitive_box(GUINT prim_index, GIM_AABB &primbox) constbtGImpactMeshShapePart::TrimeshPrimitiveManager [inline]
get_primitive_count() constbtGImpactMeshShapePart::TrimeshPrimitiveManager [inline]
get_primitive_triangle(GUINT prim_index, GIM_TRIANGLE &triangle) const btGImpactMeshShapePart::TrimeshPrimitiveManager [inline]
get_vertex(GUINT vertex_index, btVector3 &vertex) constbtGImpactMeshShapePart::TrimeshPrimitiveManager [inline]
get_vertex_count() constbtGImpactMeshShapePart::TrimeshPrimitiveManager [inline]
indexbasebtGImpactMeshShapePart::TrimeshPrimitiveManager
indexstridebtGImpactMeshShapePart::TrimeshPrimitiveManager
indicestypebtGImpactMeshShapePart::TrimeshPrimitiveManager
is_trimesh() constbtGImpactMeshShapePart::TrimeshPrimitiveManager [inline]
lock()btGImpactMeshShapePart::TrimeshPrimitiveManager [inline]
m_lock_countbtGImpactMeshShapePart::TrimeshPrimitiveManager
m_marginbtGImpactMeshShapePart::TrimeshPrimitiveManager
m_meshInterfacebtGImpactMeshShapePart::TrimeshPrimitiveManager
m_partbtGImpactMeshShapePart::TrimeshPrimitiveManager
m_scalebtGImpactMeshShapePart::TrimeshPrimitiveManager
numfacesbtGImpactMeshShapePart::TrimeshPrimitiveManager
numvertsbtGImpactMeshShapePart::TrimeshPrimitiveManager
stridebtGImpactMeshShapePart::TrimeshPrimitiveManager
TrimeshPrimitiveManager()btGImpactMeshShapePart::TrimeshPrimitiveManager [inline]
TrimeshPrimitiveManager(const TrimeshPrimitiveManager &manager)btGImpactMeshShapePart::TrimeshPrimitiveManager [inline]
TrimeshPrimitiveManager(btStridingMeshInterface *meshInterface, int part)btGImpactMeshShapePart::TrimeshPrimitiveManager [inline]
typebtGImpactMeshShapePart::TrimeshPrimitiveManager
unlock()btGImpactMeshShapePart::TrimeshPrimitiveManager [inline]
vertexbasebtGImpactMeshShapePart::TrimeshPrimitiveManager


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classbt_g_impact_mesh_shape_part_1_1_trimesh_primitive_manager.html b/Extras/GIMPACT/docs/html/classbt_g_impact_mesh_shape_part_1_1_trimesh_primitive_manager.html new file mode 100755 index 000000000..b5024327e --- /dev/null +++ b/Extras/GIMPACT/docs/html/classbt_g_impact_mesh_shape_part_1_1_trimesh_primitive_manager.html @@ -0,0 +1,616 @@ + + +GIMPACT: btGImpactMeshShapePart::TrimeshPrimitiveManager Class Reference + + + + + + + +

btGImpactMeshShapePart::TrimeshPrimitiveManager Class Reference

Trimesh primitive manager. +More... +

+#include <btGImpactShape.h> +

+List of all members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

 TrimeshPrimitiveManager ()
 TrimeshPrimitiveManager (const TrimeshPrimitiveManager &manager)
 TrimeshPrimitiveManager (btStridingMeshInterface *meshInterface, int part)
void lock ()
void unlock ()
SIMD_FORCE_INLINE bool is_trimesh () const
SIMD_FORCE_INLINE GUINT get_primitive_count () const
SIMD_FORCE_INLINE GUINT get_vertex_count () const
SIMD_FORCE_INLINE void get_indices (GUINT face_index, GUINT &i0, GUINT &i1, GUINT &i2) const
SIMD_FORCE_INLINE void get_vertex (GUINT vertex_index, btVector3 &vertex) const
SIMD_FORCE_INLINE void get_primitive_box (GUINT prim_index, GIM_AABB &primbox) const
SIMD_FORCE_INLINE void get_primitive_triangle (GUINT prim_index, GIM_TRIANGLE &triangle) const
SIMD_FORCE_INLINE void get_bullet_triangle (GUINT prim_index, btTriangleShapeEx &triangle) const

Public Attributes

btScalar m_margin
btStridingMeshInterface * m_meshInterface
btVector3 m_scale
int m_part
GUINT m_lock_count
const unsigned char * vertexbase
int numverts
PHY_ScalarType type
int stride
const unsigned char * indexbase
int indexstride
int numfaces
PHY_ScalarType indicestype
+


Detailed Description

+Trimesh primitive manager. +

+Manages the info from btStridingMeshInterface object and controls the Lock/Unlock mechanism +

+


Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
btGImpactMeshShapePart::TrimeshPrimitiveManager::TrimeshPrimitiveManager (  )  [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
btGImpactMeshShapePart::TrimeshPrimitiveManager::TrimeshPrimitiveManager (const TrimeshPrimitiveManager manager  )  [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
btGImpactMeshShapePart::TrimeshPrimitiveManager::TrimeshPrimitiveManager (btStridingMeshInterface *  meshInterface,
int  part 
) [inline]
+
+
+ +

+ +

+

+


Member Function Documentation

+ +
+
+ + + + + + + + +
void btGImpactMeshShapePart::TrimeshPrimitiveManager::lock (  )  [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void btGImpactMeshShapePart::TrimeshPrimitiveManager::unlock (  )  [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
SIMD_FORCE_INLINE bool btGImpactMeshShapePart::TrimeshPrimitiveManager::is_trimesh (  )  const [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
SIMD_FORCE_INLINE GUINT btGImpactMeshShapePart::TrimeshPrimitiveManager::get_primitive_count (  )  const [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
SIMD_FORCE_INLINE GUINT btGImpactMeshShapePart::TrimeshPrimitiveManager::get_vertex_count (  )  const [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE void btGImpactMeshShapePart::TrimeshPrimitiveManager::get_indices (GUINT  face_index,
GUINT &  i0,
GUINT &  i1,
GUINT &  i2 
) const [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE void btGImpactMeshShapePart::TrimeshPrimitiveManager::get_vertex (GUINT  vertex_index,
btVector3 &  vertex 
) const [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE void btGImpactMeshShapePart::TrimeshPrimitiveManager::get_primitive_box (GUINT  prim_index,
GIM_AABB primbox 
) const [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE void btGImpactMeshShapePart::TrimeshPrimitiveManager::get_primitive_triangle (GUINT  prim_index,
GIM_TRIANGLE triangle 
) const [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE void btGImpactMeshShapePart::TrimeshPrimitiveManager::get_bullet_triangle (GUINT  prim_index,
btTriangleShapeEx triangle 
) const [inline]
+
+
+ +

+ +

+

+


Member Data Documentation

+ +

+ +

+ +
+ +

+ +

+

+ +

+ +

+ +

+ +

+ +
+ +

+ +

+

+ +

+ +

+ +
+ +

+ +

+

+ +

+ +

+ +
+ +

+ +

+

+ +

+ +

+ +

+ +
+ +

+ +

+

+


The documentation for this class was generated from the following file: +
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classbt_g_impact_shape_interface-members.html b/Extras/GIMPACT/docs/html/classbt_g_impact_shape_interface-members.html new file mode 100755 index 000000000..84b4ca68e --- /dev/null +++ b/Extras/GIMPACT/docs/html/classbt_g_impact_shape_interface-members.html @@ -0,0 +1,44 @@ + + +GIMPACT: Member List + + + + + + +

btGImpactShapeInterface Member List

This is the complete list of members for btGImpactShapeInterface, including all inherited members.

+ + + + + + + + + + + + + + + + +
btGImpactShapeInterface()btGImpactShapeInterface [inline]
calcLocalAABB()=0btGImpactShapeInterface [protected, pure virtual]
getAabb(const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) constbtGImpactShapeInterface [inline]
getGImpactShapeType()=0btGImpactShapeInterface [pure virtual]
getLocalBox()btGImpactShapeInterface [inline]
getLocalScaling() constbtGImpactShapeInterface [inline, virtual]
getShapeType() constbtGImpactShapeInterface [inline, virtual]
hasBoxSet() const=0btGImpactShapeInterface [pure virtual]
localScalingbtGImpactShapeInterface [protected]
m_localAABBbtGImpactShapeInterface [protected]
m_needs_updatebtGImpactShapeInterface [protected]
postUpdate()btGImpactShapeInterface [inline, virtual]
processAllTriangles(btTriangleCallback *callback, const btVector3 &aabbMin, const btVector3 &aabbMax) const btGImpactShapeInterface [inline, virtual]
rayTest(const btVector3 &rayFrom, const btVector3 &rayTo, btCollisionWorld::RayResultCallback &resultCallback) const btGImpactShapeInterface [inline, virtual]
setLocalScaling(const btVector3 &scaling)btGImpactShapeInterface [inline, virtual]
updateBound()btGImpactShapeInterface [inline]


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classbt_g_impact_shape_interface.html b/Extras/GIMPACT/docs/html/classbt_g_impact_shape_interface.html new file mode 100755 index 000000000..0c5408dc6 --- /dev/null +++ b/Extras/GIMPACT/docs/html/classbt_g_impact_shape_interface.html @@ -0,0 +1,473 @@ + + +GIMPACT: btGImpactShapeInterface Class Reference + + + + + + +

btGImpactShapeInterface Class Reference

Base class for gimpact shapes. +More... +

+#include <btGImpactShape.h> +

+

Inheritance diagram for btGImpactShapeInterface: +

+ +btGImpactCompoundShape +btGImpactMeshShape +btGImpactMeshShapePart + +List of all members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

 btGImpactShapeInterface ()
SIMD_FORCE_INLINE void updateBound ()
 performs refit operation
void getAabb (const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) const
 If the Bounding box is not updated, then this class attemps to calculate it.
virtual void postUpdate ()
 Tells to this object that is needed to refit the box set.
const GIM_AABBgetLocalBox ()
 Obtains the local box, which is the global calculated box of the total of subshapes.
virtual int getShapeType () const
virtual eGIMPACT_SHAPE_TYPE getGImpactShapeType ()=0
 Base method for determinig which kind of GIMPACT shape we get.
virtual bool hasBoxSet () const=0
 Determines if this class has a hierarchy structure for sorting its primitives.
virtual void setLocalScaling (const btVector3 &scaling)
virtual const btVector3 & getLocalScaling () const
virtual void rayTest (const btVector3 &rayFrom, const btVector3 &rayTo, btCollisionWorld::RayResultCallback &resultCallback) const
 virtual method for ray collision
virtual void processAllTriangles (btTriangleCallback *callback, const btVector3 &aabbMin, const btVector3 &aabbMax) const
 Function for retrieve triangles.

Protected Member Functions

virtual void calcLocalAABB ()=0
 use this function for perfofm refit in bounding boxes

Protected Attributes

GIM_AABB m_localAABB
bool m_needs_update
btVector3 localScaling
+

Detailed Description

+Base class for gimpact shapes. +

+


Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
btGImpactShapeInterface::btGImpactShapeInterface (  )  [inline]
+
+
+ +

+ +

+

+


Member Function Documentation

+ +
+
+ + + + + + + + +
virtual void btGImpactShapeInterface::calcLocalAABB (  )  [protected, pure virtual]
+
+
+ +

+use this function for perfofm refit in bounding boxes +

+ +

+Implemented in btGImpactCompoundShape, btGImpactMeshShapePart, and btGImpactMeshShape. +

+

+ +

+
+ + + + + + + + +
SIMD_FORCE_INLINE void btGImpactShapeInterface::updateBound (  )  [inline]
+
+
+ +

+performs refit operation +

+Updates the entire Box set of this shape.

Precondition:
postUpdate() must be called for attemps to calculating the box set, else this function will does nothing.
+
Postcondition:
if m_needs_update == true, then it calls calcLocalAABB();
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void btGImpactShapeInterface::getAabb (const btTransform &  t,
btVector3 &  aabbMin,
btVector3 &  aabbMax 
) const [inline]
+
+
+ +

+If the Bounding box is not updated, then this class attemps to calculate it. +

+

Postcondition:
Calls updateBound() for update the box set.
+ +
+

+ +

+
+ + + + + + + + +
virtual void btGImpactShapeInterface::postUpdate (  )  [inline, virtual]
+
+
+ +

+Tells to this object that is needed to refit the box set. +

+ +

+Reimplemented in btGImpactMeshShape. +

+

+ +

+
+ + + + + + + + +
const GIM_AABB& btGImpactShapeInterface::getLocalBox (  )  [inline]
+
+
+ +

+Obtains the local box, which is the global calculated box of the total of subshapes. +

+ +

+

+ +

+
+ + + + + + + + +
virtual int btGImpactShapeInterface::getShapeType (  )  const [inline, virtual]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
virtual eGIMPACT_SHAPE_TYPE btGImpactShapeInterface::getGImpactShapeType (  )  [pure virtual]
+
+
+ +

+Base method for determinig which kind of GIMPACT shape we get. +

+ +

+Implemented in btGImpactCompoundShape, btGImpactMeshShapePart, and btGImpactMeshShape. +

+

+ +

+
+ + + + + + + + +
virtual bool btGImpactShapeInterface::hasBoxSet (  )  const [pure virtual]
+
+
+ +

+Determines if this class has a hierarchy structure for sorting its primitives. +

+ +

+Implemented in btGImpactCompoundShape, btGImpactMeshShapePart, and btGImpactMeshShape. +

+

+ +

+
+ + + + + + + + + +
virtual void btGImpactShapeInterface::setLocalScaling (const btVector3 &  scaling  )  [inline, virtual]
+
+
+ +

+

Postcondition:
You must call updateBound() for update the box set.
+ +

+Reimplemented in btGImpactMeshShapePart, and btGImpactMeshShape. +

+

+ +

+
+ + + + + + + + +
virtual const btVector3& btGImpactShapeInterface::getLocalScaling (  )  const [inline, virtual]
+
+
+ +

+ +

+Reimplemented in btGImpactMeshShapePart. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void btGImpactShapeInterface::rayTest (const btVector3 &  rayFrom,
const btVector3 &  rayTo,
btCollisionWorld::RayResultCallback &  resultCallback 
) const [inline, virtual]
+
+
+ +

+virtual method for ray collision +

+ +

+Reimplemented in btGImpactCompoundShape, btGImpactMeshShapePart, and btGImpactMeshShape. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void btGImpactShapeInterface::processAllTriangles (btTriangleCallback *  callback,
const btVector3 &  aabbMin,
const btVector3 &  aabbMax 
) const [inline, virtual]
+
+
+ +

+Function for retrieve triangles. +

+It gives the triangles in local space +

+Reimplemented in btGImpactMeshShapePart, and btGImpactMeshShape. +

+

+


Member Data Documentation

+ +
+ +
+ +

+ +

+

+ +

+
+ + + + +
bool btGImpactShapeInterface::m_needs_update [protected]
+
+
+ +

+ +

+

+ +

+
+ + + + +
btVector3 btGImpactShapeInterface::localScaling [protected]
+
+
+ +

+ +

+

+


The documentation for this class was generated from the following file: +
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classbt_g_impact_shape_interface.png b/Extras/GIMPACT/docs/html/classbt_g_impact_shape_interface.png new file mode 100755 index 000000000..ee972e368 Binary files /dev/null and b/Extras/GIMPACT/docs/html/classbt_g_impact_shape_interface.png differ diff --git a/Extras/GIMPACT/docs/html/classbt_triangle_shape_ex-members.html b/Extras/GIMPACT/docs/html/classbt_triangle_shape_ex-members.html new file mode 100755 index 000000000..801221a0a --- /dev/null +++ b/Extras/GIMPACT/docs/html/classbt_triangle_shape_ex-members.html @@ -0,0 +1,30 @@ + + +GIMPACT: Member List + + + + + + +

btTriangleShapeEx Member List

This is the complete list of members for btTriangleShapeEx, including all inherited members.

+ + +
btTriangleShapeEx(const btVector3 &p0, const btVector3 &p1, const btVector3 &p2)btTriangleShapeEx [inline]
getAabb(const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) constbtTriangleShapeEx [inline, virtual]


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classbt_triangle_shape_ex.html b/Extras/GIMPACT/docs/html/classbt_triangle_shape_ex.html new file mode 100755 index 000000000..20dad8d15 --- /dev/null +++ b/Extras/GIMPACT/docs/html/classbt_triangle_shape_ex.html @@ -0,0 +1,119 @@ + + +GIMPACT: btTriangleShapeEx Class Reference + + + + + + +

btTriangleShapeEx Class Reference

Helper class for colliding Bullet Triangle Shapes. +More... +

+#include <btGImpactShape.h> +

+List of all members. + + + + + + +

Public Member Functions

 btTriangleShapeEx (const btVector3 &p0, const btVector3 &p1, const btVector3 &p2)
virtual void getAabb (const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) const
+


Detailed Description

+Helper class for colliding Bullet Triangle Shapes. +

+This class implements a better getAabb method than the previous btTriangleShape class +

+


Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
btTriangleShapeEx::btTriangleShapeEx (const btVector3 &  p0,
const btVector3 &  p1,
const btVector3 &  p2 
) [inline]
+
+
+ +

+ +

+

+


Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void btTriangleShapeEx::getAabb (const btTransform &  t,
btVector3 &  aabbMin,
btVector3 &  aabbMax 
) const [inline, virtual]
+
+
+ +

+ +

+

+


The documentation for this class was generated from the following file: +
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classcopy__elements__func-members.html b/Extras/GIMPACT/docs/html/classcopy__elements__func-members.html new file mode 100755 index 000000000..bf2c7a373 --- /dev/null +++ b/Extras/GIMPACT/docs/html/classcopy__elements__func-members.html @@ -0,0 +1,29 @@ + + +GIMPACT: Member List + + + + + + +

copy_elements_func Member List

This is the complete list of members for copy_elements_func, including all inherited members.

+ +
operator()(T &a, T &b)copy_elements_func [inline]


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classcopy__elements__func.html b/Extras/GIMPACT/docs/html/classcopy__elements__func.html new file mode 100755 index 000000000..e008f9fc0 --- /dev/null +++ b/Extras/GIMPACT/docs/html/classcopy__elements__func.html @@ -0,0 +1,76 @@ + + +GIMPACT: copy_elements_func Class Reference + + + + + + +

copy_elements_func Class Reference

Prototype for copying elements. +More... +

+#include <gim_radixsort.h> +

+List of all members. + + + + + +

Public Member Functions

template<class T>
void operator() (T &a, T &b)
+


Detailed Description

+Prototype for copying elements. +

+


Member Function Documentation

+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
void copy_elements_func::operator() (T &  a,
T &  b 
) [inline]
+
+
+ +

+ +

+

+


The documentation for this class was generated from the following file: +
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classgim__array-members.html b/Extras/GIMPACT/docs/html/classgim__array-members.html new file mode 100755 index 000000000..8a306fc9e --- /dev/null +++ b/Extras/GIMPACT/docs/html/classgim__array-members.html @@ -0,0 +1,68 @@ + + +GIMPACT: Member List + + + + + + +

gim_array< T > Member List

This is the complete list of members for gim_array< T >, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
at(GUINT i)gim_array< T > [inline]
at(GUINT i) constgim_array< T > [inline]
back()gim_array< T > [inline]
back() constgim_array< T > [inline]
clear()gim_array< T > [inline]
clear_memory()gim_array< T > [inline]
clear_range(GUINT start_range)gim_array< T > [inline]
destroyData()gim_array< T > [inline]
erase(GUINT index)gim_array< T > [inline]
erase_sorted(GUINT index)gim_array< T > [inline]
erase_sorted_mem(GUINT index)gim_array< T > [inline]
front()gim_array< T > [inline]
front() constgim_array< T > [inline]
get_pointer_at(GUINT i)gim_array< T > [inline]
get_pointer_at(GUINT i) constgim_array< T > [inline]
gim_array()gim_array< T > [inline]
gim_array(GUINT reservesize)gim_array< T > [inline]
growingCheck()gim_array< T > [inline]
insert(const T &obj, GUINT index)gim_array< T > [inline]
insert_mem(GUINT index)gim_array< T > [inline]
m_allocated_sizegim_array< T >
m_datagim_array< T >
m_sizegim_array< T >
max_size() constgim_array< T > [inline]
operator[](size_t i)gim_array< T > [inline]
operator[](size_t i) constgim_array< T > [inline]
pointer()gim_array< T > [inline]
pointer() constgim_array< T > [inline]
pop_back()gim_array< T > [inline]
pop_back_mem()gim_array< T > [inline]
push_back(const T &obj)gim_array< T > [inline]
push_back_mem()gim_array< T > [inline]
push_back_memcpy(const T &obj)gim_array< T > [inline]
refit()gim_array< T > [inline]
reserve(GUINT size)gim_array< T > [inline]
resize(GUINT size, bool call_constructor=true)gim_array< T > [inline]
resizeData(GUINT newsize)gim_array< T > [inline]
size() constgim_array< T > [inline]
swap(GUINT i, GUINT j)gim_array< T > [inline]
~gim_array()gim_array< T > [inline]


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classgim__array.html b/Extras/GIMPACT/docs/html/classgim__array.html new file mode 100755 index 000000000..46099ea36 --- /dev/null +++ b/Extras/GIMPACT/docs/html/classgim__array.html @@ -0,0 +1,1017 @@ + + +GIMPACT: gim_array< T > Class Template Reference + + + + + + +

gim_array< T > Class Template Reference
+ +[CONTAINERS] +

Very simple array container with fast access and simd memory. +More... +

+#include <gim_array.h> +

+List of all members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

void destroyData ()
bool resizeData (GUINT newsize)
bool growingCheck ()
bool reserve (GUINT size)
void clear_range (GUINT start_range)
void clear ()
void clear_memory ()
 gim_array ()
 gim_array (GUINT reservesize)
 ~gim_array ()
GUINT size () const
GUINT max_size () const
T & operator[] (size_t i)
const T & operator[] (size_t i) const
T * pointer ()
const T * pointer () const
T * get_pointer_at (GUINT i)
const T * get_pointer_at (GUINT i) const
T & at (GUINT i)
const T & at (GUINT i) const
T & front ()
const T & front () const
T & back ()
const T & back () const
void swap (GUINT i, GUINT j)
void push_back (const T &obj)
void push_back_mem ()
 Simply increase the m_size, doesn't call the new element constructor.
void push_back_memcpy (const T &obj)
void pop_back ()
void pop_back_mem ()
 Simply decrease the m_size, doesn't call the deleted element destructor.
void erase (GUINT index)
 fast erase
void erase_sorted_mem (GUINT index)
void erase_sorted (GUINT index)
void insert_mem (GUINT index)
void insert (const T &obj, GUINT index)
void resize (GUINT size, bool call_constructor=true)
void refit ()

Public Attributes

T * m_data
GUINT m_size
GUINT m_allocated_size
+


Detailed Description

+

template<typename T>
+ class gim_array< T >

+ +Very simple array container with fast access and simd memory. +

+


Constructor & Destructor Documentation

+ +
+
+
+template<typename T>
+ + + + + + + + +
gim_array< T >::gim_array (  )  [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename T>
+ + + + + + + + + +
gim_array< T >::gim_array (GUINT  reservesize  )  [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename T>
+ + + + + + + + +
gim_array< T >::~gim_array (  )  [inline]
+
+
+ +

+ +

+

+


Member Function Documentation

+ +
+
+
+template<typename T>
+ + + + + + + + +
void gim_array< T >::destroyData (  )  [inline]
+
+
+ +

+protected operations +

+

+ +

+
+
+template<typename T>
+ + + + + + + + + +
bool gim_array< T >::resizeData (GUINT  newsize  )  [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename T>
+ + + + + + + + +
bool gim_array< T >::growingCheck (  )  [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename T>
+ + + + + + + + + +
bool gim_array< T >::reserve (GUINT  size  )  [inline]
+
+
+ +

+public operations +

+

+ +

+
+
+template<typename T>
+ + + + + + + + + +
void gim_array< T >::clear_range (GUINT  start_range  )  [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename T>
+ + + + + + + + +
void gim_array< T >::clear (  )  [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename T>
+ + + + + + + + +
void gim_array< T >::clear_memory (  )  [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename T>
+ + + + + + + + +
GUINT gim_array< T >::size (  )  const [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename T>
+ + + + + + + + +
GUINT gim_array< T >::max_size (  )  const [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename T>
+ + + + + + + + + +
T& gim_array< T >::operator[] (size_t  i  )  [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename T>
+ + + + + + + + + +
const T& gim_array< T >::operator[] (size_t  i  )  const [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename T>
+ + + + + + + + +
T* gim_array< T >::pointer (  )  [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename T>
+ + + + + + + + +
const T* gim_array< T >::pointer (  )  const [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename T>
+ + + + + + + + + +
T* gim_array< T >::get_pointer_at (GUINT  i  )  [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename T>
+ + + + + + + + + +
const T* gim_array< T >::get_pointer_at (GUINT  i  )  const [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename T>
+ + + + + + + + + +
T& gim_array< T >::at (GUINT  i  )  [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename T>
+ + + + + + + + + +
const T& gim_array< T >::at (GUINT  i  )  const [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename T>
+ + + + + + + + +
T& gim_array< T >::front (  )  [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename T>
+ + + + + + + + +
const T& gim_array< T >::front (  )  const [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename T>
+ + + + + + + + +
T& gim_array< T >::back (  )  [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename T>
+ + + + + + + + +
const T& gim_array< T >::back (  )  const [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename T>
+ + + + + + + + + + + + + + + + + + +
void gim_array< T >::swap (GUINT  i,
GUINT  j 
) [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename T>
+ + + + + + + + + +
void gim_array< T >::push_back (const T &  obj  )  [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename T>
+ + + + + + + + +
void gim_array< T >::push_back_mem (  )  [inline]
+
+
+ +

+Simply increase the m_size, doesn't call the new element constructor. +

+ +

+

+ +

+
+
+template<typename T>
+ + + + + + + + + +
void gim_array< T >::push_back_memcpy (const T &  obj  )  [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename T>
+ + + + + + + + +
void gim_array< T >::pop_back (  )  [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename T>
+ + + + + + + + +
void gim_array< T >::pop_back_mem (  )  [inline]
+
+
+ +

+Simply decrease the m_size, doesn't call the deleted element destructor. +

+ +

+

+ +

+
+
+template<typename T>
+ + + + + + + + + +
void gim_array< T >::erase (GUINT  index  )  [inline]
+
+
+ +

+fast erase +

+ +

+

+ +

+
+
+template<typename T>
+ + + + + + + + + +
void gim_array< T >::erase_sorted_mem (GUINT  index  )  [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename T>
+ + + + + + + + + +
void gim_array< T >::erase_sorted (GUINT  index  )  [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename T>
+ + + + + + + + + +
void gim_array< T >::insert_mem (GUINT  index  )  [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename T>
+ + + + + + + + + + + + + + + + + + +
void gim_array< T >::insert (const T &  obj,
GUINT  index 
) [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename T>
+ + + + + + + + + + + + + + + + + + +
void gim_array< T >::resize (GUINT  size,
bool  call_constructor = true 
) [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename T>
+ + + + + + + + +
void gim_array< T >::refit (  )  [inline]
+
+
+ +

+ +

+

+


Member Data Documentation

+ +
+
+
+template<typename T>
+ + + + +
T* gim_array< T >::m_data
+
+
+ +

+properties +

+

+ +

+
+
+template<typename T>
+ + + + +
GUINT gim_array< T >::m_size
+
+
+ +

+ +

+

+ +

+
+
+template<typename T>
+ + + + +
GUINT gim_array< T >::m_allocated_size
+
+
+ +

+ +

+

+


The documentation for this class was generated from the following file:
    +
  • C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_array.h
+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classgim__bitset-members.html b/Extras/GIMPACT/docs/html/classgim__bitset-members.html new file mode 100755 index 000000000..1049e34a9 --- /dev/null +++ b/Extras/GIMPACT/docs/html/classgim__bitset-members.html @@ -0,0 +1,39 @@ + + +GIMPACT: Member List + + + + + + +

gim_bitset Member List

This is the complete list of members for gim_bitset, including all inherited members.

+ + + + + + + + + + + +
clear(GUINT bit_index)gim_bitset [inline]
clear_all()gim_bitset [inline]
get(GUINT bit_index)gim_bitset [inline]
gim_bitset()gim_bitset [inline]
gim_bitset(GUINT bits_count)gim_bitset [inline]
m_containergim_bitset
resize(GUINT newsize)gim_bitset [inline]
set(GUINT bit_index)gim_bitset [inline]
set_all()gim_bitset [inline]
size()gim_bitset [inline]
~gim_bitset()gim_bitset [inline]


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classgim__bitset.html b/Extras/GIMPACT/docs/html/classgim__bitset.html new file mode 100755 index 000000000..3f0ef3ae1 --- /dev/null +++ b/Extras/GIMPACT/docs/html/classgim__bitset.html @@ -0,0 +1,277 @@ + + +GIMPACT: gim_bitset Class Reference + + + + + + +

gim_bitset Class Reference
+ +[CONTAINERS] +

#include <gim_bitset.h> +

+List of all members. + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

 gim_bitset ()
 gim_bitset (GUINT bits_count)
 ~gim_bitset ()
bool resize (GUINT newsize)
GUINT size ()
void set_all ()
void clear_all ()
void set (GUINT bit_index)
char get (GUINT bit_index)
 Return 0 or 1.
void clear (GUINT bit_index)

Public Attributes

gim_array< GUINT > m_container
+


Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
gim_bitset::gim_bitset (  )  [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
gim_bitset::gim_bitset (GUINT  bits_count  )  [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
gim_bitset::~gim_bitset (  )  [inline]
+
+
+ +

+ +

+

+


Member Function Documentation

+ +
+
+ + + + + + + + + +
bool gim_bitset::resize (GUINT  newsize  )  [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
GUINT gim_bitset::size (  )  [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void gim_bitset::set_all (  )  [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void gim_bitset::clear_all (  )  [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
void gim_bitset::set (GUINT  bit_index  )  [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
char gim_bitset::get (GUINT  bit_index  )  [inline]
+
+
+ +

+Return 0 or 1. +

+ +

+

+ +

+
+ + + + + + + + + +
void gim_bitset::clear (GUINT  bit_index  )  [inline]
+
+
+ +

+ +

+

+


Member Data Documentation

+ +
+ +
+ +

+ +

+

+


The documentation for this class was generated from the following file:
    +
  • C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_bitset.h
+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classgim__contact__array-members.html b/Extras/GIMPACT/docs/html/classgim__contact__array-members.html new file mode 100755 index 000000000..0d005edab --- /dev/null +++ b/Extras/GIMPACT/docs/html/classgim__contact__array-members.html @@ -0,0 +1,73 @@ + + +GIMPACT: Member List + + + + + + +

gim_contact_array Member List

This is the complete list of members for gim_contact_array, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
at(GUINT i)gim_array< GIM_CONTACT > [inline]
at(GUINT i) constgim_array< GIM_CONTACT > [inline]
back()gim_array< GIM_CONTACT > [inline]
back() constgim_array< GIM_CONTACT > [inline]
clear()gim_array< GIM_CONTACT > [inline]
clear_memory()gim_array< GIM_CONTACT > [inline]
clear_range(GUINT start_range)gim_array< GIM_CONTACT > [inline]
destroyData()gim_array< GIM_CONTACT > [inline]
erase(GUINT index)gim_array< GIM_CONTACT > [inline]
erase_sorted(GUINT index)gim_array< GIM_CONTACT > [inline]
erase_sorted_mem(GUINT index)gim_array< GIM_CONTACT > [inline]
front()gim_array< GIM_CONTACT > [inline]
front() constgim_array< GIM_CONTACT > [inline]
get_pointer_at(GUINT i)gim_array< GIM_CONTACT > [inline]
get_pointer_at(GUINT i) constgim_array< GIM_CONTACT > [inline]
gim_array()gim_array< GIM_CONTACT > [inline]
gim_array(GUINT reservesize)gim_array< GIM_CONTACT > [inline]
gim_contact_array()gim_contact_array [inline]
growingCheck()gim_array< GIM_CONTACT > [inline]
insert(const GIM_CONTACT &obj, GUINT index)gim_array< GIM_CONTACT > [inline]
insert_mem(GUINT index)gim_array< GIM_CONTACT > [inline]
m_allocated_sizegim_array< GIM_CONTACT >
m_datagim_array< GIM_CONTACT >
m_sizegim_array< GIM_CONTACT >
max_size() constgim_array< GIM_CONTACT > [inline]
merge_contacts(const gim_contact_array &contacts, bool normal_contact_average=true)gim_contact_array
merge_contacts_unique(const gim_contact_array &contacts)gim_contact_array
operator[](size_t i)gim_array< GIM_CONTACT > [inline]
operator[](size_t i) constgim_array< GIM_CONTACT > [inline]
pointer()gim_array< GIM_CONTACT > [inline]
pointer() constgim_array< GIM_CONTACT > [inline]
pop_back()gim_array< GIM_CONTACT > [inline]
pop_back_mem()gim_array< GIM_CONTACT > [inline]
push_back(const GIM_CONTACT &obj)gim_array< GIM_CONTACT > [inline]
push_back_mem()gim_array< GIM_CONTACT > [inline]
push_back_memcpy(const GIM_CONTACT &obj)gim_array< GIM_CONTACT > [inline]
push_contact(const btVector3 &point, const btVector3 &normal, GREAL depth, GUINT feature1, GUINT feature2)gim_contact_array [inline]
push_triangle_contacts(const GIM_TRIANGLE_CONTACT_DATA &tricontact, GUINT feature1, GUINT feature2)gim_contact_array [inline]
refit()gim_array< GIM_CONTACT > [inline]
reserve(GUINT size)gim_array< GIM_CONTACT > [inline]
resize(GUINT size, bool call_constructor=true)gim_array< GIM_CONTACT > [inline]
resizeData(GUINT newsize)gim_array< GIM_CONTACT > [inline]
size() constgim_array< GIM_CONTACT > [inline]
swap(GUINT i, GUINT j)gim_array< GIM_CONTACT > [inline]
~gim_array()gim_array< GIM_CONTACT > [inline]


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classgim__contact__array.html b/Extras/GIMPACT/docs/html/classgim__contact__array.html new file mode 100755 index 000000000..e8445d14f --- /dev/null +++ b/Extras/GIMPACT/docs/html/classgim__contact__array.html @@ -0,0 +1,205 @@ + + +GIMPACT: gim_contact_array Class Reference + + + + + + +

gim_contact_array Class Reference
+ +[CONTACTS] +

#include <gim_contact.h> +

+

Inheritance diagram for gim_contact_array: +

+ +gim_array< GIM_CONTACT > + +List of all members. + + + + + + + + + + + + +

Public Member Functions

 gim_contact_array ()
SIMD_FORCE_INLINE void push_contact (const btVector3 &point, const btVector3 &normal, GREAL depth, GUINT feature1, GUINT feature2)
SIMD_FORCE_INLINE void push_triangle_contacts (const GIM_TRIANGLE_CONTACT_DATA &tricontact, GUINT feature1, GUINT feature2)
void merge_contacts (const gim_contact_array &contacts, bool normal_contact_average=true)
void merge_contacts_unique (const gim_contact_array &contacts)
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
gim_contact_array::gim_contact_array (  )  [inline]
+
+
+ +

+ +

+

+


Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE void gim_contact_array::push_contact (const btVector3 &  point,
const btVector3 &  normal,
GREAL  depth,
GUINT  feature1,
GUINT  feature2 
) [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE void gim_contact_array::push_triangle_contacts (const GIM_TRIANGLE_CONTACT_DATA tricontact,
GUINT  feature1,
GUINT  feature2 
) [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void gim_contact_array::merge_contacts (const gim_contact_array contacts,
bool  normal_contact_average = true 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
void gim_contact_array::merge_contacts_unique (const gim_contact_array contacts  ) 
+
+
+ +

+ +

+

+


The documentation for this class was generated from the following file:
    +
  • C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_contact.h
+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classgim__contact__array.png b/Extras/GIMPACT/docs/html/classgim__contact__array.png new file mode 100755 index 000000000..57de45139 Binary files /dev/null and b/Extras/GIMPACT/docs/html/classgim__contact__array.png differ diff --git a/Extras/GIMPACT/docs/html/classgim__hash__table-members.html b/Extras/GIMPACT/docs/html/classgim__hash__table-members.html new file mode 100755 index 000000000..30e5b867b --- /dev/null +++ b/Extras/GIMPACT/docs/html/classgim__hash__table-members.html @@ -0,0 +1,77 @@ + + +GIMPACT: Member List + + + + + + +

gim_hash_table< T > Member List

This is the complete list of members for gim_hash_table< T >, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
_assign_hash_table_cell(GUINT hashkey)gim_hash_table< T > [inline, protected]
_clear_table_memory()gim_hash_table< T > [inline, protected]
_destroy()gim_hash_table< T > [inline, protected]
_erase_by_index_hash_table(GUINT index)gim_hash_table< T > [inline, protected]
_erase_hash_table(GUINT hashkey)gim_hash_table< T > [inline, protected]
_erase_sorted(GUINT index)gim_hash_table< T > [inline, protected]
_erase_unsorted(GUINT index)gim_hash_table< T > [inline, protected]
_find_avaliable_cell(GUINT hashkey)gim_hash_table< T > [inline, protected]
_find_cell(GUINT hashkey)gim_hash_table< T > [inline, protected]
_insert_hash_table(GUINT hashkey, const T &value)gim_hash_table< T > [inline, protected]
_insert_hash_table_replace(GUINT hashkey, const T &value)gim_hash_table< T > [inline, protected]
_insert_in_pos(GUINT hashkey, const T &value, GUINT pos)gim_hash_table< T > [inline, protected]
_insert_sorted(GUINT hashkey, const T &value)gim_hash_table< T > [inline, protected]
_insert_sorted_replace(GUINT hashkey, const T &value)gim_hash_table< T > [inline, protected]
_insert_unsorted(GUINT hashkey, const T &value)gim_hash_table< T > [inline, protected]
_invalidate_keys()gim_hash_table< T > [inline, protected]
_node_type typedefgim_hash_table< T > [protected]
_rehash()gim_hash_table< T > [inline, protected]
_reserve_table_memory(GUINT newtablesize)gim_hash_table< T > [inline, protected]
_resize_table(GUINT newsize)gim_hash_table< T > [inline, protected]
check_for_switching_to_hashtable()gim_hash_table< T > [inline]
clear()gim_hash_table< T > [inline]
erase_by_index(GUINT index)gim_hash_table< T > [inline]
erase_by_index_unsorted(GUINT index)gim_hash_table< T > [inline]
erase_by_key(GUINT hashkey)gim_hash_table< T > [inline]
find(GUINT hashkey)gim_hash_table< T > [inline]
get_key(GUINT index) constgim_hash_table< T > [inline]
get_value(GUINT hashkey)gim_hash_table< T > [inline]
get_value_by_index(GUINT index)gim_hash_table< T > [inline]
gim_hash_table(GUINT reserve_size=GIM_DEFAULT_HASH_TABLE_SIZE, GUINT node_size=GIM_DEFAULT_HASH_TABLE_NODE_SIZE, GUINT min_hash_table_size=GIM_INVALID_HASH)gim_hash_table< T > [inline]
insert(GUINT hashkey, const T &element)gim_hash_table< T > [inline]
insert_override(GUINT hashkey, const T &element)gim_hash_table< T > [inline]
insert_unsorted(GUINT hashkey, const T &element)gim_hash_table< T > [inline]
is_hash_table()gim_hash_table< T > [inline]
is_sorted()gim_hash_table< T > [inline]
m_hash_tablegim_hash_table< T > [protected]
m_min_hash_table_sizegim_hash_table< T > [protected]
m_node_sizegim_hash_table< T > [protected]
m_nodesgim_hash_table< T > [protected]
m_sortedgim_hash_table< T > [protected]
m_table_sizegim_hash_table< T > [protected]
operator[](GUINT index) constgim_hash_table< T > [inline]
operator[](GUINT index)gim_hash_table< T > [inline]
set_sorted(bool value)gim_hash_table< T > [inline]
size() constgim_hash_table< T > [inline]
sort()gim_hash_table< T > [inline]
switch_to_hashtable()gim_hash_table< T > [inline]
switch_to_sorted_array()gim_hash_table< T > [inline]
~gim_hash_table()gim_hash_table< T > [inline]


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classgim__hash__table.html b/Extras/GIMPACT/docs/html/classgim__hash__table.html new file mode 100755 index 000000000..24247f3dc --- /dev/null +++ b/Extras/GIMPACT/docs/html/classgim__hash__table.html @@ -0,0 +1,802 @@ + + +GIMPACT: gim_hash_table< T > Class Template Reference + + + + + + +

gim_hash_table< T > Class Template Reference
+ +[CONTAINERS] +

A compact hash table implementation. +More... +

+#include <gim_hash_table.h> +

+List of all members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

 gim_hash_table (GUINT reserve_size=GIM_DEFAULT_HASH_TABLE_SIZE, GUINT node_size=GIM_DEFAULT_HASH_TABLE_NODE_SIZE, GUINT min_hash_table_size=GIM_INVALID_HASH)
 ~gim_hash_table ()
bool is_hash_table ()
bool is_sorted ()
bool sort ()
bool switch_to_hashtable ()
bool switch_to_sorted_array ()
bool check_for_switching_to_hashtable ()
 If the container reaches the.
void set_sorted (bool value)
GUINT size () const
 Retrieves the amount of keys.
GUINT get_key (GUINT index) const
 Retrieves the hash key.
T * get_value_by_index (GUINT index)
 Retrieves the value by index.
const T & operator[] (GUINT index) const
T & operator[] (GUINT index)
GUINT find (GUINT hashkey)
 Finds the index of the element with the key.
T * get_value (GUINT hashkey)
 Retrieves the value associated with the index.
bool erase_by_index (GUINT index)
bool erase_by_index_unsorted (GUINT index)
bool erase_by_key (GUINT hashkey)
void clear ()
GUINT insert (GUINT hashkey, const T &element)
 Insert an element into the hash.
GUINT insert_override (GUINT hashkey, const T &element)
 Insert an element into the hash, and could overrite an existing object with the same hash.
GUINT insert_unsorted (GUINT hashkey, const T &element)
 Insert an element into the hash,But if this container is a sorted array, this inserts it unsorted.

Protected Types

typedef GIM_HASH_TABLE_NODE<
+ T > 
_node_type

Protected Member Functions

GUINT _find_cell (GUINT hashkey)
 Returns the cell index.
GUINT _find_avaliable_cell (GUINT hashkey)
 Find the avaliable cell for the hashkey, and return an existing cell if it has the same hash key.
void _reserve_table_memory (GUINT newtablesize)
 reserves the memory for the hash table.
void _invalidate_keys ()
void _clear_table_memory ()
 Clear all memory for the hash table.
void _rehash ()
 Invalidates the keys (Assigning GIM_INVALID_HASH to all) Reorders the hash keys.
void _resize_table (GUINT newsize)
 Resize hash table indices.
void _destroy ()
 Destroy hash table memory.
GUINT _assign_hash_table_cell (GUINT hashkey)
 Finds an avaliable hash table cell, and resizes the table if there isn't space.
bool _erase_by_index_hash_table (GUINT index)
 erase by index in hash table
bool _erase_hash_table (GUINT hashkey)
 erase by key in hash table
GUINT _insert_hash_table (GUINT hashkey, const T &value)
 insert an element in hash table
GUINT _insert_hash_table_replace (GUINT hashkey, const T &value)
 insert an element in hash table.
bool _erase_sorted (GUINT index)
bool _erase_unsorted (GUINT index)
 faster, but unsorted
void _insert_in_pos (GUINT hashkey, const T &value, GUINT pos)
 Insert in position ordered.
GUINT _insert_sorted (GUINT hashkey, const T &value)
 Insert an element in an ordered array.
GUINT _insert_sorted_replace (GUINT hashkey, const T &value)
GUINT _insert_unsorted (GUINT hashkey, const T &value)
 Fast insertion in m_nodes array.

Protected Attributes

gim_array< _node_typem_nodes
 The nodes.
bool m_sorted
GUINT * m_hash_table
GUINT m_table_size
GUINT m_node_size
GUINT m_min_hash_table_size
+


Detailed Description

+

template<class T>
+ class gim_hash_table< T >

+ +A compact hash table implementation. +

+A memory aligned compact hash table that coud be treated as an array. It could be a simple sorted array without the overhead of the hash key bucked, or could be a formely hash table with an array of keys. You can use switch_to_hashtable() and switch_to_sorted_array for saving space or increase speed.

+

    +
  • +if node_size = 0, then this container becomes a simple sorted array allocator. reserve_size is used for reserve memory in m_nodes. When the array size reaches the size equivalent to 'min_hash_table_size', then it becomes a hash table by calling check_for_switching_to_hashtable.
  • +
  • +If node_size != 0, then this container becomes a hash table for ever
  • +
+ +

+


Member Typedef Documentation

+ +
+
+
+template<class T>
+ + + + +
typedef GIM_HASH_TABLE_NODE<T> gim_hash_table< T >::_node_type [protected]
+
+
+ +

+ +

+

+


Constructor & Destructor Documentation

+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + + + + + + + +
gim_hash_table< T >::gim_hash_table (GUINT  reserve_size = GIM_DEFAULT_HASH_TABLE_SIZE,
GUINT  node_size = GIM_DEFAULT_HASH_TABLE_NODE_SIZE,
GUINT  min_hash_table_size = GIM_INVALID_HASH 
) [inline]
+
+
+ +

+if node_size = 0, then this container becomes a simple sorted array allocator. reserve_size is used for reserve memory in m_nodes. When the array size reaches the size equivalent to 'min_hash_table_size', then it becomes a hash table by calling check_for_switching_to_hashtable. If node_size != 0, then this container becomes a hash table for ever +

+

+ +

+
+
+template<class T>
+ + + + + + + + +
gim_hash_table< T >::~gim_hash_table (  )  [inline]
+
+
+ +

+ +

+

+


Member Function Documentation

+ +
+
+
+template<class T>
+ + + + + + + + +
bool gim_hash_table< T >::is_hash_table (  )  [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<class T>
+ + + + + + + + +
bool gim_hash_table< T >::is_sorted (  )  [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<class T>
+ + + + + + + + +
bool gim_hash_table< T >::sort (  )  [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<class T>
+ + + + + + + + +
bool gim_hash_table< T >::switch_to_hashtable (  )  [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<class T>
+ + + + + + + + +
bool gim_hash_table< T >::switch_to_sorted_array (  )  [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<class T>
+ + + + + + + + +
bool gim_hash_table< T >::check_for_switching_to_hashtable (  )  [inline]
+
+
+ +

+If the container reaches the. +

+ +

+

+ +

+
+
+template<class T>
+ + + + + + + + + +
void gim_hash_table< T >::set_sorted (bool  value  )  [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<class T>
+ + + + + + + + +
GUINT gim_hash_table< T >::size (  )  const [inline]
+
+
+ +

+Retrieves the amount of keys. +

+ +

+

+ +

+
+
+template<class T>
+ + + + + + + + + +
GUINT gim_hash_table< T >::get_key (GUINT  index  )  const [inline]
+
+
+ +

+Retrieves the hash key. +

+ +

+

+ +

+
+
+template<class T>
+ + + + + + + + + +
T* gim_hash_table< T >::get_value_by_index (GUINT  index  )  [inline]
+
+
+ +

+Retrieves the value by index. +

+ +

+

+ +

+
+
+template<class T>
+ + + + + + + + + +
const T& gim_hash_table< T >::operator[] (GUINT  index  )  const [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<class T>
+ + + + + + + + + +
T& gim_hash_table< T >::operator[] (GUINT  index  )  [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<class T>
+ + + + + + + + + +
GUINT gim_hash_table< T >::find (GUINT  hashkey  )  [inline]
+
+
+ +

+Finds the index of the element with the key. +

+

Returns:
the index in the array of the existing element,or GIM_INVALID_HASH if the element has been inserted If so, the element has been inserted at the last position of the array.
+ +
+

+ +

+
+
+template<class T>
+ + + + + + + + + +
T* gim_hash_table< T >::get_value (GUINT  hashkey  )  [inline]
+
+
+ +

+Retrieves the value associated with the index. +

+

Returns:
the found element, or null
+ +
+

+ +

+
+
+template<class T>
+ + + + + + + + + +
bool gim_hash_table< T >::erase_by_index (GUINT  index  )  [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<class T>
+ + + + + + + + + +
bool gim_hash_table< T >::erase_by_index_unsorted (GUINT  index  )  [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<class T>
+ + + + + + + + + +
bool gim_hash_table< T >::erase_by_key (GUINT  hashkey  )  [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<class T>
+ + + + + + + + +
void gim_hash_table< T >::clear (  )  [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
GUINT gim_hash_table< T >::insert (GUINT  hashkey,
const T &  element 
) [inline]
+
+
+ +

+Insert an element into the hash. +

+

Returns:
If GIM_INVALID_HASH, the object has been inserted succesfully. Else it returns the position of the existing element.
+ +
+

+ +

+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
GUINT gim_hash_table< T >::insert_override (GUINT  hashkey,
const T &  element 
) [inline]
+
+
+ +

+Insert an element into the hash, and could overrite an existing object with the same hash. +

+

Returns:
If GIM_INVALID_HASH, the object has been inserted succesfully. Else it returns the position of the replaced element.
+ +
+

+ +

+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
GUINT gim_hash_table< T >::insert_unsorted (GUINT  hashkey,
const T &  element 
) [inline]
+
+
+ +

+Insert an element into the hash,But if this container is a sorted array, this inserts it unsorted. +

+ +

+

+


Member Data Documentation

+ +
+
+
+template<class T>
+ + + + +
gim_array< _node_type > gim_hash_table< T >::m_nodes [protected]
+
+
+ +

+The nodes. +

+ +

+

+ +

+
+
+template<class T>
+ + + + +
bool gim_hash_table< T >::m_sorted [protected]
+
+
+ +

+ +

+

+


The documentation for this class was generated from the following file: +
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classgim__pair__set-members.html b/Extras/GIMPACT/docs/html/classgim__pair__set-members.html new file mode 100755 index 000000000..44dc55ed0 --- /dev/null +++ b/Extras/GIMPACT/docs/html/classgim__pair__set-members.html @@ -0,0 +1,71 @@ + + +GIMPACT: Member List + + + + + + +

gim_pair_set Member List

This is the complete list of members for gim_pair_set, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
at(GUINT i)gim_array< GIM_PAIR > [inline]
at(GUINT i) constgim_array< GIM_PAIR > [inline]
back()gim_array< GIM_PAIR > [inline]
back() constgim_array< GIM_PAIR > [inline]
clear()gim_array< GIM_PAIR > [inline]
clear_memory()gim_array< GIM_PAIR > [inline]
clear_range(GUINT start_range)gim_array< GIM_PAIR > [inline]
destroyData()gim_array< GIM_PAIR > [inline]
erase(GUINT index)gim_array< GIM_PAIR > [inline]
erase_sorted(GUINT index)gim_array< GIM_PAIR > [inline]
erase_sorted_mem(GUINT index)gim_array< GIM_PAIR > [inline]
front()gim_array< GIM_PAIR > [inline]
front() constgim_array< GIM_PAIR > [inline]
get_pointer_at(GUINT i)gim_array< GIM_PAIR > [inline]
get_pointer_at(GUINT i) constgim_array< GIM_PAIR > [inline]
gim_array()gim_array< GIM_PAIR > [inline]
gim_array(GUINT reservesize)gim_array< GIM_PAIR > [inline]
gim_pair_set()gim_pair_set [inline]
growingCheck()gim_array< GIM_PAIR > [inline]
insert(const GIM_PAIR &obj, GUINT index)gim_array< GIM_PAIR > [inline]
insert_mem(GUINT index)gim_array< GIM_PAIR > [inline]
m_allocated_sizegim_array< GIM_PAIR >
m_datagim_array< GIM_PAIR >
m_sizegim_array< GIM_PAIR >
max_size() constgim_array< GIM_PAIR > [inline]
operator[](size_t i)gim_array< GIM_PAIR > [inline]
operator[](size_t i) constgim_array< GIM_PAIR > [inline]
pointer()gim_array< GIM_PAIR > [inline]
pointer() constgim_array< GIM_PAIR > [inline]
pop_back()gim_array< GIM_PAIR > [inline]
pop_back_mem()gim_array< GIM_PAIR > [inline]
push_back(const GIM_PAIR &obj)gim_array< GIM_PAIR > [inline]
push_back_mem()gim_array< GIM_PAIR > [inline]
push_back_memcpy(const GIM_PAIR &obj)gim_array< GIM_PAIR > [inline]
push_pair(GUINT index1, GUINT index2)gim_pair_set [inline]
push_pair_inv(GUINT index1, GUINT index2)gim_pair_set [inline]
refit()gim_array< GIM_PAIR > [inline]
reserve(GUINT size)gim_array< GIM_PAIR > [inline]
resize(GUINT size, bool call_constructor=true)gim_array< GIM_PAIR > [inline]
resizeData(GUINT newsize)gim_array< GIM_PAIR > [inline]
size() constgim_array< GIM_PAIR > [inline]
swap(GUINT i, GUINT j)gim_array< GIM_PAIR > [inline]
~gim_array()gim_array< GIM_PAIR > [inline]


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classgim__pair__set.html b/Extras/GIMPACT/docs/html/classgim__pair__set.html new file mode 100755 index 000000000..6ad2df1b6 --- /dev/null +++ b/Extras/GIMPACT/docs/html/classgim__pair__set.html @@ -0,0 +1,75 @@ + + +GIMPACT: gim_pair_set Class Reference + + + + + + +

gim_pair_set Class Reference
+ +[BOX_PRUNNING] +

A pairset array. +More... +

+#include <gim_box_set.h> +

+

Inheritance diagram for gim_pair_set: +

+ +gim_array< GIM_PAIR > + +List of all members. + + + + + + + + +

Public Member Functions

 gim_pair_set ()
void push_pair (GUINT index1, GUINT index2)
void push_pair_inv (GUINT index1, GUINT index2)
+

Detailed Description

+A pairset array. +

+


Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
gim_pair_set::gim_pair_set (  )  [inline]
+
+
+ +

+ +

+

+


The documentation for this class was generated from the following file:
    +
  • C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_box_set.h
+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classgim__pair__set.png b/Extras/GIMPACT/docs/html/classgim__pair__set.png new file mode 100755 index 000000000..f16cf9204 Binary files /dev/null and b/Extras/GIMPACT/docs/html/classgim__pair__set.png differ diff --git a/Extras/GIMPACT/docs/html/classinteger__comparator-members.html b/Extras/GIMPACT/docs/html/classinteger__comparator-members.html new file mode 100755 index 000000000..bc4acd5a7 --- /dev/null +++ b/Extras/GIMPACT/docs/html/classinteger__comparator-members.html @@ -0,0 +1,29 @@ + + +GIMPACT: Member List + + + + + + +

integer_comparator Member List

This is the complete list of members for integer_comparator, including all inherited members.

+ +
operator()(const T &a, const T &b)integer_comparator [inline]


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classinteger__comparator.html b/Extras/GIMPACT/docs/html/classinteger__comparator.html new file mode 100755 index 000000000..ef355698c --- /dev/null +++ b/Extras/GIMPACT/docs/html/classinteger__comparator.html @@ -0,0 +1,76 @@ + + +GIMPACT: integer_comparator Class Reference + + + + + + +

integer_comparator Class Reference

Prototype for comparators. +More... +

+#include <gim_radixsort.h> +

+List of all members. + + + + + +

Public Member Functions

template<class T>
int operator() (const T &a, const T &b)
+


Detailed Description

+Prototype for comparators. +

+


Member Function Documentation

+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
int integer_comparator::operator() (const T &  a,
const T &  b 
) [inline]
+
+
+ +

+ +

+

+


The documentation for this class was generated from the following file: +
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classless__comparator-members.html b/Extras/GIMPACT/docs/html/classless__comparator-members.html new file mode 100755 index 000000000..707b6bcb1 --- /dev/null +++ b/Extras/GIMPACT/docs/html/classless__comparator-members.html @@ -0,0 +1,29 @@ + + +GIMPACT: Member List + + + + + + +

less_comparator Member List

This is the complete list of members for less_comparator, including all inherited members.

+ +
operator()(const T &a, const Z &b)less_comparator [inline]


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classless__comparator.html b/Extras/GIMPACT/docs/html/classless__comparator.html new file mode 100755 index 000000000..1851848a9 --- /dev/null +++ b/Extras/GIMPACT/docs/html/classless__comparator.html @@ -0,0 +1,76 @@ + + +GIMPACT: less_comparator Class Reference + + + + + + +

less_comparator Class Reference

Prototype for comparators. +More... +

+#include <gim_radixsort.h> +

+List of all members. + + + + + +

Public Member Functions

template<class T, class Z>
int operator() (const T &a, const Z &b)
+


Detailed Description

+Prototype for comparators. +

+


Member Function Documentation

+ +
+
+
+template<class T, class Z>
+ + + + + + + + + + + + + + + + + + +
int less_comparator::operator() (const T &  a,
const Z &  b 
) [inline]
+
+
+ +

+ +

+

+


The documentation for this class was generated from the following file: +
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classmemcopy__elements__func-members.html b/Extras/GIMPACT/docs/html/classmemcopy__elements__func-members.html new file mode 100755 index 000000000..81483ddfb --- /dev/null +++ b/Extras/GIMPACT/docs/html/classmemcopy__elements__func-members.html @@ -0,0 +1,29 @@ + + +GIMPACT: Member List + + + + + + +

memcopy_elements_func Member List

This is the complete list of members for memcopy_elements_func, including all inherited members.

+ +
operator()(T &a, T &b)memcopy_elements_func [inline]


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classmemcopy__elements__func.html b/Extras/GIMPACT/docs/html/classmemcopy__elements__func.html new file mode 100755 index 000000000..00b2dc3e6 --- /dev/null +++ b/Extras/GIMPACT/docs/html/classmemcopy__elements__func.html @@ -0,0 +1,76 @@ + + +GIMPACT: memcopy_elements_func Class Reference + + + + + + +

memcopy_elements_func Class Reference

Prototype for copying elements. +More... +

+#include <gim_radixsort.h> +

+List of all members. + + + + + +

Public Member Functions

template<class T>
void operator() (T &a, T &b)
+


Detailed Description

+Prototype for copying elements. +

+


Member Function Documentation

+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
void memcopy_elements_func::operator() (T &  a,
T &  b 
) [inline]
+
+
+ +

+ +

+

+


The documentation for this class was generated from the following file: +
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classuint__key__func-members.html b/Extras/GIMPACT/docs/html/classuint__key__func-members.html new file mode 100755 index 000000000..2a37e5320 --- /dev/null +++ b/Extras/GIMPACT/docs/html/classuint__key__func-members.html @@ -0,0 +1,29 @@ + + +GIMPACT: Member List + + + + + + +

uint_key_func Member List

This is the complete list of members for uint_key_func, including all inherited members.

+ +
operator()(const T &a)uint_key_func [inline]


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/classuint__key__func.html b/Extras/GIMPACT/docs/html/classuint__key__func.html new file mode 100755 index 000000000..51576b172 --- /dev/null +++ b/Extras/GIMPACT/docs/html/classuint__key__func.html @@ -0,0 +1,67 @@ + + +GIMPACT: uint_key_func Class Reference + + + + + + +

uint_key_func Class Reference

Prototype for getting the integer representation of an object. +More... +

+#include <gim_radixsort.h> +

+List of all members. + + + + + +

Public Member Functions

template<class T>
GUINT operator() (const T &a)
+


Detailed Description

+Prototype for getting the integer representation of an object. +

+


Member Function Documentation

+ +
+
+
+template<class T>
+ + + + + + + + + +
GUINT uint_key_func::operator() (const T &  a  )  [inline]
+
+
+ +

+ +

+

+


The documentation for this class was generated from the following file: +
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/doxygen.css b/Extras/GIMPACT/docs/html/doxygen.css new file mode 100755 index 000000000..c7db1a8a0 --- /dev/null +++ b/Extras/GIMPACT/docs/html/doxygen.css @@ -0,0 +1,358 @@ +BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV { + font-family: Geneva, Arial, Helvetica, sans-serif; +} +BODY,TD { + font-size: 90%; +} +H1 { + text-align: center; + font-size: 160%; +} +H2 { + font-size: 120%; +} +H3 { + font-size: 100%; +} +CAPTION { font-weight: bold } +DIV.qindex { + width: 100%; + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + padding: 2px; + line-height: 140%; +} +DIV.nav { + width: 100%; + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + padding: 2px; + line-height: 140%; +} +DIV.navtab { + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} +TD.navtab { + font-size: 70%; +} +A.qindex { + text-decoration: none; + font-weight: bold; + color: #1A419D; +} +A.qindex:visited { + text-decoration: none; + font-weight: bold; + color: #1A419D +} +A.qindex:hover { + text-decoration: none; + background-color: #ddddff; +} +A.qindexHL { + text-decoration: none; + font-weight: bold; + background-color: #6666cc; + color: #ffffff; + border: 1px double #9295C2; +} +A.qindexHL:hover { + text-decoration: none; + background-color: #6666cc; + color: #ffffff; +} +A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff } +A.el { text-decoration: none; font-weight: bold } +A.elRef { font-weight: bold } +A.code:link { text-decoration: none; font-weight: normal; color: #0000FF} +A.code:visited { text-decoration: none; font-weight: normal; color: #0000FF} +A.codeRef:link { font-weight: normal; color: #0000FF} +A.codeRef:visited { font-weight: normal; color: #0000FF} +A:hover { text-decoration: none; background-color: #f2f2ff } +DL.el { margin-left: -1cm } +.fragment { + font-family: monospace, fixed; + font-size: 95%; +} +PRE.fragment { + border: 1px solid #CCCCCC; + background-color: #f5f5f5; + margin-top: 4px; + margin-bottom: 4px; + margin-left: 2px; + margin-right: 8px; + padding-left: 6px; + padding-right: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px } + +DIV.groupHeader { + margin-left: 16px; + margin-top: 12px; + margin-bottom: 6px; + font-weight: bold; +} +DIV.groupText { margin-left: 16px; font-style: italic; font-size: 90% } +BODY { + background: white; + color: black; + margin-right: 20px; + margin-left: 20px; +} +TD.indexkey { + background-color: #e8eef2; + font-weight: bold; + padding-right : 10px; + padding-top : 2px; + padding-left : 10px; + padding-bottom : 2px; + margin-left : 0px; + margin-right : 0px; + margin-top : 2px; + margin-bottom : 2px; + border: 1px solid #CCCCCC; +} +TD.indexvalue { + background-color: #e8eef2; + font-style: italic; + padding-right : 10px; + padding-top : 2px; + padding-left : 10px; + padding-bottom : 2px; + margin-left : 0px; + margin-right : 0px; + margin-top : 2px; + margin-bottom : 2px; + border: 1px solid #CCCCCC; +} +TR.memlist { + background-color: #f0f0f0; +} +P.formulaDsp { text-align: center; } +IMG.formulaDsp { } +IMG.formulaInl { vertical-align: middle; } +SPAN.keyword { color: #008000 } +SPAN.keywordtype { color: #604020 } +SPAN.keywordflow { color: #e08000 } +SPAN.comment { color: #800000 } +SPAN.preprocessor { color: #806020 } +SPAN.stringliteral { color: #002080 } +SPAN.charliteral { color: #008080 } +.mdescLeft { + padding: 0px 8px 4px 8px; + font-size: 80%; + font-style: italic; + background-color: #FAFAFA; + border-top: 1px none #E0E0E0; + border-right: 1px none #E0E0E0; + border-bottom: 1px none #E0E0E0; + border-left: 1px none #E0E0E0; + margin: 0px; +} +.mdescRight { + padding: 0px 8px 4px 8px; + font-size: 80%; + font-style: italic; + background-color: #FAFAFA; + border-top: 1px none #E0E0E0; + border-right: 1px none #E0E0E0; + border-bottom: 1px none #E0E0E0; + border-left: 1px none #E0E0E0; + margin: 0px; +} +.memItemLeft { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: solid; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memItemRight { + padding: 1px 8px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: solid; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memTemplItemLeft { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: none; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memTemplItemRight { + padding: 1px 8px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: none; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memTemplParams { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: solid; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + color: #606060; + background-color: #FAFAFA; + font-size: 80%; +} +.search { color: #003399; + font-weight: bold; +} +FORM.search { + margin-bottom: 0px; + margin-top: 0px; +} +INPUT.search { font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +TD.tiny { font-size: 75%; +} +a { + color: #1A41A8; +} +a:visited { + color: #2A3798; +} +.dirtab { padding: 4px; + border-collapse: collapse; + border: 1px solid #84b0c7; +} +TH.dirtab { background: #e8eef2; + font-weight: bold; +} +HR { height: 1px; + border: none; + border-top: 1px solid black; +} + +/* Style for detailed member documentation */ +.memtemplate { + font-size: 80%; + color: #606060; + font-weight: normal; +} +.memnav { + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} +.memitem { + padding: 4px; + background-color: #eef3f5; + border-width: 1px; + border-style: solid; + border-color: #dedeee; + -moz-border-radius: 8px 8px 8px 8px; +} +.memname { + white-space: nowrap; + font-weight: bold; +} +.memdoc{ + padding-left: 10px; +} +.memproto { + background-color: #d5e1e8; + width: 100%; + border-width: 1px; + border-style: solid; + border-color: #84b0c7; + font-weight: bold; + -moz-border-radius: 8px 8px 8px 8px; +} +.paramkey { + text-align: right; +} +.paramtype { + white-space: nowrap; +} +.paramname { + color: #602020; + font-style: italic; + white-space: nowrap; +} +/* End Styling for detailed member documentation */ + +/* for the tree view */ +.ftvtree { + font-family: sans-serif; + margin:0.5em; +} +.directory { font-size: 9pt; font-weight: bold; } +.directory h3 { margin: 0px; margin-top: 1em; font-size: 11pt; } +.directory > h3 { margin-top: 0; } +.directory p { margin: 0px; white-space: nowrap; } +.directory div { display: none; margin: 0px; } +.directory img { vertical-align: -30%; } diff --git a/Extras/GIMPACT/docs/html/doxygen.png b/Extras/GIMPACT/docs/html/doxygen.png new file mode 100755 index 000000000..f0a274bba Binary files /dev/null and b/Extras/GIMPACT/docs/html/doxygen.png differ diff --git a/Extras/GIMPACT/docs/html/features.html b/Extras/GIMPACT/docs/html/features.html new file mode 100755 index 000000000..4bd033599 --- /dev/null +++ b/Extras/GIMPACT/docs/html/features.html @@ -0,0 +1,24 @@ + + +GIMPACT: + + + + + + +
    +
  • C++ oriented.
  • Extensible design.
  • Collision detection algorithm for concave shapes in the Bullet Physics Engine. See btGImpactCollisionAlgorithm.
  • Efficient Dynamic Hierarcht Bounding Box tree structures for handle collisions with composed shapes whose have large sets of primitives (triangles or convex shapes) See the GIM_BOX_TREE_SET class.
  • Collision detection for trimeshes with the btGImpactMeshShape class. Now GIMPACT works fine with the btStridingInterface class for getting the data from trimesh models.
  • Support for deformable trimeshes.
  • Collision detection for compound shapes through the btGImpactCompoundShape class. This class takes advantage from the Hierarcht Bounding Box structure (GIM_BOX_TREE_SET class).
  • Collision Shapes (Both btGImpactCompoundSape and btGImpactTrimeshShape ) can be shared by two or more Rigid Bodies in Bullet.
+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/files.html b/Extras/GIMPACT/docs/html/files.html new file mode 100755 index 000000000..7e005e40d --- /dev/null +++ b/Extras/GIMPACT/docs/html/files.html @@ -0,0 +1,47 @@ + + +GIMPACT: File Index + + + + + + +

GIMPACT File List

Here is a list of all files with brief descriptions: + + + + + + + + + + + + + + + + + + + +
C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/gim_manual.h
C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/Bullet/btGImpactCollisionAlgorithm.h
C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/Bullet/btGImpactMassUtil.h
C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/Bullet/btGImpactShape.h
C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_array.h
C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_basic_geometry_operations.h
C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_bitset.h
C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_box_collision.h
C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_box_set.h
C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_clip_polygon.h
C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_contact.h
C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_geom_types.h
C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_geometry.h
C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_hash_table.h
C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_linear_math.h
C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_math.h
C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_memory.h
C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_radixsort.h
C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_tri_collision.h
+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions.html b/Extras/GIMPACT/docs/html/functions.html new file mode 100755 index 000000000..136063cdd --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions.html @@ -0,0 +1,112 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all class members with links to the classes they belong to: +

+

- _ -

+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_0x61.html b/Extras/GIMPACT/docs/html/functions_0x61.html new file mode 100755 index 000000000..880680292 --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_0x61.html @@ -0,0 +1,76 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all class members with links to the classes they belong to: +

+

- a -

+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_0x62.html b/Extras/GIMPACT/docs/html/functions_0x62.html new file mode 100755 index 000000000..4026de666 --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_0x62.html @@ -0,0 +1,90 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all class members with links to the classes they belong to: +

+

- b -

+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_0x63.html b/Extras/GIMPACT/docs/html/functions_0x63.html new file mode 100755 index 000000000..2a7c00c66 --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_0x63.html @@ -0,0 +1,133 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all class members with links to the classes they belong to: +

+

- c -

+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_0x64.html b/Extras/GIMPACT/docs/html/functions_0x64.html new file mode 100755 index 000000000..f46518dd1 --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_0x64.html @@ -0,0 +1,70 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all class members with links to the classes they belong to: +

+

- d -

+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_0x65.html b/Extras/GIMPACT/docs/html/functions_0x65.html new file mode 100755 index 000000000..b3aee1ac2 --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_0x65.html @@ -0,0 +1,78 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all class members with links to the classes they belong to: +

+

- e -

+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_0x66.html b/Extras/GIMPACT/docs/html/functions_0x66.html new file mode 100755 index 000000000..4b0dc11f3 --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_0x66.html @@ -0,0 +1,76 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all class members with links to the classes they belong to: +

+

- f -

+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_0x67.html b/Extras/GIMPACT/docs/html/functions_0x67.html new file mode 100755 index 000000000..19ea7cb0e --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_0x67.html @@ -0,0 +1,253 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all class members with links to the classes they belong to: +

+

- g -

+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_0x68.html b/Extras/GIMPACT/docs/html/functions_0x68.html new file mode 100755 index 000000000..15a945895 --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_0x68.html @@ -0,0 +1,75 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all class members with links to the classes they belong to: +

+

- h -

+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_0x69.html b/Extras/GIMPACT/docs/html/functions_0x69.html new file mode 100755 index 000000000..7724475d8 --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_0x69.html @@ -0,0 +1,104 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all class members with links to the classes they belong to: +

+

- i -

+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_0x6c.html b/Extras/GIMPACT/docs/html/functions_0x6c.html new file mode 100755 index 000000000..d36251418 --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_0x6c.html @@ -0,0 +1,71 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all class members with links to the classes they belong to: +

+

- l -

+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_0x6d.html b/Extras/GIMPACT/docs/html/functions_0x6d.html new file mode 100755 index 000000000..12c45ebc8 --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_0x6d.html @@ -0,0 +1,221 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all class members with links to the classes they belong to: +

+

- m -

+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_0x6e.html b/Extras/GIMPACT/docs/html/functions_0x6e.html new file mode 100755 index 000000000..d52c7f4c4 --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_0x6e.html @@ -0,0 +1,84 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all class members with links to the classes they belong to: +

+

- n -

+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_0x6f.html b/Extras/GIMPACT/docs/html/functions_0x6f.html new file mode 100755 index 000000000..c0395ed5d --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_0x6f.html @@ -0,0 +1,93 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all class members with links to the classes they belong to: +

+

- o -

+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_0x70.html b/Extras/GIMPACT/docs/html/functions_0x70.html new file mode 100755 index 000000000..772ebf50b --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_0x70.html @@ -0,0 +1,99 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all class members with links to the classes they belong to: +

+

- p -

+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_0x72.html b/Extras/GIMPACT/docs/html/functions_0x72.html new file mode 100755 index 000000000..a027e951c --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_0x72.html @@ -0,0 +1,97 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all class members with links to the classes they belong to: +

+

- r -

+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_0x73.html b/Extras/GIMPACT/docs/html/functions_0x73.html new file mode 100755 index 000000000..c2ffb1bd7 --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_0x73.html @@ -0,0 +1,101 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all class members with links to the classes they belong to: +

+

- s -

+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_0x74.html b/Extras/GIMPACT/docs/html/functions_0x74.html new file mode 100755 index 000000000..8f078345a --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_0x74.html @@ -0,0 +1,80 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all class members with links to the classes they belong to: +

+

- t -

+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_0x75.html b/Extras/GIMPACT/docs/html/functions_0x75.html new file mode 100755 index 000000000..449f77b51 --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_0x75.html @@ -0,0 +1,73 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all class members with links to the classes they belong to: +

+

- u -

+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_0x76.html b/Extras/GIMPACT/docs/html/functions_0x76.html new file mode 100755 index 000000000..f806e3590 --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_0x76.html @@ -0,0 +1,68 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all class members with links to the classes they belong to: +

+

- v -

+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_0x7e.html b/Extras/GIMPACT/docs/html/functions_0x7e.html new file mode 100755 index 000000000..65295e188 --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_0x7e.html @@ -0,0 +1,80 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all class members with links to the classes they belong to: +

+

- ~ -

+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_func.html b/Extras/GIMPACT/docs/html/functions_func.html new file mode 100755 index 000000000..f302f31bb --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_func.html @@ -0,0 +1,109 @@ + + +GIMPACT: Class Members - Functions + + + + + + + +
+ +
+ +

+  +

+

- _ -

+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_func_0x61.html b/Extras/GIMPACT/docs/html/functions_func_0x61.html new file mode 100755 index 000000000..5083a156a --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_func_0x61.html @@ -0,0 +1,75 @@ + + +GIMPACT: Class Members - Functions + + + + + + + +
+ +
+ +

+  +

+

- a -

+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_func_0x62.html b/Extras/GIMPACT/docs/html/functions_func_0x62.html new file mode 100755 index 000000000..306714573 --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_func_0x62.html @@ -0,0 +1,89 @@ + + +GIMPACT: Class Members - Functions + + + + + + + +
+ +
+ +

+  +

+

- b -

+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_func_0x63.html b/Extras/GIMPACT/docs/html/functions_func_0x63.html new file mode 100755 index 000000000..17f4607ef --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_func_0x63.html @@ -0,0 +1,128 @@ + + +GIMPACT: Class Members - Functions + + + + + + + +
+ +
+ +

+  +

+

- c -

+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_func_0x64.html b/Extras/GIMPACT/docs/html/functions_func_0x64.html new file mode 100755 index 000000000..4b8fe436e --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_func_0x64.html @@ -0,0 +1,69 @@ + + +GIMPACT: Class Members - Functions + + + + + + + +
+ +
+ +

+  +

+

- d -

+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_func_0x65.html b/Extras/GIMPACT/docs/html/functions_func_0x65.html new file mode 100755 index 000000000..d6f367ebf --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_func_0x65.html @@ -0,0 +1,77 @@ + + +GIMPACT: Class Members - Functions + + + + + + + +
+ +
+ +

+  +

+

- e -

+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_func_0x66.html b/Extras/GIMPACT/docs/html/functions_func_0x66.html new file mode 100755 index 000000000..1e5624e90 --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_func_0x66.html @@ -0,0 +1,75 @@ + + +GIMPACT: Class Members - Functions + + + + + + + +
+ +
+ +

+  +

+

- f -

+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_func_0x67.html b/Extras/GIMPACT/docs/html/functions_func_0x67.html new file mode 100755 index 000000000..d2e321699 --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_func_0x67.html @@ -0,0 +1,252 @@ + + +GIMPACT: Class Members - Functions + + + + + + + +
+ +
+ +

+  +

+

- g -

+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_func_0x68.html b/Extras/GIMPACT/docs/html/functions_func_0x68.html new file mode 100755 index 000000000..2276bf1c0 --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_func_0x68.html @@ -0,0 +1,74 @@ + + +GIMPACT: Class Members - Functions + + + + + + + +
+ +
+ +

+  +

+

- h -

+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_func_0x69.html b/Extras/GIMPACT/docs/html/functions_func_0x69.html new file mode 100755 index 000000000..c1711c58b --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_func_0x69.html @@ -0,0 +1,97 @@ + + +GIMPACT: Class Members - Functions + + + + + + + +
+ +
+ +

+  +

+

- i -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_func_0x6c.html b/Extras/GIMPACT/docs/html/functions_func_0x6c.html new file mode 100755 index 000000000..a4bb88c6a --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_func_0x6c.html @@ -0,0 +1,68 @@ + + +GIMPACT: Class Members - Functions + + + + + + + +
+ +
+ +

+  +

+

- l -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_func_0x6d.html b/Extras/GIMPACT/docs/html/functions_func_0x6d.html new file mode 100755 index 000000000..da627b43e --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_func_0x6d.html @@ -0,0 +1,79 @@ + + +GIMPACT: Class Members - Functions + + + + + + + +
+ +
+ +

+  +

+

- m -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_func_0x6e.html b/Extras/GIMPACT/docs/html/functions_func_0x6e.html new file mode 100755 index 000000000..d6ad523b3 --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_func_0x6e.html @@ -0,0 +1,71 @@ + + +GIMPACT: Class Members - Functions + + + + + + + +
+ +
+ +

+  +

+

- n -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_func_0x6f.html b/Extras/GIMPACT/docs/html/functions_func_0x6f.html new file mode 100755 index 000000000..c980d9c7d --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_func_0x6f.html @@ -0,0 +1,92 @@ + + +GIMPACT: Class Members - Functions + + + + + + + +
+ +
+ +

+  +

+

- o -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_func_0x70.html b/Extras/GIMPACT/docs/html/functions_func_0x70.html new file mode 100755 index 000000000..416cc5a0a --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_func_0x70.html @@ -0,0 +1,98 @@ + + +GIMPACT: Class Members - Functions + + + + + + + +
+ +
+ +

+  +

+

- p -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_func_0x72.html b/Extras/GIMPACT/docs/html/functions_func_0x72.html new file mode 100755 index 000000000..41458b1f7 --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_func_0x72.html @@ -0,0 +1,96 @@ + + +GIMPACT: Class Members - Functions + + + + + + + +
+ +
+ +

+  +

+

- r -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_func_0x73.html b/Extras/GIMPACT/docs/html/functions_func_0x73.html new file mode 100755 index 000000000..0f3c41399 --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_func_0x73.html @@ -0,0 +1,98 @@ + + +GIMPACT: Class Members - Functions + + + + + + + +
+ +
+ +

+  +

+

- s -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_func_0x74.html b/Extras/GIMPACT/docs/html/functions_func_0x74.html new file mode 100755 index 000000000..1a7724b26 --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_func_0x74.html @@ -0,0 +1,69 @@ + + +GIMPACT: Class Members - Functions + + + + + + + +
+ +
+ +

+  +

+

- t -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_func_0x75.html b/Extras/GIMPACT/docs/html/functions_func_0x75.html new file mode 100755 index 000000000..d996cb952 --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_func_0x75.html @@ -0,0 +1,72 @@ + + +GIMPACT: Class Members - Functions + + + + + + + +
+ +
+ +

+  +

+

- u -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_func_0x7e.html b/Extras/GIMPACT/docs/html/functions_func_0x7e.html new file mode 100755 index 000000000..38c0b6bba --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_func_0x7e.html @@ -0,0 +1,79 @@ + + +GIMPACT: Class Members - Functions + + + + + + + +
+ +
+ +

+  +

+

- ~ -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_type.html b/Extras/GIMPACT/docs/html/functions_type.html new file mode 100755 index 000000000..a48c4dc38 --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_type.html @@ -0,0 +1,41 @@ + + +GIMPACT: Class Members - Typedefs + + + + + + + +  +

+

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/functions_vars.html b/Extras/GIMPACT/docs/html/functions_vars.html new file mode 100755 index 000000000..6aae60c9c --- /dev/null +++ b/Extras/GIMPACT/docs/html/functions_vars.html @@ -0,0 +1,246 @@ + + +GIMPACT: Class Members - Variables + + + + + + + +
+ +
+ +

+  +

+

- c -

+

- i -

+

- l -

+

- m -

+

- n -

+

- s -

+

- t -

+

- v -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/gim__array_8h.html b/Extras/GIMPACT/docs/html/gim__array_8h.html new file mode 100755 index 000000000..9a2647887 --- /dev/null +++ b/Extras/GIMPACT/docs/html/gim__array_8h.html @@ -0,0 +1,41 @@ + + +GIMPACT: C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_array.h File Reference + + + + + + +

C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_array.h File Reference

#include "GIMPACT/core/gim_memory.h"
+ + + + + + + + + + + +

Classes

class  gim_array< T >
 Very simple array container with fast access and simd memory. More...

Defines

#define GIM_ARRAY_GROW_INCREMENT   2
#define GIM_ARRAY_GROW_FACTOR   2
+

Detailed Description

+
Author:
Francisco León Nájera
+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/gim__basic__geometry__operations_8h.html b/Extras/GIMPACT/docs/html/gim__basic__geometry__operations_8h.html new file mode 100755 index 000000000..4b58da0e9 --- /dev/null +++ b/Extras/GIMPACT/docs/html/gim__basic__geometry__operations_8h.html @@ -0,0 +1,121 @@ + + +GIMPACT: C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_basic_geometry_operations.h File Reference + + + + + + +

C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_basic_geometry_operations.h File Reference

#include "GIMPACT/core/gim_linear_math.h"
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Defines

#define PLANEDIREPSILON   0.0000001f
#define PARALELENORMALS   0.000001f
#define TRIANGLE_NORMAL(v1, v2, v3, n)
#define TRIANGLE_NORMAL_FAST(v1, v2, v3, n)
#define TRIANGLE_PLANE(v1, v2, v3, plane)
 plane is a vec4f
#define TRIANGLE_PLANE_FAST(v1, v2, v3, plane)
 plane is a vec4f
#define EDGE_PLANE(e1, e2, n, plane)
 Calc a plane from an edge an a normal. plane is a vec4f.
#define DISTANCE_PLANE_POINT(plane, point)   (VEC_DOT(plane,point) - plane[3])
#define PROJECT_POINT_PLANE(point, plane, projected)
#define PLANE_MINOR_AXES(plane, i0, i1)   VEC_MINOR_AXES(plane, i0, i1)
 Finds the 2 smallest cartesian coordinates of a plane normal.

Enumerations

enum  ePLANE_INTERSECTION_TYPE { G_BACK_PLANE = 0, +G_COLLIDE_PLANE, +G_FRONT_PLANE + }
enum  eLINE_PLANE_INTERSECTION_TYPE {
+  G_FRONT_PLANE_S1 = 0, +G_FRONT_PLANE_S2, +G_BACK_PLANE_S1, +G_BACK_PLANE_S2, +
+  G_COLLIDE_PLANE_S1, +G_COLLIDE_PLANE_S2 +
+ }

Functions

template<typename CLASS_POINT, typename CLASS_PLANE>
SIMD_FORCE_INLINE bool POINT_IN_HULL (const CLASS_POINT &point, const CLASS_PLANE *planes, GUINT plane_count)
 Verifies if a point is in the plane hull.
template<typename CLASS_POINT, typename CLASS_PLANE>
SIMD_FORCE_INLINE void PLANE_CLIP_SEGMENT (const CLASS_POINT &s1, const CLASS_POINT &s2, const CLASS_PLANE &plane, CLASS_POINT &clipped)
template<typename CLASS_POINT, typename CLASS_PLANE>
SIMD_FORCE_INLINE eLINE_PLANE_INTERSECTION_TYPE PLANE_CLIP_SEGMENT2 (const CLASS_POINT &s1, const CLASS_POINT &s2, const CLASS_PLANE &plane, CLASS_POINT &clipped)
 Confirms if the plane intersect the edge or nor.
template<typename CLASS_POINT, typename CLASS_PLANE>
SIMD_FORCE_INLINE eLINE_PLANE_INTERSECTION_TYPE PLANE_CLIP_SEGMENT_CLOSEST (const CLASS_POINT &s1, const CLASS_POINT &s2, const CLASS_PLANE &plane, CLASS_POINT &clipped1, CLASS_POINT &clipped2)
 Confirms if the plane intersect the edge or not.
template<typename T, typename CLASS_POINT, typename CLASS_PLANE>
SIMD_FORCE_INLINE bool RAY_PLANE_COLLISION (const CLASS_PLANE &plane, const CLASS_POINT &vDir, const CLASS_POINT &vPoint, CLASS_POINT &pout, T &tparam)
 Ray plane collision in one way.
template<typename T, typename CLASS_POINT, typename CLASS_PLANE>
SIMD_FORCE_INLINE GUINT LINE_PLANE_COLLISION (const CLASS_PLANE &plane, const CLASS_POINT &vDir, const CLASS_POINT &vPoint, CLASS_POINT &pout, T &tparam, T tmin, T tmax)
 line collision
template<typename CLASS_POINT, typename CLASS_PLANE>
SIMD_FORCE_INLINE bool INTERSECT_PLANES (const CLASS_PLANE &p1, const CLASS_PLANE &p2, CLASS_POINT &p, CLASS_POINT &d)
 Returns the Ray on which 2 planes intersect if they do. Written by Rodrigo Hernandez on ODE convex collision.
template<typename CLASS_POINT>
SIMD_FORCE_INLINE void CLOSEST_POINT_ON_SEGMENT (CLASS_POINT &cp, const CLASS_POINT &v, const CLASS_POINT &e1, const CLASS_POINT &e2)
template<typename T, typename CLASS_POINT>
SIMD_FORCE_INLINE bool LINE_INTERSECTION_PARAMS (const CLASS_POINT &dir1, CLASS_POINT &point1, const CLASS_POINT &dir2, CLASS_POINT &point2, T &t1, T &t2)
 Finds the line params where these lines intersect.
template<typename CLASS_POINT>
SIMD_FORCE_INLINE void SEGMENT_COLLISION (const CLASS_POINT &vA1, const CLASS_POINT &vA2, const CLASS_POINT &vB1, const CLASS_POINT &vB2, CLASS_POINT &vPointA, CLASS_POINT &vPointB)
 Find closest points on segments.
template<typename T>
SIMD_FORCE_INLINE bool BOX_AXIS_INTERSECT (T pos, T dir, T bmin, T bmax, T &tfirst, T &tlast)
 Line box intersection in one dimension.
template<typename T>
SIMD_FORCE_INLINE void SORT_3_INDICES (const T *values, GUINT *order_indices)
 Sorts 3 componets.
+

Detailed Description

+
Author:
Francisco León Nájera type independant geometry routines
+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/gim__bitset_8h.html b/Extras/GIMPACT/docs/html/gim__bitset_8h.html new file mode 100755 index 000000000..8a9e589be --- /dev/null +++ b/Extras/GIMPACT/docs/html/gim__bitset_8h.html @@ -0,0 +1,40 @@ + + +GIMPACT: C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_bitset.h File Reference + + + + + + +

C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_bitset.h File Reference

#include "GIMPACT/core/gim_array.h"
+ + + + + + + + + + +

Classes

class  gim_bitset

Defines

#define GUINT_BIT_COUNT   32
#define GUINT_EXPONENT   5
+

Detailed Description

+
Author:
Francisco León Nájera
+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/gim__box__collision_8h.html b/Extras/GIMPACT/docs/html/gim__box__collision_8h.html new file mode 100755 index 000000000..34ad509be --- /dev/null +++ b/Extras/GIMPACT/docs/html/gim__box__collision_8h.html @@ -0,0 +1,55 @@ + + +GIMPACT: C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_box_collision.h File Reference + + + + + + +

C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_box_collision.h File Reference

#include "GIMPACT/core/gim_basic_geometry_operations.h"
+#include "LinearMath/btTransform.h"
+ + + + + + + + + + + + + + + + + + + + + + + + +

Classes

class  GIM_BOX_BOX_TRANSFORM_CACHE
 Class for transforming a model1 to the space of model0. More...
class  GIM_AABB
 Axis aligned box. More...

Defines

#define TEST_CROSS_EDGE_BOX_MCR(edge, absolute_edge, pointa, pointb, _extend, i_dir_0, i_dir_1, i_comp_0, i_comp_1)
#define TEST_CROSS_EDGE_BOX_X_AXIS_MCR(edge, absolute_edge, pointa, pointb, _extend)
#define TEST_CROSS_EDGE_BOX_Y_AXIS_MCR(edge, absolute_edge, pointa, pointb, _extend)
#define TEST_CROSS_EDGE_BOX_Z_AXIS_MCR(edge, absolute_edge, pointa, pointb, _extend)
#define BOX_PLANE_EPSILON   0.000001f

Functions

SIMD_FORCE_INLINE bool btCompareTransformsEqual (const btTransform &t1, const btTransform &t2)
 Compairison of transformation objects.
+

Detailed Description

+
Author:
Francisco León Nájera
+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/gim__box__set_8h.html b/Extras/GIMPACT/docs/html/gim__box__set_8h.html new file mode 100755 index 000000000..8005c6853 --- /dev/null +++ b/Extras/GIMPACT/docs/html/gim__box__set_8h.html @@ -0,0 +1,62 @@ + + +GIMPACT: C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_box_set.h File Reference + + + + + + +

C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_box_set.h File Reference

#include "GIMPACT/core/gim_array.h"
+#include "GIMPACT/core/gim_radixsort.h"
+#include "GIMPACT/core/gim_box_collision.h"
+#include "GIMPACT/core/gim_tri_collision.h"
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Classes

struct  GIM_PAIR
 Overlapping pair. More...
class  gim_pair_set
 A pairset array. More...
class  GIM_PRIMITIVE_MANAGER_PROTOTYPE
 Prototype Base class for primitive classification. More...
struct  GIM_AABB_DATA
struct  GIM_BOX_TREE_NODE
 Node Structure for trees. More...
class  GIM_BOX_TREE
 Basic Box tree structure. More...
class  GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE >
 Generic Box Tree Template. More...
class  GIM_BOX_TREE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE >
 Class for Box Tree Sets. More...
class  GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >
 GIM_BOX_SET collision methods. More...
+

Detailed Description

+
Author:
Francisco León Nájera
+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/gim__clip__polygon_8h.html b/Extras/GIMPACT/docs/html/gim__clip__polygon_8h.html new file mode 100755 index 000000000..ca1aa5173 --- /dev/null +++ b/Extras/GIMPACT/docs/html/gim__clip__polygon_8h.html @@ -0,0 +1,51 @@ + + +GIMPACT: C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_clip_polygon.h File Reference + + + + + + +

C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_clip_polygon.h File Reference

+ + + + + + + + + + + + + + + + + + + + + + + +

Classes

class  DISTANCE_PLANE_3D_FUNC
 This function calcs the distance from a 3D plane. More...

Functions

template<typename CLASS_POINT>
SIMD_FORCE_INLINE void PLANE_CLIP_POLYGON_COLLECT (const CLASS_POINT &point0, const CLASS_POINT &point1, GREAL dist0, GREAL dist1, CLASS_POINT *clipped, GUINT &clipped_count)
template<typename CLASS_POINT, typename CLASS_PLANE, typename DISTANCE_PLANE_FUNC>
SIMD_FORCE_INLINE GUINT PLANE_CLIP_POLYGON_GENERIC (const CLASS_PLANE &plane, const CLASS_POINT *polygon_points, GUINT polygon_point_count, CLASS_POINT *clipped, DISTANCE_PLANE_FUNC distance_func)
 Clips a polygon by a plane.
template<typename CLASS_POINT, typename CLASS_PLANE, typename DISTANCE_PLANE_FUNC>
SIMD_FORCE_INLINE GUINT PLANE_CLIP_TRIANGLE_GENERIC (const CLASS_PLANE &plane, const CLASS_POINT &point0, const CLASS_POINT &point1, const CLASS_POINT &point2, CLASS_POINT *clipped, DISTANCE_PLANE_FUNC distance_func)
 Clips a polygon by a plane.
template<typename CLASS_POINT, typename CLASS_PLANE>
SIMD_FORCE_INLINE GUINT PLANE_CLIP_POLYGON3D (const CLASS_PLANE &plane, const CLASS_POINT *polygon_points, GUINT polygon_point_count, CLASS_POINT *clipped)
template<typename CLASS_POINT, typename CLASS_PLANE>
SIMD_FORCE_INLINE GUINT PLANE_CLIP_TRIANGLE3D (const CLASS_PLANE &plane, const CLASS_POINT &point0, const CLASS_POINT &point1, const CLASS_POINT &point2, CLASS_POINT *clipped)
+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/gim__contact_8h.html b/Extras/GIMPACT/docs/html/gim__contact_8h.html new file mode 100755 index 000000000..9f383d08e --- /dev/null +++ b/Extras/GIMPACT/docs/html/gim__contact_8h.html @@ -0,0 +1,45 @@ + + +GIMPACT: C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_contact.h File Reference + + + + + + +

C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_contact.h File Reference

#include "GIMPACT/core/gim_geometry.h"
+#include "GIMPACT/core/gim_radixsort.h"
+#include "GIMPACT/core/gim_array.h"
+ + + + + + + + + + + + + +

Classes

class  GIM_CONTACT
 Structure for collision results. More...
class  gim_contact_array

Defines

#define NORMAL_CONTACT_AVERAGE   1
#define CONTACT_DIFF_EPSILON   0.00001f
+

Detailed Description

+
Author:
Francisco León Nájera
+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/gim__geom__types_8h.html b/Extras/GIMPACT/docs/html/gim__geom__types_8h.html new file mode 100755 index 000000000..bbe78f58b --- /dev/null +++ b/Extras/GIMPACT/docs/html/gim__geom__types_8h.html @@ -0,0 +1,99 @@ + + +GIMPACT: C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_geom_types.h File Reference + + + + + + +

C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_geom_types.h File Reference

#include "GIMPACT/core/gim_math.h"
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Typedefs

typedef GSHORT vec2s [2]
 Short Integer vector 2D.
typedef GSHORT vec3s [3]
 Integer vector 3D.
typedef GSHORT vec4s [4]
 Integer vector 4D.
typedef GUSHORT vec2us [2]
 Short Integer vector 2D.
typedef GUSHORT vec3us [3]
 Integer vector 3D.
typedef GUSHORT vec4us [4]
 Integer vector 4D.
typedef GINT vec2i [2]
 Integer vector 2D.
typedef GINT vec3i [3]
 Integer vector 3D.
typedef GINT vec4i [4]
 Integer vector 4D.
typedef GUINT vec2ui [2]
 Unsigned Integer vector 2D.
typedef GUINT vec3ui [3]
 Unsigned Integer vector 3D.
typedef GUINT vec4ui [4]
 Unsigned Integer vector 4D.
typedef GREAL vec2f [2]
 Float vector 2D.
typedef GREAL vec3f [3]
 Float vector 3D.
typedef GREAL vec4f [4]
 Float vector 4D.
typedef GREAL2 vec2d [2]
 Double vector 2D.
typedef GREAL2 vec3d [3]
 Float vector 3D.
typedef GREAL2 vec4d [4]
 Float vector 4D.
typedef GREAL mat2f [2][2]
 Matrix 2D, row ordered.
typedef GREAL mat3f [3][3]
 Matrix 3D, row ordered.
typedef GREAL mat4f [4][4]
 Matrix 4D, row ordered.
typedef GREAL quatf [4]
 Quaternion.
+

Detailed Description

+
Author:
Francisco León Nájera
+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/gim__geometry_8h.html b/Extras/GIMPACT/docs/html/gim__geometry_8h.html new file mode 100755 index 000000000..ca36433c4 --- /dev/null +++ b/Extras/GIMPACT/docs/html/gim__geometry_8h.html @@ -0,0 +1,35 @@ + + +GIMPACT: C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_geometry.h File Reference + + + + + + +

C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_geometry.h File Reference

#include "GIMPACT/core/gim_basic_geometry_operations.h"
+#include "GIMPACT/core/gim_clip_polygon.h"
+#include "GIMPACT/core/gim_box_collision.h"
+#include "GIMPACT/core/gim_tri_collision.h"
+ + +
+

Detailed Description

+
Author:
Francisco León Nájera
+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/gim__hash__table_8h.html b/Extras/GIMPACT/docs/html/gim__hash__table_8h.html new file mode 100755 index 000000000..6f994905c --- /dev/null +++ b/Extras/GIMPACT/docs/html/gim__hash__table_8h.html @@ -0,0 +1,70 @@ + + +GIMPACT: C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_hash_table.h File Reference + + + + + + +

C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_hash_table.h File Reference

#include "GIMPACT/core/gim_radixsort.h"
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Classes

struct  GIM_HASH_TABLE_NODE< T >
class  GIM_HASH_NODE_GET_KEY
 Macro for getting the key. More...
class  GIM_HASH_NODE_CMP_KEY_MACRO
 Macro for comparing the key and the element. More...
class  GIM_HASH_NODE_CMP_MACRO
 Macro for comparing Hash nodes. More...
class  gim_hash_table< T >
 A compact hash table implementation. More...

Defines

#define GIM_INVALID_HASH   0xffffffff
 A very very high value.
#define GIM_DEFAULT_HASH_TABLE_SIZE   380
#define GIM_DEFAULT_HASH_TABLE_NODE_SIZE   4
#define GIM_HASH_TABLE_GROW_FACTOR   2
#define GIM_MIN_RADIX_SORT_SIZE   860
 calibrated on a PIII
#define GIM_NUM_PRIME   28

Functions

template<typename T>
void gim_sort_hash_node_array (T *array, GUINT array_count)
 Sorting for hash table.
GUINT gim_next_prime (GUINT number)

Variables

static const GUINT gim_prime_list [GIM_NUM_PRIME]
+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/gim__linear__math_8h.html b/Extras/GIMPACT/docs/html/gim__linear__math_8h.html new file mode 100755 index 000000000..e3296d43c --- /dev/null +++ b/Extras/GIMPACT/docs/html/gim__linear__math_8h.html @@ -0,0 +1,348 @@ + + +GIMPACT: C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_linear_math.h File Reference + + + + + + +

C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_linear_math.h File Reference

#include "GIMPACT/core/gim_math.h"
+#include "GIMPACT/core/gim_geom_types.h"
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Defines

#define VEC_ZERO_2(a)
 Zero out a 2D vector.
#define VEC_ZERO(a)
 Zero out a 3D vector.
#define VEC_ZERO_4(a)
 Zero out a 4D vector.
#define VEC_COPY_2(b, a)
 Vector copy.
#define VEC_COPY(b, a)
 Copy 3D vector.
#define VEC_COPY_4(b, a)
 Copy 4D vector.
#define VEC_SWAP(b, a)
 VECTOR SWAP.
#define VEC_DIFF_2(v21, v2, v1)
 Vector difference.
#define VEC_DIFF(v21, v2, v1)
 Vector difference.
#define VEC_DIFF_4(v21, v2, v1)
 Vector difference.
#define VEC_SUM_2(v21, v2, v1)
 Vector sum.
#define VEC_SUM(v21, v2, v1)
 Vector sum.
#define VEC_SUM_4(v21, v2, v1)
 Vector sum.
#define VEC_SCALE_2(c, a, b)
 scalar times vector
#define VEC_SCALE(c, a, b)
 scalar times vector
#define VEC_SCALE_4(c, a, b)
 scalar times vector
#define VEC_ACCUM_2(c, a, b)
 accumulate scaled vector
#define VEC_ACCUM(c, a, b)
 accumulate scaled vector
#define VEC_ACCUM_4(c, a, b)
 accumulate scaled vector
#define VEC_DOT_2(a, b)   ((a)[0]*(b)[0] + (a)[1]*(b)[1])
 Vector dot product.
#define VEC_DOT(a, b)   ((a)[0]*(b)[0] + (a)[1]*(b)[1] + (a)[2]*(b)[2])
 Vector dot product.
#define VEC_DOT_4(a, b)   ((a)[0]*(b)[0] + (a)[1]*(b)[1] + (a)[2]*(b)[2] + (a)[3]*(b)[3])
 Vector dot product.
#define VEC_IMPACT_SQ(bsq, direction, position)
 vector impact parameter (squared)
#define VEC_IMPACT(bsq, direction, position)
 vector impact parameter
#define VEC_LENGTH_2(a, l)
 Vector length.
#define VEC_LENGTH(a, l)
 Vector length.
#define VEC_LENGTH_4(a, l)
 Vector length.
#define VEC_INV_LENGTH_2(a, l)
 Vector inv length.
#define VEC_INV_LENGTH(a, l)
 Vector inv length.
#define VEC_INV_LENGTH_4(a, l)
 Vector inv length.
#define VEC_DISTANCE(_len, _va, _vb)
 distance between two points
#define VEC_CONJUGATE_LENGTH(a, l)
 Vector length.
#define VEC_NORMALIZE(a)
 Vector length.
#define VEC_RENORMALIZE(a, newlen)
 Set Vector size.
#define VEC_CROSS(c, a, b)
 Vector cross.
#define VEC_PERPENDICULAR(vp, v, n)
#define VEC_PARALLEL(vp, v, n)
#define VEC_PROJECT(vp, v, n)
#define VEC_UNPROJECT(vp, v, n)
#define VEC_REFLECT(vr, v, n)
#define VEC_BLEND_AB(vr, sa, a, sb, b)
#define VEC_BLEND(vr, a, b, s)   VEC_BLEND_AB(vr,(1-s),a,s,b)
#define VEC_SET3(a, b, op, c)   a[0]=b[0] op c[0]; a[1]=b[1] op c[1]; a[2]=b[2] op c[2];
#define VEC_MAYOR_COORD(vec, maxc)
 Finds the bigger cartesian coordinate from a vector.
#define VEC_MINOR_AXES(vec, i0, i1)
 Finds the 2 smallest cartesian coordinates from a vector.
#define VEC_EQUAL(v1, v2)   (v1[0]==v2[0]&&v1[1]==v2[1]&&v1[2]==v2[2])
#define VEC_NEAR_EQUAL(v1, v2)   (GIM_NEAR_EQUAL(v1[0],v2[0])&&GIM_NEAR_EQUAL(v1[1],v2[1])&&GIM_NEAR_EQUAL(v1[2],v2[2]))
#define X_AXIS_CROSS_VEC(dst, src)
 Vector cross.
#define Y_AXIS_CROSS_VEC(dst, src)
#define Z_AXIS_CROSS_VEC(dst, src)
#define IDENTIFY_MATRIX_3X3(m)
 initialize matrix
#define IDENTIFY_MATRIX_4X4(m)
#define ZERO_MATRIX_4X4(m)
#define ROTX_CS(m, cosine, sine)
#define ROTY_CS(m, cosine, sine)
#define ROTZ_CS(m, cosine, sine)
#define COPY_MATRIX_2X2(b, a)
#define COPY_MATRIX_2X3(b, a)
#define COPY_MATRIX_3X3(b, a)
#define COPY_MATRIX_4X4(b, a)
#define TRANSPOSE_MATRIX_2X2(b, a)
#define TRANSPOSE_MATRIX_3X3(b, a)
#define TRANSPOSE_MATRIX_4X4(b, a)
#define SCALE_MATRIX_2X2(b, s, a)
#define SCALE_MATRIX_3X3(b, s, a)
#define SCALE_MATRIX_4X4(b, s, a)
#define SCALE_VEC_MATRIX_2X2(b, svec, a)
#define SCALE_VEC_MATRIX_3X3(b, svec, a)
#define SCALE_VEC_MATRIX_4X4(b, svec, a)
#define ACCUM_SCALE_MATRIX_2X2(b, s, a)
#define ACCUM_SCALE_MATRIX_3X3(b, s, a)
#define ACCUM_SCALE_MATRIX_4X4(b, s, a)
#define MATRIX_PRODUCT_2X2(c, a, b)
#define MATRIX_PRODUCT_3X3(c, a, b)
#define MATRIX_PRODUCT_4X4(c, a, b)
#define MAT_DOT_VEC_2X2(p, m, v)
#define MAT_DOT_VEC_3X3(p, m, v)
#define MAT_DOT_VEC_4X4(p, m, v)
#define MAT_DOT_VEC_3X4(p, m, v)
#define VEC_DOT_MAT_3X3(p, v, m)
#define MAT_DOT_VEC_2X3(p, m, v)
#define MAT_TRANSFORM_PLANE_4X4(pout, m, plane)
 Transform a plane.
#define INV_TRANSP_MAT_DOT_VEC_2X2(p, m, v)
#define NORM_XFORM_2X2(p, m, v)
#define OUTER_PRODUCT_2X2(m, v, t)
#define OUTER_PRODUCT_3X3(m, v, t)
#define OUTER_PRODUCT_4X4(m, v, t)
#define ACCUM_OUTER_PRODUCT_2X2(m, v, t)
#define ACCUM_OUTER_PRODUCT_3X3(m, v, t)
#define ACCUM_OUTER_PRODUCT_4X4(m, v, t)
#define DETERMINANT_2X2(d, m)
#define DETERMINANT_3X3(d, m)
#define COFACTOR_4X4_IJ(fac, m, i, j)
#define DETERMINANT_4X4(d, m)
#define COFACTOR_2X2(a, m)
#define COFACTOR_3X3(a, m)
#define COFACTOR_4X4(a, m)
#define ADJOINT_2X2(a, m)
#define ADJOINT_3X3(a, m)
#define ADJOINT_4X4(a, m)
#define SCALE_ADJOINT_2X2(a, s, m)
#define SCALE_ADJOINT_3X3(a, s, m)
#define SCALE_ADJOINT_4X4(a, s, m)
#define INVERT_2X2(b, det, a)
#define INVERT_3X3(b, det, a)
#define INVERT_4X4(b, det, a)
#define MAT_GET_ROW(mat, vec3, rowindex)
 Get the triple(3) row of a transform matrix.
#define MAT_GET_ROW2(mat, vec2, rowindex)
 Get the tuple(2) row of a transform matrix.
#define MAT_GET_ROW4(mat, vec4, rowindex)
 Get the quad (4) row of a transform matrix.
#define MAT_GET_COL(mat, vec3, colindex)
 Get the triple(3) col of a transform matrix.
#define MAT_GET_COL2(mat, vec2, colindex)
 Get the tuple(2) col of a transform matrix.
#define MAT_GET_COL4(mat, vec4, colindex)
 Get the quad (4) col of a transform matrix.
#define MAT_GET_X(mat, vec3)
 Get the triple(3) col of a transform matrix.
#define MAT_GET_Y(mat, vec3)
 Get the triple(3) col of a transform matrix.
#define MAT_GET_Z(mat, vec3)
 Get the triple(3) col of a transform matrix.
#define MAT_SET_X(mat, vec3)
 Get the triple(3) col of a transform matrix.
#define MAT_SET_Y(mat, vec3)
 Get the triple(3) col of a transform matrix.
#define MAT_SET_Z(mat, vec3)
 Get the triple(3) col of a transform matrix.
#define MAT_GET_TRANSLATION(mat, vec3)
 Get the triple(3) col of a transform matrix.
#define MAT_SET_TRANSLATION(mat, vec3)
 Set the triple(3) col of a transform matrix.
#define MAT_DOT_ROW(mat, vec3, rowindex)   (vec3[0]*mat[rowindex][0] + vec3[1]*mat[rowindex][1] + vec3[2]*mat[rowindex][2])
 Returns the dot product between a vec3f and the row of a matrix.
#define MAT_DOT_ROW2(mat, vec2, rowindex)   (vec2[0]*mat[rowindex][0] + vec2[1]*mat[rowindex][1])
 Returns the dot product between a vec2f and the row of a matrix.
#define MAT_DOT_ROW4(mat, vec4, rowindex)   (vec4[0]*mat[rowindex][0] + vec4[1]*mat[rowindex][1] + vec4[2]*mat[rowindex][2] + vec4[3]*mat[rowindex][3])
 Returns the dot product between a vec4f and the row of a matrix.
#define MAT_DOT_COL(mat, vec3, colindex)   (vec3[0]*mat[0][colindex] + vec3[1]*mat[1][colindex] + vec3[2]*mat[2][colindex])
 Returns the dot product between a vec3f and the col of a matrix.
#define MAT_DOT_COL2(mat, vec2, colindex)   (vec2[0]*mat[0][colindex] + vec2[1]*mat[1][colindex])
 Returns the dot product between a vec2f and the col of a matrix.
#define MAT_DOT_COL4(mat, vec4, colindex)   (vec4[0]*mat[0][colindex] + vec4[1]*mat[1][colindex] + vec4[2]*mat[2][colindex] + vec4[3]*mat[3][colindex])
 Returns the dot product between a vec4f and the col of a matrix.
#define INV_MAT_DOT_VEC_3X3(p, m, v)
+

Detailed Description

+
Author:
Francisco León Nájera Type Independant Vector and matrix operations.
+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/gim__manual_8h.html b/Extras/GIMPACT/docs/html/gim__manual_8h.html new file mode 100755 index 000000000..cb88bf6b5 --- /dev/null +++ b/Extras/GIMPACT/docs/html/gim__manual_8h.html @@ -0,0 +1,31 @@ + + +GIMPACT: C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/gim_manual.h File Reference + + + + + + +

C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/gim_manual.h File Reference

+ +
+

Detailed Description

+
Author:
Francisco León Nájera GIMPACT documentation
+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/gim__math_8h.html b/Extras/GIMPACT/docs/html/gim__math_8h.html new file mode 100755 index 000000000..3ea268a6a --- /dev/null +++ b/Extras/GIMPACT/docs/html/gim__math_8h.html @@ -0,0 +1,132 @@ + + +GIMPACT: C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_math.h File Reference + + + + + + +

C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_math.h File Reference

#include "LinearMath/btScalar.h"
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Defines

#define GREAL   btScalar
#define GREAL2   double
#define GINT   int
#define GUINT   unsigned int
#define GSHORT   short
#define GUSHORT   unsigned short
#define GINT64   long long
#define GUINT64   unsigned long long
#define G_PI   3.14159265358979f
#define G_HALF_PI   1.5707963f
#define G_TWO_PI   6.28318530f
#define G_ROOT3   1.73205f
#define G_ROOT2   1.41421f
#define G_UINT_INFINITY   0xffffffff
 A very very high value.
#define G_REAL_INFINITY   FLT_MAX
#define G_SIGN_BITMASK   0x80000000
#define G_EPSILON   SIMD_EPSILON
#define G_DEGTORAD(X)   ((X)*3.1415926f/180.0f)
#define G_RADTODEG(X)   ((X)*180.0f/3.1415926f)
#define GIM_IR(x)   ((GUINT&)(x))
 Integer representation of a floating-point value.
#define GIM_SIR(x)   ((GINT&)(x))
 Signed integer representation of a floating-point value.
#define GIM_AIR(x)   (GIM_IR(x)&0x7fffffff)
 Absolute integer representation of a floating-point value.
#define GIM_FR(x)   ((GREAL&)(x))
 Floating-point representation of an integer value.
#define GIM_MAX(a, b)   (a<b?b:a)
#define GIM_MIN(a, b)   (a>b?b:a)
#define GIM_MAX3(a, b, c)   GIM_MAX(a,GIM_MAX(b,c))
#define GIM_MIN3(a, b, c)   GIM_MIN(a,GIM_MIN(b,c))
#define GIM_IS_ZERO(value)   (value < G_EPSILON && value > -G_EPSILON)
#define GIM_IS_NEGATIVE(value)   (value <= -G_EPSILON)
#define GIM_IS_POSISITVE(value)   (value >= G_EPSILON)
#define GIM_NEAR_EQUAL(v1, v2)   GIM_IS_ZERO((v1-v2))
#define GIM_CLAMP(number, minval, maxval)   (number<minval?minval:(number>maxval?maxval:number))
 returns a clamped number
#define GIM_GREATER(x, y)   fabsf(x) > (y)
#define GIM_SWAP_NUMBERS(a, b)
 Swap numbers.
#define GIM_INV_SQRT(va, isva)
#define GIM_SQRT(va, sva)

Enumerations

enum  GIM_SCALAR_TYPES {
+  G_STYPE_REAL = 0, +G_STYPE_REAL2, +G_STYPE_SHORT, +G_STYPE_USHORT, +
+  G_STYPE_INT, +G_STYPE_UINT, +G_STYPE_INT64, +G_STYPE_UINT64 +
+ }

Functions

GREAL gim_inv_sqrt (GREAL f)
 Computes 1.0f / sqrtf(x). Comes from Quake3. See http://www.magic-software.com/3DGEDInvSqrt.html.
GREAL gim_sqrt (GREAL f)
+

Detailed Description

+
Author:
Francisco León Nájera
+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/gim__memory_8h.html b/Extras/GIMPACT/docs/html/gim__memory_8h.html new file mode 100755 index 000000000..fb2259114 --- /dev/null +++ b/Extras/GIMPACT/docs/html/gim__memory_8h.html @@ -0,0 +1,281 @@ + + +GIMPACT: C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_memory.h File Reference + + + + + + +

C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_memory.h File Reference

#include "GIMPACT/core/gim_math.h"
+#include <memory.h>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Defines

#define pf(_x, _i)
 Prefetch 64.
#define pf2(_x, _i)
 Prefetch 128.
#define GIM_COPY_ARRAYS(dest_array, source_array, element_count)
#define GIM_COPY_ARRAYS_1(dest_array, source_array, element_count, copy_macro)
#define GIM_ZERO_ARRAY(array, element_count)
#define GIM_CONSTANT_ARRAY(array, element_count, constant)
#define SIMD_T   GUINT64
 SIMD POINTER INTEGER.
#define SIMD_T_SIZE   sizeof(SIMD_T)
 SIMD INTEGER SIZE.

Typedefs

typedef void * gim_alloc_function (size_t size)
typedef void * gim_alloca_function (size_t size)
typedef void * gim_realloc_function (void *ptr, size_t oldsize, size_t newsize)
typedef void gim_free_function (void *ptr)

Functions

void gim_set_alloc_handler (gim_alloc_function *fn)
void gim_set_alloca_handler (gim_alloca_function *fn)
void gim_set_realloc_handler (gim_realloc_function *fn)
void gim_set_free_handler (gim_free_function *fn)
gim_alloc_functiongim_get_alloc_handler (void)
gim_alloca_functiongim_get_alloca_handler (void)
gim_realloc_functiongim_get_realloc_handler (void)
gim_free_functiongim_get_free_handler (void)
void * gim_alloc (size_t size)
void * gim_alloca (size_t size)
void * gim_realloc (void *ptr, size_t oldsize, size_t newsize)
void gim_free (void *ptr)
void gim_simd_memcpy (void *dst, const void *src, size_t copysize)
template<class T>
void gim_swap_elements (T *_array, size_t _i, size_t _j)
template<class T>
void gim_swap_elements_memcpy (T *_array, size_t _i, size_t _j)
template<int SIZE>
void gim_swap_elements_ptr (char *_array, size_t _i, size_t _j)
+

Detailed Description

+
Author:
Francisco León Nájera
+

Define Documentation

+ +
+
+ + + + +
#define SIMD_T   GUINT64
+
+
+ +

+SIMD POINTER INTEGER. +

+ +

+

+ +

+
+ + + + +
#define SIMD_T_SIZE   sizeof(SIMD_T)
+
+
+ +

+SIMD INTEGER SIZE. +

+ +

+

+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void gim_simd_memcpy (void *  dst,
const void *  src,
size_t  copysize 
) [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + + + + + + + +
void gim_swap_elements (T *  _array,
size_t  _i,
size_t  _j 
) [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + + + + + + + +
void gim_swap_elements_memcpy (T *  _array,
size_t  _i,
size_t  _j 
) [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<int SIZE>
+ + + + + + + + + + + + + + + + + + + + + + + + +
void gim_swap_elements_ptr (char *  _array,
size_t  _i,
size_t  _j 
) [inline]
+
+
+ +

+ +

+

+


Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/gim__radixsort_8h.html b/Extras/GIMPACT/docs/html/gim__radixsort_8h.html new file mode 100755 index 000000000..699aa6e52 --- /dev/null +++ b/Extras/GIMPACT/docs/html/gim__radixsort_8h.html @@ -0,0 +1,89 @@ + + +GIMPACT: C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_radixsort.h File Reference + + + + + + +

C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_radixsort.h File Reference

#include "GIMPACT/core/gim_memory.h"
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Classes

class  less_comparator
 Prototype for comparators. More...
class  integer_comparator
 Prototype for comparators. More...
class  uint_key_func
 Prototype for getting the integer representation of an object. More...
class  copy_elements_func
 Prototype for copying elements. More...
class  memcopy_elements_func
 Prototype for copying elements. More...
struct  GIM_RSORT_TOKEN
class  GIM_RSORT_TOKEN_COMPARATOR
 Prototype for comparators. More...

Defines

#define kHist   2048
#define D11_0(x)   (x & 0x7FF)
#define D11_1(x)   (x >> 11 & 0x7FF)
#define D11_2(x)   (x >> 22 )

Functions

void gim_radix_sort_rtokens (GIM_RSORT_TOKEN *array, GIM_RSORT_TOKEN *sorted, GUINT element_count)
 Radix sort for unsigned integer keys.
template<typename T, class GETKEY_CLASS>
void gim_radix_sort_array_tokens (T *array, GIM_RSORT_TOKEN *sorted_tokens, GUINT element_count, GETKEY_CLASS uintkey_macro)
 Get the sorted tokens from an array. For generic use. Tokens are IRR_RSORT_TOKEN.
template<typename T, class GETKEY_CLASS, class COPY_CLASS>
void gim_radix_sort (T *array, GUINT element_count, GETKEY_CLASS get_uintkey_macro, COPY_CLASS copy_elements_macro)
 Sorts array in place. For generic use.
template<class T, typename KEYCLASS, typename COMP_CLASS>
bool gim_binary_search_ex (const T *_array, GUINT _start_i, GUINT _end_i, GUINT &_result_index, const KEYCLASS &_search_key, COMP_CLASS _comp_macro)
 Failsafe Iterative binary search,.
template<class T>
bool gim_binary_search (const T *_array, GUINT _start_i, GUINT _end_i, const T &_search_key, GUINT &_result_index)
 Failsafe Iterative binary search,Template version.
template<typename T, typename COMP_CLASS>
void gim_down_heap (T *pArr, GUINT k, GUINT n, COMP_CLASS CompareFunc)
 heap sort from http://www.csse.monash.edu.au/~lloyd/tildeAlgDS/Sort/Heap/
template<typename T, typename COMP_CLASS>
void gim_heap_sort (T *pArr, GUINT element_count, COMP_CLASS CompareFunc)
+

Detailed Description

+
Author:
Francisco León Nájera. Based on the work of Michael Herf : "fast floating-point radix sort" Avaliable on http://www.stereopsis.com/radix.html
+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/gim__tri__collision_8h.html b/Extras/GIMPACT/docs/html/gim__tri__collision_8h.html new file mode 100755 index 000000000..380c32f4a --- /dev/null +++ b/Extras/GIMPACT/docs/html/gim__tri__collision_8h.html @@ -0,0 +1,43 @@ + + +GIMPACT: C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_tri_collision.h File Reference + + + + + + +

C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_tri_collision.h File Reference

#include "GIMPACT/core/gim_box_collision.h"
+#include "GIMPACT/core/gim_clip_polygon.h"
+ + + + + + + + + + + + +

Classes

struct  GIM_TRIANGLE_CONTACT_DATA
 Structure for collision. More...
class  GIM_TRIANGLE
 Class for colliding triangles. More...

Defines

#define MAX_TRI_CLIPPING   16
+

Detailed Description

+
Author:
Francisco León Nájera
+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals.html b/Extras/GIMPACT/docs/html/globals.html new file mode 100755 index 000000000..d4035a419 --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals.html @@ -0,0 +1,86 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all file members with links to the files they belong to: +

+

- a -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_0x62.html b/Extras/GIMPACT/docs/html/globals_0x62.html new file mode 100755 index 000000000..cc877ab11 --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_0x62.html @@ -0,0 +1,74 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all file members with links to the files they belong to: +

+

- b -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_0x63.html b/Extras/GIMPACT/docs/html/globals_0x63.html new file mode 100755 index 000000000..d642a4be1 --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_0x63.html @@ -0,0 +1,94 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all file members with links to the files they belong to: +

+

- c -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_0x64.html b/Extras/GIMPACT/docs/html/globals_0x64.html new file mode 100755 index 000000000..156d38576 --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_0x64.html @@ -0,0 +1,82 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all file members with links to the files they belong to: +

+

- d -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_0x65.html b/Extras/GIMPACT/docs/html/globals_0x65.html new file mode 100755 index 000000000..087ecd4d1 --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_0x65.html @@ -0,0 +1,76 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all file members with links to the files they belong to: +

+

- e -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_0x67.html b/Extras/GIMPACT/docs/html/globals_0x67.html new file mode 100755 index 000000000..8aeac7810 --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_0x67.html @@ -0,0 +1,272 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all file members with links to the files they belong to: +

+

- g -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_0x69.html b/Extras/GIMPACT/docs/html/globals_0x69.html new file mode 100755 index 000000000..0827edc29 --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_0x69.html @@ -0,0 +1,84 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all file members with links to the files they belong to: +

+

- i -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_0x6b.html b/Extras/GIMPACT/docs/html/globals_0x6b.html new file mode 100755 index 000000000..5f5bdc515 --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_0x6b.html @@ -0,0 +1,70 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all file members with links to the files they belong to: +

+

- k -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_0x6c.html b/Extras/GIMPACT/docs/html/globals_0x6c.html new file mode 100755 index 000000000..f826cd154 --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_0x6c.html @@ -0,0 +1,72 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all file members with links to the files they belong to: +

+

- l -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_0x6d.html b/Extras/GIMPACT/docs/html/globals_0x6d.html new file mode 100755 index 000000000..30a3d6b94 --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_0x6d.html @@ -0,0 +1,134 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all file members with links to the files they belong to: +

+

- m -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_0x6e.html b/Extras/GIMPACT/docs/html/globals_0x6e.html new file mode 100755 index 000000000..0c7973ea0 --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_0x6e.html @@ -0,0 +1,72 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all file members with links to the files they belong to: +

+

- n -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_0x6f.html b/Extras/GIMPACT/docs/html/globals_0x6f.html new file mode 100755 index 000000000..4ce2128e4 --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_0x6f.html @@ -0,0 +1,74 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all file members with links to the files they belong to: +

+

- o -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_0x70.html b/Extras/GIMPACT/docs/html/globals_0x70.html new file mode 100755 index 000000000..88b2af4c1 --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_0x70.html @@ -0,0 +1,98 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all file members with links to the files they belong to: +

+

- p -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_0x71.html b/Extras/GIMPACT/docs/html/globals_0x71.html new file mode 100755 index 000000000..bf7abe139 --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_0x71.html @@ -0,0 +1,70 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all file members with links to the files they belong to: +

+

- q -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_0x72.html b/Extras/GIMPACT/docs/html/globals_0x72.html new file mode 100755 index 000000000..7926c8645 --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_0x72.html @@ -0,0 +1,76 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all file members with links to the files they belong to: +

+

- r -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_0x73.html b/Extras/GIMPACT/docs/html/globals_0x73.html new file mode 100755 index 000000000..bcc29f510 --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_0x73.html @@ -0,0 +1,94 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all file members with links to the files they belong to: +

+

- s -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_0x74.html b/Extras/GIMPACT/docs/html/globals_0x74.html new file mode 100755 index 000000000..edaefa346 --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_0x74.html @@ -0,0 +1,90 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all file members with links to the files they belong to: +

+

- t -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_0x76.html b/Extras/GIMPACT/docs/html/globals_0x76.html new file mode 100755 index 000000000..f16731ff8 --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_0x76.html @@ -0,0 +1,200 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all file members with links to the files they belong to: +

+

- v -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_0x78.html b/Extras/GIMPACT/docs/html/globals_0x78.html new file mode 100755 index 000000000..b607b7f27 --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_0x78.html @@ -0,0 +1,70 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all file members with links to the files they belong to: +

+

- x -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_0x79.html b/Extras/GIMPACT/docs/html/globals_0x79.html new file mode 100755 index 000000000..544e494c5 --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_0x79.html @@ -0,0 +1,70 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all file members with links to the files they belong to: +

+

- y -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_0x7a.html b/Extras/GIMPACT/docs/html/globals_0x7a.html new file mode 100755 index 000000000..9833bc806 --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_0x7a.html @@ -0,0 +1,72 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+Here is a list of all file members with links to the files they belong to: +

+

- z -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_defs.html b/Extras/GIMPACT/docs/html/globals_defs.html new file mode 100755 index 000000000..c4381f14a --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_defs.html @@ -0,0 +1,84 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+  +

+

- a -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_defs_0x62.html b/Extras/GIMPACT/docs/html/globals_defs_0x62.html new file mode 100755 index 000000000..7c3efd1f6 --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_defs_0x62.html @@ -0,0 +1,68 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+  +

+

- b -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_defs_0x63.html b/Extras/GIMPACT/docs/html/globals_defs_0x63.html new file mode 100755 index 000000000..85e717237 --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_defs_0x63.html @@ -0,0 +1,84 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+  +

+

- c -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_defs_0x64.html b/Extras/GIMPACT/docs/html/globals_defs_0x64.html new file mode 100755 index 000000000..896f362fd --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_defs_0x64.html @@ -0,0 +1,80 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+  +

+

- d -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_defs_0x65.html b/Extras/GIMPACT/docs/html/globals_defs_0x65.html new file mode 100755 index 000000000..d9c5a4312 --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_defs_0x65.html @@ -0,0 +1,68 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+  +

+

- e -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_defs_0x67.html b/Extras/GIMPACT/docs/html/globals_defs_0x67.html new file mode 100755 index 000000000..9c800c275 --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_defs_0x67.html @@ -0,0 +1,166 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+  +

+

- g -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_defs_0x69.html b/Extras/GIMPACT/docs/html/globals_defs_0x69.html new file mode 100755 index 000000000..545ed97f1 --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_defs_0x69.html @@ -0,0 +1,80 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+  +

+

- i -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_defs_0x6b.html b/Extras/GIMPACT/docs/html/globals_defs_0x6b.html new file mode 100755 index 000000000..6d0d26d26 --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_defs_0x6b.html @@ -0,0 +1,68 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+  +

+

- k -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_defs_0x6d.html b/Extras/GIMPACT/docs/html/globals_defs_0x6d.html new file mode 100755 index 000000000..36ca24558 --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_defs_0x6d.html @@ -0,0 +1,126 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+  +

+

- m -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_defs_0x6e.html b/Extras/GIMPACT/docs/html/globals_defs_0x6e.html new file mode 100755 index 000000000..017b21a06 --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_defs_0x6e.html @@ -0,0 +1,70 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+  +

+

- n -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_defs_0x6f.html b/Extras/GIMPACT/docs/html/globals_defs_0x6f.html new file mode 100755 index 000000000..bb97a5b8c --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_defs_0x6f.html @@ -0,0 +1,72 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+  +

+

- o -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_defs_0x70.html b/Extras/GIMPACT/docs/html/globals_defs_0x70.html new file mode 100755 index 000000000..90d24d60e --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_defs_0x70.html @@ -0,0 +1,78 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+  +

+

- p -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_defs_0x72.html b/Extras/GIMPACT/docs/html/globals_defs_0x72.html new file mode 100755 index 000000000..72bbbc836 --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_defs_0x72.html @@ -0,0 +1,72 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+  +

+

- r -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_defs_0x73.html b/Extras/GIMPACT/docs/html/globals_defs_0x73.html new file mode 100755 index 000000000..21bcaee89 --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_defs_0x73.html @@ -0,0 +1,88 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+  +

+

- s -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_defs_0x74.html b/Extras/GIMPACT/docs/html/globals_defs_0x74.html new file mode 100755 index 000000000..98fdf0b92 --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_defs_0x74.html @@ -0,0 +1,88 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+  +

+

- t -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_defs_0x76.html b/Extras/GIMPACT/docs/html/globals_defs_0x76.html new file mode 100755 index 000000000..5bee9b0a5 --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_defs_0x76.html @@ -0,0 +1,162 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+  +

+

- v -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_defs_0x78.html b/Extras/GIMPACT/docs/html/globals_defs_0x78.html new file mode 100755 index 000000000..110fecb01 --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_defs_0x78.html @@ -0,0 +1,68 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+  +

+

- x -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_defs_0x79.html b/Extras/GIMPACT/docs/html/globals_defs_0x79.html new file mode 100755 index 000000000..389762e54 --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_defs_0x79.html @@ -0,0 +1,68 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+  +

+

- y -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_defs_0x7a.html b/Extras/GIMPACT/docs/html/globals_defs_0x7a.html new file mode 100755 index 000000000..6ac17214a --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_defs_0x7a.html @@ -0,0 +1,70 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+  +

+

- z -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_enum.html b/Extras/GIMPACT/docs/html/globals_enum.html new file mode 100755 index 000000000..5f1642515 --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_enum.html @@ -0,0 +1,49 @@ + + +GIMPACT: Class Members + + + + + + + +  +

+

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_eval.html b/Extras/GIMPACT/docs/html/globals_eval.html new file mode 100755 index 000000000..0745cb1d1 --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_eval.html @@ -0,0 +1,81 @@ + + +GIMPACT: Class Members + + + + + + + +  +

+

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_func.html b/Extras/GIMPACT/docs/html/globals_func.html new file mode 100755 index 000000000..79ec76f9c --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_func.html @@ -0,0 +1,163 @@ + + +GIMPACT: Class Members + + + + + + + +
+ +
+ +

+  +

+

- b -

+

- c -

+

- g -

+

- i -

+

- l -

+

- p -

+

- r -

+

- s -

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_type.html b/Extras/GIMPACT/docs/html/globals_type.html new file mode 100755 index 000000000..f17219172 --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_type.html @@ -0,0 +1,93 @@ + + +GIMPACT: Class Members + + + + + + + +  +

+

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/globals_vars.html b/Extras/GIMPACT/docs/html/globals_vars.html new file mode 100755 index 000000000..75dcdbacb --- /dev/null +++ b/Extras/GIMPACT/docs/html/globals_vars.html @@ -0,0 +1,43 @@ + + +GIMPACT: Class Members + + + + + + + +  +

+

+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/graph_legend.dot b/Extras/GIMPACT/docs/html/graph_legend.dot new file mode 100755 index 000000000..4a1a09c85 --- /dev/null +++ b/Extras/GIMPACT/docs/html/graph_legend.dot @@ -0,0 +1,22 @@ +digraph G +{ + edge [fontname="FreeSans.ttf",fontsize=10,labelfontname="FreeSans.ttf",labelfontsize=10]; + node [fontname="FreeSans.ttf",fontsize=10,shape=record]; + Node9 [shape="box",label="Inherited",fontsize=10,height=0.2,width=0.4,fontname="FreeSans.ttf",fillcolor="grey75",style="filled" fontcolor="black"]; + Node10 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans.ttf"]; + Node10 [shape="box",label="PublicBase",fontsize=10,height=0.2,width=0.4,fontname="FreeSans.ttf",color="black",URL="$classPublicBase.html"]; + Node11 -> Node10 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans.ttf"]; + Node11 [shape="box",label="Truncated",fontsize=10,height=0.2,width=0.4,fontname="FreeSans.ttf",color="red",URL="$classTruncated.html"]; + Node13 -> Node9 [dir=back,color="darkgreen",fontsize=10,style="solid",fontname="FreeSans.ttf"]; + Node13 [shape="box",label="ProtectedBase",fontsize=10,height=0.2,width=0.4,fontname="FreeSans.ttf",color="black",URL="$classProtectedBase.html"]; + Node14 -> Node9 [dir=back,color="firebrick4",fontsize=10,style="solid",fontname="FreeSans.ttf"]; + Node14 [shape="box",label="PrivateBase",fontsize=10,height=0.2,width=0.4,fontname="FreeSans.ttf",color="black",URL="$classPrivateBase.html"]; + Node15 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans.ttf"]; + Node15 [shape="box",label="Undocumented",fontsize=10,height=0.2,width=0.4,fontname="FreeSans.ttf",color="grey75"]; + Node16 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans.ttf"]; + Node16 [shape="box",label="Templ< int >",fontsize=10,height=0.2,width=0.4,fontname="FreeSans.ttf",color="black",URL="$classTempl.html"]; + Node17 -> Node16 [dir=back,color="orange",fontsize=10,style="dashed",label="< int >",fontname="FreeSans.ttf"]; + Node17 [shape="box",label="Templ< T >",fontsize=10,height=0.2,width=0.4,fontname="FreeSans.ttf",color="black",URL="$classTempl.html"]; + Node18 -> Node9 [dir=back,color="darkorchid3",fontsize=10,style="dashed",label="m_usedClass",fontname="FreeSans.ttf"]; + Node18 [shape="box",label="Used",fontsize=10,height=0.2,width=0.4,fontname="FreeSans.ttf",color="black",URL="$classUsed.html"]; +} diff --git a/Extras/GIMPACT/docs/html/graph_legend.html b/Extras/GIMPACT/docs/html/graph_legend.html new file mode 100755 index 000000000..87b9b8efe --- /dev/null +++ b/Extras/GIMPACT/docs/html/graph_legend.html @@ -0,0 +1,79 @@ + + +GIMPACT: Graph Legend + + + + +
+ +
+

Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

+Consider the following example:

/*! Invisible class because of truncation */
+class Invisible { };
+
+/*! Truncated class, inheritance relation is hidden */
+class Truncated : public Invisible { };
+
+/* Class not documented with doxygen comments */
+class Undocumented { };
+
+/*! Class that is inherited using public inheritance */
+class PublicBase : public Truncated { };
+
+/*! A template class */
+template<class T> class Templ { };
+
+/*! Class that is inherited using protected inheritance */
+class ProtectedBase { };
+
+/*! Class that is inherited using private inheritance */
+class PrivateBase { };
+
+/*! Class that is used by the Inherited class */
+class Used { };
+
+/*! Super class that inherits a number of other classes */
+class Inherited : public PublicBase,
+                  protected ProtectedBase,
+                  private PrivateBase,
+                  public Undocumented,
+                  public Templ<int>
+{
+  private:
+    Used *m_usedClass;
+};
+
If the MAX_DOT_GRAPH_HEIGHT tag in the configuration file is set to 240 this will result in the following graph:

+

+graph_legend.png +
+

+The boxes in the above graph have the following meaning:

    +
  • +A filled gray box represents the struct or class for which the graph is generated.
  • +
  • +A box with a black border denotes a documented struct or class.
  • +
  • +A box with a grey border denotes an undocumented struct or class.
  • +
  • +A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
  • +
+The arrows have the following meaning:
    +
  • +A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • +
  • +A dark green arrow is used for protected inheritance.
  • +
  • +A dark red arrow is used for private inheritance.
  • +
  • +A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • +
  • +A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.
  • +
+
Generated on Wed Jun 13 15:30:52 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/group___a_r_r_a_y___u_t_i_l_i_t_i_e_s.html b/Extras/GIMPACT/docs/html/group___a_r_r_a_y___u_t_i_l_i_t_i_e_s.html new file mode 100755 index 000000000..8853f504d --- /dev/null +++ b/Extras/GIMPACT/docs/html/group___a_r_r_a_y___u_t_i_l_i_t_i_e_s.html @@ -0,0 +1,165 @@ + + +GIMPACT: ARRAY_UTILITIES + + + + + +

ARRAY_UTILITIES

Functions for manip packed arrays of numbers. +More... + + + + + + + + + + +

Defines

#define GIM_COPY_ARRAYS(dest_array, source_array, element_count)
#define GIM_COPY_ARRAYS_1(dest_array, source_array, element_count, copy_macro)
#define GIM_ZERO_ARRAY(array, element_count)
#define GIM_CONSTANT_ARRAY(array, element_count, constant)
+

Detailed Description

+Functions for manip packed arrays of numbers. +

+


Define Documentation

+ +
+
+ + + + + + + + + + + + + + + +
#define GIM_CONSTANT_ARRAY (array,
element_count,
constant   ) 
+
+
+ +

+Value:

{\
+    for (GUINT _i_=0;_i_<element_count ;++_i_)\
+    {\
+        array[_i_] = constant;\
+    }\
+}\
+
+
+

+ +

+
+ + + + + + + + + + + + + + + +
#define GIM_COPY_ARRAYS (dest_array,
source_array,
element_count   ) 
+
+
+ +

+Value:

{\
+    for (GUINT _i_=0;_i_<element_count ;++_i_)\
+    {\
+        dest_array[_i_] = source_array[_i_];\
+    }\
+}\
+
+
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
#define GIM_COPY_ARRAYS_1 (dest_array,
source_array,
element_count,
copy_macro   ) 
+
+
+ +

+Value:

{\
+    for (GUINT _i_=0;_i_<element_count ;++_i_)\
+    {\
+        copy_macro(dest_array[_i_],source_array[_i_]);\
+    }\
+}\
+
+
+

+ +

+
+ + + + + + + + + + + + +
#define GIM_ZERO_ARRAY (array,
element_count   ) 
+
+
+ +

+Value:

{\
+    for (GUINT _i_=0;_i_<element_count ;++_i_)\
+    {\
+        array[_i_] = 0;\
+    }\
+}\
+
+
+

+


Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/group___b_a_s_i_c___c_o_n_s_t_a_n_t_s.html b/Extras/GIMPACT/docs/html/group___b_a_s_i_c___c_o_n_s_t_a_n_t_s.html new file mode 100755 index 000000000..17db814ea --- /dev/null +++ b/Extras/GIMPACT/docs/html/group___b_a_s_i_c___c_o_n_s_t_a_n_t_s.html @@ -0,0 +1,182 @@ + + +GIMPACT: BASIC_CONSTANTS + + + + + +

BASIC_CONSTANTS

+ + + + + + + + + + + + + + + + + + + + + +

Defines

#define G_PI   3.14159265358979f
#define G_HALF_PI   1.5707963f
#define G_TWO_PI   6.28318530f
#define G_ROOT3   1.73205f
#define G_ROOT2   1.41421f
#define G_UINT_INFINITY   0xffffffff
 A very very high value.
#define G_REAL_INFINITY   FLT_MAX
#define G_SIGN_BITMASK   0x80000000
#define G_EPSILON   SIMD_EPSILON
+

Detailed Description

+Basic constants Conventions: Types starting with G Constants starting with G_

Define Documentation

+ +
+
+ + + + +
#define G_EPSILON   SIMD_EPSILON
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define G_HALF_PI   1.5707963f
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define G_PI   3.14159265358979f
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define G_REAL_INFINITY   FLT_MAX
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define G_ROOT2   1.41421f
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define G_ROOT3   1.73205f
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define G_SIGN_BITMASK   0x80000000
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define G_TWO_PI   6.28318530f
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define G_UINT_INFINITY   0xffffffff
+
+
+ +

+A very very high value. +

+ +

+

+


Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/group___b_a_s_i_c___t_y_p_e_s.html b/Extras/GIMPACT/docs/html/group___b_a_s_i_c___t_y_p_e_s.html new file mode 100755 index 000000000..ffbbefe19 --- /dev/null +++ b/Extras/GIMPACT/docs/html/group___b_a_s_i_c___t_y_p_e_s.html @@ -0,0 +1,162 @@ + + +GIMPACT: BASIC_TYPES + + + + + +

BASIC_TYPES

+ + + + + + + + + + + + + + + + + + +

Defines

#define GREAL   btScalar
#define GREAL2   double
#define GINT   int
#define GUINT   unsigned int
#define GSHORT   short
#define GUSHORT   unsigned short
#define GINT64   long long
#define GUINT64   unsigned long long
+

Detailed Description

+Basic types and constants Conventions: Types starting with G Constants starting with G_

Define Documentation

+ +
+
+ + + + +
#define GINT   int
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define GINT64   long long
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define GREAL   btScalar
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define GREAL2   double
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define GSHORT   short
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define GUINT   unsigned int
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define GUINT64   unsigned long long
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define GUSHORT   unsigned short
+
+
+ +

+ +

+

+


Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/group___b_o_u_n_d___a_a_b_b___o_p_e_r_a_t_i_o_n_s.html b/Extras/GIMPACT/docs/html/group___b_o_u_n_d___a_a_b_b___o_p_e_r_a_t_i_o_n_s.html new file mode 100755 index 000000000..2d1999caa --- /dev/null +++ b/Extras/GIMPACT/docs/html/group___b_o_u_n_d___a_a_b_b___o_p_e_r_a_t_i_o_n_s.html @@ -0,0 +1,256 @@ + + +GIMPACT: BOUND_AABB_OPERATIONS + + + + + +

BOUND_AABB_OPERATIONS

+ + + + + + + + + + + + + + + + + + + + + + + +

Classes

class  GIM_BOX_BOX_TRANSFORM_CACHE
 Class for transforming a model1 to the space of model0. More...
class  GIM_AABB
 Axis aligned box. More...

Defines

#define TEST_CROSS_EDGE_BOX_MCR(edge, absolute_edge, pointa, pointb, _extend, i_dir_0, i_dir_1, i_comp_0, i_comp_1)
#define TEST_CROSS_EDGE_BOX_X_AXIS_MCR(edge, absolute_edge, pointa, pointb, _extend)
#define TEST_CROSS_EDGE_BOX_Y_AXIS_MCR(edge, absolute_edge, pointa, pointb, _extend)
#define TEST_CROSS_EDGE_BOX_Z_AXIS_MCR(edge, absolute_edge, pointa, pointb, _extend)
#define BOX_PLANE_EPSILON   0.000001f

Functions

SIMD_FORCE_INLINE bool btCompareTransformsEqual (const btTransform &t1, const btTransform &t2)
 Compairison of transformation objects.
+

Define Documentation

+ +
+
+ + + + +
#define BOX_PLANE_EPSILON   0.000001f
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#define TEST_CROSS_EDGE_BOX_MCR (edge,
absolute_edge,
pointa,
pointb,
_extend,
i_dir_0,
i_dir_1,
i_comp_0,
i_comp_1   ) 
+
+
+ +

+Value:

{\
+        const btScalar dir0 = -edge[i_dir_0];\
+        const btScalar dir1 = edge[i_dir_1];\
+        btScalar pmin = pointa[i_comp_0]*dir0 + pointa[i_comp_1]*dir1;\
+        btScalar pmax = pointb[i_comp_0]*dir0 + pointb[i_comp_1]*dir1;\
+        if(pmin>pmax)\
+        {\
+                GIM_SWAP_NUMBERS(pmin,pmax); \
+        }\
+        const btScalar abs_dir0 = absolute_edge[i_dir_0];\
+        const btScalar abs_dir1 = absolute_edge[i_dir_1];\
+        const btScalar rad = _extend[i_comp_0] * abs_dir0 + _extend[i_comp_1] * abs_dir1;\
+        if(pmin>rad || -rad>pmax) return false;\
+}\
+
+
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + +
#define TEST_CROSS_EDGE_BOX_X_AXIS_MCR (edge,
absolute_edge,
pointa,
pointb,
_extend   ) 
+
+
+ +

+Value:

{\
+        TEST_CROSS_EDGE_BOX_MCR(edge,absolute_edge,pointa,pointb,_extend,2,1,1,2);\
+}\
+
+
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + +
#define TEST_CROSS_EDGE_BOX_Y_AXIS_MCR (edge,
absolute_edge,
pointa,
pointb,
_extend   ) 
+
+
+ +

+Value:

{\
+        TEST_CROSS_EDGE_BOX_MCR(edge,absolute_edge,pointa,pointb,_extend,0,2,2,0);\
+}\
+
+
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + +
#define TEST_CROSS_EDGE_BOX_Z_AXIS_MCR (edge,
absolute_edge,
pointa,
pointb,
_extend   ) 
+
+
+ +

+Value:

{\
+        TEST_CROSS_EDGE_BOX_MCR(edge,absolute_edge,pointa,pointb,_extend,1,0,0,1);\
+}\
+
+
+

+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE bool btCompareTransformsEqual (const btTransform &  t1,
const btTransform &  t2 
)
+
+
+ +

+Compairison of transformation objects. +

+ +

+

+


Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/group___b_o_x___p_r_u_n_n_i_n_g.html b/Extras/GIMPACT/docs/html/group___b_o_x___p_r_u_n_n_i_n_g.html new file mode 100755 index 000000000..6570d2d9e --- /dev/null +++ b/Extras/GIMPACT/docs/html/group___b_o_x___p_r_u_n_n_i_n_g.html @@ -0,0 +1,2030 @@ + + +GIMPACT: BOX_PRUNNING + + + + + +

BOX_PRUNNING

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Classes

struct  GIM_PAIR
 Overlapping pair. More...
class  gim_pair_set
 A pairset array. More...
class  GIM_PRIMITIVE_MANAGER_PROTOTYPE
 Prototype Base class for primitive classification. More...
struct  GIM_AABB_DATA
struct  GIM_BOX_TREE_NODE
 Node Structure for trees. More...
class  GIM_BOX_TREE
 Basic Box tree structure. More...
class  GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE >
 Generic Box Tree Template. More...
class  GIM_BOX_TREE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE >
 Class for Box Tree Sets. More...
class  GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >
 GIM_BOX_SET collision methods. More...
void GIM_BOX_TREE::build_tree (gim_array< GIM_AABB_DATA > &primitive_boxes)
SIMD_FORCE_INLINE void GIM_BOX_TREE::clearNodes ()
SIMD_FORCE_INLINE GUINT GIM_BOX_TREE::getNodeCount () const
 node count
SIMD_FORCE_INLINE bool GIM_BOX_TREE::isLeafNode (GUINT nodeindex) const
 tells if the node is a leaf
SIMD_FORCE_INLINE GUINT GIM_BOX_TREE::getNodeData (GUINT nodeindex) const
SIMD_FORCE_INLINE void GIM_BOX_TREE::getNodeBound (GUINT nodeindex, GIM_AABB &bound) const
SIMD_FORCE_INLINE void GIM_BOX_TREE::setNodeBound (GUINT nodeindex, const GIM_AABB &bound)
SIMD_FORCE_INLINE GUINT GIM_BOX_TREE::getLeftNodeIndex (GUINT nodeindex) const
SIMD_FORCE_INLINE GUINT GIM_BOX_TREE::getRightNodeIndex (GUINT nodeindex) const
SIMD_FORCE_INLINE GUINT GIM_BOX_TREE::getScapeNodeIndex (GUINT nodeindex) const
SIMD_FORCE_INLINE void GIM_BOX_TREE_TEMPLATE_SET::update ()
 this attemps to refit the box set.
SIMD_FORCE_INLINE void GIM_BOX_TREE_TEMPLATE_SET::buildSet ()
 this rebuild the entire set
SIMD_FORCE_INLINE bool GIM_BOX_TREE_TEMPLATE_SET::boxQuery (const GIM_AABB &box, gim_array< GUINT > &collided_results) const
 returns the indices of the primitives in the m_primitive_manager
SIMD_FORCE_INLINE bool GIM_BOX_TREE_TEMPLATE_SET::boxQueryTrans (const GIM_AABB &box, const btTransform &transform, gim_array< GUINT > &collided_results) const
 returns the indices of the primitives in the m_primitive_manager
SIMD_FORCE_INLINE bool GIM_BOX_TREE_TEMPLATE_SET::rayQuery (const btVector3 &ray_dir, const btVector3 &ray_origin, gim_array< GUINT > &collided_results) const
 returns the indices of the primitives in the m_primitive_manager
SIMD_FORCE_INLINE bool GIM_BOX_TREE_TEMPLATE_SET::hasHierarchy () const
 tells if this set has hierarcht
SIMD_FORCE_INLINE bool GIM_BOX_TREE_TEMPLATE_SET::isTrimesh () const
 tells if this set is a trimesh
SIMD_FORCE_INLINE GUINT GIM_BOX_TREE_TEMPLATE_SET::getNodeCount () const
 node count
SIMD_FORCE_INLINE bool GIM_BOX_TREE_TEMPLATE_SET::isLeafNode (GUINT nodeindex) const
 tells if the node is a leaf
SIMD_FORCE_INLINE GUINT GIM_BOX_TREE_TEMPLATE_SET::getNodeData (GUINT nodeindex) const
SIMD_FORCE_INLINE void GIM_BOX_TREE_TEMPLATE_SET::getNodeBound (GUINT nodeindex, GIM_AABB &bound) const
SIMD_FORCE_INLINE void GIM_BOX_TREE_TEMPLATE_SET::setNodeBound (GUINT nodeindex, const GIM_AABB &bound)
SIMD_FORCE_INLINE GUINT GIM_BOX_TREE_TEMPLATE_SET::getLeftNodeIndex (GUINT nodeindex) const
SIMD_FORCE_INLINE GUINT GIM_BOX_TREE_TEMPLATE_SET::getRightNodeIndex (GUINT nodeindex) const
SIMD_FORCE_INLINE GUINT GIM_BOX_TREE_TEMPLATE_SET::getScapeNodeIndex (GUINT nodeindex) const
SIMD_FORCE_INLINE void GIM_BOX_TREE_TEMPLATE_SET::getNodeTriangle (GUINT nodeindex, GIM_TRIANGLE &triangle) const

Functions

 GIM_PAIR::GIM_PAIR ()
 GIM_PAIR::GIM_PAIR (const GIM_PAIR &p)
 GIM_PAIR::GIM_PAIR (GUINT index1, GUINT index2)
void gim_pair_set::push_pair (GUINT index1, GUINT index2)
void gim_pair_set::push_pair_inv (GUINT index1, GUINT index2)
virtual GUINT GIM_PRIMITIVE_MANAGER_PROTOTYPE::get_primitive_count ()=0
virtual void GIM_PRIMITIVE_MANAGER_PROTOTYPE::get_primitive_box (GUINT prim_index, GIM_AABB &primbox)=0
virtual void GIM_PRIMITIVE_MANAGER_PROTOTYPE::get_primitive_triangle (GUINT prim_index, GIM_TRIANGLE &triangle)=0
 GIM_BOX_TREE_NODE::GIM_BOX_TREE_NODE ()
SIMD_FORCE_INLINE bool GIM_BOX_TREE_NODE::is_leaf_node () const
GUINT GIM_BOX_TREE::_sort_and_calc_splitting_index (gim_array< GIM_AABB_DATA > &primitive_boxes, GUINT startIndex, GUINT endIndex, GUINT splitAxis)
GUINT GIM_BOX_TREE::_calc_splitting_axis (gim_array< GIM_AABB_DATA > &primitive_boxes, GUINT startIndex, GUINT endIndex)
void GIM_BOX_TREE::_build_sub_tree (gim_array< GIM_AABB_DATA > &primitive_boxes, GUINT startIndex, GUINT endIndex)
 GIM_BOX_TREE::GIM_BOX_TREE ()
SIMD_FORCE_INLINE void GIM_BOX_TREE_TEMPLATE_SET::refit ()
 GIM_BOX_TREE_TEMPLATE_SET::GIM_BOX_TREE_TEMPLATE_SET ()
SIMD_FORCE_INLINE GIM_AABB GIM_BOX_TREE_TEMPLATE_SET::getGlobalBox () const
SIMD_FORCE_INLINE void GIM_BOX_TREE_TEMPLATE_SET::setPrimitiveManager (const _GIM_PRIMITIVE_MANAGER_PROTOTYPE &primitive_manager)
const _GIM_PRIMITIVE_MANAGER_PROTOTYPE & GIM_BOX_TREE_TEMPLATE_SET::getPrimitiveManager () const
_GIM_PRIMITIVE_MANAGER_PROTOTYPE & GIM_BOX_TREE_TEMPLATE_SET::getPrimitiveManager ()
 GIM_TREE_TREE_COLLIDER::GIM_TREE_TREE_COLLIDER ()
SIMD_FORCE_INLINE void GIM_TREE_TREE_COLLIDER::retrieve_node0_triangle (GUINT node0)
SIMD_FORCE_INLINE void GIM_TREE_TREE_COLLIDER::retrieve_node1_triangle (GUINT node1)
SIMD_FORCE_INLINE void GIM_TREE_TREE_COLLIDER::retrieve_node0_info (GUINT node0)
SIMD_FORCE_INLINE void GIM_TREE_TREE_COLLIDER::retrieve_node1_info (GUINT node1)
SIMD_FORCE_INLINE bool GIM_TREE_TREE_COLLIDER::node_collision (GUINT node0, GUINT node1)
void GIM_TREE_TREE_COLLIDER::find_collision_pairs ()
void GIM_TREE_TREE_COLLIDER::find_collision (BOX_SET_CLASS0 *boxset1, const btTransform &trans1, BOX_SET_CLASS1 *boxset2, const btTransform &trans2, gim_pair_set &collision_pairs, bool complete_primitive_tests=true)

Variables

GUINT GIM_PAIR::m_index2
GUINT GIM_AABB_DATA::m_data
GUINT GIM_BOX_TREE_NODE::m_left
 Left subtree.
GUINT GIM_BOX_TREE_NODE::m_right
 Right subtree.
GUINT GIM_BOX_TREE_NODE::m_escapeIndex
 Scape index for traversing.
GUINT GIM_BOX_TREE_NODE::m_data
 primitive index if apply
gim_array< GIM_BOX_TREE_NODEGIM_BOX_TREE::m_node_array
_GIM_BOX_TREE_PROTOTYPE GIM_BOX_TREE_TEMPLATE_SET::m_box_tree
BOX_SET_CLASS0 * GIM_TREE_TREE_COLLIDER::m_boxset0
BOX_SET_CLASS1 * GIM_TREE_TREE_COLLIDER::m_boxset1
GUINT GIM_TREE_TREE_COLLIDER::current_node0
GUINT GIM_TREE_TREE_COLLIDER::current_node1
bool GIM_TREE_TREE_COLLIDER::node0_is_leaf
bool GIM_TREE_TREE_COLLIDER::node1_is_leaf
bool GIM_TREE_TREE_COLLIDER::t0_is_trimesh
bool GIM_TREE_TREE_COLLIDER::t1_is_trimesh
bool GIM_TREE_TREE_COLLIDER::node0_has_triangle
bool GIM_TREE_TREE_COLLIDER::node1_has_triangle
GIM_AABB GIM_TREE_TREE_COLLIDER::m_box0
GIM_AABB GIM_TREE_TREE_COLLIDER::m_box1
GIM_BOX_BOX_TRANSFORM_CACHE GIM_TREE_TREE_COLLIDER::trans_cache_1to0
btTransform GIM_TREE_TREE_COLLIDER::trans_cache_0to1
GIM_TRIANGLE GIM_TREE_TREE_COLLIDER::m_tri0
btVector4 GIM_TREE_TREE_COLLIDER::m_tri0_plane
GIM_TRIANGLE GIM_TREE_TREE_COLLIDER::m_tri1
btVector4 GIM_TREE_TREE_COLLIDER::m_tri1_plane
+

Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void GIM_BOX_TREE::_build_sub_tree (gim_array< GIM_AABB_DATA > &  primitive_boxes,
GUINT  startIndex,
GUINT  endIndex 
) [protected, inherited]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GUINT GIM_BOX_TREE::_calc_splitting_axis (gim_array< GIM_AABB_DATA > &  primitive_boxes,
GUINT  startIndex,
GUINT  endIndex 
) [protected, inherited]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GUINT GIM_BOX_TREE::_sort_and_calc_splitting_index (gim_array< GIM_AABB_DATA > &  primitive_boxes,
GUINT  startIndex,
GUINT  endIndex,
GUINT  splitAxis 
) [protected, inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename _GIM_PRIMITIVE_MANAGER_PROTOTYPE, typename _GIM_BOX_TREE_PROTOTYPE>
+ + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE bool GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE >::boxQuery (const GIM_AABB box,
gim_array< GUINT > &  collided_results 
) const [inline, inherited]
+
+
+ +

+returns the indices of the primitives in the m_primitive_manager +

+ +

+

+ +

+
+
+template<typename _GIM_PRIMITIVE_MANAGER_PROTOTYPE, typename _GIM_BOX_TREE_PROTOTYPE>
+ + + + + + + + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE bool GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE >::boxQueryTrans (const GIM_AABB box,
const btTransform &  transform,
gim_array< GUINT > &  collided_results 
) const [inline, inherited]
+
+
+ +

+returns the indices of the primitives in the m_primitive_manager +

+ +

+

+ +

+
+ + + + + + + + + +
void GIM_BOX_TREE::build_tree (gim_array< GIM_AABB_DATA > &  primitive_boxes  )  [inherited]
+
+
+ +

+prototype functions for box tree management +

+

+ +

+
+
+template<typename _GIM_PRIMITIVE_MANAGER_PROTOTYPE, typename _GIM_BOX_TREE_PROTOTYPE>
+ + + + + + + + +
SIMD_FORCE_INLINE void GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE >::buildSet (  )  [inline, inherited]
+
+
+ +

+this rebuild the entire set +

+ +

+

+ +

+
+ + + + + + + + +
SIMD_FORCE_INLINE void GIM_BOX_TREE::clearNodes (  )  [inline, inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename BOX_SET_CLASS0, typename BOX_SET_CLASS1>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >::find_collision (BOX_SET_CLASS0 *  boxset1,
const btTransform &  trans1,
BOX_SET_CLASS1 *  boxset2,
const btTransform &  trans2,
gim_pair_set collision_pairs,
bool  complete_primitive_tests = true 
) [inline, inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename BOX_SET_CLASS0, typename BOX_SET_CLASS1>
+ + + + + + + + +
void GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >::find_collision_pairs (  )  [inline, protected, inherited]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
virtual void GIM_PRIMITIVE_MANAGER_PROTOTYPE::get_primitive_box (GUINT  prim_index,
GIM_AABB primbox 
) [pure virtual, inherited]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
virtual GUINT GIM_PRIMITIVE_MANAGER_PROTOTYPE::get_primitive_count (  )  [pure virtual, inherited]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
virtual void GIM_PRIMITIVE_MANAGER_PROTOTYPE::get_primitive_triangle (GUINT  prim_index,
GIM_TRIANGLE triangle 
) [pure virtual, inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename _GIM_PRIMITIVE_MANAGER_PROTOTYPE, typename _GIM_BOX_TREE_PROTOTYPE>
+ + + + + + + + +
SIMD_FORCE_INLINE GIM_AABB GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE >::getGlobalBox (  )  const [inline, inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename _GIM_PRIMITIVE_MANAGER_PROTOTYPE, typename _GIM_BOX_TREE_PROTOTYPE>
+ + + + + + + + + +
SIMD_FORCE_INLINE GUINT GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE >::getLeftNodeIndex (GUINT  nodeindex  )  const [inline, inherited]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
SIMD_FORCE_INLINE GUINT GIM_BOX_TREE::getLeftNodeIndex (GUINT  nodeindex  )  const [inline, inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename _GIM_PRIMITIVE_MANAGER_PROTOTYPE, typename _GIM_BOX_TREE_PROTOTYPE>
+ + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE void GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE >::getNodeBound (GUINT  nodeindex,
GIM_AABB bound 
) const [inline, inherited]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE void GIM_BOX_TREE::getNodeBound (GUINT  nodeindex,
GIM_AABB bound 
) const [inline, inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename _GIM_PRIMITIVE_MANAGER_PROTOTYPE, typename _GIM_BOX_TREE_PROTOTYPE>
+ + + + + + + + +
SIMD_FORCE_INLINE GUINT GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE >::getNodeCount (  )  const [inline, inherited]
+
+
+ +

+node count +

+ +

+

+ +

+
+ + + + + + + + +
SIMD_FORCE_INLINE GUINT GIM_BOX_TREE::getNodeCount (  )  const [inline, inherited]
+
+
+ +

+node count +

+ +

+

+ +

+
+
+template<typename _GIM_PRIMITIVE_MANAGER_PROTOTYPE, typename _GIM_BOX_TREE_PROTOTYPE>
+ + + + + + + + + +
SIMD_FORCE_INLINE GUINT GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE >::getNodeData (GUINT  nodeindex  )  const [inline, inherited]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
SIMD_FORCE_INLINE GUINT GIM_BOX_TREE::getNodeData (GUINT  nodeindex  )  const [inline, inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename _GIM_PRIMITIVE_MANAGER_PROTOTYPE, typename _GIM_BOX_TREE_PROTOTYPE>
+ + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE void GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE >::getNodeTriangle (GUINT  nodeindex,
GIM_TRIANGLE triangle 
) const [inline, inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename _GIM_PRIMITIVE_MANAGER_PROTOTYPE, typename _GIM_BOX_TREE_PROTOTYPE>
+ + + + + + + + +
_GIM_PRIMITIVE_MANAGER_PROTOTYPE& GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE >::getPrimitiveManager (  )  [inline, inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename _GIM_PRIMITIVE_MANAGER_PROTOTYPE, typename _GIM_BOX_TREE_PROTOTYPE>
+ + + + + + + + +
const _GIM_PRIMITIVE_MANAGER_PROTOTYPE& GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE >::getPrimitiveManager (  )  const [inline, inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename _GIM_PRIMITIVE_MANAGER_PROTOTYPE, typename _GIM_BOX_TREE_PROTOTYPE>
+ + + + + + + + + +
SIMD_FORCE_INLINE GUINT GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE >::getRightNodeIndex (GUINT  nodeindex  )  const [inline, inherited]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
SIMD_FORCE_INLINE GUINT GIM_BOX_TREE::getRightNodeIndex (GUINT  nodeindex  )  const [inline, inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename _GIM_PRIMITIVE_MANAGER_PROTOTYPE, typename _GIM_BOX_TREE_PROTOTYPE>
+ + + + + + + + + +
SIMD_FORCE_INLINE GUINT GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE >::getScapeNodeIndex (GUINT  nodeindex  )  const [inline, inherited]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
SIMD_FORCE_INLINE GUINT GIM_BOX_TREE::getScapeNodeIndex (GUINT  nodeindex  )  const [inline, inherited]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
GIM_BOX_TREE::GIM_BOX_TREE (  )  [inline, inherited]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
GIM_BOX_TREE_NODE::GIM_BOX_TREE_NODE (  )  [inline, inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename _GIM_PRIMITIVE_MANAGER_PROTOTYPE, typename _GIM_BOX_TREE_PROTOTYPE>
+ + + + + + + + +
GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE >::GIM_BOX_TREE_TEMPLATE_SET (  )  [inline, inherited]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
GIM_PAIR::GIM_PAIR (GUINT  index1,
GUINT  index2 
) [inline, inherited]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
GIM_PAIR::GIM_PAIR (const GIM_PAIR p  )  [inline, inherited]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
GIM_PAIR::GIM_PAIR (  )  [inline, inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename BOX_SET_CLASS0, typename BOX_SET_CLASS1>
+ + + + + + + + +
GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >::GIM_TREE_TREE_COLLIDER (  )  [inline, inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename _GIM_PRIMITIVE_MANAGER_PROTOTYPE, typename _GIM_BOX_TREE_PROTOTYPE>
+ + + + + + + + +
SIMD_FORCE_INLINE bool GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE >::hasHierarchy (  )  const [inline, inherited]
+
+
+ +

+tells if this set has hierarcht +

+ +

+

+ +

+
+ + + + + + + + +
SIMD_FORCE_INLINE bool GIM_BOX_TREE_NODE::is_leaf_node (  )  const [inline, inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename _GIM_PRIMITIVE_MANAGER_PROTOTYPE, typename _GIM_BOX_TREE_PROTOTYPE>
+ + + + + + + + + +
SIMD_FORCE_INLINE bool GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE >::isLeafNode (GUINT  nodeindex  )  const [inline, inherited]
+
+
+ +

+tells if the node is a leaf +

+ +

+

+ +

+
+ + + + + + + + + +
SIMD_FORCE_INLINE bool GIM_BOX_TREE::isLeafNode (GUINT  nodeindex  )  const [inline, inherited]
+
+
+ +

+tells if the node is a leaf +

+ +

+

+ +

+
+
+template<typename _GIM_PRIMITIVE_MANAGER_PROTOTYPE, typename _GIM_BOX_TREE_PROTOTYPE>
+ + + + + + + + +
SIMD_FORCE_INLINE bool GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE >::isTrimesh (  )  const [inline, inherited]
+
+
+ +

+tells if this set is a trimesh +

+ +

+

+ +

+
+
+template<typename BOX_SET_CLASS0, typename BOX_SET_CLASS1>
+ + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE bool GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >::node_collision (GUINT  node0,
GUINT  node1 
) [inline, protected, inherited]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void gim_pair_set::push_pair (GUINT  index1,
GUINT  index2 
) [inline, inherited]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void gim_pair_set::push_pair_inv (GUINT  index1,
GUINT  index2 
) [inline, inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename _GIM_PRIMITIVE_MANAGER_PROTOTYPE, typename _GIM_BOX_TREE_PROTOTYPE>
+ + + + + + + + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE bool GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE >::rayQuery (const btVector3 &  ray_dir,
const btVector3 &  ray_origin,
gim_array< GUINT > &  collided_results 
) const [inline, inherited]
+
+
+ +

+returns the indices of the primitives in the m_primitive_manager +

+ +

+

+ +

+
+
+template<typename _GIM_PRIMITIVE_MANAGER_PROTOTYPE, typename _GIM_BOX_TREE_PROTOTYPE>
+ + + + + + + + +
SIMD_FORCE_INLINE void GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE >::refit (  )  [inline, protected, inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename BOX_SET_CLASS0, typename BOX_SET_CLASS1>
+ + + + + + + + + +
SIMD_FORCE_INLINE void GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >::retrieve_node0_info (GUINT  node0  )  [inline, protected, inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename BOX_SET_CLASS0, typename BOX_SET_CLASS1>
+ + + + + + + + + +
SIMD_FORCE_INLINE void GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >::retrieve_node0_triangle (GUINT  node0  )  [inline, protected, inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename BOX_SET_CLASS0, typename BOX_SET_CLASS1>
+ + + + + + + + + +
SIMD_FORCE_INLINE void GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >::retrieve_node1_info (GUINT  node1  )  [inline, protected, inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename BOX_SET_CLASS0, typename BOX_SET_CLASS1>
+ + + + + + + + + +
SIMD_FORCE_INLINE void GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >::retrieve_node1_triangle (GUINT  node1  )  [inline, protected, inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename _GIM_PRIMITIVE_MANAGER_PROTOTYPE, typename _GIM_BOX_TREE_PROTOTYPE>
+ + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE void GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE >::setNodeBound (GUINT  nodeindex,
const GIM_AABB bound 
) [inline, inherited]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE void GIM_BOX_TREE::setNodeBound (GUINT  nodeindex,
const GIM_AABB bound 
) [inline, inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename _GIM_PRIMITIVE_MANAGER_PROTOTYPE, typename _GIM_BOX_TREE_PROTOTYPE>
+ + + + + + + + + +
SIMD_FORCE_INLINE void GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE >::setPrimitiveManager (const _GIM_PRIMITIVE_MANAGER_PROTOTYPE &  primitive_manager  )  [inline, inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename _GIM_PRIMITIVE_MANAGER_PROTOTYPE, typename _GIM_BOX_TREE_PROTOTYPE>
+ + + + + + + + +
SIMD_FORCE_INLINE void GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE >::update (  )  [inline, inherited]
+
+
+ +

+this attemps to refit the box set. +

+node manager prototype functions +

+

+


Variable Documentation

+ +
+
+
+template<typename BOX_SET_CLASS0, typename BOX_SET_CLASS1>
+ + + + +
GUINT GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >::current_node0 [inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename BOX_SET_CLASS0, typename BOX_SET_CLASS1>
+ + + + +
GUINT GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >::current_node1 [inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename BOX_SET_CLASS0, typename BOX_SET_CLASS1>
+ + + + +
GIM_AABB GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >::m_box0 [inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename BOX_SET_CLASS0, typename BOX_SET_CLASS1>
+ + + + +
GIM_AABB GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >::m_box1 [inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename _GIM_PRIMITIVE_MANAGER_PROTOTYPE, typename _GIM_BOX_TREE_PROTOTYPE>
+ + + + +
_GIM_BOX_TREE_PROTOTYPE GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE >::m_box_tree [protected, inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename BOX_SET_CLASS0, typename BOX_SET_CLASS1>
+ + + + +
BOX_SET_CLASS0* GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >::m_boxset0 [inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename BOX_SET_CLASS0, typename BOX_SET_CLASS1>
+ + + + +
BOX_SET_CLASS1* GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >::m_boxset1 [inherited]
+
+
+ +

+ +

+

+ +

+
+ + + + +
GUINT GIM_BOX_TREE_NODE::m_data [inherited]
+
+
+ +

+primitive index if apply +

+ +

+

+ +

+
+ + + + +
GUINT GIM_AABB_DATA::m_data [inherited]
+
+
+ +

+ +

+

+ +

+
+ + + + +
GUINT GIM_BOX_TREE_NODE::m_escapeIndex [inherited]
+
+
+ +

+Scape index for traversing. +

+ +

+

+ +

+
+ + + + +
GUINT GIM_PAIR::m_index2 [inherited]
+
+
+ +

+ +

+

+ +

+
+ + + + +
GUINT GIM_BOX_TREE_NODE::m_left [inherited]
+
+
+ +

+Left subtree. +

+ +

+

+ +

+
+ + + + +
gim_array<GIM_BOX_TREE_NODE> GIM_BOX_TREE::m_node_array [protected, inherited]
+
+
+ +

+ +

+

+ +

+
+ + + + +
GUINT GIM_BOX_TREE_NODE::m_right [inherited]
+
+
+ +

+Right subtree. +

+ +

+

+ +

+
+
+template<typename BOX_SET_CLASS0, typename BOX_SET_CLASS1>
+ + + + +
GIM_TRIANGLE GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >::m_tri0 [inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename BOX_SET_CLASS0, typename BOX_SET_CLASS1>
+ + + + +
btVector4 GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >::m_tri0_plane [inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename BOX_SET_CLASS0, typename BOX_SET_CLASS1>
+ + + + +
GIM_TRIANGLE GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >::m_tri1 [inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename BOX_SET_CLASS0, typename BOX_SET_CLASS1>
+ + + + +
btVector4 GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >::m_tri1_plane [inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename BOX_SET_CLASS0, typename BOX_SET_CLASS1>
+ + + + +
bool GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >::node0_has_triangle [inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename BOX_SET_CLASS0, typename BOX_SET_CLASS1>
+ + + + +
bool GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >::node0_is_leaf [inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename BOX_SET_CLASS0, typename BOX_SET_CLASS1>
+ + + + +
bool GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >::node1_has_triangle [inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename BOX_SET_CLASS0, typename BOX_SET_CLASS1>
+ + + + +
bool GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >::node1_is_leaf [inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename BOX_SET_CLASS0, typename BOX_SET_CLASS1>
+ + + + +
bool GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >::t0_is_trimesh [inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename BOX_SET_CLASS0, typename BOX_SET_CLASS1>
+ + + + +
bool GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >::t1_is_trimesh [inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename BOX_SET_CLASS0, typename BOX_SET_CLASS1>
+ + + + +
btTransform GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >::trans_cache_0to1 [inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<typename BOX_SET_CLASS0, typename BOX_SET_CLASS1>
+ + + + +
GIM_BOX_BOX_TRANSFORM_CACHE GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >::trans_cache_1to0 [inherited]
+
+
+ +

+ +

+

+


Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/group___c_o_n_t_a_c_t_s.html b/Extras/GIMPACT/docs/html/group___c_o_n_t_a_c_t_s.html new file mode 100755 index 000000000..52dec4ba0 --- /dev/null +++ b/Extras/GIMPACT/docs/html/group___c_o_n_t_a_c_t_s.html @@ -0,0 +1,77 @@ + + +GIMPACT: CONTACTS + + + + + +

CONTACTS

Functions for managing and sorting contacts resulting from a collision query. +More... + + + + + + + + + + + + +

Classes

class  GIM_CONTACT
 Structure for collision results. More...
class  gim_contact_array

Defines

#define NORMAL_CONTACT_AVERAGE   1
#define CONTACT_DIFF_EPSILON   0.00001f
+

Detailed Description

+Functions for managing and sorting contacts resulting from a collision query. +

+

    +
  • +Contact lists must be create by calling GIM_CREATE_CONTACT_LIST
  • +
  • +After querys, contact lists must be destroy by calling GIM_DYNARRAY_DESTROY
  • +
  • +Contacts can be merge for avoid duplicate results by calling gim_merge_contacts
  • +
+

Define Documentation

+ +
+
+ + + + +
#define CONTACT_DIFF_EPSILON   0.00001f
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define NORMAL_CONTACT_AVERAGE   1
+
+
+ +

+Configuration var for applying interpolation of contact normals +

+

+


Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/group___c_o_n_t_a_i_n_e_r_s.html b/Extras/GIMPACT/docs/html/group___c_o_n_t_a_i_n_e_r_s.html new file mode 100755 index 000000000..e3d86d2f9 --- /dev/null +++ b/Extras/GIMPACT/docs/html/group___c_o_n_t_a_i_n_e_r_s.html @@ -0,0 +1,314 @@ + + +GIMPACT: CONTAINERS + + + + + +

CONTAINERS

Abstract class for template containers. +More... + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Classes

class  gim_array< T >
 Very simple array container with fast access and simd memory. More...
class  gim_bitset
struct  GIM_HASH_TABLE_NODE< T >
class  GIM_HASH_NODE_GET_KEY
 Macro for getting the key. More...
class  GIM_HASH_NODE_CMP_KEY_MACRO
 Macro for comparing the key and the element. More...
class  GIM_HASH_NODE_CMP_MACRO
 Macro for comparing Hash nodes. More...
class  gim_hash_table< T >
 A compact hash table implementation. More...

Defines

#define GIM_ARRAY_GROW_INCREMENT   2
#define GIM_ARRAY_GROW_FACTOR   2
#define GUINT_BIT_COUNT   32
#define GUINT_EXPONENT   5
#define GIM_INVALID_HASH   0xffffffff
 A very very high value.
#define GIM_DEFAULT_HASH_TABLE_SIZE   380
#define GIM_DEFAULT_HASH_TABLE_NODE_SIZE   4
#define GIM_HASH_TABLE_GROW_FACTOR   2
#define GIM_MIN_RADIX_SORT_SIZE   860
 calibrated on a PIII
#define GIM_NUM_PRIME   28

Functions

template<typename T>
void gim_sort_hash_node_array (T *array, GUINT array_count)
 Sorting for hash table.
GUINT gim_next_prime (GUINT number)

Variables

static const GUINT gim_prime_list [GIM_NUM_PRIME]
+

Detailed Description

+Abstract class for template containers. +

+


Define Documentation

+ +
+
+ + + + +
#define GIM_ARRAY_GROW_FACTOR   2
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define GIM_ARRAY_GROW_INCREMENT   2
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define GIM_DEFAULT_HASH_TABLE_NODE_SIZE   4
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define GIM_DEFAULT_HASH_TABLE_SIZE   380
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define GIM_HASH_TABLE_GROW_FACTOR   2
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define GIM_INVALID_HASH   0xffffffff
+
+
+ +

+A very very high value. +

+ +

+

+ +

+
+ + + + +
#define GIM_MIN_RADIX_SORT_SIZE   860
+
+
+ +

+calibrated on a PIII +

+ +

+

+ +

+
+ + + + +
#define GIM_NUM_PRIME   28
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define GUINT_BIT_COUNT   32
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define GUINT_EXPONENT   5
+
+
+ +

+ +

+

+


Function Documentation

+ +
+
+ + + + + + + + + +
GUINT gim_next_prime (GUINT  number  )  [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename T>
+ + + + + + + + + + + + + + + + + + +
void gim_sort_hash_node_array (T *  array,
GUINT  array_count 
) [inline]
+
+
+ +

+Sorting for hash table. +

+switch automatically between quicksort and radixsort +

+

+


Variable Documentation

+ +
+
+ + + + +
const GUINT gim_prime_list[GIM_NUM_PRIME] [static]
+
+
+ +

+Initial value:

+{
+  53ul,         97ul,         193ul,       389ul,       769ul,
+  1543ul,       3079ul,       6151ul,      12289ul,     24593ul,
+  49157ul,      98317ul,      196613ul,    393241ul,    786433ul,
+  1572869ul,    3145739ul,    6291469ul,   12582917ul,  25165843ul,
+  50331653ul,   100663319ul,  201326611ul, 402653189ul, 805306457ul,
+  1610612741ul, 3221225473ul, 4294967291ul
+}
+
+
+

+


Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html b/Extras/GIMPACT/docs/html/group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html new file mode 100755 index 000000000..138cfff0b --- /dev/null +++ b/Extras/GIMPACT/docs/html/group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html @@ -0,0 +1,1410 @@ + + +GIMPACT: GEOMETRIC_OPERATIONS + + + + + +

GEOMETRIC_OPERATIONS

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Classes

class  DISTANCE_PLANE_3D_FUNC
 This function calcs the distance from a 3D plane. More...
struct  GIM_TRIANGLE_CONTACT_DATA
 Structure for collision. More...
class  GIM_TRIANGLE
 Class for colliding triangles. More...

Defines

#define PLANEDIREPSILON   0.0000001f
#define PARALELENORMALS   0.000001f
#define TRIANGLE_NORMAL(v1, v2, v3, n)
#define TRIANGLE_NORMAL_FAST(v1, v2, v3, n)
#define TRIANGLE_PLANE(v1, v2, v3, plane)
 plane is a vec4f
#define TRIANGLE_PLANE_FAST(v1, v2, v3, plane)
 plane is a vec4f
#define EDGE_PLANE(e1, e2, n, plane)
 Calc a plane from an edge an a normal. plane is a vec4f.
#define DISTANCE_PLANE_POINT(plane, point)   (VEC_DOT(plane,point) - plane[3])
#define PROJECT_POINT_PLANE(point, plane, projected)
#define PLANE_MINOR_AXES(plane, i0, i1)   VEC_MINOR_AXES(plane, i0, i1)
 Finds the 2 smallest cartesian coordinates of a plane normal.
#define MAX_TRI_CLIPPING   16

Enumerations

enum  ePLANE_INTERSECTION_TYPE { G_BACK_PLANE = 0, +G_COLLIDE_PLANE, +G_FRONT_PLANE + }
enum  eLINE_PLANE_INTERSECTION_TYPE {
+  G_FRONT_PLANE_S1 = 0, +G_FRONT_PLANE_S2, +G_BACK_PLANE_S1, +G_BACK_PLANE_S2, +
+  G_COLLIDE_PLANE_S1, +G_COLLIDE_PLANE_S2 +
+ }

Functions

template<typename CLASS_POINT, typename CLASS_PLANE>
SIMD_FORCE_INLINE bool POINT_IN_HULL (const CLASS_POINT &point, const CLASS_PLANE *planes, GUINT plane_count)
 Verifies if a point is in the plane hull.
template<typename CLASS_POINT, typename CLASS_PLANE>
SIMD_FORCE_INLINE void PLANE_CLIP_SEGMENT (const CLASS_POINT &s1, const CLASS_POINT &s2, const CLASS_PLANE &plane, CLASS_POINT &clipped)
template<typename CLASS_POINT, typename CLASS_PLANE>
SIMD_FORCE_INLINE eLINE_PLANE_INTERSECTION_TYPE PLANE_CLIP_SEGMENT2 (const CLASS_POINT &s1, const CLASS_POINT &s2, const CLASS_PLANE &plane, CLASS_POINT &clipped)
 Confirms if the plane intersect the edge or nor.
template<typename CLASS_POINT, typename CLASS_PLANE>
SIMD_FORCE_INLINE eLINE_PLANE_INTERSECTION_TYPE PLANE_CLIP_SEGMENT_CLOSEST (const CLASS_POINT &s1, const CLASS_POINT &s2, const CLASS_PLANE &plane, CLASS_POINT &clipped1, CLASS_POINT &clipped2)
 Confirms if the plane intersect the edge or not.
template<typename T, typename CLASS_POINT, typename CLASS_PLANE>
SIMD_FORCE_INLINE bool RAY_PLANE_COLLISION (const CLASS_PLANE &plane, const CLASS_POINT &vDir, const CLASS_POINT &vPoint, CLASS_POINT &pout, T &tparam)
 Ray plane collision in one way.
template<typename T, typename CLASS_POINT, typename CLASS_PLANE>
SIMD_FORCE_INLINE GUINT LINE_PLANE_COLLISION (const CLASS_PLANE &plane, const CLASS_POINT &vDir, const CLASS_POINT &vPoint, CLASS_POINT &pout, T &tparam, T tmin, T tmax)
 line collision
template<typename CLASS_POINT, typename CLASS_PLANE>
SIMD_FORCE_INLINE bool INTERSECT_PLANES (const CLASS_PLANE &p1, const CLASS_PLANE &p2, CLASS_POINT &p, CLASS_POINT &d)
 Returns the Ray on which 2 planes intersect if they do. Written by Rodrigo Hernandez on ODE convex collision.
template<typename CLASS_POINT>
SIMD_FORCE_INLINE void CLOSEST_POINT_ON_SEGMENT (CLASS_POINT &cp, const CLASS_POINT &v, const CLASS_POINT &e1, const CLASS_POINT &e2)
template<typename T, typename CLASS_POINT>
SIMD_FORCE_INLINE bool LINE_INTERSECTION_PARAMS (const CLASS_POINT &dir1, CLASS_POINT &point1, const CLASS_POINT &dir2, CLASS_POINT &point2, T &t1, T &t2)
 Finds the line params where these lines intersect.
template<typename CLASS_POINT>
SIMD_FORCE_INLINE void SEGMENT_COLLISION (const CLASS_POINT &vA1, const CLASS_POINT &vA2, const CLASS_POINT &vB1, const CLASS_POINT &vB2, CLASS_POINT &vPointA, CLASS_POINT &vPointB)
 Find closest points on segments.
template<typename T>
SIMD_FORCE_INLINE bool BOX_AXIS_INTERSECT (T pos, T dir, T bmin, T bmax, T &tfirst, T &tlast)
 Line box intersection in one dimension.
template<typename T>
SIMD_FORCE_INLINE void SORT_3_INDICES (const T *values, GUINT *order_indices)
 Sorts 3 componets.
template<typename CLASS_POINT>
SIMD_FORCE_INLINE void PLANE_CLIP_POLYGON_COLLECT (const CLASS_POINT &point0, const CLASS_POINT &point1, GREAL dist0, GREAL dist1, CLASS_POINT *clipped, GUINT &clipped_count)
template<typename CLASS_POINT, typename CLASS_PLANE, typename DISTANCE_PLANE_FUNC>
SIMD_FORCE_INLINE GUINT PLANE_CLIP_POLYGON_GENERIC (const CLASS_PLANE &plane, const CLASS_POINT *polygon_points, GUINT polygon_point_count, CLASS_POINT *clipped, DISTANCE_PLANE_FUNC distance_func)
 Clips a polygon by a plane.
template<typename CLASS_POINT, typename CLASS_PLANE, typename DISTANCE_PLANE_FUNC>
SIMD_FORCE_INLINE GUINT PLANE_CLIP_TRIANGLE_GENERIC (const CLASS_PLANE &plane, const CLASS_POINT &point0, const CLASS_POINT &point1, const CLASS_POINT &point2, CLASS_POINT *clipped, DISTANCE_PLANE_FUNC distance_func)
 Clips a polygon by a plane.
template<typename CLASS_POINT, typename CLASS_PLANE>
SIMD_FORCE_INLINE GUINT PLANE_CLIP_POLYGON3D (const CLASS_PLANE &plane, const CLASS_POINT *polygon_points, GUINT polygon_point_count, CLASS_POINT *clipped)
template<typename CLASS_POINT, typename CLASS_PLANE>
SIMD_FORCE_INLINE GUINT PLANE_CLIP_TRIANGLE3D (const CLASS_PLANE &plane, const CLASS_POINT &point0, const CLASS_POINT &point1, const CLASS_POINT &point2, CLASS_POINT *clipped)
+

Define Documentation

+ +
+
+ + + + + + + + + + + + +
#define DISTANCE_PLANE_POINT (plane,
point   )    (VEC_DOT(plane,point) - plane[3])
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
#define EDGE_PLANE (e1,
e2,
n,
plane   ) 
+
+
+ +

+Value:

{\
+    vec3f _dif; \
+    VEC_DIFF(_dif,e2,e1); \
+    VEC_CROSS(plane,_dif,n); \
+    VEC_NORMALIZE(plane); \
+    plane[3] = VEC_DOT(e1,plane);\
+}\
+
Calc a plane from an edge an a normal. plane is a vec4f. +

+ +

+

+ +

+
+ + + + +
#define MAX_TRI_CLIPPING   16
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define PARALELENORMALS   0.000001f
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define PLANE_MINOR_AXES (plane,
i0,
i1   )    VEC_MINOR_AXES(plane, i0, i1)
+
+
+ +

+Finds the 2 smallest cartesian coordinates of a plane normal. +

+ +

+

+ +

+
+ + + + +
#define PLANEDIREPSILON   0.0000001f
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define PROJECT_POINT_PLANE (point,
plane,
projected   ) 
+
+
+ +

+Value:

{\
+        GREAL _dis;\
+        _dis = DISTANCE_PLANE_POINT(plane,point);\
+        VEC_SCALE(projected,-_dis,plane);\
+        VEC_SUM(projected,projected,point);     \
+}\
+
+
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
#define TRIANGLE_NORMAL (v1,
v2,
v3,
 ) 
+
+
+ +

+Value:

{\
+        vec3f _dif1,_dif2;\
+    VEC_DIFF(_dif1,v2,v1);\
+    VEC_DIFF(_dif2,v3,v1);\
+    VEC_CROSS(n,_dif1,_dif2);\
+    VEC_NORMALIZE(n);\
+}\
+
+
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
#define TRIANGLE_NORMAL_FAST (v1,
v2,
v3,
 ) 
+
+
+ +

+Value:

{\
+    vec3f _dif1,_dif2; \
+    VEC_DIFF(_dif1,v2,v1); \
+    VEC_DIFF(_dif2,v3,v1); \
+    VEC_CROSS(n,_dif1,_dif2); \
+}\
+
+
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
#define TRIANGLE_PLANE (v1,
v2,
v3,
plane   ) 
+
+
+ +

+Value:

{\
+    TRIANGLE_NORMAL(v1,v2,v3,plane);\
+    plane[3] = VEC_DOT(v1,plane);\
+}\
+
plane is a vec4f +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
#define TRIANGLE_PLANE_FAST (v1,
v2,
v3,
plane   ) 
+
+
+ +

+Value:

{\
+    TRIANGLE_NORMAL_FAST(v1,v2,v3,plane);\
+    plane[3] = VEC_DOT(v1,plane);\
+}\
+
plane is a vec4f +

+ +

+

+


Enumeration Type Documentation

+ +
+ +
+ +

+

Enumerator:
+ + + + + + + +
G_FRONT_PLANE_S1  +
G_FRONT_PLANE_S2  +
G_BACK_PLANE_S1  +
G_BACK_PLANE_S2  +
G_COLLIDE_PLANE_S1  +
G_COLLIDE_PLANE_S2  +
+
+ +
+

+ +

+
+ + + + +
enum ePLANE_INTERSECTION_TYPE
+
+
+ +

+

Enumerator:
+ + + + +
G_BACK_PLANE  +
G_COLLIDE_PLANE  +
G_FRONT_PLANE  +
+
+ +
+

+


Function Documentation

+ +
+
+
+template<typename T>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE bool BOX_AXIS_INTERSECT ( pos,
dir,
bmin,
bmax,
T &  tfirst,
T &  tlast 
) [inline]
+
+
+ +

+Line box intersection in one dimension. +

+

Parameters:
+ + + + + + + +
pos Position of the ray
dir Projection of the Direction of the ray
bmin Minimum bound of the box
bmax Maximum bound of the box
tfirst the minimum projection. Assign to 0 at first.
tlast the maximum projection. Assign to INFINITY at first.
+
+
Returns:
true if there is an intersection.
+ +
+

+ +

+
+
+template<typename CLASS_POINT>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE void CLOSEST_POINT_ON_SEGMENT (CLASS_POINT &  cp,
const CLASS_POINT &  v,
const CLASS_POINT &  e1,
const CLASS_POINT &  e2 
) [inline]
+
+
+ +

+Finds the closest point(cp) to (v) on a segment (e1,e2) +

+

+ +

+
+
+template<typename CLASS_POINT, typename CLASS_PLANE>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE bool INTERSECT_PLANES (const CLASS_PLANE &  p1,
const CLASS_PLANE &  p2,
CLASS_POINT &  p,
CLASS_POINT &  d 
) [inline]
+
+
+ +

+Returns the Ray on which 2 planes intersect if they do. Written by Rodrigo Hernandez on ODE convex collision. +

+

Parameters:
+ + + + + +
p1 Plane 1
p2 Plane 2
p Contains the origin of the ray upon returning if planes intersect
d Contains the direction of the ray upon returning if planes intersect
+
+
Returns:
true if the planes intersect, 0 if paralell.
+ +
+

+ +

+
+
+template<typename T, typename CLASS_POINT>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE bool LINE_INTERSECTION_PARAMS (const CLASS_POINT &  dir1,
CLASS_POINT &  point1,
const CLASS_POINT &  dir2,
CLASS_POINT &  point2,
T &  t1,
T &  t2 
) [inline]
+
+
+ +

+Finds the line params where these lines intersect. +

+

Parameters:
+ + + + + + + + +
dir1 Direction of line 1
point1 Point of line 1
dir2 Direction of line 2
point2 Point of line 2
t1 Result Parameter for line 1
t2 Result Parameter for line 2
dointersect 0 if the lines won't intersect, else 1
+
+ +
+

+ +

+
+
+template<typename T, typename CLASS_POINT, typename CLASS_PLANE>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE GUINT LINE_PLANE_COLLISION (const CLASS_PLANE &  plane,
const CLASS_POINT &  vDir,
const CLASS_POINT &  vPoint,
CLASS_POINT &  pout,
T &  tparam,
tmin,
tmax 
) [inline]
+
+
+ +

+line collision +

+

Returns:
-0 if the ray never intersects -1 if the ray collides in front -2 if the ray collides in back
+ +
+

+ +

+
+
+template<typename CLASS_POINT, typename CLASS_PLANE>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE GUINT PLANE_CLIP_POLYGON3D (const CLASS_PLANE &  plane,
const CLASS_POINT *  polygon_points,
GUINT  polygon_point_count,
CLASS_POINT *  clipped 
) [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename CLASS_POINT>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE void PLANE_CLIP_POLYGON_COLLECT (const CLASS_POINT &  point0,
const CLASS_POINT &  point1,
GREAL  dist0,
GREAL  dist1,
CLASS_POINT *  clipped,
GUINT &  clipped_count 
) [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename CLASS_POINT, typename CLASS_PLANE, typename DISTANCE_PLANE_FUNC>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE GUINT PLANE_CLIP_POLYGON_GENERIC (const CLASS_PLANE &  plane,
const CLASS_POINT *  polygon_points,
GUINT  polygon_point_count,
CLASS_POINT *  clipped,
DISTANCE_PLANE_FUNC  distance_func 
) [inline]
+
+
+ +

+Clips a polygon by a plane. +

+

Returns:
The count of the clipped counts
+ +
+

+ +

+
+
+template<typename CLASS_POINT, typename CLASS_PLANE>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE void PLANE_CLIP_SEGMENT (const CLASS_POINT &  s1,
const CLASS_POINT &  s2,
const CLASS_PLANE &  plane,
CLASS_POINT &  clipped 
) [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename CLASS_POINT, typename CLASS_PLANE>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE eLINE_PLANE_INTERSECTION_TYPE PLANE_CLIP_SEGMENT2 (const CLASS_POINT &  s1,
const CLASS_POINT &  s2,
const CLASS_PLANE &  plane,
CLASS_POINT &  clipped 
) [inline]
+
+
+ +

+Confirms if the plane intersect the edge or nor. +

+intersection type must have the following values

    +
  • +0 : Segment in front of plane, s1 closest
  • +
  • +1 : Segment in front of plane, s2 closest
  • +
  • +2 : Segment in back of plane, s1 closest
  • +
  • +3 : Segment in back of plane, s2 closest
  • +
  • +4 : Segment collides plane, s1 in back
  • +
  • +5 : Segment collides plane, s2 in back
  • +
+ +
+

+ +

+
+
+template<typename CLASS_POINT, typename CLASS_PLANE>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE eLINE_PLANE_INTERSECTION_TYPE PLANE_CLIP_SEGMENT_CLOSEST (const CLASS_POINT &  s1,
const CLASS_POINT &  s2,
const CLASS_PLANE &  plane,
CLASS_POINT &  clipped1,
CLASS_POINT &  clipped2 
) [inline]
+
+
+ +

+Confirms if the plane intersect the edge or not. +

+clipped1 and clipped2 are the vertices behind the plane. clipped1 is the closest

+intersection_type must have the following values

    +
  • +0 : Segment in front of plane, s1 closest
  • +
  • +1 : Segment in front of plane, s2 closest
  • +
  • +2 : Segment in back of plane, s1 closest
  • +
  • +3 : Segment in back of plane, s2 closest
  • +
  • +4 : Segment collides plane, s1 in back
  • +
  • +5 : Segment collides plane, s2 in back
  • +
+ +
+

+ +

+
+
+template<typename CLASS_POINT, typename CLASS_PLANE>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE GUINT PLANE_CLIP_TRIANGLE3D (const CLASS_PLANE &  plane,
const CLASS_POINT &  point0,
const CLASS_POINT &  point1,
const CLASS_POINT &  point2,
CLASS_POINT *  clipped 
) [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename CLASS_POINT, typename CLASS_PLANE, typename DISTANCE_PLANE_FUNC>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE GUINT PLANE_CLIP_TRIANGLE_GENERIC (const CLASS_PLANE &  plane,
const CLASS_POINT &  point0,
const CLASS_POINT &  point1,
const CLASS_POINT &  point2,
CLASS_POINT *  clipped,
DISTANCE_PLANE_FUNC  distance_func 
) [inline]
+
+
+ +

+Clips a polygon by a plane. +

+

Returns:
The count of the clipped counts
+ +
+

+ +

+
+
+template<typename CLASS_POINT, typename CLASS_PLANE>
+ + + + + + + + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE bool POINT_IN_HULL (const CLASS_POINT &  point,
const CLASS_PLANE *  planes,
GUINT  plane_count 
) [inline]
+
+
+ +

+Verifies if a point is in the plane hull. +

+ +

+

+ +

+
+
+template<typename T, typename CLASS_POINT, typename CLASS_PLANE>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE bool RAY_PLANE_COLLISION (const CLASS_PLANE &  plane,
const CLASS_POINT &  vDir,
const CLASS_POINT &  vPoint,
CLASS_POINT &  pout,
T &  tparam 
) [inline]
+
+
+ +

+Ray plane collision in one way. +

+Intersects plane in one way only. The ray must face the plane (normals must be in opossite directions).
+ It uses the PLANEDIREPSILON constant. +

+

+ +

+
+
+template<typename CLASS_POINT>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE void SEGMENT_COLLISION (const CLASS_POINT &  vA1,
const CLASS_POINT &  vA2,
const CLASS_POINT &  vB1,
const CLASS_POINT &  vB2,
CLASS_POINT &  vPointA,
CLASS_POINT &  vPointB 
) [inline]
+
+
+ +

+Find closest points on segments. +

+ +

+

+ +

+
+
+template<typename T>
+ + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE void SORT_3_INDICES (const T *  values,
GUINT *  order_indices 
) [inline]
+
+
+ +

+Sorts 3 componets. +

+ +

+

+


Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/group___g_e_o_m_e_t_r_i_c___t_y_p_e_s.html b/Extras/GIMPACT/docs/html/group___g_e_o_m_e_t_r_i_c___t_y_p_e_s.html new file mode 100755 index 000000000..b145d6e76 --- /dev/null +++ b/Extras/GIMPACT/docs/html/group___g_e_o_m_e_t_r_i_c___t_y_p_e_s.html @@ -0,0 +1,469 @@ + + +GIMPACT: GEOMETRIC_TYPES + + + + + +

GEOMETRIC_TYPES

Basic types and constants for geometry. +More... + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Typedefs

typedef GSHORT vec2s [2]
 Short Integer vector 2D.
typedef GSHORT vec3s [3]
 Integer vector 3D.
typedef GSHORT vec4s [4]
 Integer vector 4D.
typedef GUSHORT vec2us [2]
 Short Integer vector 2D.
typedef GUSHORT vec3us [3]
 Integer vector 3D.
typedef GUSHORT vec4us [4]
 Integer vector 4D.
typedef GINT vec2i [2]
 Integer vector 2D.
typedef GINT vec3i [3]
 Integer vector 3D.
typedef GINT vec4i [4]
 Integer vector 4D.
typedef GUINT vec2ui [2]
 Unsigned Integer vector 2D.
typedef GUINT vec3ui [3]
 Unsigned Integer vector 3D.
typedef GUINT vec4ui [4]
 Unsigned Integer vector 4D.
typedef GREAL vec2f [2]
 Float vector 2D.
typedef GREAL vec3f [3]
 Float vector 3D.
typedef GREAL vec4f [4]
 Float vector 4D.
typedef GREAL2 vec2d [2]
 Double vector 2D.
typedef GREAL2 vec3d [3]
 Float vector 3D.
typedef GREAL2 vec4d [4]
 Float vector 4D.
typedef GREAL mat2f [2][2]
 Matrix 2D, row ordered.
typedef GREAL mat3f [3][3]
 Matrix 3D, row ordered.
typedef GREAL mat4f [4][4]
 Matrix 4D, row ordered.
typedef GREAL quatf [4]
 Quaternion.
+

Detailed Description

+Basic types and constants for geometry. +

+


Typedef Documentation

+ +
+
+ + + + +
typedef GREAL mat2f[2][2]
+
+
+ +

+Matrix 2D, row ordered. +

+ +

+

+ +

+
+ + + + +
typedef GREAL mat3f[3][3]
+
+
+ +

+Matrix 3D, row ordered. +

+ +

+

+ +

+
+ + + + +
typedef GREAL mat4f[4][4]
+
+
+ +

+Matrix 4D, row ordered. +

+ +

+

+ +

+
+ + + + +
typedef GREAL quatf[4]
+
+
+ +

+Quaternion. +

+ +

+

+ +

+
+ + + + +
typedef GREAL2 vec2d[2]
+
+
+ +

+Double vector 2D. +

+ +

+

+ +

+
+ + + + +
typedef GREAL vec2f[2]
+
+
+ +

+Float vector 2D. +

+ +

+

+ +

+
+ + + + +
typedef GINT vec2i[2]
+
+
+ +

+Integer vector 2D. +

+ +

+

+ +

+
+ + + + +
typedef GSHORT vec2s[2]
+
+
+ +

+Short Integer vector 2D. +

+ +

+

+ +

+
+ + + + +
typedef GUINT vec2ui[2]
+
+
+ +

+Unsigned Integer vector 2D. +

+ +

+

+ +

+
+ + + + +
typedef GUSHORT vec2us[2]
+
+
+ +

+Short Integer vector 2D. +

+ +

+

+ +

+
+ + + + +
typedef GREAL2 vec3d[3]
+
+
+ +

+Float vector 3D. +

+ +

+

+ +

+
+ + + + +
typedef GREAL vec3f[3]
+
+
+ +

+Float vector 3D. +

+ +

+

+ +

+
+ + + + +
typedef GINT vec3i[3]
+
+
+ +

+Integer vector 3D. +

+ +

+

+ +

+
+ + + + +
typedef GSHORT vec3s[3]
+
+
+ +

+Integer vector 3D. +

+ +

+

+ +

+
+ + + + +
typedef GUINT vec3ui[3]
+
+
+ +

+Unsigned Integer vector 3D. +

+ +

+

+ +

+
+ + + + +
typedef GUSHORT vec3us[3]
+
+
+ +

+Integer vector 3D. +

+ +

+

+ +

+
+ + + + +
typedef GREAL2 vec4d[4]
+
+
+ +

+Float vector 4D. +

+ +

+

+ +

+
+ + + + +
typedef GREAL vec4f[4]
+
+
+ +

+Float vector 4D. +

+ +

+

+ +

+
+ + + + +
typedef GINT vec4i[4]
+
+
+ +

+Integer vector 4D. +

+ +

+

+ +

+
+ + + + +
typedef GSHORT vec4s[4]
+
+
+ +

+Integer vector 4D. +

+ +

+

+ +

+
+ + + + +
typedef GUINT vec4ui[4]
+
+
+ +

+Unsigned Integer vector 4D. +

+ +

+

+ +

+
+ + + + +
typedef GUSHORT vec4us[4]
+
+
+ +

+Integer vector 4D. +

+ +

+

+


Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/group___h_a_s_h___t_a_b_l_e___s_t_r_u_c_t_u_r_e_s.html b/Extras/GIMPACT/docs/html/group___h_a_s_h___t_a_b_l_e___s_t_r_u_c_t_u_r_e_s.html new file mode 100755 index 000000000..e0bb75f3a --- /dev/null +++ b/Extras/GIMPACT/docs/html/group___h_a_s_h___t_a_b_l_e___s_t_r_u_c_t_u_r_e_s.html @@ -0,0 +1,473 @@ + + +GIMPACT: HASH_TABLE_STRUCTURES + + + + + +

HASH_TABLE_STRUCTURES

Hash table data management. The hash table has the indices to the corresponding m_nodes array. +More... + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Functions

GUINT gim_hash_table::_find_cell (GUINT hashkey)
 Returns the cell index.
GUINT gim_hash_table::_find_avaliable_cell (GUINT hashkey)
 Find the avaliable cell for the hashkey, and return an existing cell if it has the same hash key.
void gim_hash_table::_reserve_table_memory (GUINT newtablesize)
 reserves the memory for the hash table.
void gim_hash_table::_invalidate_keys ()
void gim_hash_table::_clear_table_memory ()
 Clear all memory for the hash table.
void gim_hash_table::_rehash ()
 Invalidates the keys (Assigning GIM_INVALID_HASH to all) Reorders the hash keys.
void gim_hash_table::_resize_table (GUINT newsize)
 Resize hash table indices.
void gim_hash_table::_destroy ()
 Destroy hash table memory.
GUINT gim_hash_table::_assign_hash_table_cell (GUINT hashkey)
 Finds an avaliable hash table cell, and resizes the table if there isn't space.
bool gim_hash_table::_erase_by_index_hash_table (GUINT index)
 erase by index in hash table
bool gim_hash_table::_erase_hash_table (GUINT hashkey)
 erase by key in hash table
GUINT gim_hash_table::_insert_hash_table (GUINT hashkey, const T &value)
 insert an element in hash table
GUINT gim_hash_table::_insert_hash_table_replace (GUINT hashkey, const T &value)
 insert an element in hash table.

Variables

GUINT * gim_hash_table::m_hash_table
GUINT gim_hash_table::m_table_size
GUINT gim_hash_table::m_node_size
GUINT gim_hash_table::m_min_hash_table_size
+

Detailed Description

+Hash table data management. The hash table has the indices to the corresponding m_nodes array. +

+


Function Documentation

+ +
+
+
+template<class T>
+ + + + + + + + + +
GUINT gim_hash_table< T >::_assign_hash_table_cell (GUINT  hashkey  )  [inline, protected, inherited]
+
+
+ +

+Finds an avaliable hash table cell, and resizes the table if there isn't space. +

+ +

+

+ +

+
+
+template<class T>
+ + + + + + + + +
void gim_hash_table< T >::_clear_table_memory (  )  [inline, protected, inherited]
+
+
+ +

+Clear all memory for the hash table. +

+ +

+

+ +

+
+
+template<class T>
+ + + + + + + + +
void gim_hash_table< T >::_destroy (  )  [inline, protected, inherited]
+
+
+ +

+Destroy hash table memory. +

+ +

+

+ +

+
+
+template<class T>
+ + + + + + + + + +
bool gim_hash_table< T >::_erase_by_index_hash_table (GUINT  index  )  [inline, protected, inherited]
+
+
+ +

+erase by index in hash table +

+ +

+

+ +

+
+
+template<class T>
+ + + + + + + + + +
bool gim_hash_table< T >::_erase_hash_table (GUINT  hashkey  )  [inline, protected, inherited]
+
+
+ +

+erase by key in hash table +

+ +

+

+ +

+
+
+template<class T>
+ + + + + + + + + +
GUINT gim_hash_table< T >::_find_avaliable_cell (GUINT  hashkey  )  [inline, protected, inherited]
+
+
+ +

+Find the avaliable cell for the hashkey, and return an existing cell if it has the same hash key. +

+ +

+

+ +

+
+
+template<class T>
+ + + + + + + + + +
GUINT gim_hash_table< T >::_find_cell (GUINT  hashkey  )  [inline, protected, inherited]
+
+
+ +

+Returns the cell index. +

+ +

+

+ +

+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
GUINT gim_hash_table< T >::_insert_hash_table (GUINT  hashkey,
const T &  value 
) [inline, protected, inherited]
+
+
+ +

+insert an element in hash table +

+If the element exists, this won't insert the element

Returns:
the index in the array of the existing element,or GIM_INVALID_HASH if the element has been inserted If so, the element has been inserted at the last position of the array.
+ +
+

+ +

+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
GUINT gim_hash_table< T >::_insert_hash_table_replace (GUINT  hashkey,
const T &  value 
) [inline, protected, inherited]
+
+
+ +

+insert an element in hash table. +

+If the element exists, this replaces the element.

Returns:
the index in the array of the existing element,or GIM_INVALID_HASH if the element has been inserted If so, the element has been inserted at the last position of the array.
+ +
+

+ +

+
+
+template<class T>
+ + + + + + + + +
void gim_hash_table< T >::_invalidate_keys (  )  [inline, protected, inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<class T>
+ + + + + + + + +
void gim_hash_table< T >::_rehash (  )  [inline, protected, inherited]
+
+
+ +

+Invalidates the keys (Assigning GIM_INVALID_HASH to all) Reorders the hash keys. +

+ +

+

+ +

+
+
+template<class T>
+ + + + + + + + + +
void gim_hash_table< T >::_reserve_table_memory (GUINT  newtablesize  )  [inline, protected, inherited]
+
+
+ +

+reserves the memory for the hash table. +

+

Precondition:
hash table must be empty
+
Postcondition:
reserves the memory for the hash table, an initializes all elements to GIM_INVALID_HASH.
+ +
+

+ +

+
+
+template<class T>
+ + + + + + + + + +
void gim_hash_table< T >::_resize_table (GUINT  newsize  )  [inline, protected, inherited]
+
+
+ +

+Resize hash table indices. +

+ +

+

+


Variable Documentation

+ +
+
+
+template<class T>
+ + + + +
GUINT* gim_hash_table< T >::m_hash_table [protected, inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<class T>
+ + + + +
GUINT gim_hash_table< T >::m_min_hash_table_size [protected, inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<class T>
+ + + + +
GUINT gim_hash_table< T >::m_node_size [protected, inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<class T>
+ + + + +
GUINT gim_hash_table< T >::m_table_size [protected, inherited]
+
+
+ +

+ +

+

+


Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/group___m_a_t_h___f_u_n_c_t_i_o_n_s.html b/Extras/GIMPACT/docs/html/group___m_a_t_h___f_u_n_c_t_i_o_n_s.html new file mode 100755 index 000000000..9264da1ef --- /dev/null +++ b/Extras/GIMPACT/docs/html/group___m_a_t_h___f_u_n_c_t_i_o_n_s.html @@ -0,0 +1,572 @@ + + +GIMPACT: MATH_FUNCTIONS + + + + + +

MATH_FUNCTIONS

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Defines

#define G_DEGTORAD(X)   ((X)*3.1415926f/180.0f)
#define G_RADTODEG(X)   ((X)*180.0f/3.1415926f)
#define GIM_IR(x)   ((GUINT&)(x))
 Integer representation of a floating-point value.
#define GIM_SIR(x)   ((GINT&)(x))
 Signed integer representation of a floating-point value.
#define GIM_AIR(x)   (GIM_IR(x)&0x7fffffff)
 Absolute integer representation of a floating-point value.
#define GIM_FR(x)   ((GREAL&)(x))
 Floating-point representation of an integer value.
#define GIM_MAX(a, b)   (a<b?b:a)
#define GIM_MIN(a, b)   (a>b?b:a)
#define GIM_MAX3(a, b, c)   GIM_MAX(a,GIM_MAX(b,c))
#define GIM_MIN3(a, b, c)   GIM_MIN(a,GIM_MIN(b,c))
#define GIM_IS_ZERO(value)   (value < G_EPSILON && value > -G_EPSILON)
#define GIM_IS_NEGATIVE(value)   (value <= -G_EPSILON)
#define GIM_IS_POSISITVE(value)   (value >= G_EPSILON)
#define GIM_NEAR_EQUAL(v1, v2)   GIM_IS_ZERO((v1-v2))
#define GIM_CLAMP(number, minval, maxval)   (number<minval?minval:(number>maxval?maxval:number))
 returns a clamped number
#define GIM_GREATER(x, y)   fabsf(x) > (y)
#define GIM_SWAP_NUMBERS(a, b)
 Swap numbers.
#define GIM_INV_SQRT(va, isva)
#define GIM_SQRT(va, sva)

Functions

GREAL gim_inv_sqrt (GREAL f)
 Computes 1.0f / sqrtf(x). Comes from Quake3. See http://www.magic-software.com/3DGEDInvSqrt.html.
GREAL gim_sqrt (GREAL f)
+

Detailed Description

+mathematical functions

Define Documentation

+ +
+
+ + + + + + + + + +
#define G_DEGTORAD (  )    ((X)*3.1415926f/180.0f)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
#define G_RADTODEG (  )    ((X)*180.0f/3.1415926f)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
#define GIM_AIR (  )    (GIM_IR(x)&0x7fffffff)
+
+
+ +

+Absolute integer representation of a floating-point value. +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define GIM_CLAMP (number,
minval,
maxval   )    (number<minval?minval:(number>maxval?maxval:number))
+
+
+ +

+returns a clamped number +

+ +

+

+ +

+
+ + + + + + + + + +
#define GIM_FR (  )    ((GREAL&)(x))
+
+
+ +

+Floating-point representation of an integer value. +

+ +

+

+ +

+
+ + + + + + + + + + + + +
#define GIM_GREATER (x,
 )    fabsf(x) > (y)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + +
#define GIM_INV_SQRT (va,
isva   ) 
+
+
+ +

+Value:

{\
+    if(va<=0.0000001f)\
+    {\
+        isva = G_REAL_INFINITY;\
+    }\
+    else\
+    {\
+        GREAL _x = va * 0.5f;\
+        GUINT _y = 0x5f3759df - ( GIM_IR(va) >> 1);\
+        isva = GIM_FR(_y);\
+        isva  = isva * ( 1.5f - ( _x * isva * isva ) );\
+    }\
+}\
+
+
+

+ +

+
+ + + + + + + + + +
#define GIM_IR (  )    ((GUINT&)(x))
+
+
+ +

+Integer representation of a floating-point value. +

+ +

+

+ +

+
+ + + + + + + + + +
#define GIM_IS_NEGATIVE (value   )    (value <= -G_EPSILON)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
#define GIM_IS_POSISITVE (value   )    (value >= G_EPSILON)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
#define GIM_IS_ZERO (value   )    (value < G_EPSILON && value > -G_EPSILON)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + +
#define GIM_MAX (a,
 )    (a<b?b:a)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define GIM_MAX3 (a,
b,
 )    GIM_MAX(a,GIM_MAX(b,c))
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + +
#define GIM_MIN (a,
 )    (a>b?b:a)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define GIM_MIN3 (a,
b,
 )    GIM_MIN(a,GIM_MIN(b,c))
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + +
#define GIM_NEAR_EQUAL (v1,
v2   )    GIM_IS_ZERO((v1-v2))
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
#define GIM_SIR (  )    ((GINT&)(x))
+
+
+ +

+Signed integer representation of a floating-point value. +

+ +

+

+ +

+
+ + + + + + + + + + + + +
#define GIM_SQRT (va,
sva   ) 
+
+
+ +

+Value:

{\
+    GIM_INV_SQRT(va,sva);\
+    sva = 1.0f/sva;\
+}\
+
+
+

+ +

+
+ + + + + + + + + + + + +
#define GIM_SWAP_NUMBERS (a,
 ) 
+
+
+ +

+Value:

{ \
+    a = a+b; \
+    b = a-b; \
+    a = a-b; \
+}\
+
Swap numbers. +

+ +

+

+


Function Documentation

+ +
+
+ + + + + + + + + +
GREAL gim_inv_sqrt (GREAL  f  )  [inline]
+
+
+ +

+Computes 1.0f / sqrtf(x). Comes from Quake3. See http://www.magic-software.com/3DGEDInvSqrt.html. +

+ +

+

+ +

+
+ + + + + + + + + +
GREAL gim_sqrt (GREAL  f  )  [inline]
+
+
+ +

+ +

+

+


Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/group___m_a_t_r_i_x___o_p_e_r_a_t_i_o_n_s.html b/Extras/GIMPACT/docs/html/group___m_a_t_r_i_x___o_p_e_r_a_t_i_o_n_s.html new file mode 100755 index 000000000..ae95c8348 --- /dev/null +++ b/Extras/GIMPACT/docs/html/group___m_a_t_r_i_x___o_p_e_r_a_t_i_o_n_s.html @@ -0,0 +1,2922 @@ + + +GIMPACT: MATRIX_OPERATIONS + + + + + +

MATRIX_OPERATIONS

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Defines

#define IDENTIFY_MATRIX_3X3(m)
 initialize matrix
#define IDENTIFY_MATRIX_4X4(m)
#define ZERO_MATRIX_4X4(m)
#define ROTX_CS(m, cosine, sine)
#define ROTY_CS(m, cosine, sine)
#define ROTZ_CS(m, cosine, sine)
#define COPY_MATRIX_2X2(b, a)
#define COPY_MATRIX_2X3(b, a)
#define COPY_MATRIX_3X3(b, a)
#define COPY_MATRIX_4X4(b, a)
#define TRANSPOSE_MATRIX_2X2(b, a)
#define TRANSPOSE_MATRIX_3X3(b, a)
#define TRANSPOSE_MATRIX_4X4(b, a)
#define SCALE_MATRIX_2X2(b, s, a)
#define SCALE_MATRIX_3X3(b, s, a)
#define SCALE_MATRIX_4X4(b, s, a)
#define SCALE_VEC_MATRIX_2X2(b, svec, a)
#define SCALE_VEC_MATRIX_3X3(b, svec, a)
#define SCALE_VEC_MATRIX_4X4(b, svec, a)
#define ACCUM_SCALE_MATRIX_2X2(b, s, a)
#define ACCUM_SCALE_MATRIX_3X3(b, s, a)
#define ACCUM_SCALE_MATRIX_4X4(b, s, a)
#define MATRIX_PRODUCT_2X2(c, a, b)
#define MATRIX_PRODUCT_3X3(c, a, b)
#define MATRIX_PRODUCT_4X4(c, a, b)
#define MAT_DOT_VEC_2X2(p, m, v)
#define MAT_DOT_VEC_3X3(p, m, v)
#define MAT_DOT_VEC_4X4(p, m, v)
#define MAT_DOT_VEC_3X4(p, m, v)
#define VEC_DOT_MAT_3X3(p, v, m)
#define MAT_DOT_VEC_2X3(p, m, v)
#define MAT_TRANSFORM_PLANE_4X4(pout, m, plane)
 Transform a plane.
#define INV_TRANSP_MAT_DOT_VEC_2X2(p, m, v)
#define NORM_XFORM_2X2(p, m, v)
#define OUTER_PRODUCT_2X2(m, v, t)
#define OUTER_PRODUCT_3X3(m, v, t)
#define OUTER_PRODUCT_4X4(m, v, t)
#define ACCUM_OUTER_PRODUCT_2X2(m, v, t)
#define ACCUM_OUTER_PRODUCT_3X3(m, v, t)
#define ACCUM_OUTER_PRODUCT_4X4(m, v, t)
#define DETERMINANT_2X2(d, m)
#define DETERMINANT_3X3(d, m)
#define COFACTOR_4X4_IJ(fac, m, i, j)
#define DETERMINANT_4X4(d, m)
#define COFACTOR_2X2(a, m)
#define COFACTOR_3X3(a, m)
#define COFACTOR_4X4(a, m)
#define ADJOINT_2X2(a, m)
#define ADJOINT_3X3(a, m)
#define ADJOINT_4X4(a, m)
#define SCALE_ADJOINT_2X2(a, s, m)
#define SCALE_ADJOINT_3X3(a, s, m)
#define SCALE_ADJOINT_4X4(a, s, m)
#define INVERT_2X2(b, det, a)
#define INVERT_3X3(b, det, a)
#define INVERT_4X4(b, det, a)
#define MAT_GET_ROW(mat, vec3, rowindex)
 Get the triple(3) row of a transform matrix.
#define MAT_GET_ROW2(mat, vec2, rowindex)
 Get the tuple(2) row of a transform matrix.
#define MAT_GET_ROW4(mat, vec4, rowindex)
 Get the quad (4) row of a transform matrix.
#define MAT_GET_COL(mat, vec3, colindex)
 Get the triple(3) col of a transform matrix.
#define MAT_GET_COL2(mat, vec2, colindex)
 Get the tuple(2) col of a transform matrix.
#define MAT_GET_COL4(mat, vec4, colindex)
 Get the quad (4) col of a transform matrix.
#define MAT_GET_X(mat, vec3)
 Get the triple(3) col of a transform matrix.
#define MAT_GET_Y(mat, vec3)
 Get the triple(3) col of a transform matrix.
#define MAT_GET_Z(mat, vec3)
 Get the triple(3) col of a transform matrix.
#define MAT_SET_X(mat, vec3)
 Get the triple(3) col of a transform matrix.
#define MAT_SET_Y(mat, vec3)
 Get the triple(3) col of a transform matrix.
#define MAT_SET_Z(mat, vec3)
 Get the triple(3) col of a transform matrix.
#define MAT_GET_TRANSLATION(mat, vec3)
 Get the triple(3) col of a transform matrix.
#define MAT_SET_TRANSLATION(mat, vec3)
 Set the triple(3) col of a transform matrix.
#define MAT_DOT_ROW(mat, vec3, rowindex)   (vec3[0]*mat[rowindex][0] + vec3[1]*mat[rowindex][1] + vec3[2]*mat[rowindex][2])
 Returns the dot product between a vec3f and the row of a matrix.
#define MAT_DOT_ROW2(mat, vec2, rowindex)   (vec2[0]*mat[rowindex][0] + vec2[1]*mat[rowindex][1])
 Returns the dot product between a vec2f and the row of a matrix.
#define MAT_DOT_ROW4(mat, vec4, rowindex)   (vec4[0]*mat[rowindex][0] + vec4[1]*mat[rowindex][1] + vec4[2]*mat[rowindex][2] + vec4[3]*mat[rowindex][3])
 Returns the dot product between a vec4f and the row of a matrix.
#define MAT_DOT_COL(mat, vec3, colindex)   (vec3[0]*mat[0][colindex] + vec3[1]*mat[1][colindex] + vec3[2]*mat[2][colindex])
 Returns the dot product between a vec3f and the col of a matrix.
#define MAT_DOT_COL2(mat, vec2, colindex)   (vec2[0]*mat[0][colindex] + vec2[1]*mat[1][colindex])
 Returns the dot product between a vec2f and the col of a matrix.
#define MAT_DOT_COL4(mat, vec4, colindex)   (vec4[0]*mat[0][colindex] + vec4[1]*mat[1][colindex] + vec4[2]*mat[2][colindex] + vec4[3]*mat[3][colindex])
 Returns the dot product between a vec4f and the col of a matrix.
#define INV_MAT_DOT_VEC_3X3(p, m, v)
+

Detailed Description

+Operations for matrices : mat2f, mat3f and mat4f

Define Documentation

+ +
+
+ + + + + + + + + + + + + + + +
#define ACCUM_OUTER_PRODUCT_2X2 (m,
v,
 ) 
+
+
+ +

+Value:

{                                                               \
+   m[0][0] += v[0] * t[0];                                      \
+   m[0][1] += v[0] * t[1];                                      \
+                                                                \
+   m[1][0] += v[1] * t[0];                                      \
+   m[1][1] += v[1] * t[1];                                      \
+}\
+
outer product of vector times vector transpose

+The outer product of vector v and vector transpose t yeilds dyadic matrix m. +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define ACCUM_OUTER_PRODUCT_3X3 (m,
v,
 ) 
+
+
+ +

+Value:

{                                                               \
+   m[0][0] += v[0] * t[0];                                      \
+   m[0][1] += v[0] * t[1];                                      \
+   m[0][2] += v[0] * t[2];                                      \
+                                                                \
+   m[1][0] += v[1] * t[0];                                      \
+   m[1][1] += v[1] * t[1];                                      \
+   m[1][2] += v[1] * t[2];                                      \
+                                                                \
+   m[2][0] += v[2] * t[0];                                      \
+   m[2][1] += v[2] * t[1];                                      \
+   m[2][2] += v[2] * t[2];                                      \
+}\
+
outer product of vector times vector transpose

+The outer product of vector v and vector transpose t yeilds dyadic matrix m. +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define ACCUM_OUTER_PRODUCT_4X4 (m,
v,
 ) 
+
+
+ +

+Value:

{                                                               \
+   m[0][0] += v[0] * t[0];                                      \
+   m[0][1] += v[0] * t[1];                                      \
+   m[0][2] += v[0] * t[2];                                      \
+   m[0][3] += v[0] * t[3];                                      \
+                                                                \
+   m[1][0] += v[1] * t[0];                                      \
+   m[1][1] += v[1] * t[1];                                      \
+   m[1][2] += v[1] * t[2];                                      \
+   m[1][3] += v[1] * t[3];                                      \
+                                                                \
+   m[2][0] += v[2] * t[0];                                      \
+   m[2][1] += v[2] * t[1];                                      \
+   m[2][2] += v[2] * t[2];                                      \
+   m[2][3] += v[2] * t[3];                                      \
+                                                                \
+   m[3][0] += v[3] * t[0];                                      \
+   m[3][1] += v[3] * t[1];                                      \
+   m[3][2] += v[3] * t[2];                                      \
+   m[3][3] += v[3] * t[3];                                      \
+}\
+
outer product of vector times vector transpose

+The outer product of vector v and vector transpose t yeilds dyadic matrix m. +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define ACCUM_SCALE_MATRIX_2X2 (b,
s,
 ) 
+
+
+ +

+Value:

{                                       \
+   b[0][0] += (s) * a[0][0];            \
+   b[0][1] += (s) * a[0][1];            \
+                                        \
+   b[1][0] += (s) * a[1][0];            \
+   b[1][1] += (s) * a[1][1];            \
+}\
+
multiply matrix by scalar +
+

+ +

+
+ + + + + + + + + + + + + + + +
#define ACCUM_SCALE_MATRIX_3X3 (b,
s,
 ) 
+
+
+ +

+Value:

{                                       \
+   b[0][0] += (s) * a[0][0];            \
+   b[0][1] += (s) * a[0][1];            \
+   b[0][2] += (s) * a[0][2];            \
+                                        \
+   b[1][0] += (s) * a[1][0];            \
+   b[1][1] += (s) * a[1][1];            \
+   b[1][2] += (s) * a[1][2];            \
+                                        \
+   b[2][0] += (s) * a[2][0];            \
+   b[2][1] += (s) * a[2][1];            \
+   b[2][2] += (s) * a[2][2];            \
+}\
+
multiply matrix by scalar +
+

+ +

+
+ + + + + + + + + + + + + + + +
#define ACCUM_SCALE_MATRIX_4X4 (b,
s,
 ) 
+
+
+ +

+Value:

{                                       \
+   b[0][0] += (s) * a[0][0];            \
+   b[0][1] += (s) * a[0][1];            \
+   b[0][2] += (s) * a[0][2];            \
+   b[0][3] += (s) * a[0][3];            \
+                                        \
+   b[1][0] += (s) * a[1][0];            \
+   b[1][1] += (s) * a[1][1];            \
+   b[1][2] += (s) * a[1][2];            \
+   b[1][3] += (s) * a[1][3];            \
+                                        \
+   b[2][0] += (s) * a[2][0];            \
+   b[2][1] += (s) * a[2][1];            \
+   b[2][2] += (s) * a[2][2];            \
+   b[2][3] += (s) * a[2][3];            \
+                                        \
+   b[3][0] += (s) * a[3][0];            \
+   b[3][1] += (s) * a[3][1];            \
+   b[3][2] += (s) * a[3][2];            \
+   b[3][3] += (s) * a[3][3];            \
+}\
+
multiply matrix by scalar +
+

+ +

+
+ + + + + + + + + + + + +
#define ADJOINT_2X2 (a,
 ) 
+
+
+ +

+Value:

{                                                               \
+   a[0][0] = (m)[1][1];                                         \
+   a[1][0] = - (m)[1][0];                                               \
+   a[0][1] = - (m)[0][1];                                               \
+   a[1][1] = (m)[0][0];                                         \
+}\
+
adjoint of matrix

+Computes adjoint of matrix m, returning a (Note that adjoint is just the transpose of the cofactor matrix) +

+

+ +

+
+ + + + + + + + + + + + +
#define ADJOINT_3X3 (a,
 ) 
+
+
+ +

+Value:

{                                                               \
+   a[0][0] = m[1][1]*m[2][2] - m[1][2]*m[2][1];                 \
+   a[1][0] = - (m[1][0]*m[2][2] - m[2][0]*m[1][2]);             \
+   a[2][0] = m[1][0]*m[2][1] - m[1][1]*m[2][0];                 \
+   a[0][1] = - (m[0][1]*m[2][2] - m[0][2]*m[2][1]);             \
+   a[1][1] = m[0][0]*m[2][2] - m[0][2]*m[2][0];                 \
+   a[2][1] = - (m[0][0]*m[2][1] - m[0][1]*m[2][0]);             \
+   a[0][2] = m[0][1]*m[1][2] - m[0][2]*m[1][1];                 \
+   a[1][2] = - (m[0][0]*m[1][2] - m[0][2]*m[1][0]);             \
+   a[2][2] = m[0][0]*m[1][1] - m[0][1]*m[1][0]);                \
+}\
+
adjoint of matrix

+Computes adjoint of matrix m, returning a (Note that adjoint is just the transpose of the cofactor matrix) +

+

+ +

+
+ + + + + + + + + + + + +
#define ADJOINT_4X4 (a,
 ) 
+
+
+ +

+Value:

{                                                               \
+   char _i_,_j_;                                                        \
+                                                                \
+   for (_i_=0; _i_<4; _i_++) {                                  \
+      for (_j_=0; _j_<4; _j_++) {                                       \
+         COFACTOR_4X4_IJ (a[_j_][_i_], m, _i_, _j_);                    \
+      }                                                         \
+   }                                                            \
+}\
+
adjoint of matrix

+Computes adjoint of matrix m, returning a (Note that adjoint is just the transpose of the cofactor matrix) +

+

+ +

+
+ + + + + + + + + + + + +
#define COFACTOR_2X2 (a,
 ) 
+
+
+ +

+Value:

{                                                               \
+   a[0][0] = (m)[1][1];                                         \
+   a[0][1] = - (m)[1][0];                                               \
+   a[1][0] = - (m)[0][1];                                               \
+   a[1][1] = (m)[0][0];                                         \
+}\
+
cofactor of matrix

+Computes cofactor of matrix m, returning a +

+

+ +

+
+ + + + + + + + + + + + +
#define COFACTOR_3X3 (a,
 ) 
+
+
+ +

+Value:

{                                                               \
+   a[0][0] = m[1][1]*m[2][2] - m[1][2]*m[2][1];                 \
+   a[0][1] = - (m[1][0]*m[2][2] - m[2][0]*m[1][2]);             \
+   a[0][2] = m[1][0]*m[2][1] - m[1][1]*m[2][0];                 \
+   a[1][0] = - (m[0][1]*m[2][2] - m[0][2]*m[2][1]);             \
+   a[1][1] = m[0][0]*m[2][2] - m[0][2]*m[2][0];                 \
+   a[1][2] = - (m[0][0]*m[2][1] - m[0][1]*m[2][0]);             \
+   a[2][0] = m[0][1]*m[1][2] - m[0][2]*m[1][1];                 \
+   a[2][1] = - (m[0][0]*m[1][2] - m[0][2]*m[1][0]);             \
+   a[2][2] = m[0][0]*m[1][1] - m[0][1]*m[1][0]);                \
+}\
+
cofactor of matrix

+Computes cofactor of matrix m, returning a +

+

+ +

+
+ + + + + + + + + + + + +
#define COFACTOR_4X4 (a,
 ) 
+
+
+ +

+Value:

{                                                               \
+   int i,j;                                                     \
+                                                                \
+   for (i=0; i<4; i++) {                                        \
+      for (j=0; j<4; j++) {                                     \
+         COFACTOR_4X4_IJ (a[i][j], m, i, j);                    \
+      }                                                         \
+   }                                                            \
+}\
+
cofactor of matrix

+Computes cofactor of matrix m, returning a +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
#define COFACTOR_4X4_IJ (fac,
m,
i,
 ) 
+
+
+ +

+Value:

{                                                               \
+   GUINT __ii[4], __jj[4], __k;                                         \
+                                                                \
+   for (__k=0; __k<i; __k++) __ii[__k] = __k;                           \
+   for (__k=i; __k<3; __k++) __ii[__k] = __k+1;                         \
+   for (__k=0; __k<j; __k++) __jj[__k] = __k;                           \
+   for (__k=j; __k<3; __k++) __jj[__k] = __k+1;                         \
+                                                                \
+   (fac) = m[__ii[0]][__jj[0]] * (m[__ii[1]][__jj[1]]*m[__ii[2]][__jj[2]]       \
+                            - m[__ii[1]][__jj[2]]*m[__ii[2]][__jj[1]]); \
+   (fac) -= m[__ii[0]][__jj[1]] * (m[__ii[1]][__jj[0]]*m[__ii[2]][__jj[2]]      \
+                             - m[__ii[1]][__jj[2]]*m[__ii[2]][__jj[0]]);\
+   (fac) += m[__ii[0]][__jj[2]] * (m[__ii[1]][__jj[0]]*m[__ii[2]][__jj[1]]      \
+                             - m[__ii[1]][__jj[1]]*m[__ii[2]][__jj[0]]);\
+                                                                \
+   __k = i+j;                                                   \
+   if ( __k != (__k/2)*2) {                                             \
+      (fac) = -(fac);                                           \
+   }                                                            \
+}\
+
i,j,th cofactor of a 4x4 matrix +
+

+ +

+
+ + + + + + + + + + + + +
#define COPY_MATRIX_2X2 (b,
 ) 
+
+
+ +

+Value:

{                               \
+   b[0][0] = a[0][0];           \
+   b[0][1] = a[0][1];           \
+                                \
+   b[1][0] = a[1][0];           \
+   b[1][1] = a[1][1];           \
+                                \
+}\
+
matrix copy +
+

+ +

+
+ + + + + + + + + + + + +
#define COPY_MATRIX_2X3 (b,
 ) 
+
+
+ +

+Value:

{                               \
+   b[0][0] = a[0][0];           \
+   b[0][1] = a[0][1];           \
+   b[0][2] = a[0][2];           \
+                                \
+   b[1][0] = a[1][0];           \
+   b[1][1] = a[1][1];           \
+   b[1][2] = a[1][2];           \
+}\
+
matrix copy +
+

+ +

+
+ + + + + + + + + + + + +
#define COPY_MATRIX_3X3 (b,
 ) 
+
+
+ +

+Value:

{                               \
+   b[0][0] = a[0][0];           \
+   b[0][1] = a[0][1];           \
+   b[0][2] = a[0][2];           \
+                                \
+   b[1][0] = a[1][0];           \
+   b[1][1] = a[1][1];           \
+   b[1][2] = a[1][2];           \
+                                \
+   b[2][0] = a[2][0];           \
+   b[2][1] = a[2][1];           \
+   b[2][2] = a[2][2];           \
+}\
+
matrix copy +
+

+ +

+
+ + + + + + + + + + + + +
#define COPY_MATRIX_4X4 (b,
 ) 
+
+
+ +

+Value:

{                               \
+   b[0][0] = a[0][0];           \
+   b[0][1] = a[0][1];           \
+   b[0][2] = a[0][2];           \
+   b[0][3] = a[0][3];           \
+                                \
+   b[1][0] = a[1][0];           \
+   b[1][1] = a[1][1];           \
+   b[1][2] = a[1][2];           \
+   b[1][3] = a[1][3];           \
+                                \
+   b[2][0] = a[2][0];           \
+   b[2][1] = a[2][1];           \
+   b[2][2] = a[2][2];           \
+   b[2][3] = a[2][3];           \
+                                \
+   b[3][0] = a[3][0];           \
+   b[3][1] = a[3][1];           \
+   b[3][2] = a[3][2];           \
+   b[3][3] = a[3][3];           \
+}\
+
matrix copy +
+

+ +

+
+ + + + + + + + + + + + +
#define DETERMINANT_2X2 (d,
 ) 
+
+
+ +

+Value:

{                                                               \
+   d = m[0][0] * m[1][1] - m[0][1] * m[1][0];                   \
+}\
+
determinant of matrix

+Computes determinant of matrix m, returning d +

+

+ +

+
+ + + + + + + + + + + + +
#define DETERMINANT_3X3 (d,
 ) 
+
+
+ +

+Value:

{                                                               \
+   d = m[0][0] * (m[1][1]*m[2][2] - m[1][2] * m[2][1]);         \
+   d -= m[0][1] * (m[1][0]*m[2][2] - m[1][2] * m[2][0]);        \
+   d += m[0][2] * (m[1][0]*m[2][1] - m[1][1] * m[2][0]);        \
+}\
+
determinant of matrix

+Computes determinant of matrix m, returning d +

+

+ +

+
+ + + + + + + + + + + + +
#define DETERMINANT_4X4 (d,
 ) 
+
+
+ +

+Value:

{                                                               \
+   GREAL cofac;                                         \
+   COFACTOR_4X4_IJ (cofac, m, 0, 0);                            \
+   d = m[0][0] * cofac;                                         \
+   COFACTOR_4X4_IJ (cofac, m, 0, 1);                            \
+   d += m[0][1] * cofac;                                        \
+   COFACTOR_4X4_IJ (cofac, m, 0, 2);                            \
+   d += m[0][2] * cofac;                                        \
+   COFACTOR_4X4_IJ (cofac, m, 0, 3);                            \
+   d += m[0][3] * cofac;                                        \
+}\
+
determinant of matrix

+Computes determinant of matrix m, returning d +

+

+ +

+
+ + + + + + + + + +
#define IDENTIFY_MATRIX_3X3 (  ) 
+
+
+ +

+Value:

{                                               \
+   m[0][0] = 1.0;                               \
+   m[0][1] = 0.0;                               \
+   m[0][2] = 0.0;                               \
+                                                \
+   m[1][0] = 0.0;                               \
+   m[1][1] = 1.0;                               \
+   m[1][2] = 0.0;                               \
+                                                \
+   m[2][0] = 0.0;                               \
+   m[2][1] = 0.0;                               \
+   m[2][2] = 1.0;                               \
+}\
+
initialize matrix +

+ +

+

+ +

+
+ + + + + + + + + +
#define IDENTIFY_MATRIX_4X4 (  ) 
+
+
+ +

+Value:

{                                               \
+   m[0][0] = 1.0;                               \
+   m[0][1] = 0.0;                               \
+   m[0][2] = 0.0;                               \
+   m[0][3] = 0.0;                               \
+                                                \
+   m[1][0] = 0.0;                               \
+   m[1][1] = 1.0;                               \
+   m[1][2] = 0.0;                               \
+   m[1][3] = 0.0;                               \
+                                                \
+   m[2][0] = 0.0;                               \
+   m[2][1] = 0.0;                               \
+   m[2][2] = 1.0;                               \
+   m[2][3] = 0.0;                               \
+                                                \
+   m[3][0] = 0.0;                               \
+   m[3][1] = 0.0;                               \
+   m[3][2] = 0.0;                               \
+   m[3][3] = 1.0;                               \
+}\
+
initialize matrix +
+

+ +

+
+ + + + + + + + + + + + + + + +
#define INV_MAT_DOT_VEC_3X3 (p,
m,
 ) 
+
+
+ +

+Value:

{                                                               \
+   p[0] = MAT_DOT_COL(m,v,0); \
+   p[1] = MAT_DOT_COL(m,v,1);   \
+   p[2] = MAT_DOT_COL(m,v,2);   \
+}\
+
Transpose matrix times vector v is a vec3f and m is a mat4f
+ +
+

+ +

+
+ + + + + + + + + + + + + + + +
#define INV_TRANSP_MAT_DOT_VEC_2X2 (p,
m,
 ) 
+
+
+ +

+Value:

{                                                               \
+   GREAL det;                                           \
+                                                                \
+   det = m[0][0]*m[1][1] - m[0][1]*m[1][0];                     \
+   p[0] = m[1][1]*v[0] - m[1][0]*v[1];                          \
+   p[1] = - m[0][1]*v[0] + m[0][0]*v[1];                        \
+                                                                \
+   /* if matrix not singular, and not orthonormal, then renormalize */ \
+   if ((det!=1.0f) && (det != 0.0f)) {                          \
+      det = 1.0f / det;                                         \
+      p[0] *= det;                                              \
+      p[1] *= det;                                              \
+   }                                                            \
+}\
+
inverse transpose of matrix times vector

+This macro computes inverse transpose of matrix m, and multiplies vector v into it, to yeild vector p

+DANGER !!! Do Not use this on normal vectors!!! It will leave normals the wrong length !!! See macro below for use on normals. +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define INVERT_2X2 (b,
det,
 ) 
+
+
+ +

+Value:

{                                               \
+   GREAL _tmp_;                                 \
+   DETERMINANT_2X2 (det, a);                    \
+   _tmp_ = 1.0 / (det);                         \
+   SCALE_ADJOINT_2X2 (b, _tmp_, a);             \
+}\
+
inverse of matrix

+Compute inverse of matrix a, returning determinant m and inverse b +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define INVERT_3X3 (b,
det,
 ) 
+
+
+ +

+Value:

{                                               \
+   GREAL _tmp_;                                 \
+   DETERMINANT_3X3 (det, a);                    \
+   _tmp_ = 1.0 / (det);                         \
+   SCALE_ADJOINT_3X3 (b, _tmp_, a);             \
+}\
+
inverse of matrix

+Compute inverse of matrix a, returning determinant m and inverse b +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define INVERT_4X4 (b,
det,
 ) 
+
+
+ +

+Value:

{                                               \
+   GREAL _tmp_;                                 \
+   DETERMINANT_4X4 (det, a);                    \
+   _tmp_ = 1.0 / (det);                         \
+   SCALE_ADJOINT_4X4 (b, _tmp_, a);             \
+}\
+
inverse of matrix

+Compute inverse of matrix a, returning determinant m and inverse b +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define MAT_DOT_COL (mat,
vec3,
colindex   )    (vec3[0]*mat[0][colindex] + vec3[1]*mat[1][colindex] + vec3[2]*mat[2][colindex])
+
+
+ +

+Returns the dot product between a vec3f and the col of a matrix. +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define MAT_DOT_COL2 (mat,
vec2,
colindex   )    (vec2[0]*mat[0][colindex] + vec2[1]*mat[1][colindex])
+
+
+ +

+Returns the dot product between a vec2f and the col of a matrix. +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define MAT_DOT_COL4 (mat,
vec4,
colindex   )    (vec4[0]*mat[0][colindex] + vec4[1]*mat[1][colindex] + vec4[2]*mat[2][colindex] + vec4[3]*mat[3][colindex])
+
+
+ +

+Returns the dot product between a vec4f and the col of a matrix. +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define MAT_DOT_ROW (mat,
vec3,
rowindex   )    (vec3[0]*mat[rowindex][0] + vec3[1]*mat[rowindex][1] + vec3[2]*mat[rowindex][2])
+
+
+ +

+Returns the dot product between a vec3f and the row of a matrix. +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define MAT_DOT_ROW2 (mat,
vec2,
rowindex   )    (vec2[0]*mat[rowindex][0] + vec2[1]*mat[rowindex][1])
+
+
+ +

+Returns the dot product between a vec2f and the row of a matrix. +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define MAT_DOT_ROW4 (mat,
vec4,
rowindex   )    (vec4[0]*mat[rowindex][0] + vec4[1]*mat[rowindex][1] + vec4[2]*mat[rowindex][2] + vec4[3]*mat[rowindex][3])
+
+
+ +

+Returns the dot product between a vec4f and the row of a matrix. +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define MAT_DOT_VEC_2X2 (p,
m,
 ) 
+
+
+ +

+Value:

{                                                               \
+   p[0] = m[0][0]*v[0] + m[0][1]*v[1];                          \
+   p[1] = m[1][0]*v[0] + m[1][1]*v[1];                          \
+}\
+
matrix times vector +
+

+ +

+
+ + + + + + + + + + + + + + + +
#define MAT_DOT_VEC_2X3 (p,
m,
 ) 
+
+
+ +

+Value:

{                                                               \
+   p[0] = m[0][0]*v[0] + m[0][1]*v[1] + m[0][2];                \
+   p[1] = m[1][0]*v[0] + m[1][1]*v[1] + m[1][2];                \
+}\
+
The matrix is assumed to be an affine matrix, with last two entries representing a translation +
+

+ +

+
+ + + + + + + + + + + + + + + +
#define MAT_DOT_VEC_3X3 (p,
m,
 ) 
+
+
+ +

+Value:

{                                                               \
+   p[0] = m[0][0]*v[0] + m[0][1]*v[1] + m[0][2]*v[2];           \
+   p[1] = m[1][0]*v[0] + m[1][1]*v[1] + m[1][2]*v[2];           \
+   p[2] = m[2][0]*v[0] + m[2][1]*v[1] + m[2][2]*v[2];           \
+}\
+
matrix times vector +
+

+ +

+
+ + + + + + + + + + + + + + + +
#define MAT_DOT_VEC_3X4 (p,
m,
 ) 
+
+
+ +

+Value:

{                                                               \
+   p[0] = m[0][0]*v[0] + m[0][1]*v[1] + m[0][2]*v[2] + m[0][3]; \
+   p[1] = m[1][0]*v[0] + m[1][1]*v[1] + m[1][2]*v[2] + m[1][3]; \
+   p[2] = m[2][0]*v[0] + m[2][1]*v[1] + m[2][2]*v[2] + m[2][3]; \
+}\
+
matrix times vector v is a vec3f and m is a mat4f
+ Last column is added as the position +
+

+ +

+
+ + + + + + + + + + + + + + + +
#define MAT_DOT_VEC_4X4 (p,
m,
 ) 
+
+
+ +

+Value:

{                                                               \
+   p[0] = m[0][0]*v[0] + m[0][1]*v[1] + m[0][2]*v[2] + m[0][3]*v[3];    \
+   p[1] = m[1][0]*v[0] + m[1][1]*v[1] + m[1][2]*v[2] + m[1][3]*v[3];    \
+   p[2] = m[2][0]*v[0] + m[2][1]*v[1] + m[2][2]*v[2] + m[2][3]*v[3];    \
+   p[3] = m[3][0]*v[0] + m[3][1]*v[1] + m[3][2]*v[2] + m[3][3]*v[3];    \
+}\
+
matrix times vector v is a vec4f +
+

+ +

+
+ + + + + + + + + + + + + + + +
#define MAT_GET_COL (mat,
vec3,
colindex   ) 
+
+
+ +

+Value:

{\
+    vec3[0] = mat[0][colindex];\
+    vec3[1] = mat[1][colindex];\
+    vec3[2] = mat[2][colindex]; \
+}\
+
Get the triple(3) col of a transform matrix. +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define MAT_GET_COL2 (mat,
vec2,
colindex   ) 
+
+
+ +

+Value:

{\
+    vec2[0] = mat[0][colindex];\
+    vec2[1] = mat[1][colindex];\
+}\
+
Get the tuple(2) col of a transform matrix. +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define MAT_GET_COL4 (mat,
vec4,
colindex   ) 
+
+
+ +

+Value:

{\
+    vec4[0] = mat[0][colindex];\
+    vec4[1] = mat[1][colindex];\
+    vec4[2] = mat[2][colindex];\
+    vec4[3] = mat[3][colindex];\
+}\
+
Get the quad (4) col of a transform matrix. +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define MAT_GET_ROW (mat,
vec3,
rowindex   ) 
+
+
+ +

+Value:

{\
+    vec3[0] = mat[rowindex][0];\
+    vec3[1] = mat[rowindex][1];\
+    vec3[2] = mat[rowindex][2]; \
+}\
+
Get the triple(3) row of a transform matrix. +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define MAT_GET_ROW2 (mat,
vec2,
rowindex   ) 
+
+
+ +

+Value:

{\
+    vec2[0] = mat[rowindex][0];\
+    vec2[1] = mat[rowindex][1];\
+}\
+
Get the tuple(2) row of a transform matrix. +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define MAT_GET_ROW4 (mat,
vec4,
rowindex   ) 
+
+
+ +

+Value:

{\
+    vec4[0] = mat[rowindex][0];\
+    vec4[1] = mat[rowindex][1];\
+    vec4[2] = mat[rowindex][2];\
+    vec4[3] = mat[rowindex][3];\
+}\
+
Get the quad (4) row of a transform matrix. +

+ +

+

+ +

+
+ + + + + + + + + + + + +
#define MAT_GET_TRANSLATION (mat,
vec3   ) 
+
+
+ +

+Value:

{\
+    vec3[0] = mat[0][3];\
+    vec3[1] = mat[1][3];\
+    vec3[2] = mat[2][3]; \
+}\
+
Get the triple(3) col of a transform matrix. +

+ +

+

+ +

+
+ + + + + + + + + + + + +
#define MAT_GET_X (mat,
vec3   ) 
+
+
+ +

+Value:

{\
+    MAT_GET_COL(mat,vec3,0);\
+}\
+
Get the triple(3) col of a transform matrix. +

+ +

+

+ +

+
+ + + + + + + + + + + + +
#define MAT_GET_Y (mat,
vec3   ) 
+
+
+ +

+Value:

{\
+    MAT_GET_COL(mat,vec3,1);\
+}\
+
Get the triple(3) col of a transform matrix. +

+ +

+

+ +

+
+ + + + + + + + + + + + +
#define MAT_GET_Z (mat,
vec3   ) 
+
+
+ +

+Value:

{\
+    MAT_GET_COL(mat,vec3,2);\
+}\
+
Get the triple(3) col of a transform matrix. +

+ +

+

+ +

+
+ + + + + + + + + + + + +
#define MAT_SET_TRANSLATION (mat,
vec3   ) 
+
+
+ +

+Value:

{\
+    mat[0][3] = vec3[0];\
+    mat[1][3] = vec3[1];\
+    mat[2][3] = vec3[2]; \
+}\
+
Set the triple(3) col of a transform matrix. +

+ +

+

+ +

+
+ + + + + + + + + + + + +
#define MAT_SET_X (mat,
vec3   ) 
+
+
+ +

+Value:

{\
+    mat[0][0] = vec3[0];\
+    mat[1][0] = vec3[1];\
+    mat[2][0] = vec3[2];\
+}\
+
Get the triple(3) col of a transform matrix. +

+ +

+

+ +

+
+ + + + + + + + + + + + +
#define MAT_SET_Y (mat,
vec3   ) 
+
+
+ +

+Value:

{\
+    mat[0][1] = vec3[0];\
+    mat[1][1] = vec3[1];\
+    mat[2][1] = vec3[2];\
+}\
+
Get the triple(3) col of a transform matrix. +

+ +

+

+ +

+
+ + + + + + + + + + + + +
#define MAT_SET_Z (mat,
vec3   ) 
+
+
+ +

+Value:

{\
+    mat[0][2] = vec3[0];\
+    mat[1][2] = vec3[1];\
+    mat[2][2] = vec3[2];\
+}\
+
Get the triple(3) col of a transform matrix. +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define MAT_TRANSFORM_PLANE_4X4 (pout,
m,
plane   ) 
+
+
+ +

+Value:

{                                                               \
+   pout[0] = m[0][0]*plane[0] + m[0][1]*plane[1]  + m[0][2]*plane[2];\
+   pout[1] = m[1][0]*plane[0] + m[1][1]*plane[1]  + m[1][2]*plane[2];\
+   pout[2] = m[2][0]*plane[0] + m[2][1]*plane[1]  + m[2][2]*plane[2];\
+   pout[3] = m[0][3]*pout[0] + m[1][3]*pout[1]  + m[2][3]*pout[2] + plane[3];\
+}\
+
Transform a plane. +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define MATRIX_PRODUCT_2X2 (c,
a,
 ) 
+
+
+ +

+Value:

{                                               \
+   c[0][0] = a[0][0]*b[0][0]+a[0][1]*b[1][0];   \
+   c[0][1] = a[0][0]*b[0][1]+a[0][1]*b[1][1];   \
+                                                \
+   c[1][0] = a[1][0]*b[0][0]+a[1][1]*b[1][0];   \
+   c[1][1] = a[1][0]*b[0][1]+a[1][1]*b[1][1];   \
+                                                \
+}\
+
c[x][y] = a[x][0]*b[0][y]+a[x][1]*b[1][y]+a[x][2]*b[2][y]+a[x][3]*b[3][y]; +
+

+ +

+
+ + + + + + + + + + + + + + + +
#define MATRIX_PRODUCT_3X3 (c,
a,
 ) 
+
+
+ +

+Value:

{                                                               \
+   c[0][0] = a[0][0]*b[0][0]+a[0][1]*b[1][0]+a[0][2]*b[2][0];   \
+   c[0][1] = a[0][0]*b[0][1]+a[0][1]*b[1][1]+a[0][2]*b[2][1];   \
+   c[0][2] = a[0][0]*b[0][2]+a[0][1]*b[1][2]+a[0][2]*b[2][2];   \
+                                                                \
+   c[1][0] = a[1][0]*b[0][0]+a[1][1]*b[1][0]+a[1][2]*b[2][0];   \
+   c[1][1] = a[1][0]*b[0][1]+a[1][1]*b[1][1]+a[1][2]*b[2][1];   \
+   c[1][2] = a[1][0]*b[0][2]+a[1][1]*b[1][2]+a[1][2]*b[2][2];   \
+                                                                \
+   c[2][0] = a[2][0]*b[0][0]+a[2][1]*b[1][0]+a[2][2]*b[2][0];   \
+   c[2][1] = a[2][0]*b[0][1]+a[2][1]*b[1][1]+a[2][2]*b[2][1];   \
+   c[2][2] = a[2][0]*b[0][2]+a[2][1]*b[1][2]+a[2][2]*b[2][2];   \
+}\
+
c[x][y] = a[x][0]*b[0][y]+a[x][1]*b[1][y]+a[x][2]*b[2][y]+a[x][3]*b[3][y]; +
+

+ +

+
+ + + + + + + + + + + + + + + +
#define MATRIX_PRODUCT_4X4 (c,
a,
 ) 
+
+
+ +

+Value:

{                                               \
+   c[0][0] = a[0][0]*b[0][0]+a[0][1]*b[1][0]+a[0][2]*b[2][0]+a[0][3]*b[3][0];\
+   c[0][1] = a[0][0]*b[0][1]+a[0][1]*b[1][1]+a[0][2]*b[2][1]+a[0][3]*b[3][1];\
+   c[0][2] = a[0][0]*b[0][2]+a[0][1]*b[1][2]+a[0][2]*b[2][2]+a[0][3]*b[3][2];\
+   c[0][3] = a[0][0]*b[0][3]+a[0][1]*b[1][3]+a[0][2]*b[2][3]+a[0][3]*b[3][3];\
+                                                \
+   c[1][0] = a[1][0]*b[0][0]+a[1][1]*b[1][0]+a[1][2]*b[2][0]+a[1][3]*b[3][0];\
+   c[1][1] = a[1][0]*b[0][1]+a[1][1]*b[1][1]+a[1][2]*b[2][1]+a[1][3]*b[3][1];\
+   c[1][2] = a[1][0]*b[0][2]+a[1][1]*b[1][2]+a[1][2]*b[2][2]+a[1][3]*b[3][2];\
+   c[1][3] = a[1][0]*b[0][3]+a[1][1]*b[1][3]+a[1][2]*b[2][3]+a[1][3]*b[3][3];\
+                                                \
+   c[2][0] = a[2][0]*b[0][0]+a[2][1]*b[1][0]+a[2][2]*b[2][0]+a[2][3]*b[3][0];\
+   c[2][1] = a[2][0]*b[0][1]+a[2][1]*b[1][1]+a[2][2]*b[2][1]+a[2][3]*b[3][1];\
+   c[2][2] = a[2][0]*b[0][2]+a[2][1]*b[1][2]+a[2][2]*b[2][2]+a[2][3]*b[3][2];\
+   c[2][3] = a[2][0]*b[0][3]+a[2][1]*b[1][3]+a[2][2]*b[2][3]+a[2][3]*b[3][3];\
+                                                \
+   c[3][0] = a[3][0]*b[0][0]+a[3][1]*b[1][0]+a[3][2]*b[2][0]+a[3][3]*b[3][0];\
+   c[3][1] = a[3][0]*b[0][1]+a[3][1]*b[1][1]+a[3][2]*b[2][1]+a[3][3]*b[3][1];\
+   c[3][2] = a[3][0]*b[0][2]+a[3][1]*b[1][2]+a[3][2]*b[2][2]+a[3][3]*b[3][2];\
+   c[3][3] = a[3][0]*b[0][3]+a[3][1]*b[1][3]+a[3][2]*b[2][3]+a[3][3]*b[3][3];\
+}\
+
c[x][y] = a[x][0]*b[0][y]+a[x][1]*b[1][y]+a[x][2]*b[2][y]+a[x][3]*b[3][y]; +
+

+ +

+
+ + + + + + + + + + + + + + + +
#define NORM_XFORM_2X2 (p,
m,
 ) 
+
+
+ +

+Value:

{                                                               \
+   GREAL len;                                                   \
+                                                                \
+   /* do nothing if off-diagonals are zero and diagonals are    \
+    * equal */                                                  \
+   if ((m[0][1] != 0.0) || (m[1][0] != 0.0) || (m[0][0] != m[1][1])) { \
+      p[0] = m[1][1]*v[0] - m[1][0]*v[1];                       \
+      p[1] = - m[0][1]*v[0] + m[0][0]*v[1];                     \
+                                                                \
+      len = p[0]*p[0] + p[1]*p[1];                              \
+      GIM_INV_SQRT(len,len);                                    \
+      p[0] *= len;                                              \
+      p[1] *= len;                                              \
+   } else {                                                     \
+      VEC_COPY_2 (p, v);                                        \
+   }                                                            \
+}\
+
transform normal vector by inverse transpose of matrix and then renormalize the vector

+This macro computes inverse transpose of matrix m, and multiplies vector v into it, to yeild vector p Vector p is then normalized. +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define OUTER_PRODUCT_2X2 (m,
v,
 ) 
+
+
+ +

+Value:

{                                                               \
+   m[0][0] = v[0] * t[0];                                       \
+   m[0][1] = v[0] * t[1];                                       \
+                                                                \
+   m[1][0] = v[1] * t[0];                                       \
+   m[1][1] = v[1] * t[1];                                       \
+}\
+
outer product of vector times vector transpose

+The outer product of vector v and vector transpose t yeilds dyadic matrix m. +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define OUTER_PRODUCT_3X3 (m,
v,
 ) 
+
+
+ +

+Value:

{                                                               \
+   m[0][0] = v[0] * t[0];                                       \
+   m[0][1] = v[0] * t[1];                                       \
+   m[0][2] = v[0] * t[2];                                       \
+                                                                \
+   m[1][0] = v[1] * t[0];                                       \
+   m[1][1] = v[1] * t[1];                                       \
+   m[1][2] = v[1] * t[2];                                       \
+                                                                \
+   m[2][0] = v[2] * t[0];                                       \
+   m[2][1] = v[2] * t[1];                                       \
+   m[2][2] = v[2] * t[2];                                       \
+}\
+
outer product of vector times vector transpose

+The outer product of vector v and vector transpose t yeilds dyadic matrix m. +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define OUTER_PRODUCT_4X4 (m,
v,
 ) 
+
+
+ +

+Value:

{                                                               \
+   m[0][0] = v[0] * t[0];                                       \
+   m[0][1] = v[0] * t[1];                                       \
+   m[0][2] = v[0] * t[2];                                       \
+   m[0][3] = v[0] * t[3];                                       \
+                                                                \
+   m[1][0] = v[1] * t[0];                                       \
+   m[1][1] = v[1] * t[1];                                       \
+   m[1][2] = v[1] * t[2];                                       \
+   m[1][3] = v[1] * t[3];                                       \
+                                                                \
+   m[2][0] = v[2] * t[0];                                       \
+   m[2][1] = v[2] * t[1];                                       \
+   m[2][2] = v[2] * t[2];                                       \
+   m[2][3] = v[2] * t[3];                                       \
+                                                                \
+   m[3][0] = v[3] * t[0];                                       \
+   m[3][1] = v[3] * t[1];                                       \
+   m[3][2] = v[3] * t[2];                                       \
+   m[3][3] = v[3] * t[3];                                       \
+}\
+
outer product of vector times vector transpose

+The outer product of vector v and vector transpose t yeilds dyadic matrix m. +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define ROTX_CS (m,
cosine,
sine   ) 
+
+
+ +

+Value:

{                                       \
+   /* rotation about the x-axis */      \
+                                        \
+   m[0][0] = 1.0;                       \
+   m[0][1] = 0.0;                       \
+   m[0][2] = 0.0;                       \
+   m[0][3] = 0.0;                       \
+                                        \
+   m[1][0] = 0.0;                       \
+   m[1][1] = (cosine);                  \
+   m[1][2] = (sine);                    \
+   m[1][3] = 0.0;                       \
+                                        \
+   m[2][0] = 0.0;                       \
+   m[2][1] = -(sine);                   \
+   m[2][2] = (cosine);                  \
+   m[2][3] = 0.0;                       \
+                                        \
+   m[3][0] = 0.0;                       \
+   m[3][1] = 0.0;                       \
+   m[3][2] = 0.0;                       \
+   m[3][3] = 1.0;                       \
+}\
+
matrix rotation X +
+

+ +

+
+ + + + + + + + + + + + + + + +
#define ROTY_CS (m,
cosine,
sine   ) 
+
+
+ +

+Value:

{                                       \
+   /* rotation about the y-axis */      \
+                                        \
+   m[0][0] = (cosine);                  \
+   m[0][1] = 0.0;                       \
+   m[0][2] = -(sine);                   \
+   m[0][3] = 0.0;                       \
+                                        \
+   m[1][0] = 0.0;                       \
+   m[1][1] = 1.0;                       \
+   m[1][2] = 0.0;                       \
+   m[1][3] = 0.0;                       \
+                                        \
+   m[2][0] = (sine);                    \
+   m[2][1] = 0.0;                       \
+   m[2][2] = (cosine);                  \
+   m[2][3] = 0.0;                       \
+                                        \
+   m[3][0] = 0.0;                       \
+   m[3][1] = 0.0;                       \
+   m[3][2] = 0.0;                       \
+   m[3][3] = 1.0;                       \
+}\
+
matrix rotation Y +
+

+ +

+
+ + + + + + + + + + + + + + + +
#define ROTZ_CS (m,
cosine,
sine   ) 
+
+
+ +

+Value:

{                                       \
+   /* rotation about the z-axis */      \
+                                        \
+   m[0][0] = (cosine);                  \
+   m[0][1] = (sine);                    \
+   m[0][2] = 0.0;                       \
+   m[0][3] = 0.0;                       \
+                                        \
+   m[1][0] = -(sine);                   \
+   m[1][1] = (cosine);                  \
+   m[1][2] = 0.0;                       \
+   m[1][3] = 0.0;                       \
+                                        \
+   m[2][0] = 0.0;                       \
+   m[2][1] = 0.0;                       \
+   m[2][2] = 1.0;                       \
+   m[2][3] = 0.0;                       \
+                                        \
+   m[3][0] = 0.0;                       \
+   m[3][1] = 0.0;                       \
+   m[3][2] = 0.0;                       \
+   m[3][3] = 1.0;                       \
+}\
+
matrix rotation Z +
+

+ +

+
+ + + + + + + + + + + + + + + +
#define SCALE_ADJOINT_2X2 (a,
s,
 ) 
+
+
+ +

+Value:

{                                                               \
+   a[0][0] = (s) * m[1][1];                                     \
+   a[1][0] = - (s) * m[1][0];                                   \
+   a[0][1] = - (s) * m[0][1];                                   \
+   a[1][1] = (s) * m[0][0];                                     \
+}\
+
compute adjoint of matrix and scale

+Computes adjoint of matrix m, scales it by s, returning a +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define SCALE_ADJOINT_3X3 (a,
s,
 ) 
+
+
+ +

+Value:

{                                                               \
+   a[0][0] = (s) * (m[1][1] * m[2][2] - m[1][2] * m[2][1]);     \
+   a[1][0] = (s) * (m[1][2] * m[2][0] - m[1][0] * m[2][2]);     \
+   a[2][0] = (s) * (m[1][0] * m[2][1] - m[1][1] * m[2][0]);     \
+                                                                \
+   a[0][1] = (s) * (m[0][2] * m[2][1] - m[0][1] * m[2][2]);     \
+   a[1][1] = (s) * (m[0][0] * m[2][2] - m[0][2] * m[2][0]);     \
+   a[2][1] = (s) * (m[0][1] * m[2][0] - m[0][0] * m[2][1]);     \
+                                                                \
+   a[0][2] = (s) * (m[0][1] * m[1][2] - m[0][2] * m[1][1]);     \
+   a[1][2] = (s) * (m[0][2] * m[1][0] - m[0][0] * m[1][2]);     \
+   a[2][2] = (s) * (m[0][0] * m[1][1] - m[0][1] * m[1][0]);     \
+}\
+
compute adjoint of matrix and scale

+Computes adjoint of matrix m, scales it by s, returning a +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define SCALE_ADJOINT_4X4 (a,
s,
 ) 
+
+
+ +

+Value:

{                                                               \
+   char _i_,_j_; \
+   for (_i_=0; _i_<4; _i_++) {                                  \
+      for (_j_=0; _j_<4; _j_++) {                                       \
+         COFACTOR_4X4_IJ (a[_j_][_i_], m, _i_, _j_);                    \
+         a[_j_][_i_] *= s;                                              \
+      }                                                         \
+   }                                                            \
+}\
+
compute adjoint of matrix and scale

+Computes adjoint of matrix m, scales it by s, returning a +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define SCALE_MATRIX_2X2 (b,
s,
 ) 
+
+
+ +

+Value:

{                                       \
+   b[0][0] = (s) * a[0][0];             \
+   b[0][1] = (s) * a[0][1];             \
+                                        \
+   b[1][0] = (s) * a[1][0];             \
+   b[1][1] = (s) * a[1][1];             \
+}\
+
multiply matrix by scalar +
+

+ +

+
+ + + + + + + + + + + + + + + +
#define SCALE_MATRIX_3X3 (b,
s,
 ) 
+
+
+ +

+Value:

{                                       \
+   b[0][0] = (s) * a[0][0];             \
+   b[0][1] = (s) * a[0][1];             \
+   b[0][2] = (s) * a[0][2];             \
+                                        \
+   b[1][0] = (s) * a[1][0];             \
+   b[1][1] = (s) * a[1][1];             \
+   b[1][2] = (s) * a[1][2];             \
+                                        \
+   b[2][0] = (s) * a[2][0];             \
+   b[2][1] = (s) * a[2][1];             \
+   b[2][2] = (s) * a[2][2];             \
+}\
+
multiply matrix by scalar +
+

+ +

+
+ + + + + + + + + + + + + + + +
#define SCALE_MATRIX_4X4 (b,
s,
 ) 
+
+
+ +

+Value:

{                                       \
+   b[0][0] = (s) * a[0][0];             \
+   b[0][1] = (s) * a[0][1];             \
+   b[0][2] = (s) * a[0][2];             \
+   b[0][3] = (s) * a[0][3];             \
+                                        \
+   b[1][0] = (s) * a[1][0];             \
+   b[1][1] = (s) * a[1][1];             \
+   b[1][2] = (s) * a[1][2];             \
+   b[1][3] = (s) * a[1][3];             \
+                                        \
+   b[2][0] = (s) * a[2][0];             \
+   b[2][1] = (s) * a[2][1];             \
+   b[2][2] = (s) * a[2][2];             \
+   b[2][3] = (s) * a[2][3];             \
+                                        \
+   b[3][0] = s * a[3][0];               \
+   b[3][1] = s * a[3][1];               \
+   b[3][2] = s * a[3][2];               \
+   b[3][3] = s * a[3][3];               \
+}\
+
multiply matrix by scalar +
+

+ +

+
+ + + + + + + + + + + + + + + +
#define SCALE_VEC_MATRIX_2X2 (b,
svec,
 ) 
+
+
+ +

+Value:

{                                       \
+   b[0][0] = svec[0] * a[0][0];         \
+   b[1][0] = svec[0] * a[1][0];         \
+                                        \
+   b[0][1] = svec[1] * a[0][1];         \
+   b[1][1] = svec[1] * a[1][1];         \
+}\
+
multiply matrix by scalar +
+

+ +

+
+ + + + + + + + + + + + + + + +
#define SCALE_VEC_MATRIX_3X3 (b,
svec,
 ) 
+
+
+ +

+Value:

{                                       \
+   b[0][0] = svec[0] * a[0][0];         \
+   b[1][0] = svec[0] * a[1][0];         \
+   b[2][0] = svec[0] * a[2][0];         \
+                                        \
+   b[0][1] = svec[1] * a[0][1];         \
+   b[1][1] = svec[1] * a[1][1];         \
+   b[2][1] = svec[1] * a[2][1];         \
+                                        \
+   b[0][2] = svec[2] * a[0][2];         \
+   b[1][2] = svec[2] * a[1][2];         \
+   b[2][2] = svec[2] * a[2][2];         \
+}\
+
multiply matrix by scalar. Each columns is scaled by each scalar vector component +
+

+ +

+
+ + + + + + + + + + + + + + + +
#define SCALE_VEC_MATRIX_4X4 (b,
svec,
 ) 
+
+
+ +

+Value:

{                                       \
+   b[0][0] = svec[0] * a[0][0];         \
+   b[1][0] = svec[0] * a[1][0];         \
+   b[2][0] = svec[0] * a[2][0];         \
+   b[3][0] = svec[0] * a[3][0];         \
+                                        \
+   b[0][1] = svec[1] * a[0][1];         \
+   b[1][1] = svec[1] * a[1][1];         \
+   b[2][1] = svec[1] * a[2][1];         \
+   b[3][1] = svec[1] * a[3][1];         \
+                                        \
+   b[0][2] = svec[2] * a[0][2];         \
+   b[1][2] = svec[2] * a[1][2];         \
+   b[2][2] = svec[2] * a[2][2];         \
+   b[3][2] = svec[2] * a[3][2];         \
+   \
+   b[0][3] = svec[3] * a[0][3];         \
+   b[1][3] = svec[3] * a[1][3];         \
+   b[2][3] = svec[3] * a[2][3];         \
+   b[3][3] = svec[3] * a[3][3];         \
+}\
+
multiply matrix by scalar +
+

+ +

+
+ + + + + + + + + + + + +
#define TRANSPOSE_MATRIX_2X2 (b,
 ) 
+
+
+ +

+Value:

{                               \
+   b[0][0] = a[0][0];           \
+   b[0][1] = a[1][0];           \
+                                \
+   b[1][0] = a[0][1];           \
+   b[1][1] = a[1][1];           \
+}\
+
matrix transpose +
+

+ +

+
+ + + + + + + + + + + + +
#define TRANSPOSE_MATRIX_3X3 (b,
 ) 
+
+
+ +

+Value:

{                               \
+   b[0][0] = a[0][0];           \
+   b[0][1] = a[1][0];           \
+   b[0][2] = a[2][0];           \
+                                \
+   b[1][0] = a[0][1];           \
+   b[1][1] = a[1][1];           \
+   b[1][2] = a[2][1];           \
+                                \
+   b[2][0] = a[0][2];           \
+   b[2][1] = a[1][2];           \
+   b[2][2] = a[2][2];           \
+}\
+
matrix transpose +
+

+ +

+
+ + + + + + + + + + + + +
#define TRANSPOSE_MATRIX_4X4 (b,
 ) 
+
+
+ +

+Value:

{                               \
+   b[0][0] = a[0][0];           \
+   b[0][1] = a[1][0];           \
+   b[0][2] = a[2][0];           \
+   b[0][3] = a[3][0];           \
+                                \
+   b[1][0] = a[0][1];           \
+   b[1][1] = a[1][1];           \
+   b[1][2] = a[2][1];           \
+   b[1][3] = a[3][1];           \
+                                \
+   b[2][0] = a[0][2];           \
+   b[2][1] = a[1][2];           \
+   b[2][2] = a[2][2];           \
+   b[2][3] = a[3][2];           \
+                                \
+   b[3][0] = a[0][3];           \
+   b[3][1] = a[1][3];           \
+   b[3][2] = a[2][3];           \
+   b[3][3] = a[3][3];           \
+}\
+
matrix transpose +
+

+ +

+
+ + + + + + + + + + + + + + + +
#define VEC_DOT_MAT_3X3 (p,
v,
 ) 
+
+
+ +

+Value:

{                                                               \
+   p[0] = v[0]*m[0][0] + v[1]*m[1][0] + v[2]*m[2][0];           \
+   p[1] = v[0]*m[0][1] + v[1]*m[1][1] + v[2]*m[2][1];           \
+   p[2] = v[0]*m[0][2] + v[1]*m[1][2] + v[2]*m[2][2];           \
+}\
+
p[j] = v[0]*m[0][j] + v[1]*m[1][j] + v[2]*m[2][j]; +
+

+ +

+
+ + + + + + + + + +
#define ZERO_MATRIX_4X4 (  ) 
+
+
+ +

+Value:

{                                               \
+   m[0][0] = 0.0;                               \
+   m[0][1] = 0.0;                               \
+   m[0][2] = 0.0;                               \
+   m[0][3] = 0.0;                               \
+                                                \
+   m[1][0] = 0.0;                               \
+   m[1][1] = 0.0;                               \
+   m[1][2] = 0.0;                               \
+   m[1][3] = 0.0;                               \
+                                                \
+   m[2][0] = 0.0;                               \
+   m[2][1] = 0.0;                               \
+   m[2][2] = 0.0;                               \
+   m[2][3] = 0.0;                               \
+                                                \
+   m[3][0] = 0.0;                               \
+   m[3][1] = 0.0;                               \
+   m[3][2] = 0.0;                               \
+   m[3][3] = 0.0;                               \
+}\
+
initialize matrix +
+

+


Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/group___m_e_m_o_r_y___f_u_n_c_t_i_o_n___g_e_t___h_a_n_d_l_e_r_s.html b/Extras/GIMPACT/docs/html/group___m_e_m_o_r_y___f_u_n_c_t_i_o_n___g_e_t___h_a_n_d_l_e_r_s.html new file mode 100755 index 000000000..72d2662d7 --- /dev/null +++ b/Extras/GIMPACT/docs/html/group___m_e_m_o_r_y___f_u_n_c_t_i_o_n___g_e_t___h_a_n_d_l_e_r_s.html @@ -0,0 +1,117 @@ + + +GIMPACT: MEMORY_FUNCTION_GET_HANDLERS + + + + + +

MEMORY_FUNCTION_GET_HANDLERS

get current memory management functions. +More... + + + + + + + + + + +

Functions

gim_alloc_functiongim_get_alloc_handler (void)
gim_alloca_functiongim_get_alloca_handler (void)
gim_realloc_functiongim_get_realloc_handler (void)
gim_free_functiongim_get_free_handler (void)
+

Detailed Description

+get current memory management functions. +

+


Function Documentation

+ +
+
+ + + + + + + + + +
gim_alloc_function* gim_get_alloc_handler (void   ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
gim_alloca_function* gim_get_alloca_handler (void   ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
gim_free_function* gim_get_free_handler (void   ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
gim_realloc_function* gim_get_realloc_handler (void   ) 
+
+
+ +

+ +

+

+


Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/group___m_e_m_o_r_y___f_u_n_c_t_i_o_n___h_a_n_d_l_e_r_s.html b/Extras/GIMPACT/docs/html/group___m_e_m_o_r_y___f_u_n_c_t_i_o_n___h_a_n_d_l_e_r_s.html new file mode 100755 index 000000000..29050b890 --- /dev/null +++ b/Extras/GIMPACT/docs/html/group___m_e_m_o_r_y___f_u_n_c_t_i_o_n___h_a_n_d_l_e_r_s.html @@ -0,0 +1,117 @@ + + +GIMPACT: MEMORY_FUNCTION_HANDLERS + + + + + +

MEMORY_FUNCTION_HANDLERS

Memory Function Handlers set new memory management functions. if fn is 0, the default handlers are used. +More... + + + + + + + + + + +

Functions

void gim_set_alloc_handler (gim_alloc_function *fn)
void gim_set_alloca_handler (gim_alloca_function *fn)
void gim_set_realloc_handler (gim_realloc_function *fn)
void gim_set_free_handler (gim_free_function *fn)
+

Detailed Description

+Memory Function Handlers set new memory management functions. if fn is 0, the default handlers are used. +

+


Function Documentation

+ +
+
+ + + + + + + + + +
void gim_set_alloc_handler (gim_alloc_function fn  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
void gim_set_alloca_handler (gim_alloca_function fn  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
void gim_set_free_handler (gim_free_function fn  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
void gim_set_realloc_handler (gim_realloc_function fn  ) 
+
+
+ +

+ +

+

+


Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/group___m_e_m_o_r_y___f_u_n_c_t_i_o_n___p_r_o_t_o_t_y_p_e_s.html b/Extras/GIMPACT/docs/html/group___m_e_m_o_r_y___f_u_n_c_t_i_o_n___p_r_o_t_o_t_y_p_e_s.html new file mode 100755 index 000000000..917496221 --- /dev/null +++ b/Extras/GIMPACT/docs/html/group___m_e_m_o_r_y___f_u_n_c_t_i_o_n___p_r_o_t_o_t_y_p_e_s.html @@ -0,0 +1,94 @@ + + +GIMPACT: MEMORY_FUNCTION_PROTOTYPES + + + + + +

MEMORY_FUNCTION_PROTOTYPES

+ + + + + + + + + + +

Typedefs

typedef void * gim_alloc_function (size_t size)
typedef void * gim_alloca_function (size_t size)
typedef void * gim_realloc_function (void *ptr, size_t oldsize, size_t newsize)
typedef void gim_free_function (void *ptr)
+

Detailed Description

+Function prototypes to allocate and free memory.

Typedef Documentation

+ +
+
+ + + + +
typedef void* gim_alloc_function(size_t size)
+
+
+ +

+ +

+

+ +

+
+ + + + +
typedef void* gim_alloca_function(size_t size)
+
+
+ +

+ +

+

+ +

+
+ + + + +
typedef void gim_free_function(void *ptr)
+
+
+ +

+ +

+

+ +

+
+ + + + +
typedef void* gim_realloc_function(void *ptr, size_t oldsize, size_t newsize)
+
+
+ +

+ +

+

+


Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/group___m_e_m_o_r_y___f_u_n_c_t_i_o_n_s.html b/Extras/GIMPACT/docs/html/group___m_e_m_o_r_y___f_u_n_c_t_i_o_n_s.html new file mode 100755 index 000000000..3b33b30e0 --- /dev/null +++ b/Extras/GIMPACT/docs/html/group___m_e_m_o_r_y___f_u_n_c_t_i_o_n_s.html @@ -0,0 +1,129 @@ + + +GIMPACT: MEMORY_FUNCTIONS + + + + + +

MEMORY_FUNCTIONS

+ + + + + + + + + + +

Functions

void * gim_alloc (size_t size)
void * gim_alloca (size_t size)
void * gim_realloc (void *ptr, size_t oldsize, size_t newsize)
void gim_free (void *ptr)
+

Detailed Description

+Standar Memory functions

Function Documentation

+ +
+
+ + + + + + + + + +
void* gim_alloc (size_t  size  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
void* gim_alloca (size_t  size  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
void gim_free (void *  ptr  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void* gim_realloc (void *  ptr,
size_t  oldsize,
size_t  newsize 
)
+
+
+ +

+ +

+

+


Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/group___p_r_e_f_e_t_c_h.html b/Extras/GIMPACT/docs/html/group___p_r_e_f_e_t_c_h.html new file mode 100755 index 000000000..860258879 --- /dev/null +++ b/Extras/GIMPACT/docs/html/group___p_r_e_f_e_t_c_h.html @@ -0,0 +1,81 @@ + + +GIMPACT: PREFETCH + + + + + +

PREFETCH

+ + + + + + + + +

Defines

#define pf(_x, _i)
 Prefetch 64.
#define pf2(_x, _i)
 Prefetch 128.
+

Define Documentation

+ +
+
+ + + + + + + + + + + + +
#define pf (_x,
_i   ) 
+
+
+ +

+Prefetch 64. +

+ +

+

+ +

+
+ + + + + + + + + + + + +
#define pf2 (_x,
_i   ) 
+
+
+ +

+Prefetch 128. +

+ +

+

+


Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/group___s_c_a_l_a_r___t_y_p_e_s.html b/Extras/GIMPACT/docs/html/group___s_c_a_l_a_r___t_y_p_e_s.html new file mode 100755 index 000000000..df5aa87ed --- /dev/null +++ b/Extras/GIMPACT/docs/html/group___s_c_a_l_a_r___t_y_p_e_s.html @@ -0,0 +1,77 @@ + + +GIMPACT: SCALAR_TYPES + + + + + +

SCALAR_TYPES

Precision type constants. +More... + + + + +

Enumerations

enum  GIM_SCALAR_TYPES {
+  G_STYPE_REAL = 0, +G_STYPE_REAL2, +G_STYPE_SHORT, +G_STYPE_USHORT, +
+  G_STYPE_INT, +G_STYPE_UINT, +G_STYPE_INT64, +G_STYPE_UINT64 +
+ }
+

Detailed Description

+Precision type constants. +

+


Enumeration Type Documentation

+ +
+
+ + + + +
enum GIM_SCALAR_TYPES
+
+
+ +

+

Enumerator:
+ + + + + + + + + +
G_STYPE_REAL  +
G_STYPE_REAL2  +
G_STYPE_SHORT  +
G_STYPE_USHORT  +
G_STYPE_INT  +
G_STYPE_UINT  +
G_STYPE_INT64  +
G_STYPE_UINT64  +
+
+ +
+

+


Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/group___s_o_r_t_e_d___a_r_r_a_y___s_t_r_u_c_t_u_r_e_s.html b/Extras/GIMPACT/docs/html/group___s_o_r_t_e_d___a_r_r_a_y___s_t_r_u_c_t_u_r_e_s.html new file mode 100755 index 000000000..75892fd6a --- /dev/null +++ b/Extras/GIMPACT/docs/html/group___s_o_r_t_e_d___a_r_r_a_y___s_t_r_u_c_t_u_r_e_s.html @@ -0,0 +1,227 @@ + + +GIMPACT: SORTED_ARRAY_STRUCTURES + + + + + +

SORTED_ARRAY_STRUCTURES

Sorted array data management. The hash table has the indices to the corresponding m_nodes array. +More... + + + + + + + + + + + + + + + + + + +

Functions

bool gim_hash_table::_erase_sorted (GUINT index)
bool gim_hash_table::_erase_unsorted (GUINT index)
 faster, but unsorted
void gim_hash_table::_insert_in_pos (GUINT hashkey, const T &value, GUINT pos)
 Insert in position ordered.
GUINT gim_hash_table::_insert_sorted (GUINT hashkey, const T &value)
 Insert an element in an ordered array.
GUINT gim_hash_table::_insert_sorted_replace (GUINT hashkey, const T &value)
GUINT gim_hash_table::_insert_unsorted (GUINT hashkey, const T &value)
 Fast insertion in m_nodes array.
+

Detailed Description

+Sorted array data management. The hash table has the indices to the corresponding m_nodes array. +

+


Function Documentation

+ +
+
+
+template<class T>
+ + + + + + + + + +
bool gim_hash_table< T >::_erase_sorted (GUINT  index  )  [inline, protected, inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<class T>
+ + + + + + + + + +
bool gim_hash_table< T >::_erase_unsorted (GUINT  index  )  [inline, protected, inherited]
+
+
+ +

+faster, but unsorted +

+ +

+

+ +

+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + + + + + + + +
void gim_hash_table< T >::_insert_in_pos (GUINT  hashkey,
const T &  value,
GUINT  pos 
) [inline, protected, inherited]
+
+
+ +

+Insert in position ordered. +

+Also checks if it is needed to transform this container to a hash table, by calling check_for_switching_to_hashtable +

+

+ +

+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
GUINT gim_hash_table< T >::_insert_sorted (GUINT  hashkey,
const T &  value 
) [inline, protected, inherited]
+
+
+ +

+Insert an element in an ordered array. +

+ +

+

+ +

+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
GUINT gim_hash_table< T >::_insert_sorted_replace (GUINT  hashkey,
const T &  value 
) [inline, protected, inherited]
+
+
+ +

+ +

+

+ +

+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
GUINT gim_hash_table< T >::_insert_unsorted (GUINT  hashkey,
const T &  value 
) [inline, protected, inherited]
+
+
+ +

+Fast insertion in m_nodes array. +

+ +

+

+


Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/group___s_o_r_t_i_n_g.html b/Extras/GIMPACT/docs/html/group___s_o_r_t_i_n_g.html new file mode 100755 index 000000000..0718a4006 --- /dev/null +++ b/Extras/GIMPACT/docs/html/group___s_o_r_t_i_n_g.html @@ -0,0 +1,501 @@ + + +GIMPACT: SORTING + + + + + +

SORTING

Macros for sorting. +More... + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Classes

struct  GIM_RSORT_TOKEN
class  GIM_RSORT_TOKEN_COMPARATOR
 Prototype for comparators. More...

Defines

#define kHist   2048
#define D11_0(x)   (x & 0x7FF)
#define D11_1(x)   (x >> 11 & 0x7FF)
#define D11_2(x)   (x >> 22 )

Functions

void gim_radix_sort_rtokens (GIM_RSORT_TOKEN *array, GIM_RSORT_TOKEN *sorted, GUINT element_count)
 Radix sort for unsigned integer keys.
template<typename T, class GETKEY_CLASS>
void gim_radix_sort_array_tokens (T *array, GIM_RSORT_TOKEN *sorted_tokens, GUINT element_count, GETKEY_CLASS uintkey_macro)
 Get the sorted tokens from an array. For generic use. Tokens are IRR_RSORT_TOKEN.
template<typename T, class GETKEY_CLASS, class COPY_CLASS>
void gim_radix_sort (T *array, GUINT element_count, GETKEY_CLASS get_uintkey_macro, COPY_CLASS copy_elements_macro)
 Sorts array in place. For generic use.
template<class T, typename KEYCLASS, typename COMP_CLASS>
bool gim_binary_search_ex (const T *_array, GUINT _start_i, GUINT _end_i, GUINT &_result_index, const KEYCLASS &_search_key, COMP_CLASS _comp_macro)
 Failsafe Iterative binary search,.
template<class T>
bool gim_binary_search (const T *_array, GUINT _start_i, GUINT _end_i, const T &_search_key, GUINT &_result_index)
 Failsafe Iterative binary search,Template version.
template<typename T, typename COMP_CLASS>
void gim_down_heap (T *pArr, GUINT k, GUINT n, COMP_CLASS CompareFunc)
 heap sort from http://www.csse.monash.edu.au/~lloyd/tildeAlgDS/Sort/Heap/
template<typename T, typename COMP_CLASS>
void gim_heap_sort (T *pArr, GUINT element_count, COMP_CLASS CompareFunc)
+

Detailed Description

+Macros for sorting. +

+


Define Documentation

+ +
+
+ + + + + + + + + +
#define D11_0 (  )    (x & 0x7FF)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
#define D11_1 (  )    (x >> 11 & 0x7FF)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
#define D11_2 (  )    (x >> 22 )
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define kHist   2048
+
+
+ +

+ +

+

+


Function Documentation

+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool gim_binary_search (const T *  _array,
GUINT  _start_i,
GUINT  _end_i,
const T &  _search_key,
GUINT &  _result_index 
) [inline]
+
+
+ +

+Failsafe Iterative binary search,Template version. +

+If the element is not found, it returns the nearest upper element position, may be the further position after the last element.

Parameters:
+ + + + + + +
_array 
_start_i the beginning of the array
_end_i the ending index of the array
_search_key Value to find
_result_index the index of the found element, or if not found then it will get the index of the closest bigger value
+
+
Returns:
true if found, else false
+ +
+

+ +

+
+
+template<class T, typename KEYCLASS, typename COMP_CLASS>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool gim_binary_search_ex (const T *  _array,
GUINT  _start_i,
GUINT  _end_i,
GUINT &  _result_index,
const KEYCLASS &  _search_key,
COMP_CLASS  _comp_macro 
) [inline]
+
+
+ +

+Failsafe Iterative binary search,. +

+If the element is not found, it returns the nearest upper element position, may be the further position after the last element.

Parameters:
+ + + + + + + + +
_array 
_start_i the beginning of the array
_end_i the ending index of the array
_search_key Value to find
_comp_macro macro for comparing elements
_found If true the value has found. Boolean
_result_index the index of the found element, or if not found then it will get the index of the closest bigger value
+
+ +
+

+ +

+
+
+template<typename T, typename COMP_CLASS>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void gim_down_heap (T *  pArr,
GUINT  k,
GUINT  n,
COMP_CLASS  CompareFunc 
) [inline]
+
+ +

+ +

+
+
+template<typename T, typename COMP_CLASS>
+ + + + + + + + + + + + + + + + + + + + + + + + +
void gim_heap_sort (T *  pArr,
GUINT  element_count,
COMP_CLASS  CompareFunc 
) [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename T, class GETKEY_CLASS, class COPY_CLASS>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void gim_radix_sort (T *  array,
GUINT  element_count,
GETKEY_CLASS  get_uintkey_macro,
COPY_CLASS  copy_elements_macro 
) [inline]
+
+
+ +

+Sorts array in place. For generic use. +

+

Parameters:
+ + + + + + +
type Type of the array
array 
element_count 
get_uintkey_macro Macro for extract the Integer value of the element. Similar to SIMPLE_GET_UINTKEY
copy_elements_macro Macro for copy elements, similar to SIMPLE_COPY_ELEMENTS
+
+ +
+

+ +

+
+
+template<typename T, class GETKEY_CLASS>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void gim_radix_sort_array_tokens (T *  array,
GIM_RSORT_TOKEN sorted_tokens,
GUINT  element_count,
GETKEY_CLASS  uintkey_macro 
) [inline]
+
+
+ +

+Get the sorted tokens from an array. For generic use. Tokens are IRR_RSORT_TOKEN. +

+

Parameters:
+ + + + + +
array Array of elements to sort
sorted_tokens Tokens of sorted elements
element_count element count
uintkey_macro Functor which retrieves the integer representation of an array element
+
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void gim_radix_sort_rtokens (GIM_RSORT_TOKEN array,
GIM_RSORT_TOKEN sorted,
GUINT  element_count 
) [inline]
+
+
+ +

+Radix sort for unsigned integer keys. +

+ +

+

+


Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/group___v_e_c_t_o_r___o_p_e_r_a_t_i_o_n_s.html b/Extras/GIMPACT/docs/html/group___v_e_c_t_o_r___o_p_e_r_a_t_i_o_n_s.html new file mode 100755 index 000000000..603fe7b2b --- /dev/null +++ b/Extras/GIMPACT/docs/html/group___v_e_c_t_o_r___o_p_e_r_a_t_i_o_n_s.html @@ -0,0 +1,1682 @@ + + +GIMPACT: VECTOR_OPERATIONS + + + + + +

VECTOR_OPERATIONS

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Defines

#define VEC_ZERO_2(a)
 Zero out a 2D vector.
#define VEC_ZERO(a)
 Zero out a 3D vector.
#define VEC_ZERO_4(a)
 Zero out a 4D vector.
#define VEC_COPY_2(b, a)
 Vector copy.
#define VEC_COPY(b, a)
 Copy 3D vector.
#define VEC_COPY_4(b, a)
 Copy 4D vector.
#define VEC_SWAP(b, a)
 VECTOR SWAP.
#define VEC_DIFF_2(v21, v2, v1)
 Vector difference.
#define VEC_DIFF(v21, v2, v1)
 Vector difference.
#define VEC_DIFF_4(v21, v2, v1)
 Vector difference.
#define VEC_SUM_2(v21, v2, v1)
 Vector sum.
#define VEC_SUM(v21, v2, v1)
 Vector sum.
#define VEC_SUM_4(v21, v2, v1)
 Vector sum.
#define VEC_SCALE_2(c, a, b)
 scalar times vector
#define VEC_SCALE(c, a, b)
 scalar times vector
#define VEC_SCALE_4(c, a, b)
 scalar times vector
#define VEC_ACCUM_2(c, a, b)
 accumulate scaled vector
#define VEC_ACCUM(c, a, b)
 accumulate scaled vector
#define VEC_ACCUM_4(c, a, b)
 accumulate scaled vector
#define VEC_DOT_2(a, b)   ((a)[0]*(b)[0] + (a)[1]*(b)[1])
 Vector dot product.
#define VEC_DOT(a, b)   ((a)[0]*(b)[0] + (a)[1]*(b)[1] + (a)[2]*(b)[2])
 Vector dot product.
#define VEC_DOT_4(a, b)   ((a)[0]*(b)[0] + (a)[1]*(b)[1] + (a)[2]*(b)[2] + (a)[3]*(b)[3])
 Vector dot product.
#define VEC_IMPACT_SQ(bsq, direction, position)
 vector impact parameter (squared)
#define VEC_IMPACT(bsq, direction, position)
 vector impact parameter
#define VEC_LENGTH_2(a, l)
 Vector length.
#define VEC_LENGTH(a, l)
 Vector length.
#define VEC_LENGTH_4(a, l)
 Vector length.
#define VEC_INV_LENGTH_2(a, l)
 Vector inv length.
#define VEC_INV_LENGTH(a, l)
 Vector inv length.
#define VEC_INV_LENGTH_4(a, l)
 Vector inv length.
#define VEC_DISTANCE(_len, _va, _vb)
 distance between two points
#define VEC_CONJUGATE_LENGTH(a, l)
 Vector length.
#define VEC_NORMALIZE(a)
 Vector length.
#define VEC_RENORMALIZE(a, newlen)
 Set Vector size.
#define VEC_CROSS(c, a, b)
 Vector cross.
#define VEC_PERPENDICULAR(vp, v, n)
#define VEC_PARALLEL(vp, v, n)
#define VEC_PROJECT(vp, v, n)
#define VEC_UNPROJECT(vp, v, n)
#define VEC_REFLECT(vr, v, n)
#define VEC_BLEND_AB(vr, sa, a, sb, b)
#define VEC_BLEND(vr, a, b, s)   VEC_BLEND_AB(vr,(1-s),a,s,b)
#define VEC_SET3(a, b, op, c)   a[0]=b[0] op c[0]; a[1]=b[1] op c[1]; a[2]=b[2] op c[2];
#define VEC_MAYOR_COORD(vec, maxc)
 Finds the bigger cartesian coordinate from a vector.
#define VEC_MINOR_AXES(vec, i0, i1)
 Finds the 2 smallest cartesian coordinates from a vector.
#define VEC_EQUAL(v1, v2)   (v1[0]==v2[0]&&v1[1]==v2[1]&&v1[2]==v2[2])
#define VEC_NEAR_EQUAL(v1, v2)   (GIM_NEAR_EQUAL(v1[0],v2[0])&&GIM_NEAR_EQUAL(v1[1],v2[1])&&GIM_NEAR_EQUAL(v1[2],v2[2]))
#define X_AXIS_CROSS_VEC(dst, src)
 Vector cross.
#define Y_AXIS_CROSS_VEC(dst, src)
#define Z_AXIS_CROSS_VEC(dst, src)
+

Detailed Description

+T Operations for vectors : vec2f,vec3f and vec4f

Define Documentation

+ +
+
+ + + + + + + + + + + + + + + +
#define VEC_ACCUM (c,
a,
 ) 
+
+
+ +

+Value:

{                                               \
+   (c)[0] += (a)*(b)[0];                        \
+   (c)[1] += (a)*(b)[1];                        \
+   (c)[2] += (a)*(b)[2];                        \
+}\
+
accumulate scaled vector +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define VEC_ACCUM_2 (c,
a,
 ) 
+
+
+ +

+Value:

{                                               \
+   (c)[0] += (a)*(b)[0];                        \
+   (c)[1] += (a)*(b)[1];                        \
+}\
+
accumulate scaled vector +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define VEC_ACCUM_4 (c,
a,
 ) 
+
+
+ +

+Value:

{                                               \
+   (c)[0] += (a)*(b)[0];                        \
+   (c)[1] += (a)*(b)[1];                        \
+   (c)[2] += (a)*(b)[2];                        \
+   (c)[3] += (a)*(b)[3];                        \
+}\
+
accumulate scaled vector +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
#define VEC_BLEND (vr,
a,
b,
 )    VEC_BLEND_AB(vr,(1-s),a,s,b)
+
+
+ +

+Vector blending Takes two vectors a, b, blends them together with s <=1 +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + +
#define VEC_BLEND_AB (vr,
sa,
a,
sb,
 ) 
+
+
+ +

+Value:

{                                               \
+   vr[0] = (sa) * (a)[0] + (sb) * (b)[0];       \
+   vr[1] = (sa) * (a)[1] + (sb) * (b)[1];       \
+   vr[2] = (sa) * (a)[2] + (sb) * (b)[2];       \
+}\
+
Vector blending Takes two vectors a, b, blends them together with two scalars +
+

+ +

+
+ + + + + + + + + + + + +
#define VEC_CONJUGATE_LENGTH (a,
 ) 
+
+
+ +

+Value:

{\
+    GREAL _pp = 1.0 - a[0]*a[0] - a[1]*a[1] - a[2]*a[2];\
+    GIM_SQRT(_pp,l);\
+}\
+
Vector length. +

+ +

+

+ +

+
+ + + + + + + + + + + + +
#define VEC_COPY (b,
 ) 
+
+
+ +

+Value:

{                                               \
+   (b)[0] = (a)[0];                             \
+   (b)[1] = (a)[1];                             \
+   (b)[2] = (a)[2];                             \
+}\
+
Copy 3D vector. +

+ +

+

+ +

+
+ + + + + + + + + + + + +
#define VEC_COPY_2 (b,
 ) 
+
+
+ +

+Value:

{                                               \
+   (b)[0] = (a)[0];                             \
+   (b)[1] = (a)[1];                             \
+}\
+
Vector copy. +

+ +

+

+ +

+
+ + + + + + + + + + + + +
#define VEC_COPY_4 (b,
 ) 
+
+
+ +

+Value:

{                                               \
+   (b)[0] = (a)[0];                             \
+   (b)[1] = (a)[1];                             \
+   (b)[2] = (a)[2];                             \
+   (b)[3] = (a)[3];                             \
+}\
+
Copy 4D vector. +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define VEC_CROSS (c,
a,
 ) 
+
+
+ +

+Value:

{                                               \
+   c[0] = (a)[1] * (b)[2] - (a)[2] * (b)[1];    \
+   c[1] = (a)[2] * (b)[0] - (a)[0] * (b)[2];    \
+   c[2] = (a)[0] * (b)[1] - (a)[1] * (b)[0];    \
+}\
+
Vector cross. +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define VEC_DIFF (v21,
v2,
v1   ) 
+
+
+ +

+Value:

{                                               \
+   (v21)[0] = (v2)[0] - (v1)[0];                \
+   (v21)[1] = (v2)[1] - (v1)[1];                \
+   (v21)[2] = (v2)[2] - (v1)[2];                \
+}\
+
Vector difference. +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define VEC_DIFF_2 (v21,
v2,
v1   ) 
+
+
+ +

+Value:

{                                               \
+   (v21)[0] = (v2)[0] - (v1)[0];                \
+   (v21)[1] = (v2)[1] - (v1)[1];                \
+}\
+
Vector difference. +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define VEC_DIFF_4 (v21,
v2,
v1   ) 
+
+
+ +

+Value:

{                                               \
+   (v21)[0] = (v2)[0] - (v1)[0];                \
+   (v21)[1] = (v2)[1] - (v1)[1];                \
+   (v21)[2] = (v2)[2] - (v1)[2];                \
+   (v21)[3] = (v2)[3] - (v1)[3];                \
+}\
+
Vector difference. +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define VEC_DISTANCE (_len,
_va,
_vb   ) 
+
+
+ +

+Value:

{\
+    vec3f _tmp_;                                \
+    VEC_DIFF(_tmp_, _vb, _va);                  \
+    VEC_LENGTH(_tmp_,_len);                     \
+}\
+
distance between two points +

+ +

+

+ +

+
+ + + + + + + + + + + + +
#define VEC_DOT (a,
 )    ((a)[0]*(b)[0] + (a)[1]*(b)[1] + (a)[2]*(b)[2])
+
+
+ +

+Vector dot product. +

+ +

+

+ +

+
+ + + + + + + + + + + + +
#define VEC_DOT_2 (a,
 )    ((a)[0]*(b)[0] + (a)[1]*(b)[1])
+
+
+ +

+Vector dot product. +

+ +

+

+ +

+
+ + + + + + + + + + + + +
#define VEC_DOT_4 (a,
 )    ((a)[0]*(b)[0] + (a)[1]*(b)[1] + (a)[2]*(b)[2] + (a)[3]*(b)[3])
+
+
+ +

+Vector dot product. +

+ +

+

+ +

+
+ + + + + + + + + + + + +
#define VEC_EQUAL (v1,
v2   )    (v1[0]==v2[0]&&v1[1]==v2[1]&&v1[2]==v2[2])
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define VEC_IMPACT (bsq,
direction,
position   ) 
+
+
+ +

+Value:

{\
+   VEC_IMPACT_SQ(bsq,direction,position);               \
+   GIM_SQRT(bsq,bsq);                                   \
+}\
+
vector impact parameter +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define VEC_IMPACT_SQ (bsq,
direction,
position   ) 
+
+
+ +

+Value:

{\
+   GREAL _llel_ = VEC_DOT(direction, position);\
+   bsq = VEC_DOT(position, position) - _llel_*_llel_;\
+}\
+
vector impact parameter (squared) +

+ +

+

+ +

+
+ + + + + + + + + + + + +
#define VEC_INV_LENGTH (a,
 ) 
+
+
+ +

+Value:

{\
+    GREAL _pp = VEC_DOT(a,a);\
+    GIM_INV_SQRT(_pp,l);\
+}\
+
Vector inv length. +

+ +

+

+ +

+
+ + + + + + + + + + + + +
#define VEC_INV_LENGTH_2 (a,
 ) 
+
+
+ +

+Value:

{\
+    GREAL _pp = VEC_DOT_2(a,a);\
+    GIM_INV_SQRT(_pp,l);\
+}\
+
Vector inv length. +

+ +

+

+ +

+
+ + + + + + + + + + + + +
#define VEC_INV_LENGTH_4 (a,
 ) 
+
+
+ +

+Value:

{\
+    GREAL _pp = VEC_DOT_4(a,a);\
+    GIM_INV_SQRT(_pp,l);\
+}\
+
Vector inv length. +

+ +

+

+ +

+
+ + + + + + + + + + + + +
#define VEC_LENGTH (a,
 ) 
+
+
+ +

+Value:

{\
+    GREAL _pp = VEC_DOT(a,a);\
+    GIM_SQRT(_pp,l);\
+}\
+
Vector length. +

+ +

+

+ +

+
+ + + + + + + + + + + + +
#define VEC_LENGTH_2 (a,
 ) 
+
+
+ +

+Value:

{\
+    GREAL _pp = VEC_DOT_2(a,a);\
+    GIM_SQRT(_pp,l);\
+}\
+
Vector length. +

+ +

+

+ +

+
+ + + + + + + + + + + + +
#define VEC_LENGTH_4 (a,
 ) 
+
+
+ +

+Value:

{\
+    GREAL _pp = VEC_DOT_4(a,a);\
+    GIM_SQRT(_pp,l);\
+}\
+
Vector length. +

+ +

+

+ +

+
+ + + + + + + + + + + + +
#define VEC_MAYOR_COORD (vec,
maxc   ) 
+
+
+ +

+Value:

{\
+        GREAL A[] = {fabs(vec[0]),fabs(vec[1]),fabs(vec[2])};\
+    maxc =  A[0]>A[1]?(A[0]>A[2]?0:2):(A[1]>A[2]?1:2);\
+}\
+
Finds the bigger cartesian coordinate from a vector. +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define VEC_MINOR_AXES (vec,
i0,
i1   ) 
+
+
+ +

+Value:

{\
+        VEC_MAYOR_COORD(vec,i0);\
+        i0 = (i0+1)%3;\
+        i1 = (i0+1)%3;\
+}\
+
Finds the 2 smallest cartesian coordinates from a vector. +

+ +

+

+ +

+
+ + + + + + + + + + + + +
#define VEC_NEAR_EQUAL (v1,
v2   )    (GIM_NEAR_EQUAL(v1[0],v2[0])&&GIM_NEAR_EQUAL(v1[1],v2[1])&&GIM_NEAR_EQUAL(v1[2],v2[2]))
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
#define VEC_NORMALIZE (  ) 
+
+
+ +

+Value:

{       \
+    GREAL len;\
+    VEC_INV_LENGTH(a,len); \
+    if(len<G_REAL_INFINITY)\
+    {\
+        a[0] *= len;                            \
+        a[1] *= len;                            \
+        a[2] *= len;                            \
+    }                                           \
+}\
+
Vector length. +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define VEC_PARALLEL (vp,
v,
 ) 
+
+
+ +

+Value:

{                                               \
+   GREAL dot = VEC_DOT(v, n);                   \
+   vp[0] = (dot) * (n)[0];                      \
+   vp[1] = (dot) * (n)[1];                      \
+   vp[2] = (dot) * (n)[2];                      \
+}\
+
Vector parallel -- assumes that n is of unit length +
+

+ +

+
+ + + + + + + + + + + + + + + +
#define VEC_PERPENDICULAR (vp,
v,
 ) 
+
+
+ +

+Value:

{                                               \
+   GREAL dot = VEC_DOT(v, n);                   \
+   vp[0] = (v)[0] - dot*(n)[0];         \
+   vp[1] = (v)[1] - dot*(n)[1];         \
+   vp[2] = (v)[2] - dot*(n)[2];         \
+}\
+
Vector perp -- assumes that n is of unit length accepts vector v, subtracts out any component parallel to n +
+

+ +

+
+ + + + + + + + + + + + + + + +
#define VEC_PROJECT (vp,
v,
 ) 
+
+
+ +

+Value:

{ \
+        GREAL scalar = VEC_DOT(v, n);                   \
+        scalar/= VEC_DOT(n, n); \
+        vp[0] = (scalar) * (n)[0];                      \
+    vp[1] = (scalar) * (n)[1];                  \
+    vp[2] = (scalar) * (n)[2];                  \
+}\
+
Same as Vector parallel -- n can have any length accepts vector v, subtracts out any component perpendicular to n +
+

+ +

+
+ + + + + + + + + + + + + + + +
#define VEC_REFLECT (vr,
v,
 ) 
+
+
+ +

+Value:

{                                               \
+   GREAL dot = VEC_DOT(v, n);                   \
+   vr[0] = (v)[0] - 2.0 * (dot) * (n)[0];       \
+   vr[1] = (v)[1] - 2.0 * (dot) * (n)[1];       \
+   vr[2] = (v)[2] - 2.0 * (dot) * (n)[2];       \
+}\
+
Vector reflection -- assumes n is of unit length Takes vector v, reflects it against reflector n, and returns vr +
+

+ +

+
+ + + + + + + + + + + + +
#define VEC_RENORMALIZE (a,
newlen   ) 
+
+
+ +

+Value:

{       \
+    GREAL len;\
+    VEC_INV_LENGTH(a,len); \
+    if(len<G_REAL_INFINITY)\
+    {\
+        len *= newlen;\
+        a[0] *= len;                            \
+        a[1] *= len;                            \
+        a[2] *= len;                            \
+    }                                           \
+}\
+
Set Vector size. +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define VEC_SCALE (c,
a,
 ) 
+
+
+ +

+Value:

{                                               \
+   (c)[0] = (a)*(b)[0];                         \
+   (c)[1] = (a)*(b)[1];                         \
+   (c)[2] = (a)*(b)[2];                         \
+}\
+
scalar times vector +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define VEC_SCALE_2 (c,
a,
 ) 
+
+
+ +

+Value:

{                                               \
+   (c)[0] = (a)*(b)[0];                         \
+   (c)[1] = (a)*(b)[1];                         \
+}\
+
scalar times vector +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define VEC_SCALE_4 (c,
a,
 ) 
+
+
+ +

+Value:

{                                               \
+   (c)[0] = (a)*(b)[0];                         \
+   (c)[1] = (a)*(b)[1];                         \
+   (c)[2] = (a)*(b)[2];                         \
+   (c)[3] = (a)*(b)[3];                         \
+}\
+
scalar times vector +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
#define VEC_SET3 (a,
b,
op,
 )    a[0]=b[0] op c[0]; a[1]=b[1] op c[1]; a[2]=b[2] op c[2];
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define VEC_SUM (v21,
v2,
v1   ) 
+
+
+ +

+Value:

{                                               \
+   (v21)[0] = (v2)[0] + (v1)[0];                \
+   (v21)[1] = (v2)[1] + (v1)[1];                \
+   (v21)[2] = (v2)[2] + (v1)[2];                \
+}\
+
Vector sum. +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define VEC_SUM_2 (v21,
v2,
v1   ) 
+
+
+ +

+Value:

{                                               \
+   (v21)[0] = (v2)[0] + (v1)[0];                \
+   (v21)[1] = (v2)[1] + (v1)[1];                \
+}\
+
Vector sum. +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define VEC_SUM_4 (v21,
v2,
v1   ) 
+
+
+ +

+Value:

{                                               \
+   (v21)[0] = (v2)[0] + (v1)[0];                \
+   (v21)[1] = (v2)[1] + (v1)[1];                \
+   (v21)[2] = (v2)[2] + (v1)[2];                \
+   (v21)[3] = (v2)[3] + (v1)[3];                \
+}\
+
Vector sum. +

+ +

+

+ +

+
+ + + + + + + + + + + + +
#define VEC_SWAP (b,
 ) 
+
+
+ +

+Value:

{  \
+    GIM_SWAP_NUMBERS((b)[0],(a)[0]);\
+    GIM_SWAP_NUMBERS((b)[1],(a)[1]);\
+    GIM_SWAP_NUMBERS((b)[2],(a)[2]);\
+}\
+
VECTOR SWAP. +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define VEC_UNPROJECT (vp,
v,
 ) 
+
+
+ +

+Value:

{ \
+        GREAL scalar = VEC_DOT(v, n);                   \
+        scalar = VEC_DOT(n, n)/scalar; \
+        vp[0] = (scalar) * (n)[0];                      \
+    vp[1] = (scalar) * (n)[1];                  \
+    vp[2] = (scalar) * (n)[2];                  \
+}\
+
accepts vector v +
+

+ +

+
+ + + + + + + + + +
#define VEC_ZERO (  ) 
+
+
+ +

+Value:

{                                               \
+   (a)[0] = (a)[1] = (a)[2] = 0.0f;             \
+}\
+
Zero out a 3D vector. +

+ +

+

+ +

+
+ + + + + + + + + +
#define VEC_ZERO_2 (  ) 
+
+
+ +

+Value:

{                                               \
+   (a)[0] = (a)[1] = 0.0f;                      \
+}\
+
Zero out a 2D vector. +

+ +

+

+ +

+
+ + + + + + + + + +
#define VEC_ZERO_4 (  ) 
+
+
+ +

+Value:

{                                               \
+   (a)[0] = (a)[1] = (a)[2] = (a)[3] = 0.0f;    \
+}\
+
Zero out a 4D vector. +

+ +

+

+ +

+
+ + + + + + + + + + + + +
#define X_AXIS_CROSS_VEC (dst,
src   ) 
+
+
+ +

+Value:

{                                          \
+        dst[0] = 0.0f;     \
+        dst[1] = -src[2];  \
+        dst[2] = src[1];  \
+}\
+
Vector cross. +

+ +

+

+ +

+
+ + + + + + + + + + + + +
#define Y_AXIS_CROSS_VEC (dst,
src   ) 
+
+
+ +

+Value:

{                                          \
+        dst[0] = src[2];     \
+        dst[1] = 0.0f;  \
+        dst[2] = -src[0];  \
+}\
+
+
+

+ +

+
+ + + + + + + + + + + + +
#define Z_AXIS_CROSS_VEC (dst,
src   ) 
+
+
+ +

+Value:

{                                          \
+        dst[0] = -src[1];     \
+        dst[1] = src[0];  \
+        dst[2] = 0.0f;  \
+}\
+
+
+

+


Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/hierarchy.html b/Extras/GIMPACT/docs/html/hierarchy.html new file mode 100755 index 000000000..5e98fb765 --- /dev/null +++ b/Extras/GIMPACT/docs/html/hierarchy.html @@ -0,0 +1,93 @@ + + +GIMPACT: Hierarchical Index + + + + + + +

GIMPACT Class Hierarchy

This inheritance list is sorted roughly, but not completely, alphabetically: +
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/index.html b/Extras/GIMPACT/docs/html/index.html new file mode 100755 index 000000000..8b70bda23 --- /dev/null +++ b/Extras/GIMPACT/docs/html/index.html @@ -0,0 +1,30 @@ + + +GIMPACT: GIMPACT + + + + + +

GIMPACT

+

+

0.2

+INTRODUCTION

+GIMPACT is a software library with tools for geometry processing and collision detection, focused on solving most common problems on Virtual Reality development.

+Since Version 0.2, GIMPACT will work integrated with the Bullet Engine for general collision detection and physics. For more details, please visit http://www.continuousphysics.com/Bullet/

+For updates, please visit http://sourceforge.net/projects/gimpact/

+CONTENT

+ +
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/modules.html b/Extras/GIMPACT/docs/html/modules.html new file mode 100755 index 000000000..8bdb6dbde --- /dev/null +++ b/Extras/GIMPACT/docs/html/modules.html @@ -0,0 +1,43 @@ + + +GIMPACT: Module Index + + + + + +

GIMPACT Modules

Here is a list of all modules: +
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/programmers_guide.html b/Extras/GIMPACT/docs/html/programmers_guide.html new file mode 100755 index 000000000..0610fd9ea --- /dev/null +++ b/Extras/GIMPACT/docs/html/programmers_guide.html @@ -0,0 +1,55 @@ + + +GIMPACT: PROGRAMMERS GUIDE + + + + + + +

PROGRAMMERS GUIDE

This guide will show how to incorpore the GIMPACt functionality on the Bullet Engine:

+Registering the Algorithm

+For register this algorithm in Bullet, proceed as following:
btCollisionDispatcher * dispatcher = static_cast<btCollisionDispatcher *>(m_dynamicsWorld ->getDispatcher());
+btGImpactCollisionAlgorithm::registerAlgorithm(dispatcher);
+
With the instructon above, btGImpactCollisionAlgorithm will handle:
    +
  • Convex shapes vs GImpact shapes.
  • Concave shapes vs GImpact shapes.
  • Compoind shapes vs GImpact shapes.
+

+Creating Shapes.

+

+Creating trimeshes.

+For creating trimeshes you must provide an interface for your model data. You could use btTriangleIndexVertexArray class for providing the indices and the vertices from your triangle models.

+For example, you could create a trimesh from memory as following:

btTriangleIndexVertexArray* indexVertexArrays = new btTriangleIndexVertexArray(NUM_TRIANGLES,
+                &gIndices[0][0],
+                3*sizeof(int),
+                NUM_VERTICES,(REAL*) &gVertices[0],sizeof(REAL)*3);
+

+Where gIndices is an array of integers and gVertices is an array of float with 3 components. Then you must create the Trimesh shape as following:

btGImpactMeshShape * trimesh = new btGImpactMeshShape(indexVertexArrays);
+
The next step is configuring the trimesh, for example changing the scale:
trimesh->setLocalScaling(btVector3(4.f,4.f,4.f));
+
At end, you must call btGImpactMeshShape.updateBound for ensure that the shape will build its internal Box set structure:
trimesh->updateBound();// Call this method once before doing collisions
+
Also you must call btGImpactMeshShape.postUpdate() each time when changing the trimesh data ( For deformable meshes), this will enable a flag to the trimesh shape which tells that the trimesh data has been changed and btGImpactMeshShape.updateBound will be called in collision routines. <

+Compound Shapes.

+For compound shapes, you must create btGImpactCompoundShape objects. Then you could add sub shapes as following;
btGImpactCompoundShape * mycompound = new btGImpactCompoundShape();
+
+btTransform localtransform;
+ .... Setting transformation
+
+//add shapes with transformation
+btCollisionShape * subshape = creatingShape(0);
+mycompound->addChildShape(localtransform,subshape);
+.... Setting transformation
+btCollisionShape * subshape2 = creatingShape(1);
+mycompound->addChildShape(localtransform,subshape);
+.... add more shapes
+
At end, you must call btGImpactCompoundShape.updateBound for ensure that the shape will build its internal Box set structure:
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/requirements.html b/Extras/GIMPACT/docs/html/requirements.html new file mode 100755 index 000000000..c77971c15 --- /dev/null +++ b/Extras/GIMPACT/docs/html/requirements.html @@ -0,0 +1,24 @@ + + +GIMPACT: + + + + + + + +
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/struct_g_i_m___a_a_b_b___d_a_t_a-members.html b/Extras/GIMPACT/docs/html/struct_g_i_m___a_a_b_b___d_a_t_a-members.html new file mode 100755 index 000000000..eac7de4cc --- /dev/null +++ b/Extras/GIMPACT/docs/html/struct_g_i_m___a_a_b_b___d_a_t_a-members.html @@ -0,0 +1,30 @@ + + +GIMPACT: Member List + + + + + + +

GIM_AABB_DATA Member List

This is the complete list of members for GIM_AABB_DATA, including all inherited members.

+ + +
m_boundGIM_AABB_DATA
m_dataGIM_AABB_DATA


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/struct_g_i_m___a_a_b_b___d_a_t_a.html b/Extras/GIMPACT/docs/html/struct_g_i_m___a_a_b_b___d_a_t_a.html new file mode 100755 index 000000000..276ad09dc --- /dev/null +++ b/Extras/GIMPACT/docs/html/struct_g_i_m___a_a_b_b___d_a_t_a.html @@ -0,0 +1,58 @@ + + +GIMPACT: GIM_AABB_DATA Struct Reference + + + + + + +

GIM_AABB_DATA Struct Reference
+ +[BOX_PRUNNING] +

#include <gim_box_set.h> +

+List of all members. + + + + + + +

Public Attributes

GIM_AABB m_bound
GUINT m_data
+


Member Data Documentation

+ +
+ +
+ +

+ +

+

+


The documentation for this struct was generated from the following file:
    +
  • C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_box_set.h
+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/struct_g_i_m___b_o_x___t_r_e_e___n_o_d_e-members.html b/Extras/GIMPACT/docs/html/struct_g_i_m___b_o_x___t_r_e_e___n_o_d_e-members.html new file mode 100755 index 000000000..3ded1f913 --- /dev/null +++ b/Extras/GIMPACT/docs/html/struct_g_i_m___b_o_x___t_r_e_e___n_o_d_e-members.html @@ -0,0 +1,35 @@ + + +GIMPACT: Member List + + + + + + +

GIM_BOX_TREE_NODE Member List

This is the complete list of members for GIM_BOX_TREE_NODE, including all inherited members.

+ + + + + + + +
GIM_BOX_TREE_NODE()GIM_BOX_TREE_NODE [inline]
is_leaf_node() constGIM_BOX_TREE_NODE [inline]
m_boundGIM_BOX_TREE_NODE
m_dataGIM_BOX_TREE_NODE
m_escapeIndexGIM_BOX_TREE_NODE
m_leftGIM_BOX_TREE_NODE
m_rightGIM_BOX_TREE_NODE


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/struct_g_i_m___b_o_x___t_r_e_e___n_o_d_e.html b/Extras/GIMPACT/docs/html/struct_g_i_m___b_o_x___t_r_e_e___n_o_d_e.html new file mode 100755 index 000000000..e65f7b483 --- /dev/null +++ b/Extras/GIMPACT/docs/html/struct_g_i_m___b_o_x___t_r_e_e___n_o_d_e.html @@ -0,0 +1,79 @@ + + +GIMPACT: GIM_BOX_TREE_NODE Struct Reference + + + + + + +

GIM_BOX_TREE_NODE Struct Reference
+ +[BOX_PRUNNING] +

Node Structure for trees. +More... +

+#include <gim_box_set.h> +

+List of all members. + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

 GIM_BOX_TREE_NODE ()
SIMD_FORCE_INLINE bool is_leaf_node () const

Public Attributes

GIM_AABB m_bound
GUINT m_left
 Left subtree.
GUINT m_right
 Right subtree.
GUINT m_escapeIndex
 Scape index for traversing.
GUINT m_data
 primitive index if apply
+


Detailed Description

+Node Structure for trees. +

+


Member Data Documentation

+ +
+ +
+ +

+ +

+

+


The documentation for this struct was generated from the following file:
    +
  • C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_box_set.h
+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/struct_g_i_m___h_a_s_h___t_a_b_l_e___n_o_d_e-members.html b/Extras/GIMPACT/docs/html/struct_g_i_m___h_a_s_h___t_a_b_l_e___n_o_d_e-members.html new file mode 100755 index 000000000..f1f2cf14f --- /dev/null +++ b/Extras/GIMPACT/docs/html/struct_g_i_m___h_a_s_h___t_a_b_l_e___n_o_d_e-members.html @@ -0,0 +1,36 @@ + + +GIMPACT: Member List + + + + + + +

GIM_HASH_TABLE_NODE< T > Member List

This is the complete list of members for GIM_HASH_TABLE_NODE< T >, including all inherited members.

+ + + + + + + + +
GIM_HASH_TABLE_NODE()GIM_HASH_TABLE_NODE< T > [inline]
GIM_HASH_TABLE_NODE(const GIM_HASH_TABLE_NODE &value)GIM_HASH_TABLE_NODE< T > [inline]
GIM_HASH_TABLE_NODE(GUINT key, const T &data)GIM_HASH_TABLE_NODE< T > [inline]
m_dataGIM_HASH_TABLE_NODE< T >
m_keyGIM_HASH_TABLE_NODE< T >
operator<(const GIM_HASH_TABLE_NODE< T > &other) const GIM_HASH_TABLE_NODE< T > [inline]
operator==(const GIM_HASH_TABLE_NODE< T > &other) const GIM_HASH_TABLE_NODE< T > [inline]
operator>(const GIM_HASH_TABLE_NODE< T > &other) const GIM_HASH_TABLE_NODE< T > [inline]


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/struct_g_i_m___h_a_s_h___t_a_b_l_e___n_o_d_e.html b/Extras/GIMPACT/docs/html/struct_g_i_m___h_a_s_h___t_a_b_l_e___n_o_d_e.html new file mode 100755 index 000000000..b9a04e9cf --- /dev/null +++ b/Extras/GIMPACT/docs/html/struct_g_i_m___h_a_s_h___t_a_b_l_e___n_o_d_e.html @@ -0,0 +1,241 @@ + + +GIMPACT: GIM_HASH_TABLE_NODE< T > Struct Template Reference + + + + + + +

GIM_HASH_TABLE_NODE< T > Struct Template Reference
+ +[CONTAINERS] +

#include <gim_hash_table.h> +

+List of all members. + + + + + + + + + + + + + + + + + + + +

Public Member Functions

 GIM_HASH_TABLE_NODE ()
 GIM_HASH_TABLE_NODE (const GIM_HASH_TABLE_NODE &value)
 GIM_HASH_TABLE_NODE (GUINT key, const T &data)
bool operator< (const GIM_HASH_TABLE_NODE< T > &other) const
bool operator> (const GIM_HASH_TABLE_NODE< T > &other) const
bool operator== (const GIM_HASH_TABLE_NODE< T > &other) const

Public Attributes

GUINT m_key
m_data
+

template<typename T>
+ struct GIM_HASH_TABLE_NODE< T >

+ +

Constructor & Destructor Documentation

+ +
+
+
+template<typename T>
+ + + + + + + + +
GIM_HASH_TABLE_NODE< T >::GIM_HASH_TABLE_NODE (  )  [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename T>
+ + + + + + + + + +
GIM_HASH_TABLE_NODE< T >::GIM_HASH_TABLE_NODE (const GIM_HASH_TABLE_NODE< T > &  value  )  [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename T>
+ + + + + + + + + + + + + + + + + + +
GIM_HASH_TABLE_NODE< T >::GIM_HASH_TABLE_NODE (GUINT  key,
const T &  data 
) [inline]
+
+
+ +

+ +

+

+


Member Function Documentation

+ +
+
+
+template<typename T>
+ + + + + + + + + +
bool GIM_HASH_TABLE_NODE< T >::operator< (const GIM_HASH_TABLE_NODE< T > &  other  )  const [inline]
+
+
+ +

+ +

+inverse order, further objects are first +

+

+ +

+
+
+template<typename T>
+ + + + + + + + + +
bool GIM_HASH_TABLE_NODE< T >::operator> (const GIM_HASH_TABLE_NODE< T > &  other  )  const [inline]
+
+
+ +

+ +

+inverse order, further objects are first +

+

+ +

+
+
+template<typename T>
+ + + + + + + + + +
bool GIM_HASH_TABLE_NODE< T >::operator== (const GIM_HASH_TABLE_NODE< T > &  other  )  const [inline]
+
+
+ +

+ +

+inverse order, further objects are first +

+

+


Member Data Documentation

+ +
+
+
+template<typename T>
+ + + + +
GUINT GIM_HASH_TABLE_NODE< T >::m_key
+
+
+ +

+ +

+

+ +

+
+
+template<typename T>
+ + + + +
T GIM_HASH_TABLE_NODE< T >::m_data
+
+
+ +

+ +

+

+


The documentation for this struct was generated from the following file: +
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/struct_g_i_m___p_a_i_r-members.html b/Extras/GIMPACT/docs/html/struct_g_i_m___p_a_i_r-members.html new file mode 100755 index 000000000..7911996a5 --- /dev/null +++ b/Extras/GIMPACT/docs/html/struct_g_i_m___p_a_i_r-members.html @@ -0,0 +1,33 @@ + + +GIMPACT: Member List + + + + + + +

GIM_PAIR Member List

This is the complete list of members for GIM_PAIR, including all inherited members.

+ + + + + +
GIM_PAIR()GIM_PAIR [inline]
GIM_PAIR(const GIM_PAIR &p)GIM_PAIR [inline]
GIM_PAIR(GUINT index1, GUINT index2)GIM_PAIR [inline]
m_index1GIM_PAIR
m_index2GIM_PAIR


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/struct_g_i_m___p_a_i_r.html b/Extras/GIMPACT/docs/html/struct_g_i_m___p_a_i_r.html new file mode 100755 index 000000000..b045bf17c --- /dev/null +++ b/Extras/GIMPACT/docs/html/struct_g_i_m___p_a_i_r.html @@ -0,0 +1,71 @@ + + +GIMPACT: GIM_PAIR Struct Reference + + + + + + +

GIM_PAIR Struct Reference
+ +[BOX_PRUNNING] +

Overlapping pair. +More... +

+#include <gim_box_set.h> +

+List of all members. + + + + + + + + + + + + + +

Public Member Functions

 GIM_PAIR ()
 GIM_PAIR (const GIM_PAIR &p)
 GIM_PAIR (GUINT index1, GUINT index2)

Public Attributes

GUINT m_index1
GUINT m_index2
+


Detailed Description

+Overlapping pair. +

+


Member Data Documentation

+ +
+
+ + + + +
GUINT GIM_PAIR::m_index1
+
+
+ +

+ +

+

+


The documentation for this struct was generated from the following file:
    +
  • C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_box_set.h
+
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/struct_g_i_m___r_s_o_r_t___t_o_k_e_n-members.html b/Extras/GIMPACT/docs/html/struct_g_i_m___r_s_o_r_t___t_o_k_e_n-members.html new file mode 100755 index 000000000..73be2287c --- /dev/null +++ b/Extras/GIMPACT/docs/html/struct_g_i_m___r_s_o_r_t___t_o_k_e_n-members.html @@ -0,0 +1,34 @@ + + +GIMPACT: Member List + + + + + + +

GIM_RSORT_TOKEN Member List

This is the complete list of members for GIM_RSORT_TOKEN, including all inherited members.

+ + + + + + +
GIM_RSORT_TOKEN()GIM_RSORT_TOKEN [inline]
GIM_RSORT_TOKEN(const GIM_RSORT_TOKEN &rtoken)GIM_RSORT_TOKEN [inline]
m_keyGIM_RSORT_TOKEN
m_valueGIM_RSORT_TOKEN
operator<(const GIM_RSORT_TOKEN &other) const GIM_RSORT_TOKEN [inline]
operator>(const GIM_RSORT_TOKEN &other) const GIM_RSORT_TOKEN [inline]


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/struct_g_i_m___r_s_o_r_t___t_o_k_e_n.html b/Extras/GIMPACT/docs/html/struct_g_i_m___r_s_o_r_t___t_o_k_e_n.html new file mode 100755 index 000000000..25f9277bc --- /dev/null +++ b/Extras/GIMPACT/docs/html/struct_g_i_m___r_s_o_r_t___t_o_k_e_n.html @@ -0,0 +1,163 @@ + + +GIMPACT: GIM_RSORT_TOKEN Struct Reference + + + + + + +

GIM_RSORT_TOKEN Struct Reference
+ +[SORTING] +

#include <gim_radixsort.h> +

+List of all members. + + + + + + + + + + + + + + + +

Public Member Functions

 GIM_RSORT_TOKEN ()
 GIM_RSORT_TOKEN (const GIM_RSORT_TOKEN &rtoken)
bool operator< (const GIM_RSORT_TOKEN &other) const
bool operator> (const GIM_RSORT_TOKEN &other) const

Public Attributes

GUINT m_key
GUINT m_value
+


Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
GIM_RSORT_TOKEN::GIM_RSORT_TOKEN (  )  [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
GIM_RSORT_TOKEN::GIM_RSORT_TOKEN (const GIM_RSORT_TOKEN rtoken  )  [inline]
+
+
+ +

+ +

+

+


Member Function Documentation

+ +
+
+ + + + + + + + + +
bool GIM_RSORT_TOKEN::operator< (const GIM_RSORT_TOKEN other  )  const [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
bool GIM_RSORT_TOKEN::operator> (const GIM_RSORT_TOKEN other  )  const [inline]
+
+
+ +

+ +

+

+


Member Data Documentation

+ +
+
+ + + + +
GUINT GIM_RSORT_TOKEN::m_key
+
+
+ +

+ +

+

+ +

+
+ + + + +
GUINT GIM_RSORT_TOKEN::m_value
+
+
+ +

+ +

+

+


The documentation for this struct was generated from the following file: +
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/struct_g_i_m___t_r_i_a_n_g_l_e___c_o_n_t_a_c_t___d_a_t_a-members.html b/Extras/GIMPACT/docs/html/struct_g_i_m___t_r_i_a_n_g_l_e___c_o_n_t_a_c_t___d_a_t_a-members.html new file mode 100755 index 000000000..484249530 --- /dev/null +++ b/Extras/GIMPACT/docs/html/struct_g_i_m___t_r_i_a_n_g_l_e___c_o_n_t_a_c_t___d_a_t_a-members.html @@ -0,0 +1,37 @@ + + +GIMPACT: Member List + + + + + + +

GIM_TRIANGLE_CONTACT_DATA Member List

This is the complete list of members for GIM_TRIANGLE_CONTACT_DATA, including all inherited members.

+ + + + + + + + + +
copy_from(const GIM_TRIANGLE_CONTACT_DATA &other)GIM_TRIANGLE_CONTACT_DATA [inline]
GIM_TRIANGLE_CONTACT_DATA()GIM_TRIANGLE_CONTACT_DATA [inline]
GIM_TRIANGLE_CONTACT_DATA(const GIM_TRIANGLE_CONTACT_DATA &other)GIM_TRIANGLE_CONTACT_DATA [inline]
m_penetration_depthGIM_TRIANGLE_CONTACT_DATA
m_point_countGIM_TRIANGLE_CONTACT_DATA
m_pointsGIM_TRIANGLE_CONTACT_DATA
m_separating_normalGIM_TRIANGLE_CONTACT_DATA
merge_points(const btVector4 &plane, GREAL margin, const btVector3 *points, GUINT point_count)GIM_TRIANGLE_CONTACT_DATA [inline]
mergepoints_generic(const CLASS_PLANE &plane, GREAL margin, const btVector3 *points, GUINT point_count, DISTANCE_FUNC distance_func)GIM_TRIANGLE_CONTACT_DATA [inline]


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/struct_g_i_m___t_r_i_a_n_g_l_e___c_o_n_t_a_c_t___d_a_t_a.html b/Extras/GIMPACT/docs/html/struct_g_i_m___t_r_i_a_n_g_l_e___c_o_n_t_a_c_t___d_a_t_a.html new file mode 100755 index 000000000..f4e5c6ace --- /dev/null +++ b/Extras/GIMPACT/docs/html/struct_g_i_m___t_r_i_a_n_g_l_e___c_o_n_t_a_c_t___d_a_t_a.html @@ -0,0 +1,282 @@ + + +GIMPACT: GIM_TRIANGLE_CONTACT_DATA Struct Reference + + + + + + +

GIM_TRIANGLE_CONTACT_DATA Struct Reference
+ +[GEOMETRIC_OPERATIONS] +

Structure for collision. +More... +

+#include <gim_tri_collision.h> +

+List of all members. + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

SIMD_FORCE_INLINE void copy_from (const GIM_TRIANGLE_CONTACT_DATA &other)
 GIM_TRIANGLE_CONTACT_DATA ()
 GIM_TRIANGLE_CONTACT_DATA (const GIM_TRIANGLE_CONTACT_DATA &other)
template<typename DISTANCE_FUNC, typename CLASS_PLANE>
SIMD_FORCE_INLINE void mergepoints_generic (const CLASS_PLANE &plane, GREAL margin, const btVector3 *points, GUINT point_count, DISTANCE_FUNC distance_func)
 classify points that are closer
SIMD_FORCE_INLINE void merge_points (const btVector4 &plane, GREAL margin, const btVector3 *points, GUINT point_count)
 classify points that are closer

Public Attributes

GREAL m_penetration_depth
GUINT m_point_count
btVector4 m_separating_normal
btVector3 m_points [MAX_TRI_CLIPPING]
+


Detailed Description

+Structure for collision. +

+


Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
GIM_TRIANGLE_CONTACT_DATA::GIM_TRIANGLE_CONTACT_DATA (  )  [inline]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
GIM_TRIANGLE_CONTACT_DATA::GIM_TRIANGLE_CONTACT_DATA (const GIM_TRIANGLE_CONTACT_DATA other  )  [inline]
+
+
+ +

+ +

+

+


Member Function Documentation

+ +
+
+ + + + + + + + + +
SIMD_FORCE_INLINE void GIM_TRIANGLE_CONTACT_DATA::copy_from (const GIM_TRIANGLE_CONTACT_DATA other  )  [inline]
+
+
+ +

+ +

+

+ +

+
+
+template<typename DISTANCE_FUNC, typename CLASS_PLANE>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE void GIM_TRIANGLE_CONTACT_DATA::mergepoints_generic (const CLASS_PLANE &  plane,
GREAL  margin,
const btVector3 *  points,
GUINT  point_count,
DISTANCE_FUNC  distance_func 
) [inline]
+
+
+ +

+classify points that are closer +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SIMD_FORCE_INLINE void GIM_TRIANGLE_CONTACT_DATA::merge_points (const btVector4 &  plane,
GREAL  margin,
const btVector3 *  points,
GUINT  point_count 
) [inline]
+
+
+ +

+classify points that are closer +

+ +

+

+


Member Data Documentation

+ +
+ +
+ +

+ +

+

+ +

+ +
+ +

+ +

+

+ +

+ +
+ +

+ +

+

+ +

+
+ + + + +
btVector3 GIM_TRIANGLE_CONTACT_DATA::m_points[MAX_TRI_CLIPPING]
+
+
+ +

+ +

+

+


The documentation for this struct was generated from the following file: +
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/structbt_g_impact_collision_algorithm_1_1_create_func-members.html b/Extras/GIMPACT/docs/html/structbt_g_impact_collision_algorithm_1_1_create_func-members.html new file mode 100755 index 000000000..a8a645142 --- /dev/null +++ b/Extras/GIMPACT/docs/html/structbt_g_impact_collision_algorithm_1_1_create_func-members.html @@ -0,0 +1,29 @@ + + +GIMPACT: Member List + + + + + + +

btGImpactCollisionAlgorithm::CreateFunc Member List

This is the complete list of members for btGImpactCollisionAlgorithm::CreateFunc, including all inherited members.

+ +
CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo &ci, btCollisionObject *body0, btCollisionObject *body1)btGImpactCollisionAlgorithm::CreateFunc [inline, virtual]


Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/structbt_g_impact_collision_algorithm_1_1_create_func.html b/Extras/GIMPACT/docs/html/structbt_g_impact_collision_algorithm_1_1_create_func.html new file mode 100755 index 000000000..64ce809df --- /dev/null +++ b/Extras/GIMPACT/docs/html/structbt_g_impact_collision_algorithm_1_1_create_func.html @@ -0,0 +1,75 @@ + + +GIMPACT: btGImpactCollisionAlgorithm::CreateFunc Struct Reference + + + + + + + +

btGImpactCollisionAlgorithm::CreateFunc Struct Reference

#include <btGImpactCollisionAlgorithm.h> +

+List of all members. + + + + +

Public Member Functions

virtual btCollisionAlgorithm * CreateCollisionAlgorithm (btCollisionAlgorithmConstructionInfo &ci, btCollisionObject *body0, btCollisionObject *body1)
+


Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual btCollisionAlgorithm* btGImpactCollisionAlgorithm::CreateFunc::CreateCollisionAlgorithm (btCollisionAlgorithmConstructionInfo &  ci,
btCollisionObject *  body0,
btCollisionObject *  body1 
) [inline, virtual]
+
+
+ +

+ +

+

+


The documentation for this struct was generated from the following file: +
Generated on Wed Jun 13 16:58:22 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/docs/html/tab_b.gif b/Extras/GIMPACT/docs/html/tab_b.gif new file mode 100755 index 000000000..0d623483f Binary files /dev/null and b/Extras/GIMPACT/docs/html/tab_b.gif differ diff --git a/Extras/GIMPACT/docs/html/tab_l.gif b/Extras/GIMPACT/docs/html/tab_l.gif new file mode 100755 index 000000000..9b1e6337c Binary files /dev/null and b/Extras/GIMPACT/docs/html/tab_l.gif differ diff --git a/Extras/GIMPACT/docs/html/tab_r.gif b/Extras/GIMPACT/docs/html/tab_r.gif new file mode 100755 index 000000000..ce9dd9f53 Binary files /dev/null and b/Extras/GIMPACT/docs/html/tab_r.gif differ diff --git a/Extras/GIMPACT/docs/html/tabs.css b/Extras/GIMPACT/docs/html/tabs.css new file mode 100755 index 000000000..c37faafe8 --- /dev/null +++ b/Extras/GIMPACT/docs/html/tabs.css @@ -0,0 +1,102 @@ +/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */ + +DIV.tabs +{ + float : left; + width : 100%; + background : url("tab_b.gif") repeat-x bottom; + margin-bottom : 4px; +} + +DIV.tabs UL +{ + margin : 0px; + padding-left : 10px; + list-style : none; +} + +DIV.tabs LI, DIV.tabs FORM +{ + display : inline; + margin : 0px; + padding : 0px; +} + +DIV.tabs FORM +{ + float : right; +} + +DIV.tabs A +{ + float : left; + background : url("tab_r.gif") no-repeat right top; + border-bottom : 1px solid #84B0C7; + font-size : x-small; + font-weight : bold; + text-decoration : none; +} + +DIV.tabs A:hover +{ + background-position: 100% -150px; +} + +DIV.tabs A:link, DIV.tabs A:visited, +DIV.tabs A:active, DIV.tabs A:hover +{ + color: #1A419D; +} + +DIV.tabs SPAN +{ + float : left; + display : block; + background : url("tab_l.gif") no-repeat left top; + padding : 5px 9px; + white-space : nowrap; +} + +DIV.tabs INPUT +{ + float : right; + display : inline; + font-size : 1em; +} + +DIV.tabs TD +{ + font-size : x-small; + font-weight : bold; + text-decoration : none; +} + + + +/* Commented Backslash Hack hides rule from IE5-Mac \*/ +DIV.tabs SPAN {float : none;} +/* End IE5-Mac hack */ + +DIV.tabs A:hover SPAN +{ + background-position: 0% -150px; +} + +DIV.tabs LI.current A +{ + background-position: 100% -150px; + border-width : 0px; +} + +DIV.tabs LI.current SPAN +{ + background-position: 0% -150px; + padding-bottom : 6px; +} + +DIV.nav +{ + background : none; + border : none; + border-bottom : 1px solid #84B0C7; +} diff --git a/Extras/GIMPACT/docs/html/todo.html b/Extras/GIMPACT/docs/html/todo.html new file mode 100755 index 000000000..001fa4345 --- /dev/null +++ b/Extras/GIMPACT/docs/html/todo.html @@ -0,0 +1,30 @@ + + +GIMPACT: + + + + + + +

+FEATURE REQUESTS

+
    +
  • Tetrahedrization for solid trimeshes.
  • Examples for implement deformable collisions, like cloth simulations and finite elements dynamics.
  • Generic Ray collision functionality.
  • Implement Low level SAT algorithms for speed up convex collisions.
+

+MISCELANEOUS

+
    +
  • Improve the documentation.
  • Benchmarking.
  • Bug reports and Bug Fixes.
+
Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by  + +doxygen 1.5.2
+ + diff --git a/Extras/GIMPACT/include/GIMPACT/Bullet/btGImpactCollisionAlgorithm.h b/Extras/GIMPACT/include/GIMPACT/Bullet/btGImpactCollisionAlgorithm.h new file mode 100755 index 000000000..f16605c24 --- /dev/null +++ b/Extras/GIMPACT/include/GIMPACT/Bullet/btGImpactCollisionAlgorithm.h @@ -0,0 +1,308 @@ +/*! \file btGImpactShape.h +\author Francisco León Nájera +*/ +/* +----------------------------------------------------------------------------- +This source file is part of GIMPACT Library. + +For the latest info, see http://gimpact.sourceforge.net/ + +Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371. +email: projectileman@yahoo.com + + 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 GIMPACT-LICENSE-LGPL.TXT. + (2) The BSD-style license that is included with this library in + the file GIMPACT-LICENSE-BSD.TXT. + (3) The zlib/libpng license that is included with this library in + the file GIMPACT-LICENSE-ZLIB.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 + GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details. + +----------------------------------------------------------------------------- +*/ + +#ifndef BVH_CONCAVE_COLLISION_ALGORITHM_H +#define BVH_CONCAVE_COLLISION_ALGORITHM_H + +#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" +#include "BulletCollision/BroadphaseCollision/btDispatcher.h" +#include "BulletCollision/BroadphaseCollision/btBroadphaseInterface.h" +#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h" +class btDispatcher; +#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" +#include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h" +#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" + +#include "LinearMath/btAlignedObjectArray.h" + +#include "GIMPACT/Bullet/btGImpactShape.h" +#include "BulletCollision/CollisionShapes/btStaticPlaneShape.h" +#include "BulletCollision/CollisionShapes/btCompoundShape.h" +#include "BulletCollision/CollisionShapes/btCompoundShape.h" +#include "BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h" + + + + +//! Collision Algorithm for GImpact Shapes +/*! +For register this algorithm in Bullet, proceed as following: + \code +btCollisionDispatcher * dispatcher = static_cast(m_dynamicsWorld ->getDispatcher()); +btGImpactCollisionAlgorithm::registerAlgorithm(dispatcher); + \endcode +*/ +class btGImpactCollisionAlgorithm : public btCollisionAlgorithm +{ +protected: + btCollisionAlgorithm * m_convex_algorithm; + btPersistentManifold* m_manifoldPtr; + btManifoldResult* m_resultOut; + const btDispatcherInfo * m_dispatchInfo; + int m_triface0; + int m_part0; + int m_triface1; + int m_part1; + + SIMD_FORCE_INLINE btPersistentManifold* newContactManifold(btCollisionObject* body0,btCollisionObject* body1) + { + clearCache(); + m_manifoldPtr = m_dispatcher->getNewManifold(body0,body1); + return m_manifoldPtr; + } + + SIMD_FORCE_INLINE void destroyConvexAlgorithm() + { + if(m_convex_algorithm) + { + delete m_convex_algorithm; + m_convex_algorithm = NULL; + } + } + + SIMD_FORCE_INLINE void clearCache() + { + if(m_manifoldPtr) + { + //m_manifoldPtr->clearManifold(); + m_dispatcher->releaseManifold(m_manifoldPtr); + m_manifoldPtr = NULL; + } + destroyConvexAlgorithm(); + + m_triface0 = -1; + m_part0 = -1; + m_triface1 = -1; + m_part1 = -1; + } + + + // Call before process collision + SIMD_FORCE_INLINE void checkManifold(btCollisionObject* body0,btCollisionObject* body1) + { + if(m_manifoldPtr == NULL) + { + newContactManifold(body0,body1); + } + /*else if(m_manifoldPtr->getBody0()!=body0) + { + clearCache(); + newContactManifold(body0,body1); + }*/ + m_resultOut->setPersistentManifold(m_manifoldPtr); + } + + // Call before process collision + SIMD_FORCE_INLINE btCollisionAlgorithm * newAlgorithm(btCollisionObject* body0,btCollisionObject* body1) + { + checkManifold(body0,body1); + /*btConvexConvexAlgorithm::CreateFunc convexcreatefunc; + btCollisionAlgorithmConstructionInfo cinfo; + cinfo.m_dispatcher = m_dispatcher; + cinfo.m_manifold = m_manifoldPtr;*/ + btCollisionAlgorithm * convex_algorithm = m_dispatcher->findAlgorithm(body0,body1,m_manifoldPtr); + return convex_algorithm ; + } + + // Call before process collision + SIMD_FORCE_INLINE void checkConvexAlgorithm(btCollisionObject* body0,btCollisionObject* body1) + { + if(m_convex_algorithm) return; + m_convex_algorithm = newAlgorithm(body0,body1); + } + + + + + SIMD_FORCE_INLINE void addContactPoint(btCollisionObject * body0, + btCollisionObject * body1, + const btVector3 & point, + const btVector3 & normal, + btScalar distance) + { + checkManifold(body0,body1); + m_resultOut->addContactPoint(normal,point,distance); + } + + void gimpactcompound_vs_gimpactcompound_find_pairs( + const btTransform & trans0, + const btTransform & trans1, + btGImpactCompoundShape * shape0, + btGImpactCompoundShape * shape1,gim_pair_set & pairset) const; + + void gimpacttrimeshpart_vs_gimpacttrimeshpart_find_pairs( + const btTransform & trans0, + const btTransform & trans1, + btGImpactMeshShapePart * shape0, + btGImpactMeshShapePart * shape1,gim_pair_set & pairset) const; + + void gimpactcompound_vs_gimpacttrimeshpart_find_pairs( + const btTransform & trans0, + const btTransform & trans1, + btGImpactCompoundShape * shape0, + btGImpactMeshShapePart * shape1,gim_pair_set & pairset) const; + +public: + + btGImpactCollisionAlgorithm( const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1); + + virtual ~btGImpactCollisionAlgorithm(); + + virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); + + btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); + + + + + struct CreateFunc :public btCollisionAlgorithmCreateFunc + { + virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1) + { + return new btGImpactCollisionAlgorithm(ci,body0,body1); + } + }; + + //! Use this function for register the algorithm externally + static void registerAlgorithm(btCollisionDispatcher * dispatcher); + + //! Collision algorithms + //!@{ + + + + + + void shape_vs_shape_collision( + btCollisionObject * body0, + btCollisionObject * body1, + btCollisionShape * shape0, + btCollisionShape * shape1,bool swapped); + + void convex_vs_convex_collision(btCollisionObject * body0, + btCollisionObject * body1, + btCollisionShape * shape0, + btCollisionShape * shape1); + + void gimpacttrimesh_vs_shape_collision( + btCollisionObject * body0, + btCollisionObject * body1, + btGImpactMeshShape * shape0, + btCollisionShape * shape1,bool swapped); + + void gimpacttrimesh_vs_gimpacttrimesh( + btCollisionObject * body0, + btCollisionObject * body1, + btGImpactMeshShape * shape0, + btGImpactMeshShape * shape1); + + void gimpacttrimesh_vs_gimpactcompound( + btCollisionObject * body0, + btCollisionObject * body1, + btGImpactMeshShape * shape0, + btGImpactCompoundShape * shape1,bool swapped); + + void gimpacttrimesh_vs_trimeshpart( + btCollisionObject * body0, + btCollisionObject * body1, + btGImpactMeshShape * shape0, + btGImpactMeshShapePart * shape1,bool swapped); + + + void gimpactcompound_vs_gimpactcompound_collision( + btCollisionObject * body0, + btCollisionObject * body1, + btGImpactCompoundShape * shape0, + btGImpactCompoundShape * shape1); + + + void gimpactcompound_vs_gimpacttrimeshpart_collision( + btCollisionObject * body0, + btCollisionObject * body1, + btGImpactCompoundShape * shape0, + btGImpactMeshShapePart * shape1,bool swapped); + + + void gimpactcompound_vs_shape_collision( + btCollisionObject * body0, + btCollisionObject * body1, + btGImpactCompoundShape * shape0, + btCollisionShape * shape1,bool swapped); + + void gimpacttrimeshpart_vs_gimpacttrimeshpart_collision( + btCollisionObject * body0, + btCollisionObject * body1, + btGImpactMeshShapePart * shape0, + btGImpactMeshShapePart * shape1,bool swapped); + + void gimpacttrimeshpart_vs_plane_collision( + btCollisionObject * body0, + btCollisionObject * body1, + btGImpactMeshShapePart * shape0, + btStaticPlaneShape * shape1,bool swapped); + + + void gimpacttrimeshpart_vs_concave_collision( + btCollisionObject * body0, + btCollisionObject * body1, + btGImpactMeshShapePart * shape0, + btConcaveShape * shape1,bool swapped); + + void gimpacttrimeshpart_vs_shape_collision( + btCollisionObject * body0, + btCollisionObject * body1, + btGImpactMeshShapePart * shape0, + btCollisionShape * shape1,bool swapped); + + void gimpact_vs_compoundshape(btCollisionObject * body0, + btCollisionObject * body1, + btGImpactShapeInterface * shape0, + btCompoundShape * shape1,bool swapped); + + + void gimpact_vs_shape(btCollisionObject * body0, + btCollisionObject * body1, + btGImpactShapeInterface * shape0, + btCollisionShape * shape1,bool swapped); + + void gimpact_vs_gimpact(btCollisionObject * body0, + btCollisionObject * body1, + btGImpactShapeInterface * shape0, + btGImpactShapeInterface * shape1); + + //!@} + +}; + + + +#endif //BVH_CONCAVE_COLLISION_ALGORITHM_H diff --git a/Extras/GIMPACT/include/GIMPACT/Bullet/btGImpactMassUtil.h b/Extras/GIMPACT/include/GIMPACT/Bullet/btGImpactMassUtil.h new file mode 100755 index 000000000..6f59377c3 --- /dev/null +++ b/Extras/GIMPACT/include/GIMPACT/Bullet/btGImpactMassUtil.h @@ -0,0 +1,69 @@ +/*! \file btGImpactMassUtil.h +\author Francisco León Nájera +*/ +/* +----------------------------------------------------------------------------- +This source file is part of GIMPACT Library. + +For the latest info, see http://gimpact.sourceforge.net/ + +Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371. +email: projectileman@yahoo.com + + 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 GIMPACT-LICENSE-LGPL.TXT. + (2) The BSD-style license that is included with this library in + the file GIMPACT-LICENSE-BSD.TXT. + (3) The zlib/libpng license that is included with this library in + the file GIMPACT-LICENSE-ZLIB.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 + GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details. + +----------------------------------------------------------------------------- +*/ + + +#ifndef GIMPACT_MASS_UTIL_H +#define GIMPACT_MASS_UTIL_H + +#include "LinearMath/btTransform.h" + + + +SIMD_FORCE_INLINE btVector3 gim_inertia_add_transformed( + const btVector3 & source_inertia, const btVector3 & added_inertia, const btTransform & transform) +{ + btMatrix3x3 rotatedTensor = transform.getBasis().scaled(added_inertia) * transform.getBasis().transpose(); + + btScalar x2 = transform.getOrigin()[0]; + x2*= x2; + btScalar y2 = transform.getOrigin()[1]; + y2*= y2; + btScalar z2 = transform.getOrigin()[2]; + z2*= z2; + + btScalar ix = rotatedTensor[0][0]*(y2+z2); + btScalar iy = rotatedTensor[1][1]*(x2+z2); + btScalar iz = rotatedTensor[2][2]*(x2+y2); + + return btVector3(source_inertia[0]+ix,source_inertia[1]+iy,source_inertia[2] + iz); +} + +SIMD_FORCE_INLINE btVector3 gim_get_point_inertia(const btVector3 & point, btScalar mass) +{ + btScalar x2 = point[0]*point[0]; + btScalar y2 = point[1]*point[1]; + btScalar z2 = point[2]*point[2]; + return btVector3(mass*(y2+z2),mass*(x2+z2),mass*(x2+y2)); +} + + +#endif //GIMPACT_MESH_SHAPE_H diff --git a/Extras/GIMPACT/include/GIMPACT/Bullet/btGImpactShape.h b/Extras/GIMPACT/include/GIMPACT/Bullet/btGImpactShape.h new file mode 100755 index 000000000..076a494df --- /dev/null +++ b/Extras/GIMPACT/include/GIMPACT/Bullet/btGImpactShape.h @@ -0,0 +1,811 @@ +/*! \file btGImpactShape.h +\author Francisco León Nájera +*/ +/* +----------------------------------------------------------------------------- +This source file is part of GIMPACT Library. + +For the latest info, see http://gimpact.sourceforge.net/ + +Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371. +email: projectileman@yahoo.com + + 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 GIMPACT-LICENSE-LGPL.TXT. + (2) The BSD-style license that is included with this library in + the file GIMPACT-LICENSE-BSD.TXT. + (3) The zlib/libpng license that is included with this library in + the file GIMPACT-LICENSE-ZLIB.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 + GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details. + +----------------------------------------------------------------------------- +*/ + + +#ifndef GIMPACT_SHAPE_H +#define GIMPACT_SHAPE_H + +#include "BulletCollision/CollisionShapes/btCollisionShape.h" +#include "BulletCollision/CollisionShapes/btTriangleShape.h" +#include "BulletCollision/CollisionShapes/btStridingMeshInterface.h" +#include "BulletCollision/CollisionShapes/btCollisionMargin.h" +#include "BulletCollision/CollisionDispatch/btCollisionWorld.h" +#include "BulletCollision/CollisionShapes/btConcaveShape.h" +#include "LinearMath/btVector3.h" +#include "LinearMath/btTransform.h" +#include "LinearMath/btMatrix3x3.h" +#include "LinearMath/btAlignedObjectArray.h" + +#include "GIMPACT/core/gim_box_set.h" + + +enum eGIMPACT_SHAPE_TYPE +{ + CONST_GIMPACT_COMPOUND_SHAPE = 0, + CONST_GIMPACT_TRIMESH_SHAPE_PART, + CONST_GIMPACT_TRIMESH_SHAPE +}; + +//! Base class for gimpact shapes +class btGImpactShapeInterface : public btConcaveShape +{ +protected: + GIM_AABB m_localAABB; + bool m_needs_update; + btVector3 localScaling; + + //! use this function for perfofm refit in bounding boxes + virtual void calcLocalAABB() = 0; + + +public: + btGImpactShapeInterface() + { + m_localAABB.invalidate(); + m_needs_update = true; + localScaling.setValue(1.f,1.f,1.f); + } + + + //! performs refit operation + /*! + Updates the entire Box set of this shape. + \pre postUpdate() must be called for attemps to calculating the box set, else this function + will does nothing. + \post if m_needs_update == true, then it calls calcLocalAABB(); + */ + SIMD_FORCE_INLINE void updateBound() + { + if(!m_needs_update) return; + calcLocalAABB(); + m_needs_update = false; + } + + //! If the Bounding box is not updated, then this class attemps to calculate it. + /*! + \post Calls updateBound() for update the box set. + */ + void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const + { + GIM_AABB transformedbox = m_localAABB; + transformedbox.appy_transform(t); + aabbMin = transformedbox.m_min; + aabbMax = transformedbox.m_max; + } + + //! Tells to this object that is needed to refit the box set + virtual void postUpdate() + { + m_needs_update = true; + } + + //! Obtains the local box, which is the global calculated box of the total of subshapes + const GIM_AABB & getLocalBox() + { + return m_localAABB; + } + + + virtual int getShapeType() const + { + return GIMPACT_SHAPE_PROXYTYPE; + } + + //! Base method for determinig which kind of GIMPACT shape we get + virtual eGIMPACT_SHAPE_TYPE getGImpactShapeType() = 0; + + //! Determines if this class has a hierarchy structure for sorting its primitives + virtual bool hasBoxSet() const = 0; + + /*! + \post You must call updateBound() for update the box set. + */ + virtual void setLocalScaling(const btVector3& scaling) + { + localScaling = scaling; + postUpdate(); + } + virtual const btVector3& getLocalScaling() const + { + return localScaling; + } + + + //! virtual method for ray collision + virtual void rayTest(const btVector3& rayFrom, const btVector3& rayTo, btCollisionWorld::RayResultCallback& resultCallback) const + { + } + + //! Function for retrieve triangles. + /*! + It gives the triangles in local space + */ + virtual void processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const + { + } + + //!@} + + +}; + + +//! btGIMPACTCompoundShape allows to handle multiple btCollisionShape objects at once +/*! +This allows for concave collision objects. This is more general then the Static Concave btTriangleMeshShape. +*/ +class btGImpactCompoundShape : public btGImpactShapeInterface +{ +public: + //! compound primitive manager + class CompoundPrimitiveManager + { + public: + btGImpactCompoundShape * m_compoundShape; + + CompoundPrimitiveManager(const CompoundPrimitiveManager& compound) + { + m_compoundShape = compound.m_compoundShape; + } + + CompoundPrimitiveManager(btGImpactCompoundShape * compoundShape) + { + m_compoundShape = compoundShape; + } + + CompoundPrimitiveManager() + { + m_compoundShape = NULL; + } + + SIMD_FORCE_INLINE bool is_trimesh() const + { + return false; + } + + SIMD_FORCE_INLINE GUINT get_primitive_count() const + { + return (GUINT )m_compoundShape->getNumChildShapes(); + } + + SIMD_FORCE_INLINE void get_primitive_box(GUINT prim_index ,GIM_AABB & primbox) const + { + btTransform prim_trans = m_compoundShape->getChildTransform(prim_index); + const btCollisionShape* shape = m_compoundShape->getChildShape(prim_index); + shape->getAabb(prim_trans,primbox.m_min,primbox.m_max); + } + + SIMD_FORCE_INLINE void get_primitive_triangle(GUINT prim_index,GIM_TRIANGLE & triangle) const + { + btAssert(0); + } + + }; + + class BoxSetClass: public GIM_BOX_TREE_SET + { + public: + }; + + +protected: + + BoxSetClass m_box_set; + btAlignedObjectArray m_childTransforms; + btAlignedObjectArray m_childShapes; + + + //! use this function for perfofm refit in bounding boxes + virtual void calcLocalAABB() + { + if(m_box_set.getNodeCount() == 0) + { + m_box_set.buildSet(); + } + else + { + m_box_set.update(); + } + + m_localAABB = m_box_set.getGlobalBox(); + } +public: + + btGImpactCompoundShape() + { + m_box_set.setPrimitiveManager(CompoundPrimitiveManager(this)); + } + + virtual ~btGImpactCompoundShape() + { + } + + //! Obtains the primitive manager + SIMD_FORCE_INLINE const CompoundPrimitiveManager & getPrimitiveManager() const + { + return m_box_set.getPrimitiveManager(); + } + + //! Use this method for adding children + void addChildShape(const btTransform& localTransform,btCollisionShape* shape) + { + m_childTransforms.push_back(localTransform); + m_childShapes.push_back(shape); + } + + //! Gets the number of children + int getNumChildShapes() const + { + return int (m_childShapes.size()); + } + + //! Gets the children + btCollisionShape* getChildShape(int index) + { + return m_childShapes[index]; + } + + //! Gets the children + const btCollisionShape* getChildShape(int index) const + { + return m_childShapes[index]; + } + + //! Gets the children transform + btTransform getChildTransform(int index) const + { + return m_childTransforms[index]; + } + + //! Sets the children transform + /*! + \post You must call updateBound() for update the box set. + */ + void setChildTransform(int index, const btTransform & transform) + { + m_childTransforms[index] = transform; + postUpdate(); + } + + //! Calculates the exact inertia tensor for this shape + virtual void calculateLocalInertia(btScalar mass,btVector3& inertia); + + + BoxSetClass * getBoxSet() + { + return &m_box_set; + } + + virtual char* getName()const + { + return "GImpactCompound"; + } + + virtual eGIMPACT_SHAPE_TYPE getGImpactShapeType() + { + return CONST_GIMPACT_COMPOUND_SHAPE; + } + + virtual bool hasBoxSet() const + { + if(m_box_set.getNodeCount() == 0) return false; + return true; + } + + virtual void rayTest(const btVector3& rayFrom, const btVector3& rayTo, btCollisionWorld::RayResultCallback& resultCallback) const; + + +}; + +//! Helper class for colliding Bullet Triangle Shapes +/*! +This class implements a better getAabb method than the previous btTriangleShape class +*/ +class btTriangleShapeEx: public btTriangleShape +{ +public: + btTriangleShapeEx(const btVector3& p0,const btVector3& p1,const btVector3& p2): btTriangleShape(p0,p1,p2) + { + } + + virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax)const + { + btVector3 tv0 = t(m_vertices1[0]); + btVector3 tv1 = t(m_vertices1[1]); + btVector3 tv2 = t(m_vertices1[2]); + + GIM_AABB trianglebox(tv0,tv1,tv2,m_collisionMargin); + aabbMin = trianglebox.m_min; + aabbMax = trianglebox.m_max; + } + + +}; + + +//! This class manages a sub part of a mesh supplied by the btStridingMeshInterface interface. +/*! +- Simply create this shape by passing the btStridingMeshInterface to the constructor btGImpactMeshShapePart, then you must call updateBound() after creating the mesh +- When making operations with this shape, you must call lock before accessing to the trimesh primitives, and then call unlock +- You can handle deformable meshes with this shape, by calling postUpdate() every time when changing the mesh vertices. + +*/ +class btGImpactMeshShapePart : public btGImpactShapeInterface +{ +public: + //! Trimesh primitive manager + /*! + Manages the info from btStridingMeshInterface object and controls the Lock/Unlock mechanism + */ + class TrimeshPrimitiveManager + { + public: + btScalar m_margin; + btStridingMeshInterface * m_meshInterface; + btVector3 m_scale; + int m_part; + GUINT m_lock_count; + const unsigned char *vertexbase; + int numverts; + PHY_ScalarType type; + int stride; + const unsigned char *indexbase; + int indexstride; + int numfaces; + PHY_ScalarType indicestype; + + TrimeshPrimitiveManager() + { + m_meshInterface = NULL; + m_part = 0; + m_margin = 0.1f; + m_scale = btVector3(1.f,1.f,1.f); + m_lock_count = 0; + vertexbase = 0; + numverts = 0; + stride = 0; + indexbase = 0; + indexstride = 0; + numfaces = 0; + } + + TrimeshPrimitiveManager(const TrimeshPrimitiveManager & manager) + { + m_meshInterface = manager.m_meshInterface; + m_part = manager.m_part; + m_margin = manager.m_margin; + m_scale = manager.m_meshInterface->getScaling(); + m_lock_count = 0; + vertexbase = 0; + numverts = 0; + stride = 0; + indexbase = 0; + indexstride = 0; + numfaces = 0; + + } + + TrimeshPrimitiveManager( + btStridingMeshInterface * meshInterface, int part) + { + m_meshInterface = meshInterface; + m_part = part; + m_scale = m_meshInterface->getScaling(); + m_margin = 0.1f; + m_lock_count = 0; + vertexbase = 0; + numverts = 0; + stride = 0; + indexbase = 0; + indexstride = 0; + numfaces = 0; + + } + + + void lock() + { + if(m_lock_count>0) + { + m_lock_count++; + return; + } + m_meshInterface->getLockedReadOnlyVertexIndexBase( + &vertexbase,numverts, + type, stride,&indexbase, indexstride, numfaces,indicestype,m_part); + + m_lock_count = 1; + } + + void unlock() + { + if(m_lock_count == 0) return; + if(m_lock_count>1) + { + --m_lock_count; + return; + } + m_meshInterface->unLockReadOnlyVertexBase(m_part); + vertexbase = NULL; + m_lock_count = 0; + } + + SIMD_FORCE_INLINE bool is_trimesh() const + { + return true; + } + + SIMD_FORCE_INLINE GUINT get_primitive_count() const + { + return (GUINT )numfaces; + } + + SIMD_FORCE_INLINE GUINT get_vertex_count() const + { + return (GUINT )numverts; + } + + SIMD_FORCE_INLINE void get_indices(GUINT face_index,GUINT &i0,GUINT &i1,GUINT &i2) const + { + if(indicestype == PHY_SHORT) + { + GUSHORT * s_indices = (GUSHORT *)(indexbase + face_index*indexstride); + i0 = s_indices[0]; + i1 = s_indices[1]; + i2 = s_indices[2]; + } + else + { + GUINT * i_indices = (GUINT *)(indexbase + face_index*indexstride); + i0 = i_indices[0]; + i1 = i_indices[1]; + i2 = i_indices[2]; + } + } + + SIMD_FORCE_INLINE void get_vertex(GUINT vertex_index, btVector3 & vertex) const + { + if(indicestype == PHY_DOUBLE) + { + double * dvertices = (double *)(vertexbase + vertex_index*stride); + vertex[0] = btScalar(dvertices[0]*m_scale[0]); + vertex[1] = btScalar(dvertices[1]*m_scale[1]); + vertex[2] = btScalar(dvertices[2]*m_scale[2]); + } + else + { + float * svertices = (float *)(vertexbase + vertex_index*stride); + vertex[0] = svertices[0]*m_scale[0]; + vertex[1] = svertices[1]*m_scale[1]; + vertex[2] = svertices[2]*m_scale[2]; + } + } + + SIMD_FORCE_INLINE void get_primitive_box(GUINT prim_index ,GIM_AABB & primbox) const + { + GIM_TRIANGLE triangle; + get_primitive_triangle(prim_index,triangle); + primbox = triangle.get_box(); + } + + SIMD_FORCE_INLINE void get_primitive_triangle(GUINT prim_index,GIM_TRIANGLE & triangle) const + { + GUINT indices[3]; + get_indices(prim_index,indices[0],indices[1],indices[2]); + get_vertex(indices[0],triangle.m_vertices[0]); + get_vertex(indices[1],triangle.m_vertices[1]); + get_vertex(indices[2],triangle.m_vertices[2]); + triangle.m_margin = m_margin; + } + + SIMD_FORCE_INLINE void get_bullet_triangle(GUINT prim_index,btTriangleShapeEx & triangle) const + { + GUINT indices[3]; + get_indices(prim_index,indices[0],indices[1],indices[2]); + get_vertex(indices[0],triangle.m_vertices1[0]); + get_vertex(indices[1],triangle.m_vertices1[1]); + get_vertex(indices[2],triangle.m_vertices1[2]); + triangle.setMargin(m_margin); + } + + }; + + class BoxSetClass: public GIM_BOX_TREE_SET + { + public: + }; + + +protected: + BoxSetClass m_box_set; + + //! use this function for perfofm refit in bounding boxes + virtual void calcLocalAABB() + { + lock(); + if(m_box_set.getNodeCount() == 0) + { + m_box_set.buildSet(); + } + else + { + m_box_set.update(); + } + unlock(); + + m_localAABB = m_box_set.getGlobalBox(); + } +public: + + btGImpactMeshShapePart() + { + } + + btGImpactMeshShapePart(const btGImpactMeshShapePart & meshpart) + { + m_box_set.setPrimitiveManager(meshpart.getPrimitiveManager()); + } + + + btGImpactMeshShapePart(btStridingMeshInterface * meshInterface, int part) + { + m_box_set.setPrimitiveManager(TrimeshPrimitiveManager(meshInterface,part)); + } + + virtual ~btGImpactMeshShapePart() + { + } + + SIMD_FORCE_INLINE const TrimeshPrimitiveManager & getPrimitiveManager() const + { + return m_box_set.getPrimitiveManager(); + } + + SIMD_FORCE_INLINE void lock() const + { + void * dummy = (void*)(& m_box_set.getPrimitiveManager()); + TrimeshPrimitiveManager * dummymanager = static_cast(dummy); + dummymanager->lock(); + } + + SIMD_FORCE_INLINE void unlock() const + { + void * dummy = (void*)(&m_box_set.getPrimitiveManager()); + TrimeshPrimitiveManager * dummymanager = static_cast(dummy); + dummymanager->unlock(); + } + + virtual void calculateLocalInertia(btScalar mass,btVector3& inertia); + + SIMD_FORCE_INLINE BoxSetClass * getBoxSet() + { + return &m_box_set; + } + + virtual char* getName()const + { + return "GImpactMeshShapePart"; + } + + virtual eGIMPACT_SHAPE_TYPE getGImpactShapeType() + { + return CONST_GIMPACT_TRIMESH_SHAPE_PART; + } + + virtual bool hasBoxSet() const + { + if(m_box_set.getNodeCount() == 0) return false; + return true; + } + + SIMD_FORCE_INLINE GUINT getTriangleCount() const + { + return m_box_set.getPrimitiveManager().get_primitive_count(); + } + + SIMD_FORCE_INLINE void getTriangle(GUINT triangle_index, GIM_TRIANGLE & triangle) const + { + m_box_set.getPrimitiveManager().get_primitive_triangle(triangle_index,triangle); + } + + SIMD_FORCE_INLINE void getBulletTriangle(GUINT prim_index,btTriangleShapeEx & triangle) const + { + m_box_set.getPrimitiveManager().get_bullet_triangle(prim_index,triangle); + } + + SIMD_FORCE_INLINE GUINT getVertexCount() const + { + return m_box_set.getPrimitiveManager().get_vertex_count(); + } + + SIMD_FORCE_INLINE void getVertex(GUINT vertex_index, btVector3 & vertex) const + { + m_box_set.getPrimitiveManager().get_vertex(vertex_index,vertex); + } + + SIMD_FORCE_INLINE void setMargin(btScalar margin) + { + m_box_set.getPrimitiveManager().m_margin = margin; + postUpdate(); + } + + SIMD_FORCE_INLINE btScalar getMargin() const + { + return m_box_set.getPrimitiveManager().m_margin; + } + + virtual void setLocalScaling(const btVector3& scaling) + { + m_box_set.getPrimitiveManager().m_scale = scaling; + postUpdate(); + } + + virtual const btVector3& getLocalScaling() const + { + return m_box_set.getPrimitiveManager().m_scale; + } + + SIMD_FORCE_INLINE GUINT getPart() const + { + return (GUINT)m_box_set.getPrimitiveManager().m_part; + } + + virtual void rayTest(const btVector3& rayFrom, const btVector3& rayTo, btCollisionWorld::RayResultCallback& resultCallback) const; + + virtual void processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const; +}; + + +//! This class manages a mesh supplied by the btStridingMeshInterface interface. +/*! +Set of btGImpactMeshShapePart parts +- Simply create this shape by passing the btStridingMeshInterface to the constructor btGImpactMeshShape, then you must call updateBound() after creating the mesh + +- You can handle deformable meshes with this shape, by calling postUpdate() every time when changing the mesh vertices. + +*/ + +class btGImpactMeshShape : public btGImpactShapeInterface +{ +protected: + btAlignedObjectArray m_mesh_parts; + void buildMeshParts(btStridingMeshInterface * meshInterface) + { + for (int i=0;igetNumSubParts() ;++i ) + { + btGImpactMeshShapePart * newpart = new btGImpactMeshShapePart(meshInterface,i); + m_mesh_parts.push_back(newpart); + } + } + + //! use this function for perfofm refit in bounding boxes + virtual void calcLocalAABB() + { + m_localAABB.invalidate(); + int i = m_mesh_parts.size(); + while(i--) + { + m_mesh_parts[i]->updateBound(); + m_localAABB.merge(m_mesh_parts[i]->getLocalBox()); + } + } + +public: + btGImpactMeshShape(btStridingMeshInterface * meshInterface) + { + buildMeshParts(meshInterface); + } + + virtual ~btGImpactMeshShape() + { + int i = m_mesh_parts.size(); + while(i--) + { + btGImpactMeshShapePart * part = m_mesh_parts[i]; + delete part; + } + m_mesh_parts.clear(); + } + + int getMeshPartCount() + { + return m_mesh_parts.size(); + } + + btGImpactMeshShapePart * getMeshPart(int index) + { + return m_mesh_parts[index]; + } + + + + const btGImpactMeshShapePart * getMeshPart(int index) const + { + return m_mesh_parts[index]; + } + + + virtual void setLocalScaling(const btVector3& scaling) + { + localScaling = scaling; + + int i = m_mesh_parts.size(); + while(i--) + { + btGImpactMeshShapePart * part = m_mesh_parts[i]; + part->setLocalScaling(scaling); + } + + m_needs_update = true; + } + + //! Tells to this object that is needed to refit all the meshes + virtual void postUpdate() + { + int i = m_mesh_parts.size(); + while(i--) + { + btGImpactMeshShapePart * part = m_mesh_parts[i]; + part->postUpdate(); + } + + m_needs_update = true; + } + + + virtual void calculateLocalInertia(btScalar mass,btVector3& inertia); + virtual eGIMPACT_SHAPE_TYPE getGImpactShapeType() + { + return CONST_GIMPACT_TRIMESH_SHAPE; + } + + virtual bool hasBoxSet() const + { + return false; + } + + virtual char* getName()const + { + return "GImpactMesh"; + } + + virtual void rayTest(const btVector3& rayFrom, const btVector3& rayTo, btCollisionWorld::RayResultCallback& resultCallback) const; + + //! Function for retrieve triangles. + /*! + It gives the triangles in local space + */ + virtual void processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const; +}; + + +#endif //GIMPACT_MESH_SHAPE_H diff --git a/Extras/GIMPACT/include/GIMPACT/core/gim_array.h b/Extras/GIMPACT/include/GIMPACT/core/gim_array.h new file mode 100755 index 000000000..fd9e6732e --- /dev/null +++ b/Extras/GIMPACT/include/GIMPACT/core/gim_array.h @@ -0,0 +1,332 @@ +#ifndef GIM_ARRAY_H_INCLUDED +#define GIM_ARRAY_H_INCLUDED +/*! \file gim_array.h +\author Francisco León Nájera +*/ +/* +----------------------------------------------------------------------------- +This source file is part of GIMPACT Library. + +For the latest info, see http://gimpact.sourceforge.net/ + +Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371. +email: projectileman@yahoo.com + + 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 GIMPACT-LICENSE-LGPL.TXT. + (2) The BSD-style license that is included with this library in + the file GIMPACT-LICENSE-BSD.TXT. + (3) The zlib/libpng license that is included with this library in + the file GIMPACT-LICENSE-ZLIB.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 + GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details. + +----------------------------------------------------------------------------- +*/ + +#include "GIMPACT/core/gim_memory.h" + +/*! \addtogroup CONTAINERS +\brief +Abstract class for template containers +*/ +//! @{ + +#define GIM_ARRAY_GROW_INCREMENT 2 +#define GIM_ARRAY_GROW_FACTOR 2 + +//! Very simple array container with fast access and simd memory +template +class gim_array +{ +public: +//! properties +//!@{ + T *m_data; + GUINT m_size; + GUINT m_allocated_size; +//!@} +//! protected operations +//!@{ + + inline void destroyData() + { + m_allocated_size = 0; + if(m_data==NULL) return; + gim_free(m_data); + m_data = NULL; + } + + inline bool resizeData(GUINT newsize) + { + if(newsize==0) + { + destroyData(); + return true; + } + + if(m_size>0) + { + m_data = (T*)gim_realloc(m_data,m_size*sizeof(T),newsize*sizeof(T)); + } + else + { + m_data = (T*)gim_alloc(newsize*sizeof(T)); + } + m_allocated_size = newsize; + return true; + } + + inline bool growingCheck() + { + if(m_allocated_size<=m_size) + { + GUINT requestsize = m_size; + m_size = m_allocated_size; + if(resizeData((requestsize+GIM_ARRAY_GROW_INCREMENT)*GIM_ARRAY_GROW_FACTOR)==false) return false; + } + return true; + } + +//!@} +//! public operations +//!@{ + inline bool reserve(GUINT size) + { + if(m_allocated_size>=size) return false; + return resizeData(size); + } + + inline void clear_range(GUINT start_range) + { + while(m_size>start_range) + { + m_data[--m_size].~T(); + } + } + + inline void clear() + { + if(m_size==0)return; + clear_range(0); + } + + inline void clear_memory() + { + clear(); + destroyData(); + } + + gim_array() + { + m_data = 0; + m_size = 0; + m_allocated_size = 0; + } + + gim_array(GUINT reservesize) + { + m_data = 0; + m_size = 0; + + m_allocated_size = 0; + reserve(reservesize); + } + + ~gim_array() + { + clear_memory(); + } + + inline GUINT size() const + { + return m_size; + } + + inline GUINT max_size() const + { + return m_allocated_size; + } + + inline T & operator[](size_t i) + { + return m_data[i]; + } + inline const T & operator[](size_t i) const + { + return m_data[i]; + } + + inline T * pointer(){ return m_data;} + inline const T * pointer() const + { return m_data;} + + + inline T * get_pointer_at(GUINT i) + { + return m_data + i; + } + + inline const T * get_pointer_at(GUINT i) const + { + return m_data + i; + } + + inline T & at(GUINT i) + { + return m_data[i]; + } + + inline const T & at(GUINT i) const + { + return m_data[i]; + } + + inline T & front() + { + return *m_data; + } + + inline const T & front() const + { + return *m_data; + } + + inline T & back() + { + return m_data[m_size-1]; + } + + inline const T & back() const + { + return m_data[m_size-1]; + } + + + inline void swap(GUINT i, GUINT j) + { + gim_swap_elements(m_data,i,j); + } + + inline void push_back(const T & obj) + { + this->growingCheck(); + m_data[m_size] = obj; + m_size++; + } + + //!Simply increase the m_size, doesn't call the new element constructor + inline void push_back_mem() + { + this->growingCheck(); + m_size++; + } + + inline void push_back_memcpy(const T & obj) + { + this->growingCheck(); + irr_simd_memcpy(&m_data[m_size],&obj,sizeof(T)); + m_size++; + } + + inline void pop_back() + { + m_size--; + m_data[m_size].~T(); + } + + //!Simply decrease the m_size, doesn't call the deleted element destructor + inline void pop_back_mem() + { + m_size--; + } + + //! fast erase + inline void erase(GUINT index) + { + if(indexgrowingCheck(); + for(GUINT i = m_size;i>index;i--) + { + gim_simd_memcpy(m_data+i,m_data+i-1,sizeof(T)); + } + m_size++; + } + + inline void insert(const T & obj,GUINT index) + { + insert_mem(index); + m_data[index] = obj; + } + + inline void resize(GUINT size, bool call_constructor = true) + { + + if(size>m_size) + { + reserve(size); + if(call_constructor) + { + T obj; + while(m_size +SIMD_FORCE_INLINE bool POINT_IN_HULL( + const CLASS_POINT& point,const CLASS_PLANE * planes,GUINT plane_count) +{ + GREAL _dis; + for (GUINT _i = 0;_i< plane_count;++_i) + { + _dis = DISTANCE_PLANE_POINT(planes[_i],point); + if(_dis>0.0f) return false; + } + return true; +} + +template +SIMD_FORCE_INLINE void PLANE_CLIP_SEGMENT( + const CLASS_POINT& s1, + const CLASS_POINT &s2,const CLASS_PLANE &plane,CLASS_POINT &clipped) +{ + GREAL _dis1,_dis2; + _dis1 = DISTANCE_PLANE_POINT(plane,s1); + VEC_DIFF(clipped,s2,s1); + _dis2 = VEC_DOT(clipped,plane); + VEC_SCALE(clipped,-_dis1/_dis2,clipped); + VEC_SUM(clipped,clipped,s1); +} + +enum ePLANE_INTERSECTION_TYPE +{ + G_BACK_PLANE = 0, + G_COLLIDE_PLANE, + G_FRONT_PLANE +}; + +enum eLINE_PLANE_INTERSECTION_TYPE +{ + G_FRONT_PLANE_S1 = 0, + G_FRONT_PLANE_S2, + G_BACK_PLANE_S1, + G_BACK_PLANE_S2, + G_COLLIDE_PLANE_S1, + G_COLLIDE_PLANE_S2 +}; + +//! Confirms if the plane intersect the edge or nor +/*! +intersection type must have the following values +
    +
  • 0 : Segment in front of plane, s1 closest +
  • 1 : Segment in front of plane, s2 closest +
  • 2 : Segment in back of plane, s1 closest +
  • 3 : Segment in back of plane, s2 closest +
  • 4 : Segment collides plane, s1 in back +
  • 5 : Segment collides plane, s2 in back +
+*/ + +template +SIMD_FORCE_INLINE eLINE_PLANE_INTERSECTION_TYPE PLANE_CLIP_SEGMENT2( + const CLASS_POINT& s1, + const CLASS_POINT &s2, + const CLASS_PLANE &plane,CLASS_POINT &clipped) +{ + GREAL _dis1 = DISTANCE_PLANE_POINT(plane,s1); + GREAL _dis2 = DISTANCE_PLANE_POINT(plane,s2); + if(_dis1 >-G_EPSILON && _dis2 >-G_EPSILON) + { + if(_dis1<_dis2) return G_FRONT_PLANE_S1; + return G_FRONT_PLANE_S2; + } + else if(_dis1 _dis2) return G_BACK_PLANE_S1; + return G_BACK_PLANE_S2; + } + + VEC_DIFF(clipped,s2,s1); + _dis2 = VEC_DOT(clipped,plane); + VEC_SCALE(clipped,-_dis1/_dis2,clipped); + VEC_SUM(clipped,clipped,s1); + if(_dis1<_dis2) return G_COLLIDE_PLANE_S1; + return G_COLLIDE_PLANE_S2; +} + +//! Confirms if the plane intersect the edge or not +/*! +clipped1 and clipped2 are the vertices behind the plane. +clipped1 is the closest + +intersection_type must have the following values +
    +
  • 0 : Segment in front of plane, s1 closest +
  • 1 : Segment in front of plane, s2 closest +
  • 2 : Segment in back of plane, s1 closest +
  • 3 : Segment in back of plane, s2 closest +
  • 4 : Segment collides plane, s1 in back +
  • 5 : Segment collides plane, s2 in back +
+*/ +template +SIMD_FORCE_INLINE eLINE_PLANE_INTERSECTION_TYPE PLANE_CLIP_SEGMENT_CLOSEST( + const CLASS_POINT& s1, + const CLASS_POINT &s2, + const CLASS_PLANE &plane, + CLASS_POINT &clipped1,CLASS_POINT &clipped2) +{ + eLINE_PLANE_INTERSECTION_TYPE intersection_type = PLANE_CLIP_SEGMENT2(s1,s2,plane,clipped1); + switch(intersection_type) + { + case G_FRONT_PLANE_S1: + VEC_COPY(clipped1,s1); + VEC_COPY(clipped2,s2); + break; + case G_FRONT_PLANE_S2: + VEC_COPY(clipped1,s2); + VEC_COPY(clipped2,s1); + break; + case G_BACK_PLANE_S1: + VEC_COPY(clipped1,s1); + VEC_COPY(clipped2,s2); + break; + case G_BACK_PLANE_S2: + VEC_COPY(clipped1,s2); + VEC_COPY(clipped2,s1); + break; + case G_COLLIDE_PLANE_S1: + VEC_COPY(clipped2,s1); + break; + case G_COLLIDE_PLANE_S2: + VEC_COPY(clipped2,s2); + break; + } + return intersection_type; +} + + +//! Finds the 2 smallest cartesian coordinates of a plane normal +#define PLANE_MINOR_AXES(plane, i0, i1) VEC_MINOR_AXES(plane, i0, i1) + +//! Ray plane collision in one way +/*! +Intersects plane in one way only. The ray must face the plane (normals must be in opossite directions).
+It uses the PLANEDIREPSILON constant. +*/ +template +SIMD_FORCE_INLINE bool RAY_PLANE_COLLISION( + const CLASS_PLANE & plane, + const CLASS_POINT & vDir, + const CLASS_POINT & vPoint, + CLASS_POINT & pout,T &tparam) +{ + GREAL _dis,_dotdir; + _dotdir = VEC_DOT(plane,vDir); + if(_dotdir +SIMD_FORCE_INLINE GUINT LINE_PLANE_COLLISION( + const CLASS_PLANE & plane, + const CLASS_POINT & vDir, + const CLASS_POINT & vPoint, + CLASS_POINT & pout, + T &tparam, + T tmin, T tmax) +{ + GREAL _dis,_dotdir; + _dotdir = VEC_DOT(plane,vDir); + if(btFabs(_dotdir)tmax) + { + returnvalue = 0; + tparam = tmax; + } + + VEC_SCALE(pout,tparam,vDir); + VEC_SUM(pout,vPoint,pout); + return returnvalue; +} + +/*! \brief Returns the Ray on which 2 planes intersect if they do. + Written by Rodrigo Hernandez on ODE convex collision + + \param p1 Plane 1 + \param p2 Plane 2 + \param p Contains the origin of the ray upon returning if planes intersect + \param d Contains the direction of the ray upon returning if planes intersect + \return true if the planes intersect, 0 if paralell. + +*/ +template +SIMD_FORCE_INLINE bool INTERSECT_PLANES( + const CLASS_PLANE &p1, + const CLASS_PLANE &p2, + CLASS_POINT &p, + CLASS_POINT &d) +{ + VEC_CROSS(d,p1,p2); + GREAL denom = VEC_DOT(d, d); + if(GIM_IS_ZERO(denom)) return false; + vec3f _n; + _n[0]=p1[3]*p2[0] - p2[3]*p1[0]; + _n[1]=p1[3]*p2[1] - p2[3]*p1[1]; + _n[2]=p1[3]*p2[2] - p2[3]*p1[2]; + VEC_CROSS(p,_n,d); + p[0]/=denom; + p[1]/=denom; + p[2]/=denom; + return true; +} + +//***************** SEGMENT and LINE FUNCTIONS **********************************/// + +/*! Finds the closest point(cp) to (v) on a segment (e1,e2) + */ +template +SIMD_FORCE_INLINE void CLOSEST_POINT_ON_SEGMENT( + CLASS_POINT & cp, const CLASS_POINT & v, + const CLASS_POINT &e1,const CLASS_POINT &e2) +{ + vec3f _n; + VEC_DIFF(_n,e2,e1); + VEC_DIFF(cp,v,e1); + GREAL _scalar = VEC_DOT(cp, _n); + _scalar/= VEC_DOT(_n, _n); + if(_scalar <0.0f) + { + VEC_COPY(cp,e1); + } + else if(_scalar >1.0f) + { + VEC_COPY(cp,e2); + } + else + { + VEC_SCALE(cp,_scalar,_n); + VEC_SUM(cp,cp,e1); + } +} + + +/*! \brief Finds the line params where these lines intersect. + +\param dir1 Direction of line 1 +\param point1 Point of line 1 +\param dir2 Direction of line 2 +\param point2 Point of line 2 +\param t1 Result Parameter for line 1 +\param t2 Result Parameter for line 2 +\param dointersect 0 if the lines won't intersect, else 1 + +*/ +template +SIMD_FORCE_INLINE bool LINE_INTERSECTION_PARAMS( + const CLASS_POINT & dir1, + CLASS_POINT & point1, + const CLASS_POINT & dir2, + CLASS_POINT & point2, + T& t1,T& t2) +{ + GREAL det; + GREAL e1e1 = VEC_DOT(dir1,dir1); + GREAL e1e2 = VEC_DOT(dir1,dir2); + GREAL e2e2 = VEC_DOT(dir2,dir2); + vec3f p1p2; + VEC_DIFF(p1p2,point1,point2); + GREAL p1p2e1 = VEC_DOT(p1p2,dir1); + GREAL p1p2e2 = VEC_DOT(p1p2,dir2); + det = e1e2*e1e2 - e1e1*e2e2; + if(GIM_IS_ZERO(det)) return false; + t1 = (e1e2*p1p2e2 - e2e2*p1p2e1)/det; + t2 = (e1e1*p1p2e2 - e1e2*p1p2e1)/det; + return true; +} + +//! Find closest points on segments +template +SIMD_FORCE_INLINE void SEGMENT_COLLISION( + const CLASS_POINT & vA1, + const CLASS_POINT & vA2, + const CLASS_POINT & vB1, + const CLASS_POINT & vB2, + CLASS_POINT & vPointA, + CLASS_POINT & vPointB) +{ + CLASS_POINT _AD,_BD,_N; + vec4f _M;//plane + VEC_DIFF(_AD,vA2,vA1); + VEC_DIFF(_BD,vB2,vB1); + VEC_CROSS(_N,_AD,_BD); + GREAL _tp = VEC_DOT(_N,_N); + if(_tp_M[1]) + { + invert_b_order = true; + GIM_SWAP_NUMBERS(_M[0],_M[1]); + } + _M[2] = VEC_DOT(vA1,_AD); + _M[3] = VEC_DOT(vA2,_AD); + //mid points + _N[0] = (_M[0]+_M[1])*0.5f; + _N[1] = (_M[2]+_M[3])*0.5f; + + if(_N[0]<_N[1]) + { + if(_M[1]<_M[2]) + { + vPointB = invert_b_order?vB1:vB2; + vPointA = vA1; + } + else if(_M[1]<_M[3]) + { + vPointB = invert_b_order?vB1:vB2; + CLOSEST_POINT_ON_SEGMENT(vPointA,vPointB,vA1,vA2); + } + else + { + vPointA = vA2; + CLOSEST_POINT_ON_SEGMENT(vPointB,vPointA,vB1,vB2); + } + } + else + { + if(_M[3]<_M[0]) + { + vPointB = invert_b_order?vB2:vB1; + vPointA = vA2; + } + else if(_M[3]<_M[1]) + { + vPointA = vA2; + CLOSEST_POINT_ON_SEGMENT(vPointB,vPointA,vB1,vB2); + } + else + { + vPointB = invert_b_order?vB1:vB2; + CLOSEST_POINT_ON_SEGMENT(vPointA,vPointB,vA1,vA2); + } + } + return; + } + + + VEC_CROSS(_M,_N,_BD); + _M[3] = VEC_DOT(_M,vB1); + + LINE_PLANE_COLLISION(_M,_AD,vA1,vPointA,_tp,0.0f, 1.0f); + /*Closest point on segment*/ + VEC_DIFF(vPointB,vPointA,vB1); + _tp = VEC_DOT(vPointB, _BD); + _tp/= VEC_DOT(_BD, _BD); + _tp = GIM_CLAMP(_tp,0.0f,1.0f); + VEC_SCALE(vPointB,_tp,_BD); + VEC_SUM(vPointB,vPointB,vB1); +} + + + + +//! Line box intersection in one dimension +/*! + +*\param pos Position of the ray +*\param dir Projection of the Direction of the ray +*\param bmin Minimum bound of the box +*\param bmax Maximum bound of the box +*\param tfirst the minimum projection. Assign to 0 at first. +*\param tlast the maximum projection. Assign to INFINITY at first. +*\return true if there is an intersection. +*/ +template +SIMD_FORCE_INLINE bool BOX_AXIS_INTERSECT(T pos, T dir,T bmin, T bmax, T & tfirst, T & tlast) +{ + if(GIM_IS_ZERO(dir)) + { + return !(pos < bmin || pos > bmax); + } + GREAL a0 = (bmin - pos) / dir; + GREAL a1 = (bmax - pos) / dir; + if(a0 > a1) GIM_SWAP_NUMBERS(a0, a1); + tfirst = GIM_MAX(a0, tfirst); + tlast = GIM_MIN(a1, tlast); + if (tlast < tfirst) return false; + return true; +} + + +//! Sorts 3 componets +template +SIMD_FORCE_INLINE void SORT_3_INDICES( + const T * values, + GUINT * order_indices) +{ + //get minimum + order_indices[0] = values[0] < values[1] ? (values[0] < values[2] ? 0 : 2) : (values[1] < values[2] ? 1 : 2); + + //get second and third + GUINT i0 = (order_indices[0] + 1)%3; + GUINT i1 = (i0 + 1)%3; + + if(values[i0] < values[i1]) + { + order_indices[1] = i0; + order_indices[2] = i1; + } + else + { + order_indices[1] = i1; + order_indices[2] = i0; + } +} + + + +//! @} + + +#endif // GIM_VECTOR_H_INCLUDED diff --git a/Extras/GIMPACT/include/GIMPACT/core/gim_bitset.h b/Extras/GIMPACT/include/GIMPACT/core/gim_bitset.h new file mode 100755 index 000000000..893eea5ff --- /dev/null +++ b/Extras/GIMPACT/include/GIMPACT/core/gim_bitset.h @@ -0,0 +1,129 @@ +#ifndef GIM_BITSET_H_INCLUDED +#define GIM_BITSET_H_INCLUDED +/*! \file gim_bitset.h +\author Francisco León Nájera +*/ +/* +----------------------------------------------------------------------------- +This source file is part of GIMPACT Library. + +For the latest info, see http://gimpact.sourceforge.net/ + +Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371. +email: projectileman@yahoo.com + + 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 GIMPACT-LICENSE-LGPL.TXT. + (2) The BSD-style license that is included with this library in + the file GIMPACT-LICENSE-BSD.TXT. + (3) The zlib/libpng license that is included with this library in + the file GIMPACT-LICENSE-ZLIB.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 + GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details. + +----------------------------------------------------------------------------- +*/ + +#include "GIMPACT/core/gim_array.h" + +/*! \addtogroup CONTAINERS +\brief +Abstract class for template containers +*/ +//! @{ + +#define GUINT_BIT_COUNT 32 +#define GUINT_EXPONENT 5 + +class gim_bitset +{ +public: + gim_array m_container; + + gim_bitset() + { + + } + + gim_bitset(GUINT bits_count) + { + resize(bits_count); + } + + ~gim_bitset() + { + } + + inline bool resize(GUINT newsize) + { + GUINT oldsize = m_container.size(); + m_container.resize(newsize/GUINT_BIT_COUNT + 1,false); + while(oldsize=size()) + { + resize(bit_index); + } + m_container[bit_index >> GUINT_EXPONENT] |= (1 << (bit_index & (GUINT_BIT_COUNT-1))); + } + + ///Return 0 or 1 + inline char get(GUINT bit_index) + { + if(bit_index>=size()) + { + return 0; + } + char value = m_container[bit_index >> GUINT_EXPONENT] & + (1 << (bit_index & (GUINT_BIT_COUNT-1))); + return value; + } + + inline void clear(GUINT bit_index) + { + m_container[bit_index >> GUINT_EXPONENT] &= ~(1 << (bit_index & (GUINT_BIT_COUNT-1))); + } +}; + + +//! @} + + + +#endif // GIM_CONTAINERS_H_INCLUDED diff --git a/Extras/GIMPACT/include/GIMPACT/core/gim_box_collision.h b/Extras/GIMPACT/include/GIMPACT/core/gim_box_collision.h new file mode 100755 index 000000000..cde486382 --- /dev/null +++ b/Extras/GIMPACT/include/GIMPACT/core/gim_box_collision.h @@ -0,0 +1,594 @@ +#ifndef GIM_BOX_COLLISION_H_INCLUDED +#define GIM_BOX_COLLISION_H_INCLUDED + +/*! \file gim_box_collision.h +\author Francisco León Nájera +*/ +/* +----------------------------------------------------------------------------- +This source file is part of GIMPACT Library. + +For the latest info, see http://gimpact.sourceforge.net/ + +Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371. +email: projectileman@yahoo.com + + 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 GIMPACT-LICENSE-LGPL.TXT. + (2) The BSD-style license that is included with this library in + the file GIMPACT-LICENSE-BSD.TXT. + (3) The zlib/libpng license that is included with this library in + the file GIMPACT-LICENSE-ZLIB.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 + GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details. + +----------------------------------------------------------------------------- +*/ +#include "GIMPACT/core/gim_basic_geometry_operations.h" +#include "LinearMath/btTransform.h" + +/*! \defgroup BOUND_AABB_OPERATIONS +*/ +//! @{ + + +//SIMD_FORCE_INLINE bool test_cross_edge_box( +// const btVector3 & edge, +// const btVector3 & absolute_edge, +// const btVector3 & pointa, +// const btVector3 & pointb, const btVector3 & extend, +// int dir_index0, +// int dir_index1 +// int component_index0, +// int component_index1) +//{ +// // dir coords are -z and y +// +// const btScalar dir0 = -edge[dir_index0]; +// const btScalar dir1 = edge[dir_index1]; +// btScalar pmin = pointa[component_index0]*dir0 + pointa[component_index1]*dir1; +// btScalar pmax = pointb[component_index0]*dir0 + pointb[component_index1]*dir1; +// //find minmax +// if(pmin>pmax) +// { +// GIM_SWAP_NUMBERS(pmin,pmax); +// } +// //find extends +// const btScalar rad = extend[component_index0] * absolute_edge[dir_index0] + +// extend[component_index1] * absolute_edge[dir_index1]; +// +// if(pmin>rad || -rad>pmax) return false; +// return true; +//} +// +//SIMD_FORCE_INLINE bool test_cross_edge_box_X_axis( +// const btVector3 & edge, +// const btVector3 & absolute_edge, +// const btVector3 & pointa, +// const btVector3 & pointb, btVector3 & extend) +//{ +// +// return test_cross_edge_box(edge,absolute_edge,pointa,pointb,extend,2,1,1,2); +//} +// +// +//SIMD_FORCE_INLINE bool test_cross_edge_box_Y_axis( +// const btVector3 & edge, +// const btVector3 & absolute_edge, +// const btVector3 & pointa, +// const btVector3 & pointb, btVector3 & extend) +//{ +// +// return test_cross_edge_box(edge,absolute_edge,pointa,pointb,extend,0,2,2,0); +//} +// +//SIMD_FORCE_INLINE bool test_cross_edge_box_Z_axis( +// const btVector3 & edge, +// const btVector3 & absolute_edge, +// const btVector3 & pointa, +// const btVector3 & pointb, btVector3 & extend) +//{ +// +// return test_cross_edge_box(edge,absolute_edge,pointa,pointb,extend,1,0,0,1); +//} + +#define TEST_CROSS_EDGE_BOX_MCR(edge,absolute_edge,pointa,pointb,_extend,i_dir_0,i_dir_1,i_comp_0,i_comp_1)\ +{\ + const btScalar dir0 = -edge[i_dir_0];\ + const btScalar dir1 = edge[i_dir_1];\ + btScalar pmin = pointa[i_comp_0]*dir0 + pointa[i_comp_1]*dir1;\ + btScalar pmax = pointb[i_comp_0]*dir0 + pointb[i_comp_1]*dir1;\ + if(pmin>pmax)\ + {\ + GIM_SWAP_NUMBERS(pmin,pmax); \ + }\ + const btScalar abs_dir0 = absolute_edge[i_dir_0];\ + const btScalar abs_dir1 = absolute_edge[i_dir_1];\ + const btScalar rad = _extend[i_comp_0] * abs_dir0 + _extend[i_comp_1] * abs_dir1;\ + if(pmin>rad || -rad>pmax) return false;\ +}\ + + +#define TEST_CROSS_EDGE_BOX_X_AXIS_MCR(edge,absolute_edge,pointa,pointb,_extend)\ +{\ + TEST_CROSS_EDGE_BOX_MCR(edge,absolute_edge,pointa,pointb,_extend,2,1,1,2);\ +}\ + +#define TEST_CROSS_EDGE_BOX_Y_AXIS_MCR(edge,absolute_edge,pointa,pointb,_extend)\ +{\ + TEST_CROSS_EDGE_BOX_MCR(edge,absolute_edge,pointa,pointb,_extend,0,2,2,0);\ +}\ + +#define TEST_CROSS_EDGE_BOX_Z_AXIS_MCR(edge,absolute_edge,pointa,pointb,_extend)\ +{\ + TEST_CROSS_EDGE_BOX_MCR(edge,absolute_edge,pointa,pointb,_extend,1,0,0,1);\ +}\ + + + +//! Class for transforming a model1 to the space of model0 +class GIM_BOX_BOX_TRANSFORM_CACHE +{ +public: + btVector3 m_T1to0;//!< Transforms translation of model1 to model 0 + btMatrix3x3 m_R1to0;//!< Transforms Rotation of model1 to model 0, equal to R0' * R1 + btMatrix3x3 m_AR;//!< Absolute value of m_R1to0 + + SIMD_FORCE_INLINE void calc_absolute_matrix() + { + static const btVector3 vepsi(1e-6f,1e-6f,1e-6f); + m_AR[0] = vepsi + m_R1to0[0].absolute(); + m_AR[1] = vepsi + m_R1to0[1].absolute(); + m_AR[2] = vepsi + m_R1to0[2].absolute(); + } + + GIM_BOX_BOX_TRANSFORM_CACHE() + { + } + + + GIM_BOX_BOX_TRANSFORM_CACHE(mat4f trans1_to_0) + { + COPY_MATRIX_3X3(m_R1to0,trans1_to_0) + MAT_GET_TRANSLATION(trans1_to_0,m_T1to0) + calc_absolute_matrix(); + } + + //! Calc the transformation relative 1 to 0. Inverts matrics by transposing + SIMD_FORCE_INLINE void calc_from_homogenic(const btTransform & trans0,const btTransform & trans1) + { + + m_R1to0 = trans0.getBasis().transpose(); + m_T1to0 = m_R1to0 * (-trans0.getOrigin()); + + m_T1to0 += m_R1to0*trans1.getOrigin(); + m_R1to0 *= trans1.getBasis(); + + calc_absolute_matrix(); + } + + //! Calcs the full invertion of the matrices. Useful for scaling matrices + SIMD_FORCE_INLINE void calc_from_full_invert(const btTransform & trans0,const btTransform & trans1) + { + m_R1to0 = trans0.getBasis().inverse(); + m_T1to0 = m_R1to0 * (-trans0.getOrigin()); + + m_T1to0 += m_R1to0*trans1.getOrigin(); + m_R1to0 *= trans1.getBasis(); + + calc_absolute_matrix(); + } + + SIMD_FORCE_INLINE btVector3 transform(const btVector3 & point) + { + return btVector3(m_R1to0[0].dot(point) + m_T1to0.x(), + m_R1to0[1].dot(point) + m_T1to0.y(), + m_R1to0[2].dot(point) + m_T1to0.z()); + } +}; + + +#define BOX_PLANE_EPSILON 0.000001f + +//! Axis aligned box +class GIM_AABB +{ +public: + btVector3 m_min; + btVector3 m_max; + + GIM_AABB() + {} + + + GIM_AABB(const btVector3 & V1, + const btVector3 & V2, + const btVector3 & V3) + { + m_min[0] = GIM_MIN3(V1[0],V2[0],V3[0]); + m_min[1] = GIM_MIN3(V1[1],V2[1],V3[1]); + m_min[2] = GIM_MIN3(V1[2],V2[2],V3[2]); + + m_max[0] = GIM_MAX3(V1[0],V2[0],V3[0]); + m_max[1] = GIM_MAX3(V1[1],V2[1],V3[1]); + m_max[2] = GIM_MAX3(V1[2],V2[2],V3[2]); + } + + GIM_AABB(const btVector3 & V1, + const btVector3 & V2, + const btVector3 & V3, + GREAL margin) + { + m_min[0] = GIM_MIN3(V1[0],V2[0],V3[0]); + m_min[1] = GIM_MIN3(V1[1],V2[1],V3[1]); + m_min[2] = GIM_MIN3(V1[2],V2[2],V3[2]); + + m_max[0] = GIM_MAX3(V1[0],V2[0],V3[0]); + m_max[1] = GIM_MAX3(V1[1],V2[1],V3[1]); + m_max[2] = GIM_MAX3(V1[2],V2[2],V3[2]); + + m_min[0] -= margin; + m_min[1] -= margin; + m_min[2] -= margin; + m_max[0] += margin; + m_max[1] += margin; + m_max[2] += margin; + } + + GIM_AABB(const GIM_AABB &other): + m_min(other.m_min),m_max(other.m_max) + { + } + + GIM_AABB(const GIM_AABB &other,btScalar margin ): + m_min(other.m_min),m_max(other.m_max) + { + m_min[0] -= margin; + m_min[1] -= margin; + m_min[2] -= margin; + m_max[0] += margin; + m_max[1] += margin; + m_max[2] += margin; + } + + SIMD_FORCE_INLINE void invalidate() + { + m_min[0] = G_REAL_INFINITY; + m_min[1] = G_REAL_INFINITY; + m_min[2] = G_REAL_INFINITY; + m_max[0] = -G_REAL_INFINITY; + m_max[1] = -G_REAL_INFINITY; + m_max[2] = -G_REAL_INFINITY; + } + + SIMD_FORCE_INLINE void increment_margin(btScalar margin) + { + m_min[0] -= margin; + m_min[1] -= margin; + m_min[2] -= margin; + m_max[0] += margin; + m_max[1] += margin; + m_max[2] += margin; + } + + SIMD_FORCE_INLINE void copy_with_margin(const GIM_AABB &other, btScalar margin) + { + m_min[0] = other.m_min[0] - margin; + m_min[1] = other.m_min[1] - margin; + m_min[2] = other.m_min[2] - margin; + + m_max[0] = other.m_max[0] + margin; + m_max[1] = other.m_max[1] + margin; + m_max[2] = other.m_max[2] + margin; + } + + template + SIMD_FORCE_INLINE void calc_from_triangle( + const CLASS_POINT & V1, + const CLASS_POINT & V2, + const CLASS_POINT & V3) + { + m_min[0] = GIM_MIN3(V1[0],V2[0],V3[0]); + m_min[1] = GIM_MIN3(V1[1],V2[1],V3[1]); + m_min[2] = GIM_MIN3(V1[2],V2[2],V3[2]); + + m_max[0] = GIM_MAX3(V1[0],V2[0],V3[0]); + m_max[1] = GIM_MAX3(V1[1],V2[1],V3[1]); + m_max[2] = GIM_MAX3(V1[2],V2[2],V3[2]); + } + + template + SIMD_FORCE_INLINE void calc_from_triangle_margin( + const CLASS_POINT & V1, + const CLASS_POINT & V2, + const CLASS_POINT & V3, btScalar margin) + { + m_min[0] = GIM_MIN3(V1[0],V2[0],V3[0]); + m_min[1] = GIM_MIN3(V1[1],V2[1],V3[1]); + m_min[2] = GIM_MIN3(V1[2],V2[2],V3[2]); + + m_max[0] = GIM_MAX3(V1[0],V2[0],V3[0]); + m_max[1] = GIM_MAX3(V1[1],V2[1],V3[1]); + m_max[2] = GIM_MAX3(V1[2],V2[2],V3[2]); + + m_min[0] -= margin; + m_min[1] -= margin; + m_min[2] -= margin; + m_max[0] += margin; + m_max[1] += margin; + m_max[2] += margin; + } + + //! Apply a transform to an AABB + SIMD_FORCE_INLINE void appy_transform(const btTransform & trans) + { + btVector3 center = (m_max+m_min)*0.5f; + btVector3 extends = m_max - center; + // Compute new center + center = trans(center); + + btVector3 textends(extends.dot(trans.getBasis().getRow(0).absolute()), + extends.dot(trans.getBasis().getRow(1).absolute()), + extends.dot(trans.getBasis().getRow(2).absolute())); + + m_min = center - textends; + m_max = center + textends; + } + + //! Merges a Box + SIMD_FORCE_INLINE void merge(const GIM_AABB & box) + { + m_min[0] = GIM_MIN(m_min[0],box.m_min[0]); + m_min[1] = GIM_MIN(m_min[1],box.m_min[1]); + m_min[2] = GIM_MIN(m_min[2],box.m_min[2]); + + m_max[0] = GIM_MAX(m_max[0],box.m_max[0]); + m_max[1] = GIM_MAX(m_max[1],box.m_max[1]); + m_max[2] = GIM_MAX(m_max[2],box.m_max[2]); + } + + //! Merges a point + template + SIMD_FORCE_INLINE void merge_point(const CLASS_POINT & point) + { + m_min[0] = GIM_MIN(m_min[0],point[0]); + m_min[1] = GIM_MIN(m_min[1],point[1]); + m_min[2] = GIM_MIN(m_min[2],point[2]); + + m_max[0] = GIM_MAX(m_max[0],point[0]); + m_max[1] = GIM_MAX(m_max[1],point[1]); + m_max[2] = GIM_MAX(m_max[2],point[2]); + } + + //! Gets the extend and center + SIMD_FORCE_INLINE void get_center_extend(btVector3 & center,btVector3 & extend) const + { + center = (m_max+m_min)*0.5f; + extend = m_max - center; + } + + //! Finds the intersecting box between this box and the other. + SIMD_FORCE_INLINE void find_intersection(const GIM_AABB & other, GIM_AABB & intersection) const + { + intersection.m_min[0] = GIM_MAX(other.m_min[0],m_min[0]); + intersection.m_min[1] = GIM_MAX(other.m_min[1],m_min[1]); + intersection.m_min[2] = GIM_MAX(other.m_min[2],m_min[2]); + + intersection.m_max[0] = GIM_MIN(other.m_max[0],m_max[0]); + intersection.m_max[1] = GIM_MIN(other.m_max[1],m_max[1]); + intersection.m_max[2] = GIM_MIN(other.m_max[2],m_max[2]); + } + + + SIMD_FORCE_INLINE bool has_collision(const GIM_AABB & other) const + { + if(m_min[0] > other.m_max[0] || + m_max[0] < other.m_min[0] || + m_min[1] > other.m_max[1] || + m_max[1] < other.m_min[1] || + m_min[2] > other.m_max[2] || + m_max[2] < other.m_min[2]) + { + return false; + } + return true; + } + + /*! \brief Finds the Ray intersection parameter. + \param aabb Aligned box + \param vorigin A vec3f with the origin of the ray + \param vdir A vec3f with the direction of the ray + */ + SIMD_FORCE_INLINE bool collide_ray(const btVector3 & vorigin,const btVector3 & vdir) + { + btVector3 extents,center; + this->get_center_extend(center,extents);; + + btScalar Dx = vorigin[0] - center[0]; + if(GIM_GREATER(Dx, extents[0]) && Dx*vdir[0]>=0.0f) return false; + btScalar Dy = vorigin[1] - center[1]; + if(GIM_GREATER(Dy, extents[1]) && Dy*vdir[1]>=0.0f) return false; + btScalar Dz = vorigin[2] - center[2]; + if(GIM_GREATER(Dz, extents[2]) && Dz*vdir[2]>=0.0f) return false; + + + btScalar f = vdir[1] * Dz - vdir[2] * Dy; + if(btFabs(f) > extents[1]*btFabs(vdir[2]) + extents[2]*btFabs(vdir[1])) return false; + f = vdir[2] * Dx - vdir[0] * Dz; + if(btFabs(f) > extents[0]*btFabs(vdir[2]) + extents[2]*btFabs(vdir[0]))return false; + f = vdir[0] * Dy - vdir[1] * Dx; + if(btFabs(f) > extents[0]*btFabs(vdir[1]) + extents[1]*btFabs(vdir[0]))return false; + return true; + } + + + SIMD_FORCE_INLINE void projection_interval(const btVector3 & direction, btScalar &vmin, btScalar &vmax) const + { + btVector3 center = (m_max+m_min)*0.5f; + btVector3 extend = m_max-center; + + btScalar _fOrigin = direction.dot(center); + btScalar _fMaximumExtent = extend.dot(direction.absolute()); + vmin = _fOrigin - _fMaximumExtent; + vmax = _fOrigin + _fMaximumExtent; + } + + SIMD_FORCE_INLINE ePLANE_INTERSECTION_TYPE plane_classify(const btVector4 &plane) const + { + btScalar _fmin,_fmax; + this->projection_interval(plane,_fmin,_fmax); + + if(plane[3] > _fmax + BOX_PLANE_EPSILON) + { + return G_BACK_PLANE; // 0 + } + + if(plane[3]+BOX_PLANE_EPSILON >=_fmin) + { + return G_COLLIDE_PLANE; //1 + } + return G_FRONT_PLANE;//2 + } + + SIMD_FORCE_INLINE bool overlapping_trans_conservative(const GIM_AABB & box, btTransform & trans1_to_0) + { + GIM_AABB tbox = box; + tbox.appy_transform(trans1_to_0); + return has_collision(tbox); + } + + //! transcache is the transformation cache from box to this AABB + SIMD_FORCE_INLINE bool overlapping_trans_cache( + const GIM_AABB & box,const GIM_BOX_BOX_TRANSFORM_CACHE & transcache, bool fulltest) + { + + //Taken from OPCODE + btVector3 ea,eb;//extends + btVector3 ca,cb;//extends + get_center_extend(ca,ea); + box.get_center_extend(cb,eb); + + + btVector3 T; + btScalar t,t2; + int i; + + // Class I : A's basis vectors + for(i=0;i<3;i++) + { + T[i] = transcache.m_R1to0[i].dot(cb) + transcache.m_T1to0[i] - ca[i]; + t = transcache.m_AR[i].dot(eb) + ea[i]; + if(GIM_GREATER(T[i], t)) return false; + } + // Class II : B's basis vectors + for(i=0;i<3;i++) + { + t = MAT_DOT_COL(transcache.m_R1to0,T,i); + t2 = MAT_DOT_COL(transcache.m_AR,ea,i) + eb[i]; + if(GIM_GREATER(t,t2)) return false; + } + // Class III : 9 cross products + if(fulltest) + { + int j,m,n,o,p,q,r; + for(i=0;i<3;i++) + { + m = (i+1)%3; + n = (i+2)%3; + o = i==0?1:0; + p = i==2?1:2; + for(j=0;j<3;j++) + { + q = j==2?1:2; + r = j==0?1:0; + t = T[n]*transcache.m_R1to0[m][j] - T[m]*transcache.m_R1to0[n][j]; + t2 = ea[o]*transcache.m_AR[p][j] + ea[p]*transcache.m_AR[o][j] + + eb[r]*transcache.m_AR[i][q] + eb[q]*transcache.m_AR[i][r]; + if(GIM_GREATER(t,t2)) return false; + } + } + } + return true; + } + + //! Simple test for planes. + SIMD_FORCE_INLINE bool collide_plane( + const btVector4 & plane) + { + ePLANE_INTERSECTION_TYPE classify = plane_classify(plane); + return (classify == G_COLLIDE_PLANE); + } + + //! test for a triangle, with edges + SIMD_FORCE_INLINE bool collide_triangle_exact( + const btVector3 & p1, + const btVector3 & p2, + const btVector3 & p3, + const btVector4 & triangle_plane) + { + if(!collide_plane(triangle_plane)) return false; + + btVector3 center,extends; + this->get_center_extend(center,extends); + + const btVector3 v1(p1 - center); + const btVector3 v2(p2 - center); + const btVector3 v3(p3 - center); + + //First axis + btVector3 diff(v2 - v1); + btVector3 abs_diff = diff.absolute(); + //Test With X axis + TEST_CROSS_EDGE_BOX_X_AXIS_MCR(diff,abs_diff,v1,v3,extends); + //Test With Y axis + TEST_CROSS_EDGE_BOX_Y_AXIS_MCR(diff,abs_diff,v1,v3,extends); + //Test With Z axis + TEST_CROSS_EDGE_BOX_Z_AXIS_MCR(diff,abs_diff,v1,v3,extends); + + + diff = v3 - v2; + abs_diff = diff.absolute(); + //Test With X axis + TEST_CROSS_EDGE_BOX_X_AXIS_MCR(diff,abs_diff,v2,v1,extends); + //Test With Y axis + TEST_CROSS_EDGE_BOX_Y_AXIS_MCR(diff,abs_diff,v2,v1,extends); + //Test With Z axis + TEST_CROSS_EDGE_BOX_Z_AXIS_MCR(diff,abs_diff,v2,v1,extends); + + diff = v1 - v3; + abs_diff = diff.absolute(); + //Test With X axis + TEST_CROSS_EDGE_BOX_X_AXIS_MCR(diff,abs_diff,v3,v2,extends); + //Test With Y axis + TEST_CROSS_EDGE_BOX_Y_AXIS_MCR(diff,abs_diff,v3,v2,extends); + //Test With Z axis + TEST_CROSS_EDGE_BOX_Z_AXIS_MCR(diff,abs_diff,v3,v2,extends); + + return true; + } +}; + + +//! Compairison of transformation objects +SIMD_FORCE_INLINE bool btCompareTransformsEqual(const btTransform & t1,const btTransform & t2) +{ + if(!(t1.getOrigin() == t2.getOrigin()) ) return false; + + if(!(t1.getBasis().getRow(0) == t2.getBasis().getRow(0)) ) return false; + if(!(t1.getBasis().getRow(1) == t2.getBasis().getRow(1)) ) return false; + if(!(t1.getBasis().getRow(2) == t2.getBasis().getRow(2)) ) return false; + return true; +} + + +//! @} + +#endif // GIM_BOX_COLLISION_H_INCLUDED diff --git a/Extras/GIMPACT/include/GIMPACT/core/gim_box_set.h b/Extras/GIMPACT/include/GIMPACT/core/gim_box_set.h new file mode 100755 index 000000000..43e760f56 --- /dev/null +++ b/Extras/GIMPACT/include/GIMPACT/core/gim_box_set.h @@ -0,0 +1,678 @@ +#ifndef GIM_BOX_SET_H_INCLUDED +#define GIM_BOX_SET_H_INCLUDED + +/*! \file gim_box_set.h +\author Francisco León Nájera +*/ +/* +----------------------------------------------------------------------------- +This source file is part of GIMPACT Library. + +For the latest info, see http://gimpact.sourceforge.net/ + +Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371. +email: projectileman@yahoo.com + + 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 GIMPACT-LICENSE-LGPL.TXT. + (2) The BSD-style license that is included with this library in + the file GIMPACT-LICENSE-BSD.TXT. + (3) The zlib/libpng license that is included with this library in + the file GIMPACT-LICENSE-ZLIB.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 + GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details. + +----------------------------------------------------------------------------- +*/ + + +#include "GIMPACT/core/gim_array.h" +#include "GIMPACT/core/gim_radixsort.h" +#include "GIMPACT/core/gim_box_collision.h" +#include "GIMPACT/core/gim_tri_collision.h" + + +/*! \defgroup BOX_PRUNNING + + + +*/ +//! @{ + +//! Overlapping pair +struct GIM_PAIR +{ + GUINT m_index1; + GUINT m_index2; + GIM_PAIR() + {} + + GIM_PAIR(const GIM_PAIR & p) + { + m_index1 = p.m_index1; + m_index2 = p.m_index2; + } + + GIM_PAIR(GUINT index1, GUINT index2) + { + m_index1 = index1; + m_index2 = index2; + } +}; + +//! A pairset array +class gim_pair_set: public gim_array +{ +public: + gim_pair_set():gim_array(32) + { + } + inline void push_pair(GUINT index1,GUINT index2) + { + push_back(GIM_PAIR(index1,index2)); + } + + inline void push_pair_inv(GUINT index1,GUINT index2) + { + push_back(GIM_PAIR(index2,index1)); + } +}; + + +//! Prototype Base class for primitive classification +/*! +This class is a wrapper for primitive collections. +This tells relevant info for the Bounding Box set classes, which take care of space classification. +This class can manage Compound shapes and trimeshes, and if it is managing trimesh then the Hierarchy Bounding Box classes will take advantage of primitive Vs Box overlapping tests for getting optimal results and less Per Box compairisons. +*/ +class GIM_PRIMITIVE_MANAGER_PROTOTYPE +{ +public: + + //! determines if this manager consist on only triangles, which special case will be optimized + virtual bool is_trimesh() = 0; + virtual GUINT get_primitive_count() = 0; + virtual void get_primitive_box(GUINT prim_index ,GIM_AABB & primbox) = 0; + virtual void get_primitive_triangle(GUINT prim_index,GIM_TRIANGLE & triangle) = 0; +}; + + +struct GIM_AABB_DATA +{ + GIM_AABB m_bound; + GUINT m_data; +}; + +//! Node Structure for trees +struct GIM_BOX_TREE_NODE +{ + GIM_AABB m_bound; + GUINT m_left;//!< Left subtree + GUINT m_right;//!< Right subtree + GUINT m_escapeIndex;//!< Scape index for traversing + GUINT m_data;//!< primitive index if apply + + GIM_BOX_TREE_NODE() + { + m_left = 0; + m_right = 0; + m_escapeIndex = 0; + m_data = 0; + } + + SIMD_FORCE_INLINE bool is_leaf_node() const + { + return (!m_left && !m_right); + } +}; + +//! Basic Box tree structure +class GIM_BOX_TREE +{ +protected: + GUINT m_num_nodes; + gim_array m_node_array; +protected: + GUINT _sort_and_calc_splitting_index( + gim_array & primitive_boxes, + GUINT startIndex, GUINT endIndex, GUINT splitAxis); + + GUINT _calc_splitting_axis(gim_array & primitive_boxes, GUINT startIndex, GUINT endIndex); + + void _build_sub_tree(gim_array & primitive_boxes, GUINT startIndex, GUINT endIndex); +public: + GIM_BOX_TREE() + { + m_num_nodes = 0; + } + + //! prototype functions for box tree management + //!@{ + void build_tree(gim_array & primitive_boxes); + + SIMD_FORCE_INLINE void clearNodes() + { + m_node_array.clear(); + m_num_nodes = 0; + } + + //! node count + SIMD_FORCE_INLINE GUINT getNodeCount() const + { + return m_num_nodes; + } + + //! tells if the node is a leaf + SIMD_FORCE_INLINE bool isLeafNode(GUINT nodeindex) const + { + return m_node_array[nodeindex].is_leaf_node(); + } + + SIMD_FORCE_INLINE GUINT getNodeData(GUINT nodeindex) const + { + return m_node_array[nodeindex].m_data; + } + + SIMD_FORCE_INLINE void getNodeBound(GUINT nodeindex, GIM_AABB & bound) const + { + bound = m_node_array[nodeindex].m_bound; + } + + SIMD_FORCE_INLINE void setNodeBound(GUINT nodeindex, const GIM_AABB & bound) + { + m_node_array[nodeindex].m_bound = bound; + } + + SIMD_FORCE_INLINE GUINT getLeftNodeIndex(GUINT nodeindex) const + { + return m_node_array[nodeindex].m_left; + } + + SIMD_FORCE_INLINE GUINT getRightNodeIndex(GUINT nodeindex) const + { + return m_node_array[nodeindex].m_right; + } + + SIMD_FORCE_INLINE GUINT getScapeNodeIndex(GUINT nodeindex) const + { + return m_node_array[nodeindex].m_escapeIndex; + } + + //!@} +}; + + +//! Generic Box Tree Template +/*! +This class offers an structure for managing a box tree of primitives. +Requires a Primitive prototype (like GIM_PRIMITIVE_MANAGER_PROTOTYPE ) and +a Box tree structure ( like GIM_BOX_TREE). +*/ +template +class GIM_BOX_TREE_TEMPLATE_SET +{ +protected: + _GIM_PRIMITIVE_MANAGER_PROTOTYPE m_primitive_manager; + _GIM_BOX_TREE_PROTOTYPE m_box_tree; +protected: + //stackless refit + SIMD_FORCE_INLINE void refit() + { + GUINT nodecount = getNodeCount(); + while(nodecount--) + { + if(isLeafNode(nodecount)) + { + GIM_AABB leafbox; + m_primitive_manager.get_primitive_box(getNodeData(nodecount),leafbox); + setNodeBound(nodecount,leafbox); + } + else + { + //get left bound + GUINT childindex = getLeftNodeIndex(nodecount); + GIM_AABB bound; + getNodeBound(childindex,bound); + //get right bound + childindex = getRightNodeIndex(nodecount); + GIM_AABB bound2; + getNodeBound(childindex,bound2); + bound.merge(bound2); + + setNodeBound(nodecount,bound); + } + } + } +public: + + GIM_BOX_TREE_TEMPLATE_SET() + { + } + + SIMD_FORCE_INLINE GIM_AABB getGlobalBox() const + { + GIM_AABB totalbox; + getNodeBound(0, totalbox); + return totalbox; + } + + SIMD_FORCE_INLINE void setPrimitiveManager(const _GIM_PRIMITIVE_MANAGER_PROTOTYPE & primitive_manager) + { + m_primitive_manager = primitive_manager; + } + + const _GIM_PRIMITIVE_MANAGER_PROTOTYPE & getPrimitiveManager() const + { + return m_primitive_manager; + } + + _GIM_PRIMITIVE_MANAGER_PROTOTYPE & getPrimitiveManager() + { + return m_primitive_manager; + } + +//! node manager prototype functions +///@{ + + //! this attemps to refit the box set. + SIMD_FORCE_INLINE void update() + { + refit(); + } + + //! this rebuild the entire set + SIMD_FORCE_INLINE void buildSet() + { + //obtain primitive boxes + gim_array primitive_boxes; + primitive_boxes.resize(m_primitive_manager.get_primitive_count(),false); + + for (GUINT i = 0;i & collided_results) const + { + GUINT curIndex = 0; + GUINT numNodes = getNodeCount(); + + while (curIndex < numNodes) + { + GIM_AABB bound; + getNodeBound(curIndex,bound); + + //catch bugs in tree data + + bool aabbOverlap = bound.has_collision(box); + bool isleafnode = isLeafNode(curIndex); + + if (isleafnode && aabbOverlap) + { + collided_results.push_back(getNodeData(curIndex)); + } + + if (aabbOverlap || isleafnode) + { + //next subnode + curIndex++; + } + else + { + //skip node + curIndex+= getScapeNodeIndex(curIndex); + } + } + if(collided_results.size()>0) return true; + return false; + } + + //! returns the indices of the primitives in the m_primitive_manager + SIMD_FORCE_INLINE bool boxQueryTrans(const GIM_AABB & box, + const btTransform & transform, gim_array & collided_results) const + { + GIM_AABB transbox=box; + transbox.appy_transform(transform); + return boxQuery(transbox,collided_results); + } + + //! returns the indices of the primitives in the m_primitive_manager + SIMD_FORCE_INLINE bool rayQuery( + const btVector3 & ray_dir,const btVector3 & ray_origin , + gim_array & collided_results) const + { + GUINT curIndex = 0; + GUINT numNodes = getNodeCount(); + + while (curIndex < numNodes) + { + GIM_AABB bound; + getNodeBound(curIndex,bound); + + //catch bugs in tree data + + bool aabbOverlap = bound.collide_ray(ray_origin,ray_dir); + bool isleafnode = isLeafNode(curIndex); + + if (isleafnode && aabbOverlap) + { + collided_results.push_back(getNodeData( curIndex)); + } + + if (aabbOverlap || isleafnode) + { + //next subnode + curIndex++; + } + else + { + //skip node + curIndex+= getScapeNodeIndex(curIndex); + } + } + if(collided_results.size()>0) return true; + return false; + } + + //! tells if this set has hierarcht + SIMD_FORCE_INLINE bool hasHierarchy() const + { + return true; + } + + //! tells if this set is a trimesh + SIMD_FORCE_INLINE bool isTrimesh() const + { + return m_primitive_manager.is_trimesh(); + } + + //! node count + SIMD_FORCE_INLINE GUINT getNodeCount() const + { + return m_box_tree.getNodeCount(); + } + + //! tells if the node is a leaf + SIMD_FORCE_INLINE bool isLeafNode(GUINT nodeindex) const + { + return m_box_tree.isLeafNode(nodeindex); + } + + SIMD_FORCE_INLINE GUINT getNodeData(GUINT nodeindex) const + { + return m_box_tree.getNodeData(nodeindex); + } + + SIMD_FORCE_INLINE void getNodeBound(GUINT nodeindex, GIM_AABB & bound) const + { + m_box_tree.getNodeBound(nodeindex, bound); + } + + SIMD_FORCE_INLINE void setNodeBound(GUINT nodeindex, const GIM_AABB & bound) + { + m_box_tree.setNodeBound(nodeindex, bound); + } + + SIMD_FORCE_INLINE GUINT getLeftNodeIndex(GUINT nodeindex) const + { + return m_box_tree.getLeftNodeIndex(nodeindex); + } + + SIMD_FORCE_INLINE GUINT getRightNodeIndex(GUINT nodeindex) const + { + return m_box_tree.getRightNodeIndex(nodeindex); + } + + SIMD_FORCE_INLINE GUINT getScapeNodeIndex(GUINT nodeindex) const + { + return m_box_tree.getScapeNodeIndex(nodeindex); + } + + SIMD_FORCE_INLINE void getNodeTriangle(GUINT nodeindex,GIM_TRIANGLE & triangle) const + { + m_primitive_manager.get_primitive_triangle(getNodeData(nodeindex),triangle); + } + +//! @} +}; + +//! Class for Box Tree Sets +/*! +this has the GIM_BOX_TREE implementation for bounding boxes. +*/ +template +class GIM_BOX_TREE_SET: public GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, GIM_BOX_TREE> +{ +public: + +}; + + + + + +/// GIM_BOX_SET collision methods +template +class GIM_TREE_TREE_COLLIDER +{ +public: + gim_pair_set * m_collision_pairs; + BOX_SET_CLASS0 * m_boxset0; + BOX_SET_CLASS1 * m_boxset1; + GUINT current_node0; + GUINT current_node1; + bool node0_is_leaf; + bool node1_is_leaf; + bool t0_is_trimesh; + bool t1_is_trimesh; + bool node0_has_triangle; + bool node1_has_triangle; + GIM_AABB m_box0; + GIM_AABB m_box1; + GIM_BOX_BOX_TRANSFORM_CACHE trans_cache_1to0; + btTransform trans_cache_0to1; + GIM_TRIANGLE m_tri0; + btVector4 m_tri0_plane; + GIM_TRIANGLE m_tri1; + btVector4 m_tri1_plane; + + +public: + GIM_TREE_TREE_COLLIDER() + { + current_node0 = G_UINT_INFINITY; + current_node1 = G_UINT_INFINITY; + } +protected: + SIMD_FORCE_INLINE void retrieve_node0_triangle(GUINT node0) + { + if(node0_has_triangle) return; + m_boxset0->getNodeTriangle(node0,m_tri0); + //transform triangle + m_tri0.m_vertices[0] = trans_cache_0to1(m_tri0.m_vertices[0]); + m_tri0.m_vertices[1] = trans_cache_0to1(m_tri0.m_vertices[1]); + m_tri0.m_vertices[2] = trans_cache_0to1(m_tri0.m_vertices[2]); + m_tri0.get_plane(m_tri0_plane); + + node0_has_triangle = true; + } + + SIMD_FORCE_INLINE void retrieve_node1_triangle(GUINT node1) + { + if(node1_has_triangle) return; + m_boxset1->getNodeTriangle(node1,m_tri1); + //transform triangle + m_tri1.m_vertices[0] = trans_cache_1to0.transform(m_tri1.m_vertices[0]); + m_tri1.m_vertices[1] = trans_cache_1to0.transform(m_tri1.m_vertices[1]); + m_tri1.m_vertices[2] = trans_cache_1to0.transform(m_tri1.m_vertices[2]); + m_tri1.get_plane(m_tri1_plane); + + node1_has_triangle = true; + } + + SIMD_FORCE_INLINE void retrieve_node0_info(GUINT node0) + { + if(node0 == current_node0) return; + m_boxset0->getNodeBound(node0,m_box0); + node0_is_leaf = m_boxset0->isLeafNode(node0); + node0_has_triangle = false; + current_node0 = node0; + } + + SIMD_FORCE_INLINE void retrieve_node1_info(GUINT node1) + { + if(node1 == current_node1) return; + m_boxset1->getNodeBound(node1,m_box1); + node1_is_leaf = m_boxset1->isLeafNode(node1); + node1_has_triangle = false; + current_node1 = node1; + } + + SIMD_FORCE_INLINE bool node_collision(GUINT node0 ,GUINT node1) + { + retrieve_node0_info(node0); + retrieve_node1_info(node1); + bool result = m_box0.overlapping_trans_cache(m_box1,trans_cache_1to0,true); + if(!result) return false; + + if(t0_is_trimesh && node0_is_leaf) + { + //perform primitive vs box collision + retrieve_node0_triangle(node0); + //do triangle vs box collision + m_box1.increment_margin(m_tri0.m_margin); + + result = m_box1.collide_triangle_exact( + m_tri0.m_vertices[0],m_tri0.m_vertices[1],m_tri0.m_vertices[2],m_tri0_plane); + + m_box1.increment_margin(-m_tri0.m_margin); + + if(!result) return false; + return true; + } + else if(t1_is_trimesh && node1_is_leaf) + { + //perform primitive vs box collision + retrieve_node1_triangle(node1); + //do triangle vs box collision + m_box0.increment_margin(m_tri1.m_margin); + + result = m_box0.collide_triangle_exact( + m_tri1.m_vertices[0],m_tri1.m_vertices[1],m_tri1.m_vertices[2],m_tri1_plane); + + m_box0.increment_margin(-m_tri1.m_margin); + + if(!result) return false; + return true; + } + return true; + } + + //stackless collision routine + void find_collision_pairs() + { + gim_pair_set stack_collisions; + stack_collisions.reserve(32); + + //add the first pair + stack_collisions.push_pair(0,0); + + + while(stack_collisions.size()) + { + //retrieve the last pair and pop + GUINT node0 = stack_collisions.back().m_index1; + GUINT node1 = stack_collisions.back().m_index2; + stack_collisions.pop_back(); + if(node_collision(node0,node1)) // a collision is found + { + if(node0_is_leaf) + { + if(node1_is_leaf) + { + m_collision_pairs->push_pair(m_boxset1->getNodeData(node0),m_boxset1->getNodeData(node1)); + } + else + { + //collide left + stack_collisions.push_pair(node0,m_boxset1->getLeftNodeIndex(node1)); + + //collide right + stack_collisions.push_pair(node0,m_boxset1->getRightNodeIndex(node1)); + } + } + else + { + if(node1_is_leaf) + { + //collide left + stack_collisions.push_pair(m_boxset0->getLeftNodeIndex(node0),node1); + //collide right + stack_collisions.push_pair(m_boxset0->getRightNodeIndex(node0),node1); + } + else + { + GUINT left0 = m_boxset0->getLeftNodeIndex(node0); + GUINT right0 = m_boxset0->getRightNodeIndex(node0); + GUINT left1 = m_boxset1->getLeftNodeIndex(node1); + GUINT right1 = m_boxset1->getRightNodeIndex(node1); + //collide left + stack_collisions.push_pair(left0,left1); + //collide right + stack_collisions.push_pair(left0,right1); + //collide left + stack_collisions.push_pair(right0,left1); + //collide right + stack_collisions.push_pair(right0,right1); + + }// else if node1 is not a leaf + }// else if node0 is not a leaf + + }// if(node_collision(node0,node1)) + }//while(stack_collisions.size()) + } +public: + void find_collision(BOX_SET_CLASS0 * boxset1, const btTransform & trans1, + BOX_SET_CLASS1 * boxset2, const btTransform & trans2, + gim_pair_set & collision_pairs, bool complete_primitive_tests = true) + { + m_collision_pairs = &collision_pairs; + m_boxset0 = boxset1; + m_boxset1 = boxset2; + + trans_cache_1to0.calc_from_homogenic(trans1,trans2); + + trans_cache_0to1 = trans2.inverse(); + trans_cache_0to1 *= trans1; + + + if(complete_primitive_tests) + { + t0_is_trimesh = boxset1->getPrimitiveManager().is_trimesh(); + t1_is_trimesh = boxset2->getPrimitiveManager().is_trimesh(); + } + else + { + t0_is_trimesh = false; + t1_is_trimesh = false; + } + + find_collision_pairs(); + } +}; + + +#endif // GIM_BOXPRUNING_H_INCLUDED diff --git a/Extras/GIMPACT/include/GIMPACT/core/gim_clip_polygon.h b/Extras/GIMPACT/include/GIMPACT/core/gim_clip_polygon.h new file mode 100755 index 000000000..f0e2d895b --- /dev/null +++ b/Extras/GIMPACT/include/GIMPACT/core/gim_clip_polygon.h @@ -0,0 +1,214 @@ +#ifndef GIM_CLIP_POLYGON_H_INCLUDED +#define GIM_CLIP_POLYGON_H_INCLUDED + +/*! \file gim_tri_collision.h +\author Francisco León Nájera +*/ +/* +----------------------------------------------------------------------------- +This source file is part of GIMPACT Library. + +For the latest info, see http://gimpact.sourceforge.net/ + +Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371. +email: projectileman@yahoo.com + + 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 GIMPACT-LICENSE-LGPL.TXT. + (2) The BSD-style license that is included with this library in + the file GIMPACT-LICENSE-BSD.TXT. + (3) The zlib/libpng license that is included with this library in + the file GIMPACT-LICENSE-ZLIB.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 + GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details. + +----------------------------------------------------------------------------- +*/ + +/*! \addtogroup GEOMETRIC_OPERATIONS +*/ +//! @{ + +//! This function calcs the distance from a 3D plane +class DISTANCE_PLANE_3D_FUNC +{ +public: + template + inline GREAL operator()(const CLASS_PLANE & plane, const CLASS_POINT & point) + { + return DISTANCE_PLANE_POINT(plane, point); + } +}; + + + +template +SIMD_FORCE_INLINE void PLANE_CLIP_POLYGON_COLLECT( + const CLASS_POINT & point0, + const CLASS_POINT & point1, + GREAL dist0, + GREAL dist1, + CLASS_POINT * clipped, + GUINT & clipped_count) +{ + GUINT _prevclassif = (dist0>G_EPSILON); + GUINT _classif = (dist1>G_EPSILON); + if(_classif!=_prevclassif) + { + GREAL blendfactor = -dist0/(dist1-dist0); + VEC_BLEND(clipped[clipped_count],point0,point1,blendfactor); + clipped_count++; + } + if(!_classif) + { + VEC_COPY(clipped[clipped_count],point1); + clipped_count++; + } +} + + +//! Clips a polygon by a plane +/*! +*\return The count of the clipped counts +*/ +template +SIMD_FORCE_INLINE GUINT PLANE_CLIP_POLYGON_GENERIC( + const CLASS_PLANE & plane, + const CLASS_POINT * polygon_points, + GUINT polygon_point_count, + CLASS_POINT * clipped,DISTANCE_PLANE_FUNC distance_func) +{ + GUINT clipped_count = 0; + + + //clip first point + GREAL firstdist = distance_func(plane,polygon_points[0]);; + if(!(firstdist>G_EPSILON)) + { + VEC_COPY(clipped[clipped_count],polygon_points[0]); + clipped_count++; + } + + GREAL olddist = firstdist; + for(GUINT _i=1;_i +SIMD_FORCE_INLINE GUINT PLANE_CLIP_TRIANGLE_GENERIC( + const CLASS_PLANE & plane, + const CLASS_POINT & point0, + const CLASS_POINT & point1, + const CLASS_POINT & point2, + CLASS_POINT * clipped,DISTANCE_PLANE_FUNC distance_func) +{ + GUINT clipped_count = 0; + + //clip first point + GREAL firstdist = distance_func(plane,point0);; + if(!(firstdist>G_EPSILON)) + { + VEC_COPY(clipped[clipped_count],point0); + clipped_count++; + } + + // point 1 + GREAL olddist = firstdist; + GREAL dist = distance_func(plane,point1); + + PLANE_CLIP_POLYGON_COLLECT( + point0,point1, + olddist, + dist, + clipped, + clipped_count); + + olddist = dist; + + + // point 2 + dist = distance_func(plane,point2); + + PLANE_CLIP_POLYGON_COLLECT( + point1,point2, + olddist, + dist, + clipped, + clipped_count); + olddist = dist; + + + + //RETURN TO FIRST point + PLANE_CLIP_POLYGON_COLLECT( + point2,point0, + olddist, + firstdist, + clipped, + clipped_count); + + return clipped_count; +} + + +template +SIMD_FORCE_INLINE GUINT PLANE_CLIP_POLYGON3D( + const CLASS_PLANE & plane, + const CLASS_POINT * polygon_points, + GUINT polygon_point_count, + CLASS_POINT * clipped) +{ + return PLANE_CLIP_POLYGON_GENERIC(plane,polygon_points,polygon_point_count,clipped,DISTANCE_PLANE_3D_FUNC()); +} + + +template +SIMD_FORCE_INLINE GUINT PLANE_CLIP_TRIANGLE3D( + const CLASS_PLANE & plane, + const CLASS_POINT & point0, + const CLASS_POINT & point1, + const CLASS_POINT & point2, + CLASS_POINT * clipped) +{ + return PLANE_CLIP_TRIANGLE_GENERIC(plane,point0,point1,point2,clipped,DISTANCE_PLANE_3D_FUNC()); +} + + +//! @} + +#endif // GIM_TRI_COLLISION_H_INCLUDED diff --git a/Extras/GIMPACT/include/GIMPACT/core/gim_contact.h b/Extras/GIMPACT/include/GIMPACT/core/gim_contact.h new file mode 100755 index 000000000..8c55ddd20 --- /dev/null +++ b/Extras/GIMPACT/include/GIMPACT/core/gim_contact.h @@ -0,0 +1,172 @@ +#ifndef GIM_CONTACT_H_INCLUDED +#define GIM_CONTACT_H_INCLUDED + +/*! \file gim_contact.h +\author Francisco León Nájera +*/ +/* +----------------------------------------------------------------------------- +This source file is part of GIMPACT Library. + +For the latest info, see http://gimpact.sourceforge.net/ + +Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371. +email: projectileman@yahoo.com + + 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 GIMPACT-LICENSE-LGPL.TXT. + (2) The BSD-style license that is included with this library in + the file GIMPACT-LICENSE-BSD.TXT. + (3) The zlib/libpng license that is included with this library in + the file GIMPACT-LICENSE-ZLIB.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 + GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details. + +----------------------------------------------------------------------------- +*/ +#include "GIMPACT/core/gim_geometry.h" +#include "GIMPACT/core/gim_radixsort.h" +#include "GIMPACT/core/gim_array.h" + +/*! \defgroup CONTACTS +\brief +Functions for managing and sorting contacts resulting from a collision query. +
    +
  • Contact lists must be create by calling \ref GIM_CREATE_CONTACT_LIST +
  • After querys, contact lists must be destroy by calling \ref GIM_DYNARRAY_DESTROY +
  • Contacts can be merge for avoid duplicate results by calling \ref gim_merge_contacts +
+ +*/ +//! @{ + +/** +Configuration var for applying interpolation of contact normals +*/ +#define NORMAL_CONTACT_AVERAGE 1 +#define CONTACT_DIFF_EPSILON 0.00001f + +/// Structure for collision results +class GIM_CONTACT +{ +public: + btVector3 m_point; + btVector3 m_normal; + GREAL m_depth;//Positive value indicates interpenetration + GREAL m_distance;//Padding not for use + GUINT m_feature1;//Face number + GUINT m_feature2;//Face number +public: + GIM_CONTACT() + { + } + + GIM_CONTACT(const GIM_CONTACT & contact): + m_point(contact.m_point), + m_normal(contact.m_normal), + m_depth(contact.m_depth), + m_feature1(contact.m_feature1), + m_feature2(contact.m_feature2) + { + m_point = contact.m_point; + m_normal = contact.m_normal; + m_depth = contact.m_depth; + m_feature1 = contact.m_feature1; + m_feature2 = contact.m_feature2; + } + + GIM_CONTACT(const btVector3 &point,const btVector3 & normal, + GREAL depth, GUINT feature1, GUINT feature2): + m_point(point), + m_normal(normal), + m_depth(depth), + m_feature1(feature1), + m_feature2(feature2) + { + } + + //! Calcs key for coord classification + SIMD_FORCE_INLINE GUINT calc_key_contact() const + { + GINT _coords[] = { + (GINT)(m_point[0]*1000.0f+1.0f), + (GINT)(m_point[1]*1333.0f), + (GINT)(m_point[2]*2133.0f+3.0f)}; + GUINT _hash=0; + GUINT *_uitmp = (GUINT *)(&_coords[0]); + _hash = *_uitmp; + _uitmp++; + _hash += (*_uitmp)<<4; + _uitmp++; + _hash += (*_uitmp)<<8; + return _hash; + } + + SIMD_FORCE_INLINE void interpolate_normals( btVector3 * normals,GUINT normal_count) + { + btVector3 vec_sum(m_normal); + for(GUINT i=0;i +{ +public: + gim_contact_array():gim_array(64) + { + } + + SIMD_FORCE_INLINE void push_contact(const btVector3 &point,const btVector3 & normal, + GREAL depth, GUINT feature1, GUINT feature2) + { + push_back_mem(); + GIM_CONTACT & newele = back(); + newele.m_point = point; + newele.m_normal = normal; + newele.m_depth = depth; + newele.m_feature1 = feature1; + newele.m_feature2 = feature2; + } + + SIMD_FORCE_INLINE void push_triangle_contacts( + const GIM_TRIANGLE_CONTACT_DATA & tricontact, + GUINT feature1,GUINT feature2) + { + for(GUINT i = 0;i +struct GIM_HASH_TABLE_NODE +{ + GUINT m_key; + T m_data; + GIM_HASH_TABLE_NODE() + { + } + + GIM_HASH_TABLE_NODE(const GIM_HASH_TABLE_NODE & value) + { + m_key = value.m_key; + m_data = value.m_data; + } + + GIM_HASH_TABLE_NODE(GUINT key, const T & data) + { + m_key = key; + m_data = data; + } + + bool operator <(const GIM_HASH_TABLE_NODE & other) const + { + ///inverse order, further objects are first + if(m_key < other.m_key) return true; + return false; + } + + bool operator >(const GIM_HASH_TABLE_NODE & other) const + { + ///inverse order, further objects are first + if(m_key > other.m_key) return true; + return false; + } + + bool operator ==(const GIM_HASH_TABLE_NODE & other) const + { + ///inverse order, further objects are first + if(m_key == other.m_key) return true; + return false; + } +}; + +///Macro for getting the key +class GIM_HASH_NODE_GET_KEY +{ +public: + template + inline GUINT operator()( const T& a) + { + return a.m_key; + } +}; + + + +///Macro for comparing the key and the element +class GIM_HASH_NODE_CMP_KEY_MACRO +{ +public: + template + inline int operator() ( const T& a, GUINT key) + { + return ((int)(a.m_key - key)); + } +}; + +///Macro for comparing Hash nodes +class GIM_HASH_NODE_CMP_MACRO +{ +public: + template + inline int operator() ( const T& a, const T& b ) + { + return ((int)(a.m_key - b.m_key)); + } +}; + + + + + +//! Sorting for hash table +/*! +switch automatically between quicksort and radixsort +*/ +template +void gim_sort_hash_node_array(T * array, GUINT array_count) +{ + if(array_count + +
    +
  • if node_size = 0, then this container becomes a simple sorted array allocator. reserve_size is used for reserve memory in m_nodes. +When the array size reaches the size equivalent to 'min_hash_table_size', then it becomes a hash table by calling check_for_switching_to_hashtable. +
  • If node_size != 0, then this container becomes a hash table for ever +
+ +*/ +template +class gim_hash_table +{ +protected: + typedef GIM_HASH_TABLE_NODE _node_type; + + //!The nodes + //array< _node_type, SuperAllocator<_node_type> > m_nodes; + gim_array< _node_type > m_nodes; + //SuperBufferedArray< _node_type > m_nodes; + bool m_sorted; + + /*! \defgroup HASH_TABLE_STRUCTURES + \brief + Hash table data management. The hash table has the indices to the corresponding m_nodes array + */ + //! @{ + + GUINT * m_hash_table;//!< + GUINT m_table_size;//!< + GUINT m_node_size;//!< + GUINT m_min_hash_table_size; + + + + //! Returns the cell index + inline GUINT _find_cell(GUINT hashkey) + { + _node_type * nodesptr = m_nodes.pointer(); + GUINT start_index = (hashkey%m_table_size)*m_node_size; + GUINT end_index = start_index + m_node_size; + + while(start_index= m_nodes.size()) return false; + if(m_nodes[index].m_key != GIM_INVALID_HASH) + { + //Search for the avaliable cell in buffer + GUINT cell_index = _find_cell(m_nodes[index].m_key); + + btAssert(cell_index!=GIM_INVALID_HASH); + btAssert(m_hash_table[cell_index]==index); + + m_hash_table[cell_index] = GIM_INVALID_HASH; + } + + return this->_erase_unsorted(index); + } + + //! erase by key in hash table + inline bool _erase_hash_table(GUINT hashkey) + { + if(hashkey == GIM_INVALID_HASH) return false; + + //Search for the avaliable cell in buffer + GUINT cell_index = _find_cell(hashkey); + if(cell_index ==GIM_INVALID_HASH) return false; + + GUINT index = m_hash_table[cell_index]; + m_hash_table[cell_index] = GIM_INVALID_HASH; + + return this->_erase_unsorted(index); + } + + + + //! insert an element in hash table + /*! + If the element exists, this won't insert the element + \return the index in the array of the existing element,or GIM_INVALID_HASH if the element has been inserted + If so, the element has been inserted at the last position of the array. + */ + inline GUINT _insert_hash_table(GUINT hashkey, const T & value) + { + if(hashkey==GIM_INVALID_HASH) + { + //Insert anyway + _insert_unsorted(hashkey,value); + return GIM_INVALID_HASH; + } + + GUINT cell_index = _assign_hash_table_cell(hashkey); + + GUINT value_key = m_hash_table[cell_index]; + + if(value_key!= GIM_INVALID_HASH) return value_key;// Not overrited + + m_hash_table[cell_index] = m_nodes.size(); + + _insert_unsorted(hashkey,value); + return GIM_INVALID_HASH; + } + + //! insert an element in hash table. + /*! + If the element exists, this replaces the element. + \return the index in the array of the existing element,or GIM_INVALID_HASH if the element has been inserted + If so, the element has been inserted at the last position of the array. + */ + inline GUINT _insert_hash_table_replace(GUINT hashkey, const T & value) + { + if(hashkey==GIM_INVALID_HASH) + { + //Insert anyway + _insert_unsorted(hashkey,value); + return GIM_INVALID_HASH; + } + + GUINT cell_index = _assign_hash_table_cell(hashkey); + + GUINT value_key = m_hash_table[cell_index]; + + if(value_key!= GIM_INVALID_HASH) + {//replaces the existing + m_nodes[value_key] = _node_type(hashkey,value); + return value_key;// index of the replaced element + } + + m_hash_table[cell_index] = m_nodes.size(); + + _insert_unsorted(hashkey,value); + return GIM_INVALID_HASH; + + } + + //! @} + + /*! \defgroup SORTED_ARRAY_STRUCTURES + \brief + Sorted array data management. The hash table has the indices to the corresponding m_nodes array + */ + //! @{ + inline bool _erase_sorted(GUINT index) + { + if(index>=(GUINT)m_nodes.size()) return false; + m_nodes.erase_sorted(index); + if(m_nodes.size()<2) m_sorted = false; + return true; + } + + //! faster, but unsorted + inline bool _erase_unsorted(GUINT index) + { + if(index>=m_nodes.size()) return false; + + GUINT lastindex = m_nodes.size()-1; + if(indexcheck_for_switching_to_hashtable(); + } + + //! Insert an element in an ordered array + inline GUINT _insert_sorted(GUINT hashkey, const T & value) + { + if(hashkey==GIM_INVALID_HASH || size()==0) + { + m_nodes.push_back(_node_type(hashkey,value)); + return GIM_INVALID_HASH; + } + //Insert at last position + //Sort element + + + GUINT result_ind=0; + GUINT last_index = m_nodes.size()-1; + _node_type * ptr = m_nodes.pointer(); + + bool found = gim_binary_search_ex( + ptr,0,last_index,result_ind,hashkey,GIM_HASH_NODE_CMP_KEY_MACRO()); + + + //Insert before found index + if(found) + { + return result_ind; + } + else + { + _insert_in_pos(hashkey, value, result_ind); + } + return GIM_INVALID_HASH; + } + + inline GUINT _insert_sorted_replace(GUINT hashkey, const T & value) + { + if(hashkey==GIM_INVALID_HASH || size()==0) + { + m_nodes.push_back(_node_type(hashkey,value)); + return GIM_INVALID_HASH; + } + //Insert at last position + //Sort element + GUINT result_ind; + GUINT last_index = m_nodes.size()-1; + _node_type * ptr = m_nodes.pointer(); + + bool found = gim_binary_search_ex( + ptr,0,last_index,result_ind,hashkey,GIM_HASH_NODE_CMP_KEY_MACRO()); + + //Insert before found index + if(found) + { + m_nodes[result_ind] = _node_type(hashkey,value); + } + else + { + _insert_in_pos(hashkey, value, result_ind); + } + return result_ind; + } + + //! Fast insertion in m_nodes array + inline GUINT _insert_unsorted(GUINT hashkey, const T & value) + { + m_nodes.push_back(_node_type(hashkey,value)); + m_sorted = false; + return GIM_INVALID_HASH; + } + + //! @} + + +public: + + /*! +
  • if node_size = 0, then this container becomes a simple sorted array allocator. reserve_size is used for reserve memory in m_nodes. + When the array size reaches the size equivalent to 'min_hash_table_size', then it becomes a hash table by calling check_for_switching_to_hashtable. +
  • If node_size != 0, then this container becomes a hash table for ever + + */ + gim_hash_table(GUINT reserve_size = GIM_DEFAULT_HASH_TABLE_SIZE, + GUINT node_size = GIM_DEFAULT_HASH_TABLE_NODE_SIZE, + GUINT min_hash_table_size = GIM_INVALID_HASH) + { + m_hash_table = NULL; + m_table_size = 0; + m_sorted = false; + m_node_size = node_size; + m_min_hash_table_size = min_hash_table_size; + + if(m_node_size!=0) + { + if(reserve_size!=0) + { + m_nodes.reserve(reserve_size); + _reserve_table_memory(reserve_size); + _invalidate_keys(); + } + else + { + m_nodes.reserve(GIM_DEFAULT_HASH_TABLE_SIZE); + _reserve_table_memory(GIM_DEFAULT_HASH_TABLE_SIZE); + _invalidate_keys(); + } + } + else if(reserve_size!=0) + { + m_nodes.reserve(reserve_size); + } + + } + + ~gim_hash_table() + { + _destroy(); + } + + inline bool is_hash_table() + { + if(m_hash_table) return true; + return false; + } + + inline bool is_sorted() + { + if(size()<2) return true; + return m_sorted; + } + + bool sort() + { + if(is_sorted()) return true; + if(m_nodes.size()<2) return false; + + + _node_type * ptr = m_nodes.pointer(); + GUINT siz = m_nodes.size(); + gim_sort_hash_node_array(ptr,siz); + m_sorted=true; + + + + if(m_hash_table) + { + _rehash(); + } + return true; + } + + bool switch_to_hashtable() + { + if(m_hash_table) return false; + if(m_node_size==0) m_node_size = GIM_DEFAULT_HASH_TABLE_NODE_SIZE; + if(m_nodes.size()m_hash_table) return true; + + if(!(m_nodes.size()< m_min_hash_table_size)) + { + if(m_node_size == 0) + { + m_node_size = GIM_DEFAULT_HASH_TABLE_NODE_SIZE; + } + + _resize_table(m_nodes.size()+1); + return true; + } + return false; + } + + inline void set_sorted(bool value) + { + m_sorted = value; + } + + //! Retrieves the amount of keys. + inline GUINT size() const + { + return m_nodes.size(); + } + + //! Retrieves the hash key. + inline GUINT get_key(GUINT index) const + { + return m_nodes[index].m_key; + } + + //! Retrieves the value by index + /*! + */ + inline T * get_value_by_index(GUINT index) + { + return &m_nodes[index].m_data; + } + + inline const T& operator[](GUINT index) const + { + return m_nodes[index].m_data; + } + + inline T& operator[](GUINT index) + { + return m_nodes[index].m_data; + } + + //! Finds the index of the element with the key + /*! + \return the index in the array of the existing element,or GIM_INVALID_HASH if the element has been inserted + If so, the element has been inserted at the last position of the array. + */ + inline GUINT find(GUINT hashkey) + { + if(m_hash_table) + { + GUINT cell_index = _find_cell(hashkey); + if(cell_index==GIM_INVALID_HASH) return GIM_INVALID_HASH; + return m_hash_table[cell_index]; + } + GUINT last_index = m_nodes.size(); + if(last_index<2) + { + if(last_index==0) return GIM_INVALID_HASH; + if(m_nodes[0].m_key == hashkey) return 0; + return GIM_INVALID_HASH; + } + else if(m_sorted) + { + //Binary search + GUINT result_ind = 0; + last_index--; + _node_type * ptr = m_nodes.pointer(); + + bool found = gim_binary_search_ex(ptr,0,last_index,result_ind,hashkey,GIM_HASH_NODE_CMP_KEY_MACRO()); + + + if(found) return result_ind; + } + return GIM_INVALID_HASH; + } + + //! Retrieves the value associated with the index + /*! + \return the found element, or null + */ + inline T * get_value(GUINT hashkey) + { + GUINT index = find(hashkey); + if(index == GIM_INVALID_HASH) return NULL; + return &m_nodes[index].m_data; + } + + + /*! + */ + inline bool erase_by_index(GUINT index) + { + if(index > m_nodes.size()) return false; + + if(m_hash_table == NULL) + { + if(is_sorted()) + { + return this->_erase_sorted(index); + } + else + { + return this->_erase_unsorted(index); + } + } + else + { + return this->_erase_by_index_hash_table(index); + } + return false; + } + + + + inline bool erase_by_index_unsorted(GUINT index) + { + if(index > m_nodes.size()) return false; + + if(m_hash_table == NULL) + { + return this->_erase_unsorted(index); + } + else + { + return this->_erase_by_index_hash_table(index); + } + return false; + } + + + + /*! + + */ + inline bool erase_by_key(GUINT hashkey) + { + if(size()==0) return false; + + if(m_hash_table) + { + return this->_erase_hash_table(hashkey); + } + //Binary search + + if(is_sorted()==false) return false; + + GUINT result_ind = find(hashkey); + if(result_ind!= GIM_INVALID_HASH) + { + return this->_erase_sorted(result_ind); + } + return false; + } + + void clear() + { + m_nodes.clear(); + + if(m_hash_table==NULL) return; + GUINT datasize = m_table_size*m_node_size; + //Initialize the hashkeys. + GUINT i; + for(i=0;i_insert_hash_table(hashkey,element); + } + if(this->is_sorted()) + { + return this->_insert_sorted(hashkey,element); + } + return this->_insert_unsorted(hashkey,element); + } + + //! Insert an element into the hash, and could overrite an existing object with the same hash. + /*! + \return If GIM_INVALID_HASH, the object has been inserted succesfully. Else it returns the position + of the replaced element. + */ + inline GUINT insert_override(GUINT hashkey, const T & element) + { + if(m_hash_table) + { + return this->_insert_hash_table_replace(hashkey,element); + } + if(this->is_sorted()) + { + return this->_insert_sorted_replace(hashkey,element); + } + this->_insert_unsorted(hashkey,element); + return m_nodes.size(); + } + + + + //! Insert an element into the hash,But if this container is a sorted array, this inserts it unsorted + /*! + */ + inline GUINT insert_unsorted(GUINT hashkey,const T & element) + { + if(m_hash_table) + { + return this->_insert_hash_table(hashkey,element); + } + return this->_insert_unsorted(hashkey,element); + } + + +}; + +//! @} + + + +#endif // GIM_CONTAINERS_H_INCLUDED diff --git a/Extras/GIMPACT/include/GIMPACT/core/gim_linear_math.h b/Extras/GIMPACT/include/GIMPACT/core/gim_linear_math.h new file mode 100755 index 000000000..26613ca98 --- /dev/null +++ b/Extras/GIMPACT/include/GIMPACT/core/gim_linear_math.h @@ -0,0 +1,1584 @@ +#ifndef GIM_LINEAR_H_INCLUDED +#define GIM_LINEAR_H_INCLUDED + +/*! \file gim_linear_math.h +*\author Francisco León Nájera +Type Independant Vector and matrix operations. +*/ +/* +----------------------------------------------------------------------------- +This source file is part of GIMPACT Library. + +For the latest info, see http://gimpact.sourceforge.net/ + +Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371. +email: projectileman@yahoo.com + + 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 GIMPACT-LICENSE-LGPL.TXT. + (2) The BSD-style license that is included with this library in + the file GIMPACT-LICENSE-BSD.TXT. + (3) The zlib/libpng license that is included with this library in + the file GIMPACT-LICENSE-ZLIB.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 + GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details. + +----------------------------------------------------------------------------- +*/ + + +#include "GIMPACT/core/gim_math.h" +#include "GIMPACT/core/gim_geom_types.h" + + + +/*! \defgroup VECTOR_OPERATIONS +T +Operations for vectors : vec2f,vec3f and vec4f +*/ +//! @{ + +//! Zero out a 2D vector +#define VEC_ZERO_2(a) \ +{ \ + (a)[0] = (a)[1] = 0.0f; \ +}\ + + +//! Zero out a 3D vector +#define VEC_ZERO(a) \ +{ \ + (a)[0] = (a)[1] = (a)[2] = 0.0f; \ +}\ + + +/// Zero out a 4D vector +#define VEC_ZERO_4(a) \ +{ \ + (a)[0] = (a)[1] = (a)[2] = (a)[3] = 0.0f; \ +}\ + + +/// Vector copy +#define VEC_COPY_2(b,a) \ +{ \ + (b)[0] = (a)[0]; \ + (b)[1] = (a)[1]; \ +}\ + + +/// Copy 3D vector +#define VEC_COPY(b,a) \ +{ \ + (b)[0] = (a)[0]; \ + (b)[1] = (a)[1]; \ + (b)[2] = (a)[2]; \ +}\ + + +/// Copy 4D vector +#define VEC_COPY_4(b,a) \ +{ \ + (b)[0] = (a)[0]; \ + (b)[1] = (a)[1]; \ + (b)[2] = (a)[2]; \ + (b)[3] = (a)[3]; \ +}\ + +/// VECTOR SWAP +#define VEC_SWAP(b,a) \ +{ \ + GIM_SWAP_NUMBERS((b)[0],(a)[0]);\ + GIM_SWAP_NUMBERS((b)[1],(a)[1]);\ + GIM_SWAP_NUMBERS((b)[2],(a)[2]);\ +}\ + +/// Vector difference +#define VEC_DIFF_2(v21,v2,v1) \ +{ \ + (v21)[0] = (v2)[0] - (v1)[0]; \ + (v21)[1] = (v2)[1] - (v1)[1]; \ +}\ + + +/// Vector difference +#define VEC_DIFF(v21,v2,v1) \ +{ \ + (v21)[0] = (v2)[0] - (v1)[0]; \ + (v21)[1] = (v2)[1] - (v1)[1]; \ + (v21)[2] = (v2)[2] - (v1)[2]; \ +}\ + + +/// Vector difference +#define VEC_DIFF_4(v21,v2,v1) \ +{ \ + (v21)[0] = (v2)[0] - (v1)[0]; \ + (v21)[1] = (v2)[1] - (v1)[1]; \ + (v21)[2] = (v2)[2] - (v1)[2]; \ + (v21)[3] = (v2)[3] - (v1)[3]; \ +}\ + + +/// Vector sum +#define VEC_SUM_2(v21,v2,v1) \ +{ \ + (v21)[0] = (v2)[0] + (v1)[0]; \ + (v21)[1] = (v2)[1] + (v1)[1]; \ +}\ + + +/// Vector sum +#define VEC_SUM(v21,v2,v1) \ +{ \ + (v21)[0] = (v2)[0] + (v1)[0]; \ + (v21)[1] = (v2)[1] + (v1)[1]; \ + (v21)[2] = (v2)[2] + (v1)[2]; \ +}\ + + +/// Vector sum +#define VEC_SUM_4(v21,v2,v1) \ +{ \ + (v21)[0] = (v2)[0] + (v1)[0]; \ + (v21)[1] = (v2)[1] + (v1)[1]; \ + (v21)[2] = (v2)[2] + (v1)[2]; \ + (v21)[3] = (v2)[3] + (v1)[3]; \ +}\ + + +/// scalar times vector +#define VEC_SCALE_2(c,a,b) \ +{ \ + (c)[0] = (a)*(b)[0]; \ + (c)[1] = (a)*(b)[1]; \ +}\ + + +/// scalar times vector +#define VEC_SCALE(c,a,b) \ +{ \ + (c)[0] = (a)*(b)[0]; \ + (c)[1] = (a)*(b)[1]; \ + (c)[2] = (a)*(b)[2]; \ +}\ + + +/// scalar times vector +#define VEC_SCALE_4(c,a,b) \ +{ \ + (c)[0] = (a)*(b)[0]; \ + (c)[1] = (a)*(b)[1]; \ + (c)[2] = (a)*(b)[2]; \ + (c)[3] = (a)*(b)[3]; \ +}\ + + +/// accumulate scaled vector +#define VEC_ACCUM_2(c,a,b) \ +{ \ + (c)[0] += (a)*(b)[0]; \ + (c)[1] += (a)*(b)[1]; \ +}\ + + +/// accumulate scaled vector +#define VEC_ACCUM(c,a,b) \ +{ \ + (c)[0] += (a)*(b)[0]; \ + (c)[1] += (a)*(b)[1]; \ + (c)[2] += (a)*(b)[2]; \ +}\ + + +/// accumulate scaled vector +#define VEC_ACCUM_4(c,a,b) \ +{ \ + (c)[0] += (a)*(b)[0]; \ + (c)[1] += (a)*(b)[1]; \ + (c)[2] += (a)*(b)[2]; \ + (c)[3] += (a)*(b)[3]; \ +}\ + + +/// Vector dot product +#define VEC_DOT_2(a,b) ((a)[0]*(b)[0] + (a)[1]*(b)[1]) + + +/// Vector dot product +#define VEC_DOT(a,b) ((a)[0]*(b)[0] + (a)[1]*(b)[1] + (a)[2]*(b)[2]) + +/// Vector dot product +#define VEC_DOT_4(a,b) ((a)[0]*(b)[0] + (a)[1]*(b)[1] + (a)[2]*(b)[2] + (a)[3]*(b)[3]) + +/// vector impact parameter (squared) +#define VEC_IMPACT_SQ(bsq,direction,position) {\ + GREAL _llel_ = VEC_DOT(direction, position);\ + bsq = VEC_DOT(position, position) - _llel_*_llel_;\ +}\ + + +/// vector impact parameter +#define VEC_IMPACT(bsq,direction,position) {\ + VEC_IMPACT_SQ(bsq,direction,position); \ + GIM_SQRT(bsq,bsq); \ +}\ + +/// Vector length +#define VEC_LENGTH_2(a,l)\ +{\ + GREAL _pp = VEC_DOT_2(a,a);\ + GIM_SQRT(_pp,l);\ +}\ + + +/// Vector length +#define VEC_LENGTH(a,l)\ +{\ + GREAL _pp = VEC_DOT(a,a);\ + GIM_SQRT(_pp,l);\ +}\ + + +/// Vector length +#define VEC_LENGTH_4(a,l)\ +{\ + GREAL _pp = VEC_DOT_4(a,a);\ + GIM_SQRT(_pp,l);\ +}\ + +/// Vector inv length +#define VEC_INV_LENGTH_2(a,l)\ +{\ + GREAL _pp = VEC_DOT_2(a,a);\ + GIM_INV_SQRT(_pp,l);\ +}\ + + +/// Vector inv length +#define VEC_INV_LENGTH(a,l)\ +{\ + GREAL _pp = VEC_DOT(a,a);\ + GIM_INV_SQRT(_pp,l);\ +}\ + + +/// Vector inv length +#define VEC_INV_LENGTH_4(a,l)\ +{\ + GREAL _pp = VEC_DOT_4(a,a);\ + GIM_INV_SQRT(_pp,l);\ +}\ + + + +/// distance between two points +#define VEC_DISTANCE(_len,_va,_vb) {\ + vec3f _tmp_; \ + VEC_DIFF(_tmp_, _vb, _va); \ + VEC_LENGTH(_tmp_,_len); \ +}\ + + +/// Vector length +#define VEC_CONJUGATE_LENGTH(a,l)\ +{\ + GREAL _pp = 1.0 - a[0]*a[0] - a[1]*a[1] - a[2]*a[2];\ + GIM_SQRT(_pp,l);\ +}\ + + +/// Vector length +#define VEC_NORMALIZE(a) { \ + GREAL len;\ + VEC_INV_LENGTH(a,len); \ + if(lenA[1]?(A[0]>A[2]?0:2):(A[1]>A[2]?1:2);\ +}\ + +//! Finds the 2 smallest cartesian coordinates from a vector +#define VEC_MINOR_AXES(vec, i0, i1)\ +{\ + VEC_MAYOR_COORD(vec,i0);\ + i0 = (i0+1)%3;\ + i1 = (i0+1)%3;\ +}\ + + + + +#define VEC_EQUAL(v1,v2) (v1[0]==v2[0]&&v1[1]==v2[1]&&v1[2]==v2[2]) + +#define VEC_NEAR_EQUAL(v1,v2) (GIM_NEAR_EQUAL(v1[0],v2[0])&&GIM_NEAR_EQUAL(v1[1],v2[1])&&GIM_NEAR_EQUAL(v1[2],v2[2])) + + +/// Vector cross +#define X_AXIS_CROSS_VEC(dst,src)\ +{ \ + dst[0] = 0.0f; \ + dst[1] = -src[2]; \ + dst[2] = src[1]; \ +}\ + +#define Y_AXIS_CROSS_VEC(dst,src)\ +{ \ + dst[0] = src[2]; \ + dst[1] = 0.0f; \ + dst[2] = -src[0]; \ +}\ + +#define Z_AXIS_CROSS_VEC(dst,src)\ +{ \ + dst[0] = -src[1]; \ + dst[1] = src[0]; \ + dst[2] = 0.0f; \ +}\ + + + +//! @} + + +/*! \defgroup MATRIX_OPERATIONS +Operations for matrices : mat2f, mat3f and mat4f +*/ +//! @{ + +/// initialize matrix +#define IDENTIFY_MATRIX_3X3(m) \ +{ \ + m[0][0] = 1.0; \ + m[0][1] = 0.0; \ + m[0][2] = 0.0; \ + \ + m[1][0] = 0.0; \ + m[1][1] = 1.0; \ + m[1][2] = 0.0; \ + \ + m[2][0] = 0.0; \ + m[2][1] = 0.0; \ + m[2][2] = 1.0; \ +}\ + +/*! initialize matrix */ +#define IDENTIFY_MATRIX_4X4(m) \ +{ \ + m[0][0] = 1.0; \ + m[0][1] = 0.0; \ + m[0][2] = 0.0; \ + m[0][3] = 0.0; \ + \ + m[1][0] = 0.0; \ + m[1][1] = 1.0; \ + m[1][2] = 0.0; \ + m[1][3] = 0.0; \ + \ + m[2][0] = 0.0; \ + m[2][1] = 0.0; \ + m[2][2] = 1.0; \ + m[2][3] = 0.0; \ + \ + m[3][0] = 0.0; \ + m[3][1] = 0.0; \ + m[3][2] = 0.0; \ + m[3][3] = 1.0; \ +}\ + +/*! initialize matrix */ +#define ZERO_MATRIX_4X4(m) \ +{ \ + m[0][0] = 0.0; \ + m[0][1] = 0.0; \ + m[0][2] = 0.0; \ + m[0][3] = 0.0; \ + \ + m[1][0] = 0.0; \ + m[1][1] = 0.0; \ + m[1][2] = 0.0; \ + m[1][3] = 0.0; \ + \ + m[2][0] = 0.0; \ + m[2][1] = 0.0; \ + m[2][2] = 0.0; \ + m[2][3] = 0.0; \ + \ + m[3][0] = 0.0; \ + m[3][1] = 0.0; \ + m[3][2] = 0.0; \ + m[3][3] = 0.0; \ +}\ + +/*! matrix rotation X */ +#define ROTX_CS(m,cosine,sine) \ +{ \ + /* rotation about the x-axis */ \ + \ + m[0][0] = 1.0; \ + m[0][1] = 0.0; \ + m[0][2] = 0.0; \ + m[0][3] = 0.0; \ + \ + m[1][0] = 0.0; \ + m[1][1] = (cosine); \ + m[1][2] = (sine); \ + m[1][3] = 0.0; \ + \ + m[2][0] = 0.0; \ + m[2][1] = -(sine); \ + m[2][2] = (cosine); \ + m[2][3] = 0.0; \ + \ + m[3][0] = 0.0; \ + m[3][1] = 0.0; \ + m[3][2] = 0.0; \ + m[3][3] = 1.0; \ +}\ + +/*! matrix rotation Y */ +#define ROTY_CS(m,cosine,sine) \ +{ \ + /* rotation about the y-axis */ \ + \ + m[0][0] = (cosine); \ + m[0][1] = 0.0; \ + m[0][2] = -(sine); \ + m[0][3] = 0.0; \ + \ + m[1][0] = 0.0; \ + m[1][1] = 1.0; \ + m[1][2] = 0.0; \ + m[1][3] = 0.0; \ + \ + m[2][0] = (sine); \ + m[2][1] = 0.0; \ + m[2][2] = (cosine); \ + m[2][3] = 0.0; \ + \ + m[3][0] = 0.0; \ + m[3][1] = 0.0; \ + m[3][2] = 0.0; \ + m[3][3] = 1.0; \ +}\ + +/*! matrix rotation Z */ +#define ROTZ_CS(m,cosine,sine) \ +{ \ + /* rotation about the z-axis */ \ + \ + m[0][0] = (cosine); \ + m[0][1] = (sine); \ + m[0][2] = 0.0; \ + m[0][3] = 0.0; \ + \ + m[1][0] = -(sine); \ + m[1][1] = (cosine); \ + m[1][2] = 0.0; \ + m[1][3] = 0.0; \ + \ + m[2][0] = 0.0; \ + m[2][1] = 0.0; \ + m[2][2] = 1.0; \ + m[2][3] = 0.0; \ + \ + m[3][0] = 0.0; \ + m[3][1] = 0.0; \ + m[3][2] = 0.0; \ + m[3][3] = 1.0; \ +}\ + +/*! matrix copy */ +#define COPY_MATRIX_2X2(b,a) \ +{ \ + b[0][0] = a[0][0]; \ + b[0][1] = a[0][1]; \ + \ + b[1][0] = a[1][0]; \ + b[1][1] = a[1][1]; \ + \ +}\ + + +/*! matrix copy */ +#define COPY_MATRIX_2X3(b,a) \ +{ \ + b[0][0] = a[0][0]; \ + b[0][1] = a[0][1]; \ + b[0][2] = a[0][2]; \ + \ + b[1][0] = a[1][0]; \ + b[1][1] = a[1][1]; \ + b[1][2] = a[1][2]; \ +}\ + + +/*! matrix copy */ +#define COPY_MATRIX_3X3(b,a) \ +{ \ + b[0][0] = a[0][0]; \ + b[0][1] = a[0][1]; \ + b[0][2] = a[0][2]; \ + \ + b[1][0] = a[1][0]; \ + b[1][1] = a[1][1]; \ + b[1][2] = a[1][2]; \ + \ + b[2][0] = a[2][0]; \ + b[2][1] = a[2][1]; \ + b[2][2] = a[2][2]; \ +}\ + + +/*! matrix copy */ +#define COPY_MATRIX_4X4(b,a) \ +{ \ + b[0][0] = a[0][0]; \ + b[0][1] = a[0][1]; \ + b[0][2] = a[0][2]; \ + b[0][3] = a[0][3]; \ + \ + b[1][0] = a[1][0]; \ + b[1][1] = a[1][1]; \ + b[1][2] = a[1][2]; \ + b[1][3] = a[1][3]; \ + \ + b[2][0] = a[2][0]; \ + b[2][1] = a[2][1]; \ + b[2][2] = a[2][2]; \ + b[2][3] = a[2][3]; \ + \ + b[3][0] = a[3][0]; \ + b[3][1] = a[3][1]; \ + b[3][2] = a[3][2]; \ + b[3][3] = a[3][3]; \ +}\ + + +/*! matrix transpose */ +#define TRANSPOSE_MATRIX_2X2(b,a) \ +{ \ + b[0][0] = a[0][0]; \ + b[0][1] = a[1][0]; \ + \ + b[1][0] = a[0][1]; \ + b[1][1] = a[1][1]; \ +}\ + + +/*! matrix transpose */ +#define TRANSPOSE_MATRIX_3X3(b,a) \ +{ \ + b[0][0] = a[0][0]; \ + b[0][1] = a[1][0]; \ + b[0][2] = a[2][0]; \ + \ + b[1][0] = a[0][1]; \ + b[1][1] = a[1][1]; \ + b[1][2] = a[2][1]; \ + \ + b[2][0] = a[0][2]; \ + b[2][1] = a[1][2]; \ + b[2][2] = a[2][2]; \ +}\ + + +/*! matrix transpose */ +#define TRANSPOSE_MATRIX_4X4(b,a) \ +{ \ + b[0][0] = a[0][0]; \ + b[0][1] = a[1][0]; \ + b[0][2] = a[2][0]; \ + b[0][3] = a[3][0]; \ + \ + b[1][0] = a[0][1]; \ + b[1][1] = a[1][1]; \ + b[1][2] = a[2][1]; \ + b[1][3] = a[3][1]; \ + \ + b[2][0] = a[0][2]; \ + b[2][1] = a[1][2]; \ + b[2][2] = a[2][2]; \ + b[2][3] = a[3][2]; \ + \ + b[3][0] = a[0][3]; \ + b[3][1] = a[1][3]; \ + b[3][2] = a[2][3]; \ + b[3][3] = a[3][3]; \ +}\ + + +/*! multiply matrix by scalar */ +#define SCALE_MATRIX_2X2(b,s,a) \ +{ \ + b[0][0] = (s) * a[0][0]; \ + b[0][1] = (s) * a[0][1]; \ + \ + b[1][0] = (s) * a[1][0]; \ + b[1][1] = (s) * a[1][1]; \ +}\ + + +/*! multiply matrix by scalar */ +#define SCALE_MATRIX_3X3(b,s,a) \ +{ \ + b[0][0] = (s) * a[0][0]; \ + b[0][1] = (s) * a[0][1]; \ + b[0][2] = (s) * a[0][2]; \ + \ + b[1][0] = (s) * a[1][0]; \ + b[1][1] = (s) * a[1][1]; \ + b[1][2] = (s) * a[1][2]; \ + \ + b[2][0] = (s) * a[2][0]; \ + b[2][1] = (s) * a[2][1]; \ + b[2][2] = (s) * a[2][2]; \ +}\ + + +/*! multiply matrix by scalar */ +#define SCALE_MATRIX_4X4(b,s,a) \ +{ \ + b[0][0] = (s) * a[0][0]; \ + b[0][1] = (s) * a[0][1]; \ + b[0][2] = (s) * a[0][2]; \ + b[0][3] = (s) * a[0][3]; \ + \ + b[1][0] = (s) * a[1][0]; \ + b[1][1] = (s) * a[1][1]; \ + b[1][2] = (s) * a[1][2]; \ + b[1][3] = (s) * a[1][3]; \ + \ + b[2][0] = (s) * a[2][0]; \ + b[2][1] = (s) * a[2][1]; \ + b[2][2] = (s) * a[2][2]; \ + b[2][3] = (s) * a[2][3]; \ + \ + b[3][0] = s * a[3][0]; \ + b[3][1] = s * a[3][1]; \ + b[3][2] = s * a[3][2]; \ + b[3][3] = s * a[3][3]; \ +}\ + + +/*! multiply matrix by scalar */ +#define SCALE_VEC_MATRIX_2X2(b,svec,a) \ +{ \ + b[0][0] = svec[0] * a[0][0]; \ + b[1][0] = svec[0] * a[1][0]; \ + \ + b[0][1] = svec[1] * a[0][1]; \ + b[1][1] = svec[1] * a[1][1]; \ +}\ + + +/*! multiply matrix by scalar. Each columns is scaled by each scalar vector component */ +#define SCALE_VEC_MATRIX_3X3(b,svec,a) \ +{ \ + b[0][0] = svec[0] * a[0][0]; \ + b[1][0] = svec[0] * a[1][0]; \ + b[2][0] = svec[0] * a[2][0]; \ + \ + b[0][1] = svec[1] * a[0][1]; \ + b[1][1] = svec[1] * a[1][1]; \ + b[2][1] = svec[1] * a[2][1]; \ + \ + b[0][2] = svec[2] * a[0][2]; \ + b[1][2] = svec[2] * a[1][2]; \ + b[2][2] = svec[2] * a[2][2]; \ +}\ + + +/*! multiply matrix by scalar */ +#define SCALE_VEC_MATRIX_4X4(b,svec,a) \ +{ \ + b[0][0] = svec[0] * a[0][0]; \ + b[1][0] = svec[0] * a[1][0]; \ + b[2][0] = svec[0] * a[2][0]; \ + b[3][0] = svec[0] * a[3][0]; \ + \ + b[0][1] = svec[1] * a[0][1]; \ + b[1][1] = svec[1] * a[1][1]; \ + b[2][1] = svec[1] * a[2][1]; \ + b[3][1] = svec[1] * a[3][1]; \ + \ + b[0][2] = svec[2] * a[0][2]; \ + b[1][2] = svec[2] * a[1][2]; \ + b[2][2] = svec[2] * a[2][2]; \ + b[3][2] = svec[2] * a[3][2]; \ + \ + b[0][3] = svec[3] * a[0][3]; \ + b[1][3] = svec[3] * a[1][3]; \ + b[2][3] = svec[3] * a[2][3]; \ + b[3][3] = svec[3] * a[3][3]; \ +}\ + + +/*! multiply matrix by scalar */ +#define ACCUM_SCALE_MATRIX_2X2(b,s,a) \ +{ \ + b[0][0] += (s) * a[0][0]; \ + b[0][1] += (s) * a[0][1]; \ + \ + b[1][0] += (s) * a[1][0]; \ + b[1][1] += (s) * a[1][1]; \ +}\ + + +/*! multiply matrix by scalar */ +#define ACCUM_SCALE_MATRIX_3X3(b,s,a) \ +{ \ + b[0][0] += (s) * a[0][0]; \ + b[0][1] += (s) * a[0][1]; \ + b[0][2] += (s) * a[0][2]; \ + \ + b[1][0] += (s) * a[1][0]; \ + b[1][1] += (s) * a[1][1]; \ + b[1][2] += (s) * a[1][2]; \ + \ + b[2][0] += (s) * a[2][0]; \ + b[2][1] += (s) * a[2][1]; \ + b[2][2] += (s) * a[2][2]; \ +}\ + + +/*! multiply matrix by scalar */ +#define ACCUM_SCALE_MATRIX_4X4(b,s,a) \ +{ \ + b[0][0] += (s) * a[0][0]; \ + b[0][1] += (s) * a[0][1]; \ + b[0][2] += (s) * a[0][2]; \ + b[0][3] += (s) * a[0][3]; \ + \ + b[1][0] += (s) * a[1][0]; \ + b[1][1] += (s) * a[1][1]; \ + b[1][2] += (s) * a[1][2]; \ + b[1][3] += (s) * a[1][3]; \ + \ + b[2][0] += (s) * a[2][0]; \ + b[2][1] += (s) * a[2][1]; \ + b[2][2] += (s) * a[2][2]; \ + b[2][3] += (s) * a[2][3]; \ + \ + b[3][0] += (s) * a[3][0]; \ + b[3][1] += (s) * a[3][1]; \ + b[3][2] += (s) * a[3][2]; \ + b[3][3] += (s) * a[3][3]; \ +}\ + +/*! matrix product */ +/*! c[x][y] = a[x][0]*b[0][y]+a[x][1]*b[1][y]+a[x][2]*b[2][y]+a[x][3]*b[3][y];*/ +#define MATRIX_PRODUCT_2X2(c,a,b) \ +{ \ + c[0][0] = a[0][0]*b[0][0]+a[0][1]*b[1][0]; \ + c[0][1] = a[0][0]*b[0][1]+a[0][1]*b[1][1]; \ + \ + c[1][0] = a[1][0]*b[0][0]+a[1][1]*b[1][0]; \ + c[1][1] = a[1][0]*b[0][1]+a[1][1]*b[1][1]; \ + \ +}\ + +/*! matrix product */ +/*! c[x][y] = a[x][0]*b[0][y]+a[x][1]*b[1][y]+a[x][2]*b[2][y]+a[x][3]*b[3][y];*/ +#define MATRIX_PRODUCT_3X3(c,a,b) \ +{ \ + c[0][0] = a[0][0]*b[0][0]+a[0][1]*b[1][0]+a[0][2]*b[2][0]; \ + c[0][1] = a[0][0]*b[0][1]+a[0][1]*b[1][1]+a[0][2]*b[2][1]; \ + c[0][2] = a[0][0]*b[0][2]+a[0][1]*b[1][2]+a[0][2]*b[2][2]; \ + \ + c[1][0] = a[1][0]*b[0][0]+a[1][1]*b[1][0]+a[1][2]*b[2][0]; \ + c[1][1] = a[1][0]*b[0][1]+a[1][1]*b[1][1]+a[1][2]*b[2][1]; \ + c[1][2] = a[1][0]*b[0][2]+a[1][1]*b[1][2]+a[1][2]*b[2][2]; \ + \ + c[2][0] = a[2][0]*b[0][0]+a[2][1]*b[1][0]+a[2][2]*b[2][0]; \ + c[2][1] = a[2][0]*b[0][1]+a[2][1]*b[1][1]+a[2][2]*b[2][1]; \ + c[2][2] = a[2][0]*b[0][2]+a[2][1]*b[1][2]+a[2][2]*b[2][2]; \ +}\ + + +/*! matrix product */ +/*! c[x][y] = a[x][0]*b[0][y]+a[x][1]*b[1][y]+a[x][2]*b[2][y]+a[x][3]*b[3][y];*/ +#define MATRIX_PRODUCT_4X4(c,a,b) \ +{ \ + c[0][0] = a[0][0]*b[0][0]+a[0][1]*b[1][0]+a[0][2]*b[2][0]+a[0][3]*b[3][0];\ + c[0][1] = a[0][0]*b[0][1]+a[0][1]*b[1][1]+a[0][2]*b[2][1]+a[0][3]*b[3][1];\ + c[0][2] = a[0][0]*b[0][2]+a[0][1]*b[1][2]+a[0][2]*b[2][2]+a[0][3]*b[3][2];\ + c[0][3] = a[0][0]*b[0][3]+a[0][1]*b[1][3]+a[0][2]*b[2][3]+a[0][3]*b[3][3];\ + \ + c[1][0] = a[1][0]*b[0][0]+a[1][1]*b[1][0]+a[1][2]*b[2][0]+a[1][3]*b[3][0];\ + c[1][1] = a[1][0]*b[0][1]+a[1][1]*b[1][1]+a[1][2]*b[2][1]+a[1][3]*b[3][1];\ + c[1][2] = a[1][0]*b[0][2]+a[1][1]*b[1][2]+a[1][2]*b[2][2]+a[1][3]*b[3][2];\ + c[1][3] = a[1][0]*b[0][3]+a[1][1]*b[1][3]+a[1][2]*b[2][3]+a[1][3]*b[3][3];\ + \ + c[2][0] = a[2][0]*b[0][0]+a[2][1]*b[1][0]+a[2][2]*b[2][0]+a[2][3]*b[3][0];\ + c[2][1] = a[2][0]*b[0][1]+a[2][1]*b[1][1]+a[2][2]*b[2][1]+a[2][3]*b[3][1];\ + c[2][2] = a[2][0]*b[0][2]+a[2][1]*b[1][2]+a[2][2]*b[2][2]+a[2][3]*b[3][2];\ + c[2][3] = a[2][0]*b[0][3]+a[2][1]*b[1][3]+a[2][2]*b[2][3]+a[2][3]*b[3][3];\ + \ + c[3][0] = a[3][0]*b[0][0]+a[3][1]*b[1][0]+a[3][2]*b[2][0]+a[3][3]*b[3][0];\ + c[3][1] = a[3][0]*b[0][1]+a[3][1]*b[1][1]+a[3][2]*b[2][1]+a[3][3]*b[3][1];\ + c[3][2] = a[3][0]*b[0][2]+a[3][1]*b[1][2]+a[3][2]*b[2][2]+a[3][3]*b[3][2];\ + c[3][3] = a[3][0]*b[0][3]+a[3][1]*b[1][3]+a[3][2]*b[2][3]+a[3][3]*b[3][3];\ +}\ + + +/*! matrix times vector */ +#define MAT_DOT_VEC_2X2(p,m,v) \ +{ \ + p[0] = m[0][0]*v[0] + m[0][1]*v[1]; \ + p[1] = m[1][0]*v[0] + m[1][1]*v[1]; \ +}\ + + +/*! matrix times vector */ +#define MAT_DOT_VEC_3X3(p,m,v) \ +{ \ + p[0] = m[0][0]*v[0] + m[0][1]*v[1] + m[0][2]*v[2]; \ + p[1] = m[1][0]*v[0] + m[1][1]*v[1] + m[1][2]*v[2]; \ + p[2] = m[2][0]*v[0] + m[2][1]*v[1] + m[2][2]*v[2]; \ +}\ + + +/*! matrix times vector +v is a vec4f +*/ +#define MAT_DOT_VEC_4X4(p,m,v) \ +{ \ + p[0] = m[0][0]*v[0] + m[0][1]*v[1] + m[0][2]*v[2] + m[0][3]*v[3]; \ + p[1] = m[1][0]*v[0] + m[1][1]*v[1] + m[1][2]*v[2] + m[1][3]*v[3]; \ + p[2] = m[2][0]*v[0] + m[2][1]*v[1] + m[2][2]*v[2] + m[2][3]*v[3]; \ + p[3] = m[3][0]*v[0] + m[3][1]*v[1] + m[3][2]*v[2] + m[3][3]*v[3]; \ +}\ + +/*! matrix times vector +v is a vec3f +and m is a mat4f
    +Last column is added as the position +*/ +#define MAT_DOT_VEC_3X4(p,m,v) \ +{ \ + p[0] = m[0][0]*v[0] + m[0][1]*v[1] + m[0][2]*v[2] + m[0][3]; \ + p[1] = m[1][0]*v[0] + m[1][1]*v[1] + m[1][2]*v[2] + m[1][3]; \ + p[2] = m[2][0]*v[0] + m[2][1]*v[1] + m[2][2]*v[2] + m[2][3]; \ +}\ + + +/*! vector transpose times matrix */ +/*! p[j] = v[0]*m[0][j] + v[1]*m[1][j] + v[2]*m[2][j]; */ +#define VEC_DOT_MAT_3X3(p,v,m) \ +{ \ + p[0] = v[0]*m[0][0] + v[1]*m[1][0] + v[2]*m[2][0]; \ + p[1] = v[0]*m[0][1] + v[1]*m[1][1] + v[2]*m[2][1]; \ + p[2] = v[0]*m[0][2] + v[1]*m[1][2] + v[2]*m[2][2]; \ +}\ + + +/*! affine matrix times vector */ +/** The matrix is assumed to be an affine matrix, with last two + * entries representing a translation */ +#define MAT_DOT_VEC_2X3(p,m,v) \ +{ \ + p[0] = m[0][0]*v[0] + m[0][1]*v[1] + m[0][2]; \ + p[1] = m[1][0]*v[0] + m[1][1]*v[1] + m[1][2]; \ +}\ + +//! Transform a plane +#define MAT_TRANSFORM_PLANE_4X4(pout,m,plane)\ +{ \ + pout[0] = m[0][0]*plane[0] + m[0][1]*plane[1] + m[0][2]*plane[2];\ + pout[1] = m[1][0]*plane[0] + m[1][1]*plane[1] + m[1][2]*plane[2];\ + pout[2] = m[2][0]*plane[0] + m[2][1]*plane[1] + m[2][2]*plane[2];\ + pout[3] = m[0][3]*pout[0] + m[1][3]*pout[1] + m[2][3]*pout[2] + plane[3];\ +}\ + + + +/** inverse transpose of matrix times vector + * + * This macro computes inverse transpose of matrix m, + * and multiplies vector v into it, to yeild vector p + * + * DANGER !!! Do Not use this on normal vectors!!! + * It will leave normals the wrong length !!! + * See macro below for use on normals. + */ +#define INV_TRANSP_MAT_DOT_VEC_2X2(p,m,v) \ +{ \ + GREAL det; \ + \ + det = m[0][0]*m[1][1] - m[0][1]*m[1][0]; \ + p[0] = m[1][1]*v[0] - m[1][0]*v[1]; \ + p[1] = - m[0][1]*v[0] + m[0][0]*v[1]; \ + \ + /* if matrix not singular, and not orthonormal, then renormalize */ \ + if ((det!=1.0f) && (det != 0.0f)) { \ + det = 1.0f / det; \ + p[0] *= det; \ + p[1] *= det; \ + } \ +}\ + + +/** transform normal vector by inverse transpose of matrix + * and then renormalize the vector + * + * This macro computes inverse transpose of matrix m, + * and multiplies vector v into it, to yeild vector p + * Vector p is then normalized. + */ +#define NORM_XFORM_2X2(p,m,v) \ +{ \ + GREAL len; \ + \ + /* do nothing if off-diagonals are zero and diagonals are \ + * equal */ \ + if ((m[0][1] != 0.0) || (m[1][0] != 0.0) || (m[0][0] != m[1][1])) { \ + p[0] = m[1][1]*v[0] - m[1][0]*v[1]; \ + p[1] = - m[0][1]*v[0] + m[0][0]*v[1]; \ + \ + len = p[0]*p[0] + p[1]*p[1]; \ + GIM_INV_SQRT(len,len); \ + p[0] *= len; \ + p[1] *= len; \ + } else { \ + VEC_COPY_2 (p, v); \ + } \ +}\ + + +/** outer product of vector times vector transpose + * + * The outer product of vector v and vector transpose t yeilds + * dyadic matrix m. + */ +#define OUTER_PRODUCT_2X2(m,v,t) \ +{ \ + m[0][0] = v[0] * t[0]; \ + m[0][1] = v[0] * t[1]; \ + \ + m[1][0] = v[1] * t[0]; \ + m[1][1] = v[1] * t[1]; \ +}\ + + +/** outer product of vector times vector transpose + * + * The outer product of vector v and vector transpose t yeilds + * dyadic matrix m. + */ +#define OUTER_PRODUCT_3X3(m,v,t) \ +{ \ + m[0][0] = v[0] * t[0]; \ + m[0][1] = v[0] * t[1]; \ + m[0][2] = v[0] * t[2]; \ + \ + m[1][0] = v[1] * t[0]; \ + m[1][1] = v[1] * t[1]; \ + m[1][2] = v[1] * t[2]; \ + \ + m[2][0] = v[2] * t[0]; \ + m[2][1] = v[2] * t[1]; \ + m[2][2] = v[2] * t[2]; \ +}\ + + +/** outer product of vector times vector transpose + * + * The outer product of vector v and vector transpose t yeilds + * dyadic matrix m. + */ +#define OUTER_PRODUCT_4X4(m,v,t) \ +{ \ + m[0][0] = v[0] * t[0]; \ + m[0][1] = v[0] * t[1]; \ + m[0][2] = v[0] * t[2]; \ + m[0][3] = v[0] * t[3]; \ + \ + m[1][0] = v[1] * t[0]; \ + m[1][1] = v[1] * t[1]; \ + m[1][2] = v[1] * t[2]; \ + m[1][3] = v[1] * t[3]; \ + \ + m[2][0] = v[2] * t[0]; \ + m[2][1] = v[2] * t[1]; \ + m[2][2] = v[2] * t[2]; \ + m[2][3] = v[2] * t[3]; \ + \ + m[3][0] = v[3] * t[0]; \ + m[3][1] = v[3] * t[1]; \ + m[3][2] = v[3] * t[2]; \ + m[3][3] = v[3] * t[3]; \ +}\ + + +/** outer product of vector times vector transpose + * + * The outer product of vector v and vector transpose t yeilds + * dyadic matrix m. + */ +#define ACCUM_OUTER_PRODUCT_2X2(m,v,t) \ +{ \ + m[0][0] += v[0] * t[0]; \ + m[0][1] += v[0] * t[1]; \ + \ + m[1][0] += v[1] * t[0]; \ + m[1][1] += v[1] * t[1]; \ +}\ + + +/** outer product of vector times vector transpose + * + * The outer product of vector v and vector transpose t yeilds + * dyadic matrix m. + */ +#define ACCUM_OUTER_PRODUCT_3X3(m,v,t) \ +{ \ + m[0][0] += v[0] * t[0]; \ + m[0][1] += v[0] * t[1]; \ + m[0][2] += v[0] * t[2]; \ + \ + m[1][0] += v[1] * t[0]; \ + m[1][1] += v[1] * t[1]; \ + m[1][2] += v[1] * t[2]; \ + \ + m[2][0] += v[2] * t[0]; \ + m[2][1] += v[2] * t[1]; \ + m[2][2] += v[2] * t[2]; \ +}\ + + +/** outer product of vector times vector transpose + * + * The outer product of vector v and vector transpose t yeilds + * dyadic matrix m. + */ +#define ACCUM_OUTER_PRODUCT_4X4(m,v,t) \ +{ \ + m[0][0] += v[0] * t[0]; \ + m[0][1] += v[0] * t[1]; \ + m[0][2] += v[0] * t[2]; \ + m[0][3] += v[0] * t[3]; \ + \ + m[1][0] += v[1] * t[0]; \ + m[1][1] += v[1] * t[1]; \ + m[1][2] += v[1] * t[2]; \ + m[1][3] += v[1] * t[3]; \ + \ + m[2][0] += v[2] * t[0]; \ + m[2][1] += v[2] * t[1]; \ + m[2][2] += v[2] * t[2]; \ + m[2][3] += v[2] * t[3]; \ + \ + m[3][0] += v[3] * t[0]; \ + m[3][1] += v[3] * t[1]; \ + m[3][2] += v[3] * t[2]; \ + m[3][3] += v[3] * t[3]; \ +}\ + + +/** determinant of matrix + * + * Computes determinant of matrix m, returning d + */ +#define DETERMINANT_2X2(d,m) \ +{ \ + d = m[0][0] * m[1][1] - m[0][1] * m[1][0]; \ +}\ + + +/** determinant of matrix + * + * Computes determinant of matrix m, returning d + */ +#define DETERMINANT_3X3(d,m) \ +{ \ + d = m[0][0] * (m[1][1]*m[2][2] - m[1][2] * m[2][1]); \ + d -= m[0][1] * (m[1][0]*m[2][2] - m[1][2] * m[2][0]); \ + d += m[0][2] * (m[1][0]*m[2][1] - m[1][1] * m[2][0]); \ +}\ + + +/** i,j,th cofactor of a 4x4 matrix + * + */ +#define COFACTOR_4X4_IJ(fac,m,i,j) \ +{ \ + GUINT __ii[4], __jj[4], __k; \ + \ + for (__k=0; __k +*/ +#define INV_MAT_DOT_VEC_3X3(p,m,v) \ +{ \ + p[0] = MAT_DOT_COL(m,v,0); \ + p[1] = MAT_DOT_COL(m,v,1); \ + p[2] = MAT_DOT_COL(m,v,2); \ +}\ + + +//! @} + +#endif // GIM_VECTOR_H_INCLUDED diff --git a/Extras/GIMPACT/include/GIMPACT/core/gim_math.h b/Extras/GIMPACT/include/GIMPACT/core/gim_math.h new file mode 100755 index 000000000..18e55aded --- /dev/null +++ b/Extras/GIMPACT/include/GIMPACT/core/gim_math.h @@ -0,0 +1,181 @@ +#ifndef GIM_MATH_H_INCLUDED +#define GIM_MATH_H_INCLUDED +/*! \file gim_math.h +\author Francisco León Nájera +*/ +/* +----------------------------------------------------------------------------- +This source file is part of GIMPACT Library. + +For the latest info, see http://gimpact.sourceforge.net/ + +Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371. +email: projectileman@yahoo.com + + 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 GIMPACT-LICENSE-LGPL.TXT. + (2) The BSD-style license that is included with this library in + the file GIMPACT-LICENSE-BSD.TXT. + (3) The zlib/libpng license that is included with this library in + the file GIMPACT-LICENSE-ZLIB.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 + GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details. + +----------------------------------------------------------------------------- +*/ + +#include "LinearMath/btScalar.h" + + +/*! \defgroup BASIC_TYPES +Basic types and constants +Conventions: +Types starting with G +Constants starting with G_ +*/ +//! @{ + +#define GREAL btScalar +#define GREAL2 double +#define GINT int +#define GUINT unsigned int +#define GSHORT short +#define GUSHORT unsigned short +#define GINT64 long long +#define GUINT64 unsigned long long + +//! @} + +/*! \defgroup BASIC_CONSTANTS +Basic constants +Conventions: +Types starting with G +Constants starting with G_ +*/ +//! @{ + +#define G_PI 3.14159265358979f +#define G_HALF_PI 1.5707963f +//267948966 +#define G_TWO_PI 6.28318530f +//71795864 +#define G_ROOT3 1.73205f +#define G_ROOT2 1.41421f +#define G_UINT_INFINITY 0xffffffff //!< A very very high value +#define G_REAL_INFINITY FLT_MAX +#define G_SIGN_BITMASK 0x80000000 +#define G_EPSILON SIMD_EPSILON +//! @} + + +/*! \defgroup SCALAR_TYPES +\brief +Precision type constants +*/ +//! @{ +enum GIM_SCALAR_TYPES +{ + G_STYPE_REAL =0, + G_STYPE_REAL2, + G_STYPE_SHORT, + G_STYPE_USHORT, + G_STYPE_INT, + G_STYPE_UINT, + G_STYPE_INT64, + G_STYPE_UINT64 +}; +//! @} + +/*! \defgroup MATH_FUNCTIONS +mathematical functions +*/ +//! @{ + +#define G_DEGTORAD(X) ((X)*3.1415926f/180.0f) +#define G_RADTODEG(X) ((X)*180.0f/3.1415926f) + +//! Integer representation of a floating-point value. +#define GIM_IR(x) ((GUINT&)(x)) + +//! Signed integer representation of a floating-point value. +#define GIM_SIR(x) ((GINT&)(x)) + +//! Absolute integer representation of a floating-point value +#define GIM_AIR(x) (GIM_IR(x)&0x7fffffff) + +//! Floating-point representation of an integer value. +#define GIM_FR(x) ((GREAL&)(x)) + +#define GIM_MAX(a,b) (ab?b:a) + +#define GIM_MAX3(a,b,c) GIM_MAX(a,GIM_MAX(b,c)) +#define GIM_MIN3(a,b,c) GIM_MIN(a,GIM_MIN(b,c)) + +#define GIM_IS_ZERO(value) (value < G_EPSILON && value > -G_EPSILON) + +#define GIM_IS_NEGATIVE(value) (value <= -G_EPSILON) + +#define GIM_IS_POSISITVE(value) (value >= G_EPSILON) + +#define GIM_NEAR_EQUAL(v1,v2) GIM_IS_ZERO((v1-v2)) + +///returns a clamped number +#define GIM_CLAMP(number,minval,maxval) (numbermaxval?maxval:number)) + +#define GIM_GREATER(x, y) fabsf(x) > (y) + +///Swap numbers +#define GIM_SWAP_NUMBERS(a,b){ \ + a = a+b; \ + b = a-b; \ + a = a-b; \ +}\ + +#define GIM_INV_SQRT(va,isva)\ +{\ + if(va<=0.0000001f)\ + {\ + isva = G_REAL_INFINITY;\ + }\ + else\ + {\ + GREAL _x = va * 0.5f;\ + GUINT _y = 0x5f3759df - ( GIM_IR(va) >> 1);\ + isva = GIM_FR(_y);\ + isva = isva * ( 1.5f - ( _x * isva * isva ) );\ + }\ +}\ + +#define GIM_SQRT(va,sva)\ +{\ + GIM_INV_SQRT(va,sva);\ + sva = 1.0f/sva;\ +}\ + +//! Computes 1.0f / sqrtf(x). Comes from Quake3. See http://www.magic-software.com/3DGEDInvSqrt.html +inline GREAL gim_inv_sqrt(GREAL f) +{ + GREAL r; + GIM_INV_SQRT(f,r); + return r; +} + +inline GREAL gim_sqrt(GREAL f) +{ + GREAL r; + GIM_SQRT(f,r); + return r; +} + +//! @} + +#endif // GIM_MATH_H_INCLUDED diff --git a/Extras/GIMPACT/include/GIMPACT/core/gim_memory.h b/Extras/GIMPACT/include/GIMPACT/core/gim_memory.h new file mode 100755 index 000000000..8e654bdcf --- /dev/null +++ b/Extras/GIMPACT/include/GIMPACT/core/gim_memory.h @@ -0,0 +1,208 @@ +#ifndef GIM_MEMORY_H_INCLUDED +#define GIM_MEMORY_H_INCLUDED +/*! \file gim_memory.h +\author Francisco León Nájera +*/ +/* +----------------------------------------------------------------------------- +This source file is part of GIMPACT Library. + +For the latest info, see http://gimpact.sourceforge.net/ + +Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371. +email: projectileman@yahoo.com + + 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 GIMPACT-LICENSE-LGPL.TXT. + (2) The BSD-style license that is included with this library in + the file GIMPACT-LICENSE-BSD.TXT. + (3) The zlib/libpng license that is included with this library in + the file GIMPACT-LICENSE-ZLIB.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 + GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details. + +----------------------------------------------------------------------------- +*/ + + +#include "GIMPACT/core/gim_math.h" +#include + +//#define PREFETCH 1 +//! \defgroup PREFETCH +//! @{ +#ifdef PREFETCH +#include // for prefetch +#define pfval 64 +#define pfval2 128 +//! Prefetch 64 +#define pf(_x,_i) _mm_prefetch((void *)(_x + _i + pfval), 0) +//! Prefetch 128 +#define pf2(_x,_i) _mm_prefetch((void *)(_x + _i + pfval2), 0) +#else +//! Prefetch 64 +#define pf(_x,_i) +//! Prefetch 128 +#define pf2(_x,_i) +#endif +//! @} + +/*! \defgroup ARRAY_UTILITIES +\brief +Functions for manip packed arrays of numbers +*/ +//! @{ +#define GIM_COPY_ARRAYS(dest_array,source_array,element_count)\ +{\ + for (GUINT _i_=0;_i_=SIMD_T_SIZE) + { + *(ui_dst_ptr++) = *(ui_src_ptr++); + copysize-=SIMD_T_SIZE; + } + if(copysize==0) return; + + char * c_src_ptr = (char *)ui_src_ptr; + char * c_dst_ptr = (char *)ui_dst_ptr; + while(copysize>0) + { + *(c_dst_ptr++) = *(c_src_ptr++); + copysize--; + } + return; +#else + memcpy(dst,src,copysize); +#endif +} + + + +template +inline void gim_swap_elements(T* _array,size_t _i,size_t _j) +{ + T _e_tmp_ = _array[_i]; + _array[_i] = _array[_j]; + _array[_j] = _e_tmp_; +} + + +template +inline void gim_swap_elements_memcpy(T* _array,size_t _i,size_t _j) +{ + char _e_tmp_[sizeof(T)]; + gim_simd_memcpy(_e_tmp_,&_array[_i],sizeof(T)); + gim_simd_memcpy(&_array[_i],&_array[_j],sizeof(T)); + gim_simd_memcpy(&_array[_j],_e_tmp_,sizeof(T)); +} + +template +inline void gim_swap_elements_ptr(char * _array,size_t _i,size_t _j) +{ + char _e_tmp_[SIZE]; + _i*=SIZE; + _j*=SIZE; + gim_simd_memcpy(_e_tmp_,_array+_i,SIZE); + gim_simd_memcpy(_array+_i,_array+_j,SIZE); + gim_simd_memcpy(_array+_j,_e_tmp_,SIZE); +} + +#endif // GIM_MEMORY_H_INCLUDED diff --git a/Extras/GIMPACT/include/GIMPACT/core/gim_radixsort.h b/Extras/GIMPACT/include/GIMPACT/core/gim_radixsort.h new file mode 100755 index 000000000..cf2a6bacd --- /dev/null +++ b/Extras/GIMPACT/include/GIMPACT/core/gim_radixsort.h @@ -0,0 +1,410 @@ +#ifndef GIM_RADIXSORT_H_INCLUDED +#define GIM_RADIXSORT_H_INCLUDED +/*! \file gim_radixsort.h +\author Francisco León Nájera. +Based on the work of Michael Herf : "fast floating-point radix sort" +Avaliable on http://www.stereopsis.com/radix.html +*/ +/* +----------------------------------------------------------------------------- +This source file is part of GIMPACT Library. + +For the latest info, see http://gimpact.sourceforge.net/ + +Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371. +email: projectileman@yahoo.com + + 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 GIMPACT-LICENSE-LGPL.TXT. + (2) The BSD-style license that is included with this library in + the file GIMPACT-LICENSE-BSD.TXT. + (3) The zlib/libpng license that is included with this library in + the file GIMPACT-LICENSE-ZLIB.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 + GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details. + +----------------------------------------------------------------------------- +*/ + +#include "GIMPACT/core/gim_memory.h" + +/*! \defgroup SORTING +\brief +Macros for sorting. +*/ + +//! Prototype for comparators +class less_comparator +{ + public: + + template + inline int operator() ( const T& a, const Z& b ) + { + return ( ab?1:0)); + } +}; + +//! Prototype for comparators +class integer_comparator +{ + public: + + template + inline int operator() ( const T& a, const T& b ) + { + return (int)(a-b); + } +}; + +//!Prototype for getting the integer representation of an object +class uint_key_func +{ +public: + template + inline GUINT operator()( const T& a) + { + return (GUINT)a; + } +}; + + +//!Prototype for copying elements +class copy_elements_func +{ +public: + template + inline void operator()(T& a,T& b) + { + a = b; + } +}; + +//!Prototype for copying elements +class memcopy_elements_func +{ +public: + template + inline void operator()(T& a,T& b) + { + gim_simd_memcpy(&a,&b,sizeof(T)); + } +}; + + +//! @{ +struct GIM_RSORT_TOKEN +{ + GUINT m_key; + GUINT m_value; + GIM_RSORT_TOKEN() + { + } + GIM_RSORT_TOKEN(const GIM_RSORT_TOKEN& rtoken) + { + m_key = rtoken.m_key; + m_value = rtoken.m_value; + } + + inline bool operator <(const GIM_RSORT_TOKEN& other) const + { + return (m_key < other.m_key); + } + + inline bool operator >(const GIM_RSORT_TOKEN& other) const + { + return (m_key > other.m_key); + } +}; + +//! Prototype for comparators +class GIM_RSORT_TOKEN_COMPARATOR +{ + public: + + inline int operator()( const GIM_RSORT_TOKEN& a, const GIM_RSORT_TOKEN& b ) + { + return (int)((a.m_key) - (b.m_key)); + } +}; + + + +#define kHist 2048 +// ---- utils for accessing 11-bit quantities +#define D11_0(x) (x & 0x7FF) +#define D11_1(x) (x >> 11 & 0x7FF) +#define D11_2(x) (x >> 22 ) + + + +///Radix sort for unsigned integer keys +inline void gim_radix_sort_rtokens( + GIM_RSORT_TOKEN * array, + GIM_RSORT_TOKEN * sorted, GUINT element_count) +{ + GUINT i; + GUINT b0[kHist * 3]; + GUINT *b1 = b0 + kHist; + GUINT *b2 = b1 + kHist; + for (i = 0; i < kHist * 3; ++i) + { + b0[i] = 0; + } + GUINT fi; + GUINT pos; + for (i = 0; i < element_count; ++i) + { + fi = array[i].m_key; + b0[D11_0(fi)] ++; + b1[D11_1(fi)] ++; + b2[D11_2(fi)] ++; + } + { + GUINT sum0 = 0, sum1 = 0, sum2 = 0; + GUINT tsum; + for (i = 0; i < kHist; ++i) + { + tsum = b0[i] + sum0; + b0[i] = sum0 - 1; + sum0 = tsum; + tsum = b1[i] + sum1; + b1[i] = sum1 - 1; + sum1 = tsum; + tsum = b2[i] + sum2; + b2[i] = sum2 - 1; + sum2 = tsum; + } + } + for (i = 0; i < element_count; ++i) + { + fi = array[i].m_key; + pos = D11_0(fi); + pos = ++b0[pos]; + sorted[pos].m_key = array[i].m_key; + sorted[pos].m_value = array[i].m_value; + } + for (i = 0; i < element_count; ++i) + { + fi = sorted[i].m_key; + pos = D11_1(fi); + pos = ++b1[pos]; + array[pos].m_key = sorted[i].m_key; + array[pos].m_value = sorted[i].m_value; + } + for (i = 0; i < element_count; ++i) + { + fi = array[i].m_key; + pos = D11_2(fi); + pos = ++b2[pos]; + sorted[pos].m_key = array[i].m_key; + sorted[pos].m_value = array[i].m_value; + } +} + + + + +/// Get the sorted tokens from an array. For generic use. Tokens are IRR_RSORT_TOKEN +/*! +*\param array Array of elements to sort +*\param sorted_tokens Tokens of sorted elements +*\param element_count element count +*\param uintkey_macro Functor which retrieves the integer representation of an array element +*/ +template +void gim_radix_sort_array_tokens( + T* array , + GIM_RSORT_TOKEN * sorted_tokens, + GUINT element_count,GETKEY_CLASS uintkey_macro) +{ + GIM_RSORT_TOKEN * _unsorted = (GIM_RSORT_TOKEN *) gim_alloc(sizeof(GIM_RSORT_TOKEN)*element_count); + for (GUINT _i=0;_i +void gim_radix_sort( + T * array, GUINT element_count, + GETKEY_CLASS get_uintkey_macro, COPY_CLASS copy_elements_macro) +{ + GIM_RSORT_TOKEN * _sorted = (GIM_RSORT_TOKEN *) gim_alloc(sizeof(GIM_RSORT_TOKEN)*element_count); + gim_radix_sort_array_tokens(array,_sorted,element_count,get_uintkey_macro); + T * _original_array = (T *) gim_alloc(sizeof(T)*element_count); + gim_simd_memcpy(_original_array,array,sizeof(T)*element_count); + for (GUINT _i=0;_i +bool gim_binary_search_ex( + const T* _array, GUINT _start_i, + GUINT _end_i,GUINT & _result_index, + const KEYCLASS & _search_key, + COMP_CLASS _comp_macro) +{ + GUINT _k; + int _comp_result; + GUINT _i = _start_i; + GUINT _j = _end_i+1; + while (_i < _j) + { + _k = (_j+_i-1)/2; + _comp_result = _comp_macro(_array[_k], _search_key); + if (_comp_result == 0) + { + _result_index = _k; + return true; + } + else if (_comp_result < 0) + { + _i = _k+1; + } + else + { + _j = _k; + } + } + _result_index = _i; + return false; +} + + + +//! Failsafe Iterative binary search,Template version +/*! +If the element is not found, it returns the nearest upper element position, may be the further position after the last element. +\param _array +\param _start_i the beginning of the array +\param _end_i the ending index of the array +\param _search_key Value to find +\param _result_index the index of the found element, or if not found then it will get the index of the closest bigger value +\return true if found, else false +*/ +template +bool gim_binary_search( + const T*_array,GUINT _start_i, + GUINT _end_i,const T & _search_key, + GUINT & _result_index) +{ + GUINT _i = _start_i; + GUINT _j = _end_i+1; + GUINT _k; + while(_i < _j) + { + _k = (_j+_i-1)/2; + if(_array[_k]==_search_key) + { + _result_index = _k; + return true; + } + else if (_array[_k]<_search_key) + { + _i = _k+1; + } + else + { + _j = _k; + } + } + _result_index = _i; + return false; +} + + + +///heap sort from http://www.csse.monash.edu.au/~lloyd/tildeAlgDS/Sort/Heap/ +template +void gim_down_heap(T *pArr, GUINT k, GUINT n,COMP_CLASS CompareFunc) +{ + /* PRE: a[k+1..N] is a heap */ + /* POST: a[k..N] is a heap */ + + T temp = pArr[k - 1]; + /* k has child(s) */ + while (k <= n/2) + { + int child = 2*k; + + if ((child < (int)n) && CompareFunc(pArr[child - 1] , pArr[child])<0) + { + child++; + } + /* pick larger child */ + if (CompareFunc(temp , pArr[child - 1])<0) + { + /* move child up */ + pArr[k - 1] = pArr[child - 1]; + k = child; + } + else + { + break; + } + } + pArr[k - 1] = temp; +} /*downHeap*/ + + +template +void gim_heap_sort(T *pArr, GUINT element_count, COMP_CLASS CompareFunc) +{ + /* sort a[0..N-1], N.B. 0 to N-1 */ + GUINT k; + GUINT n = element_count; + for (k = n/2; k > 0; k--) + { + gim_down_heap(pArr, k, n, CompareFunc); + } + + /* a[1..N] is now a heap */ + while ( n>=2 ) + { + gim_swap_elements(pArr,0,n-1); /* largest of a[0..n-1] */ + --n; + /* restore a[1..i-1] heap */ + gim_down_heap(pArr, 1, n, CompareFunc); + } +} + + + +//! @} +#endif // GIM_RADIXSORT_H_INCLUDED diff --git a/Extras/GIMPACT/include/GIMPACT/core/gim_tri_collision.h b/Extras/GIMPACT/include/GIMPACT/core/gim_tri_collision.h new file mode 100755 index 000000000..31725ab68 --- /dev/null +++ b/Extras/GIMPACT/include/GIMPACT/core/gim_tri_collision.h @@ -0,0 +1,381 @@ +#ifndef GIM_TRI_COLLISION_H_INCLUDED +#define GIM_TRI_COLLISION_H_INCLUDED + +/*! \file gim_tri_collision.h +\author Francisco León Nájera +*/ +/* +----------------------------------------------------------------------------- +This source file is part of GIMPACT Library. + +For the latest info, see http://gimpact.sourceforge.net/ + +Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371. +email: projectileman@yahoo.com + + 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 GIMPACT-LICENSE-LGPL.TXT. + (2) The BSD-style license that is included with this library in + the file GIMPACT-LICENSE-BSD.TXT. + (3) The zlib/libpng license that is included with this library in + the file GIMPACT-LICENSE-ZLIB.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 + GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details. + +----------------------------------------------------------------------------- +*/ + +#include "GIMPACT/core/gim_box_collision.h" +#include "GIMPACT/core/gim_clip_polygon.h" + +/*! \addtogroup GEOMETRIC_OPERATIONS +*/ +//! @{ + + + +#define MAX_TRI_CLIPPING 16 + +//! Structure for collision +struct GIM_TRIANGLE_CONTACT_DATA +{ + GREAL m_penetration_depth; + GUINT m_point_count; + btVector4 m_separating_normal; + btVector3 m_points[MAX_TRI_CLIPPING]; + + SIMD_FORCE_INLINE void copy_from(const GIM_TRIANGLE_CONTACT_DATA& other) + { + m_penetration_depth = other.m_penetration_depth; + m_separating_normal = other.m_separating_normal; + m_point_count = other.m_point_count; + GUINT i = m_point_count; + while(i--) + { + m_points[i] = other.m_points[i]; + } + } + + GIM_TRIANGLE_CONTACT_DATA() + { + } + + GIM_TRIANGLE_CONTACT_DATA(const GIM_TRIANGLE_CONTACT_DATA& other) + { + copy_from(other); + } + + + + + //! classify points that are closer + template + SIMD_FORCE_INLINE void mergepoints_generic(const CLASS_PLANE & plane, + GREAL margin, const btVector3 * points, GUINT point_count, DISTANCE_FUNC distance_func) + { + m_point_count = 0; + m_penetration_depth= -1000.0f; + + GUINT point_indices[MAX_TRI_CLIPPING]; + + for(GUINT _k=0;_k=0.0f) + { + if(_dist>m_penetration_depth) + { + m_penetration_depth = _dist; + point_indices[0] = _k; + m_point_count=1; + } + else if((_dist+G_EPSILON)>=m_penetration_depth) + { + point_indices[m_point_count] = _k; + m_point_count++; + } + } + } + + for(GUINT _k=0;_k u*axe1[i1] + ((vecproj[i2] - u*axe1[i2])/axe2[i2])*axe2[i1] = vecproj[i1] + + --> u*axe1[i1] + vecproj[i2]*axe2[i1]/axe2[i2] - u*axe1[i2]*axe2[i1]/axe2[i2] = vecproj[i1] + + --> u*(axe1[i1] - axe1[i2]*axe2[i1]/axe2[i2]) = vecproj[i1] - vecproj[i2]*axe2[i1]/axe2[i2] + + --> u*((axe1[i1]*axe2[i2] - axe1[i2]*axe2[i1])/axe2[i2]) = (vecproj[i1]*axe2[i2] - vecproj[i2]*axe2[i1])/axe2[i2] + + --> u*(axe1[i1]*axe2[i2] - axe1[i2]*axe2[i1]) = vecproj[i1]*axe2[i2] - vecproj[i2]*axe2[i1] + + --> u = (vecproj[i1]*axe2[i2] - vecproj[i2]*axe2[i1]) /(axe1[i1]*axe2[i2] - axe1[i2]*axe2[i1]) + +if 0.0<= u+v <=1.0 then they are inside of triangle + + \return false if the point is outside of triangle.This function doesn't take the margin + */ + SIMD_FORCE_INLINE bool get_uv_parameters( + const btVector3 & point, + const btVector3 & tri_plane, + GREAL & u, GREAL & v) const + { + btVector3 _axe1 = m_vertices[1]-m_vertices[0]; + btVector3 _axe2 = m_vertices[2]-m_vertices[0]; + btVector3 _vecproj = point - m_vertices[0]; + GUINT _i1 = (tri_plane.closestAxis()+1)%3; + GUINT _i2 = (_i1+1)%3; + if(btFabs(_axe2[_i2])G_EPSILON) + { + return false; + } + } + return true; + } + + //! is point in triangle beam? + /*! + Test if point is in triangle, with m_margin tolerance + */ + SIMD_FORCE_INLINE bool is_point_inside(const btVector3 & point, const btVector3 & tri_normal) const + { + //Test with edge 0 + btVector4 edge_plane; + this->get_edge_plane(0,tri_normal,edge_plane); + GREAL dist = DISTANCE_PLANE_POINT(edge_plane,point); + if(dist-m_margin>0.0f) return false; // outside plane + + this->get_edge_plane(1,tri_normal,edge_plane); + dist = DISTANCE_PLANE_POINT(edge_plane,point); + if(dist-m_margin>0.0f) return false; // outside plane + + this->get_edge_plane(2,tri_normal,edge_plane); + dist = DISTANCE_PLANE_POINT(edge_plane,point); + if(dist-m_margin>0.0f) return false; // outside plane + return true; + } + + + //! Bidireccional ray collision + SIMD_FORCE_INLINE bool ray_collision( + const btVector3 & vPoint, + const btVector3 & vDir, btVector3 & pout, btVector3 & triangle_normal, + GREAL & tparam, GREAL tmax = G_REAL_INFINITY) + { + btVector4 faceplane; + { + btVector3 dif1 = m_vertices[1] - m_vertices[0]; + btVector3 dif2 = m_vertices[2] - m_vertices[0]; + VEC_CROSS(faceplane,dif1,dif2); + faceplane[3] = m_vertices[0].dot(faceplane); + } + + GUINT res = LINE_PLANE_COLLISION(faceplane,vDir,vPoint,pout,tparam,0.0f, tmax); + if(res == 0) return false; + if(! is_point_inside(pout,faceplane)) return false; + + if(res==2) //invert normal + { + triangle_normal.setValue(-faceplane[0],-faceplane[1],-faceplane[2]); + } + else + { + triangle_normal.setValue(faceplane[0],faceplane[1],faceplane[2]); + } + + VEC_NORMALIZE(triangle_normal); + + return true; + } + + + //! one direccion ray collision + SIMD_FORCE_INLINE bool ray_collision_front_side( + const btVector3 & vPoint, + const btVector3 & vDir, btVector3 & pout, btVector3 & triangle_normal, + GREAL & tparam, GREAL tmax = G_REAL_INFINITY) + { + btVector4 faceplane; + { + btVector3 dif1 = m_vertices[1] - m_vertices[0]; + btVector3 dif2 = m_vertices[2] - m_vertices[0]; + VEC_CROSS(faceplane,dif1,dif2); + faceplane[3] = m_vertices[0].dot(faceplane); + } + + GUINT res = LINE_PLANE_COLLISION(faceplane,vDir,vPoint,pout,tparam,0.0f, tmax); + if(res != 1) return false; + + if(!is_point_inside(pout,faceplane)) return false; + + triangle_normal.setValue(faceplane[0],faceplane[1],faceplane[2]); + + VEC_NORMALIZE(triangle_normal); + + return true; + } + +}; + + + +//! @} + +#endif // GIM_TRI_COLLISION_H_INCLUDED diff --git a/Extras/GIMPACT/include/GIMPACT/gim_manual.h b/Extras/GIMPACT/include/GIMPACT/gim_manual.h new file mode 100755 index 000000000..09cf77495 --- /dev/null +++ b/Extras/GIMPACT/include/GIMPACT/gim_manual.h @@ -0,0 +1,146 @@ +#ifndef GIM_MANUAL_H_INCLUDED +#define GIM_MANUAL_H_INCLUDED + +/*! \file gim_manual.h +*\author Francisco León Nájera +GIMPACT documentation + +*/ +/* +----------------------------------------------------------------------------- +This source file is part of GIMPACT Library. + +For the latest info, see http://gimpact.sourceforge.net/ + +Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371. +email: projectileman@yahoo.com + + 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 GIMPACT-LICENSE-LGPL.TXT. + (2) The BSD-style license that is included with this library in + the file GIMPACT-LICENSE-BSD.TXT. + (3) The zlib/libpng license that is included with this library in + the file GIMPACT-LICENSE-ZLIB.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 + GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details. + +----------------------------------------------------------------------------- +*/ + +/*! \mainpage GIMPACT +*\section INTRO INTRODUCTION +

    +GIMPACT is a software library with tools for geometry processing and collision detection, focused on solving most common problems on Virtual Reality development. +

    +

    +Since Version 0.2, GIMPACT will work integrated with the Bullet Engine for general collision detection and physics. For more details, please visit http://www.continuousphysics.com/Bullet/ +

    +

    For updates, please visit http://sourceforge.net/projects/gimpact/

    + +*\section CONTENT +- \subpage FEATURES +- \subpage REQUIREMENTS +- \subpage PROGRAMMERS_GUIDE "PROGRAMMERS GUIDE" +- \subpage TODO +*/ +/*! \page FEATURES +- C++ oriented. +- Extensible design. +- Collision detection algorithm for concave shapes in the Bullet Physics Engine. See btGImpactCollisionAlgorithm. +- Efficient Dynamic Hierarcht Bounding Box tree structures for handle collisions with composed shapes whose have large sets of primitives (triangles or convex shapes) See the GIM_BOX_TREE_SET class. +- Collision detection for trimeshes with the btGImpactMeshShape class. Now GIMPACT works fine with the btStridingInterface class for getting the data from trimesh models. +- Support for deformable trimeshes. +- Collision detection for compound shapes through the btGImpactCompoundShape class. This class takes advantage from the Hierarcht Bounding Box structure (GIM_BOX_TREE_SET class). +- Collision Shapes (Both btGImpactCompoundSape and btGImpactTrimeshShape ) can be shared by two or more Rigid Bodies in Bullet. + +*/ +/*! \page REQUIREMENTS +- GIMPACT has dependencies to the Bullet Physics Engine. +- Ansi C++ compiler, +*/ +/*! \page PROGRAMMERS_GUIDE PROGRAMMERS GUIDE +This guide will show how to incorpore the GIMPACt functionality on the Bullet Engine: +*\section REG Registering the Algorithm +For register this algorithm in Bullet, proceed as following: + \code +btCollisionDispatcher * dispatcher = static_cast(m_dynamicsWorld ->getDispatcher()); +btGImpactCollisionAlgorithm::registerAlgorithm(dispatcher); + \endcode +

    +With the instructon above, btGImpactCollisionAlgorithm will handle: +- Convex shapes vs GImpact shapes. +- Concave shapes vs GImpact shapes. +- Compoind shapes vs GImpact shapes. + +*\section CREATING_SHAPES Creating Shapes. +*\subsection TRIMESH Creating trimeshes. +

    For creating trimeshes you must provide an interface for your model data. You could use btTriangleIndexVertexArray class for providing the indices and the vertices from your triangle models.

    +

    +For example, you could create a trimesh from memory as following: +\code +btTriangleIndexVertexArray* indexVertexArrays = new btTriangleIndexVertexArray(NUM_TRIANGLES, + &gIndices[0][0], + 3*sizeof(int), + NUM_VERTICES,(REAL*) &gVertices[0],sizeof(REAL)*3); +\endcode +

    +

    +Where gIndices is an array of integers and gVertices is an array of float with 3 components. +

    +Then you must create the Trimesh shape as following: +\code +btGImpactMeshShape * trimesh = new btGImpactMeshShape(indexVertexArrays); +\endcode +The next step is configuring the trimesh, for example changing the scale: +\code +trimesh->setLocalScaling(btVector3(4.f,4.f,4.f)); +\endcode +At end, you must call btGImpactMeshShape.updateBound for ensure that the shape will build its internal Box set structure: +\code +trimesh->updateBound();// Call this method once before doing collisions +\endcode +Also you must call btGImpactMeshShape.postUpdate() each time when changing the trimesh data ( For deformable meshes), this will enable a flag to the trimesh shape which tells that the trimesh data has been changed and btGImpactMeshShape.updateBound will be called in collision routines. +< + +*\subsection COMPOUND Compound Shapes. +For compound shapes, you must create btGImpactCompoundShape objects. Then you could add +sub shapes as following; +\code +btGImpactCompoundShape * mycompound = new btGImpactCompoundShape(); + +btTransform localtransform; + .... Setting transformation + +//add shapes with transformation +btCollisionShape * subshape = creatingShape(0); +mycompound->addChildShape(localtransform,subshape); +.... Setting transformation +btCollisionShape * subshape2 = creatingShape(1); +mycompound->addChildShape(localtransform,subshape); +.... add more shapes +\endcode +At end, you must call btGImpactCompoundShape.updateBound for ensure that the shape will build its internal Box set structure: +*/ + +/*! \page TODO +*\section FEATURE FEATURE REQUESTS +- Tetrahedrization for solid trimeshes. +- Examples for implement deformable collisions, like cloth simulations and finite elements dynamics. +- Generic Ray collision functionality. +- Implement Low level SAT algorithms for speed up convex collisions. +*\section MISCELANEOUS +- Improve the documentation. +- Benchmarking. +- Bug reports and Bug Fixes. +*/ + + +#endif diff --git a/Extras/GIMPACT/index.html b/Extras/GIMPACT/index.html new file mode 100755 index 000000000..4289abd13 --- /dev/null +++ b/Extras/GIMPACT/index.html @@ -0,0 +1,5 @@ + + + + + diff --git a/Extras/GIMPACT/src/Bullet/btGImpactCollisionAlgorithm.cpp b/Extras/GIMPACT/src/Bullet/btGImpactCollisionAlgorithm.cpp new file mode 100755 index 000000000..59fb1fe92 --- /dev/null +++ b/Extras/GIMPACT/src/Bullet/btGImpactCollisionAlgorithm.cpp @@ -0,0 +1,924 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +/* +Author: Francisco León Nájera +Concave-Concave Collision + +*/ + +#include "BulletCollision/CollisionDispatch/btManifoldResult.h" +#include "LinearMath/btIDebugDraw.h" +#include "BulletCollision/CollisionDispatch/btCollisionObject.h" +#include "GIMPACT/Bullet/btGImpactCollisionAlgorithm.h" +#include "GIMPACT/core/gim_contact.h" +#include "BulletCollision/CollisionShapes/btBoxShape.h" + +#define BULLET_TRIANGLE_COLLISION 1 +#define TREE_PRIMITIVE_VS_BOX true +#define GIMPACT_VS_PLANE_COLLISION 1 + + +//! Class for accessing the plane equation +class btPlaneShape : public btStaticPlaneShape +{ +public: + + btPlaneShape(const btVector3& v, float f) + :btStaticPlaneShape(v,f) + { + } + + void get_plane_equation(btVector4 &equation) + { + equation[0] = m_planeNormal[0]; + equation[1] = m_planeNormal[1]; + equation[2] = m_planeNormal[2]; + equation[3] = m_planeConstant; + } + + + void get_plane_equation_transformed(const btTransform & trans,btVector4 &equation) + { + equation[0] = trans.getBasis().getRow(0).dot(m_planeNormal); + equation[1] = trans.getBasis().getRow(1).dot(m_planeNormal); + equation[2] = trans.getBasis().getRow(2).dot(m_planeNormal); + equation[3] = trans.getOrigin().dot(m_planeNormal) + m_planeConstant; + } +}; + +btGImpactCollisionAlgorithm::btGImpactCollisionAlgorithm( const btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1) +: btCollisionAlgorithm(ci) +{ + m_manifoldPtr = NULL; + m_convex_algorithm = NULL; +} + +btGImpactCollisionAlgorithm::~btGImpactCollisionAlgorithm() +{ + clearCache(); +} + + + +////////////////////////////////////////////////////////////////////////////////////////////// + + +void btGImpactCollisionAlgorithm::gimpactcompound_vs_gimpactcompound_find_pairs( + const btTransform & trans0, + const btTransform & trans1, + btGImpactCompoundShape * shape0, + btGImpactCompoundShape * shape1,gim_pair_set & pairset) const +{ + GIM_TREE_TREE_COLLIDER collider; + collider.find_collision(shape0->getBoxSet(),trans0,shape1->getBoxSet(),trans1,pairset,TREE_PRIMITIVE_VS_BOX); + +} + +void btGImpactCollisionAlgorithm::gimpacttrimeshpart_vs_gimpacttrimeshpart_find_pairs( + const btTransform & trans0, + const btTransform & trans1, + btGImpactMeshShapePart * shape0, + btGImpactMeshShapePart * shape1,gim_pair_set & pairset) const +{ + GIM_TREE_TREE_COLLIDER collider; + + collider.find_collision(shape0->getBoxSet(),trans0,shape1->getBoxSet(),trans1,pairset,TREE_PRIMITIVE_VS_BOX); + +} + +void btGImpactCollisionAlgorithm::gimpactcompound_vs_gimpacttrimeshpart_find_pairs( + const btTransform & trans0, + const btTransform & trans1, + btGImpactCompoundShape * shape0, + btGImpactMeshShapePart * shape1,gim_pair_set & pairset) const +{ + GIM_TREE_TREE_COLLIDER collider; + collider.find_collision(shape0->getBoxSet(),trans0,shape1->getBoxSet(),trans1,pairset,TREE_PRIMITIVE_VS_BOX); +} + + + + +void btGImpactCollisionAlgorithm::shape_vs_shape_collision( + btCollisionObject * body0, + btCollisionObject * body1, + btCollisionShape * shape0, + btCollisionShape * shape1,bool swapped) +{ + + btCollisionShape * orgshape0 = body0->getCollisionShape(); + btCollisionShape * orgshape1 = body1->getCollisionShape(); + + body0->setCollisionShape(shape0); + body1->setCollisionShape(shape1); + + + if(swapped) + { + btCollisionAlgorithm* algorswapped = newAlgorithm(body1,body0); + + m_resultOut->setPersistentManifold(m_manifoldPtr); + m_resultOut->setShapeIdentifiers(m_part1,m_triface1,m_part0,m_triface0); + + algorswapped->processCollision(body1,body0,*m_dispatchInfo,m_resultOut); + + delete algorswapped; + } + else + { + btCollisionAlgorithm* algor = newAlgorithm(body0,body1); + + m_resultOut->setPersistentManifold(m_manifoldPtr); + m_resultOut->setShapeIdentifiers(m_part0,m_triface0,m_part1,m_triface1); + + algor->processCollision(body0,body1,*m_dispatchInfo,m_resultOut); + + delete algor; + } + + body0->setCollisionShape(orgshape0); + body1->setCollisionShape(orgshape1); +} + +void btGImpactCollisionAlgorithm::convex_vs_convex_collision( + btCollisionObject * body0, + btCollisionObject * body1, + btCollisionShape * shape0, + btCollisionShape * shape1) +{ + //shape_vs_shape_collision(body0,body1,shape0,shape1,false); + //return; + + btCollisionShape * orgshape0 = body0->getCollisionShape(); + btCollisionShape * orgshape1 = body1->getCollisionShape(); + + body0->setCollisionShape(shape0); + body1->setCollisionShape(shape1); + + + m_resultOut->setShapeIdentifiers(m_part0,m_triface0,m_part1,m_triface1); + + checkConvexAlgorithm(body0,body1); + m_convex_algorithm->processCollision(body0,body1,*m_dispatchInfo,m_resultOut); + + body0->setCollisionShape(orgshape0); + body1->setCollisionShape(orgshape1); + +} + + + +void btGImpactCollisionAlgorithm::gimpacttrimesh_vs_shape_collision( + btCollisionObject * body0, + btCollisionObject * body1, + btGImpactMeshShape * shape0, + btCollisionShape * shape1,bool swapped) +{ + GUINT i = shape0->getMeshPartCount(); + while(i--) + { + btGImpactMeshShapePart * part = shape0->getMeshPart(i); + gimpacttrimeshpart_vs_shape_collision(body0,body1,part,shape1,swapped); + } +} + +void btGImpactCollisionAlgorithm::gimpacttrimesh_vs_gimpacttrimesh( + btCollisionObject * body0, + btCollisionObject * body1, + btGImpactMeshShape * shape0, + btGImpactMeshShape * shape1) +{ + GUINT i = shape0->getMeshPartCount(); + while(i--) + { + btGImpactMeshShapePart * part0 = shape0->getMeshPart(i); + + GUINT j = shape1->getMeshPartCount(); + while(j--) + { + btGImpactMeshShapePart * part1 = shape1->getMeshPart(j); + gimpacttrimeshpart_vs_gimpacttrimeshpart_collision(body0,body1,part0,part1,false); + } + } +} + +void btGImpactCollisionAlgorithm::gimpacttrimesh_vs_gimpactcompound( + btCollisionObject * body0, + btCollisionObject * body1, + btGImpactMeshShape * shape0, + btGImpactCompoundShape * shape1,bool swapped) +{ + GUINT i = shape0->getMeshPartCount(); + while(i--) + { + btGImpactMeshShapePart * part = shape0->getMeshPart(i); + gimpactcompound_vs_gimpacttrimeshpart_collision(body1,body0,shape1,part,!swapped); + } +} + + + +void btGImpactCollisionAlgorithm::gimpacttrimesh_vs_trimeshpart( + btCollisionObject * body0, + btCollisionObject * body1, + btGImpactMeshShape * shape0, + btGImpactMeshShapePart * shape1,bool swapped) +{ + GUINT i = shape0->getMeshPartCount(); + while(i--) + { + btGImpactMeshShapePart * part = shape0->getMeshPart(i); + gimpacttrimeshpart_vs_gimpacttrimeshpart_collision(body0,body1,part,shape1,swapped); + } +} + + +void btGImpactCollisionAlgorithm::gimpactcompound_vs_gimpactcompound_collision( + btCollisionObject * body0, + btCollisionObject * body1, + btGImpactCompoundShape * shape0, + btGImpactCompoundShape * shape1) +{ + btTransform orgtrans0 = body0->getWorldTransform(); + btTransform orgtrans1 = body1->getWorldTransform(); + + gim_pair_set pairset; + + gimpactcompound_vs_gimpactcompound_find_pairs(orgtrans0,orgtrans1,shape0,shape1,pairset); + + if(pairset.size()== 0) return; + +// btCollisionShape * orgshape0 = body0->getCollisionShape(); +// btCollisionShape * orgshape1 = body1->getCollisionShape(); + + GUINT i = pairset.size(); + while(i--) + { + const GIM_PAIR & pair = pairset[i]; + btCollisionShape * colshape0 = shape0->getChildShape(pair.m_index1); + btCollisionShape * colshape1 = shape1->getChildShape(pair.m_index2); + + btTransform childtrans0 = orgtrans0*shape0->getChildTransform(pair.m_index1); + btTransform childtrans1 = orgtrans1*shape1->getChildTransform(pair.m_index2); + + body0->setWorldTransform(childtrans0); + body1->setWorldTransform(childtrans1); + + + //collide two shapes + shape_vs_shape_collision(body0,body1,colshape0,colshape1,false); + + //restore transforms +// body0->setCollisionShape(orgshape0); +// body1->setCollisionShape(orgshape1); + + body0->setWorldTransform(orgtrans0); + body1->setWorldTransform(orgtrans1); + } +} + + +void btGImpactCollisionAlgorithm::gimpactcompound_vs_gimpacttrimeshpart_collision( + btCollisionObject * body0, + btCollisionObject * body1, + btGImpactCompoundShape * shape0, + btGImpactMeshShapePart * shape1,bool swapped) +{ + //lock trimesh + shape1->lock(); + + btTransform orgtrans0 = body0->getWorldTransform(); + btTransform orgtrans1 = body1->getWorldTransform(); + + gim_pair_set pairset; + + gimpactcompound_vs_gimpacttrimeshpart_find_pairs(orgtrans0,orgtrans1,shape0,shape1,pairset); + + if(pairset.size()== 0) + { + //unlock trimesh + shape1->unlock(); + return; + } + +// btCollisionShape * orgshape0 = body0->getCollisionShape(); +// btCollisionShape * orgshape1 = body1->getCollisionShape(); + + + m_part1 = shape1->getPart(); + m_part0 = -1; + m_triface0 = -1; + + btTriangleShapeEx bullet_triangle(btVector3(0.f,0.f,0.f),btVector3(0.f,0.f,0.f),btVector3(0.f,0.f,0.f)); + + + GUINT i = pairset.size(); + + while(i--) + { + const GIM_PAIR & pair = pairset[i]; + btCollisionShape * colshape0 = shape0->getChildShape(pair.m_index1); + btTransform childtrans0 = orgtrans0*shape0->getChildTransform(pair.m_index1); + body0->setWorldTransform(childtrans0); + + shape1->getBulletTriangle(pair.m_index2,bullet_triangle); + m_triface1 = pair.m_index2; + + //collide two shapes + shape_vs_shape_collision(body0,body1,colshape0,&bullet_triangle,swapped); + + //restore transforms +// body0->setCollisionShape(orgshape0); +// body1->setCollisionShape(orgshape1); + body1->setWorldTransform(orgtrans1); + } + + //unlock trimesh + shape1->unlock(); +} + + + +void btGImpactCollisionAlgorithm::gimpactcompound_vs_shape_collision( + btCollisionObject * body0, + btCollisionObject * body1, + btGImpactCompoundShape * shape0, + btCollisionShape * shape1,bool swapped) +{ + btTransform orgtrans0 = body0->getWorldTransform(); + + btTransform trans1to0 = orgtrans0.inverse(); + trans1to0 *= body1->getWorldTransform(); + + GIM_AABB boxshape; + shape1->getAabb(trans1to0,boxshape.m_min,boxshape.m_max); + gim_array collided_results; + shape0->getBoxSet()->boxQuery(boxshape, collided_results); + + if(collided_results.size() == 0) return; + + + + GUINT i = collided_results.size(); + + while(i--) + { + btCollisionShape * colshape0 = shape0->getChildShape(collided_results[i]); + btTransform childtrans0 = orgtrans0*shape0->getChildTransform(collided_results[i]); + + body0->setWorldTransform(childtrans0); + + //collide two shapes + shape_vs_shape_collision(body0,body1,colshape0,shape1,swapped); + + //restore transforms +// body0->setCollisionShape(orgshape0); + body0->setWorldTransform(orgtrans0); + } + +} + + + + +void btGImpactCollisionAlgorithm::gimpacttrimeshpart_vs_gimpacttrimeshpart_collision( + btCollisionObject * body0, + btCollisionObject * body1, + btGImpactMeshShapePart * shape0, + btGImpactMeshShapePart * shape1,bool swapped) +{ + shape0->lock(); + shape1->lock(); + + btGImpactMeshShapePart * trishape0; + btGImpactMeshShapePart * trishape1; + btCollisionObject * tribody0; + btCollisionObject * tribody1; + + if(swapped) + { + trishape0 = shape1; + trishape1 = shape0; + tribody0 = body1; + tribody1 = body0; + } + else + { + trishape0 = shape0; + trishape1 = shape1; + tribody0 = body0; + tribody1 = body1; + } + + btTransform orgtrans0 = tribody0->getWorldTransform(); + btTransform orgtrans1 = tribody1->getWorldTransform(); + + gim_pair_set pairset; + + gimpacttrimeshpart_vs_gimpacttrimeshpart_find_pairs(orgtrans0,orgtrans1,trishape0,trishape1,pairset); + + if(pairset.size()== 0) + { + shape0->unlock(); + shape1->unlock(); + return; + } + + m_part0 = trishape0->getPart(); + m_part1 = trishape1->getPart(); + +#ifdef BULLET_TRIANGLE_COLLISION + + btTriangleShapeEx tri0(btVector3(0.f,0.f,0.f),btVector3(0.f,0.f,0.f),btVector3(0.f,0.f,0.f)); + btTriangleShapeEx tri1(btVector3(0.f,0.f,0.f),btVector3(0.f,0.f,0.f),btVector3(0.f,0.f,0.f)); + GUINT i = pairset.size(); + while(i--) + { + const GIM_PAIR & pair = pairset[i]; + m_triface0 = pair.m_index1; + m_triface1 = pair.m_index2; + + trishape0->getBulletTriangle(pair.m_index1,tri0); + trishape1->getBulletTriangle(pair.m_index2,tri1); + + + convex_vs_convex_collision( + tribody0, + tribody1, + &tri0, + &tri1); + + } + //unlock + shape0->unlock(); + shape1->unlock(); + +#else + gim_contact_array tempcontacts; + GIM_TRIANGLE tri0; + GIM_TRIANGLE tri1; + GIM_TRIANGLE_CONTACT_DATA contact_data; + GUINT i = pairset.size(); + while(i--) + { + const GIM_PAIR & pair = pairset[i]; + + trishape0->getTriangle(pair.m_index1,tri0); + trishape1->getTriangle(pair.m_index2,tri1); + + tri0.apply_transform(orgtrans0); + tri1.apply_transform(orgtrans1); + + if(tri0.collide_triangle(tri1,contact_data)) + { + tempcontacts.push_triangle_contacts(contact_data,pair.m_index1,pair.m_index2); + } + } + //unlock + shape0->unlock(); + shape1->unlock(); + + if(tempcontacts.size()==0) return; + + //sort contacts + gim_contact_array contacts; + contacts.merge_contacts(tempcontacts,true); + // put contacts + m_part0 = trishape0->getPart(); + m_part1 = trishape1->getPart(); + i = contacts.size(); + while(i--) + { + GIM_CONTACT * pcontact = &contacts[i]; + + m_triface0 = pcontact->m_feature1; + m_triface1 = pcontact->m_feature2; + + addContactPoint(tribody0, tribody1, + pcontact->m_point, + pcontact->m_normal, + -pcontact->m_depth); + } +#endif +} + +void btGImpactCollisionAlgorithm::gimpacttrimeshpart_vs_plane_collision( + btCollisionObject * body0, + btCollisionObject * body1, + btGImpactMeshShapePart * shape0, + btStaticPlaneShape * shape1,bool swapped) +{ + + + btTransform orgtrans0 = body0->getWorldTransform(); + btTransform orgtrans1 = body1->getWorldTransform(); + + btPlaneShape * planeshape = static_cast(shape1); + btVector4 plane; + planeshape->get_plane_equation_transformed(orgtrans1,plane); + + //test box against plane + + GIM_AABB tribox; + shape0->getAabb(orgtrans0,tribox.m_min,tribox.m_max); + tribox.increment_margin(planeshape->getMargin()); + + if( tribox.plane_classify(plane)!= G_COLLIDE_PLANE) return; + + shape0->lock(); + + GREAL margin = shape0->getMargin() + planeshape->getMargin(); + + btVector3 vertex; + GUINT vi = shape0->getVertexCount(); + while(vi--) + { + shape0->getVertex(vi,vertex); + vertex = orgtrans0(vertex); + + GREAL distance = vertex.dot(plane) - plane[3] - margin; + + if(distance<0.0)//add contact + { + if(swapped) + { + addContactPoint(body1, body0, + vertex, + -plane, + distance); + } + else + { + addContactPoint(body0, body1, + vertex, + plane, + distance); + } + } + } + + shape0->unlock(); +} + + +class btGImpactTriangleCallback: public btTriangleCallback +{ +public: + btGImpactCollisionAlgorithm * algorithm; + btCollisionObject * body0; + btCollisionObject * body1; + btGImpactMeshShapePart * gimpactshape0; + bool swapped; + btScalar margin; + + + virtual void processTriangle(btVector3* triangle, int partId, int triangleIndex) + { + btTriangleShapeEx tri1(triangle[0],triangle[1],triangle[2]); + tri1.setMargin(margin); + algorithm->gimpacttrimeshpart_vs_shape_collision( + body0,body1,gimpactshape0,&tri1,swapped); + } +}; + + + +void btGImpactCollisionAlgorithm::gimpacttrimeshpart_vs_concave_collision( + btCollisionObject * body0, + btCollisionObject * body1, + btGImpactMeshShapePart * shape0, + btConcaveShape * shape1,bool swapped) +{ + + //create the callback + btGImpactTriangleCallback tricallback; + tricallback.algorithm = this; + tricallback.body0 = body0; + tricallback.body1 = body1; + tricallback.gimpactshape0 = shape0; + tricallback.swapped = swapped; + tricallback.margin = shape1->getMargin(); + + + + //getting the trimesh AABB + btTransform gimpactInConcaveSpace; + gimpactInConcaveSpace = body1->getWorldTransform().inverse() * body0->getWorldTransform(); + btVector3 minAABB,maxAABB; + shape0->getAabb(gimpactInConcaveSpace,minAABB,maxAABB); + + shape1->processAllTriangles(&tricallback,minAABB,maxAABB); + + + +} + + +void btGImpactCollisionAlgorithm::gimpacttrimeshpart_vs_shape_collision( + btCollisionObject * body0, + btCollisionObject * body1, + btGImpactMeshShapePart * shape0, + btCollisionShape * shape1,bool swapped) +{ +#ifdef GIMPACT_VS_PLANE_COLLISION + if(shape1->getShapeType() == STATIC_PLANE_PROXYTYPE) + { + btStaticPlaneShape * plane1 = static_cast(shape1); + gimpacttrimeshpart_vs_plane_collision(body0,body1,shape0,plane1,swapped); + return; + } +#endif + if(shape1->isConcave()) + { + btConcaveShape * concave1 = static_cast(shape1); + gimpacttrimeshpart_vs_concave_collision(body0,body1,shape0,concave1,swapped); + return; + } + + btTransform trans1to0 = body0->getWorldTransform().inverse(); + trans1to0 *= body1->getWorldTransform(); + + //lock + shape0->lock(); + + GIM_AABB boxshape; + shape1->getAabb(trans1to0,boxshape.m_min,boxshape.m_max); + gim_array collided_results(32); + shape0->getBoxSet()->boxQuery(boxshape, collided_results); + + if(collided_results.size() == 0) + { + shape0->unlock(); + return; + } + + btTriangleShapeEx bullet_triangle(btVector3(0.f,0.f,0.f),btVector3(0.f,0.f,0.f),btVector3(0.f,0.f,0.f)); + + + m_part0 = shape0->getPart(); + m_part1 = -1; + m_triface1 = -1; + + GUINT i = collided_results.size(); + + if(shape1->isConvex()) + { + if(swapped) + { + while(i--) + { + m_triface0 = collided_results[i]; + shape0->getBulletTriangle(collided_results[i],bullet_triangle); + //collide two shapes + convex_vs_convex_collision(body1,body0,shape1,&bullet_triangle); + } + } + else + { + while(i--) + { + m_triface0 = collided_results[i]; + shape0->getBulletTriangle(collided_results[i],bullet_triangle); + //collide two shapes + convex_vs_convex_collision(body0,body1,&bullet_triangle,shape1); + } + } + } + else + { + while(i--) + { + m_triface0 = collided_results[i]; + shape0->getBulletTriangle(collided_results[i],bullet_triangle); + //collide two shapes + shape_vs_shape_collision(body0,body1,&bullet_triangle,shape1,swapped); + } + } + + + + shape0->unlock(); +} + + +void btGImpactCollisionAlgorithm::gimpact_vs_compoundshape(btCollisionObject * body0, + btCollisionObject * body1, + btGImpactShapeInterface * shape0, + btCompoundShape * shape1,bool swapped) +{ + btTransform orgtrans1 = body1->getWorldTransform(); + + int i = shape1->getNumChildShapes(); + while(i--) + { + + btCollisionShape * colshape1 = shape1->getChildShape(i); + btTransform childtrans1 = orgtrans1*shape1->getChildTransform(i); + + body1->setWorldTransform(childtrans1); + + //collide child shape + gimpact_vs_shape(body0, body1, + shape0,colshape1,swapped); + + + //restore transforms + body1->setWorldTransform(orgtrans1); + } +} + + +void btGImpactCollisionAlgorithm::gimpact_vs_shape(btCollisionObject * body0, + btCollisionObject * body1, + btGImpactShapeInterface * shape0, + btCollisionShape * shape1,bool swapped) +{ + if(shape1->getShapeType() == COMPOUND_SHAPE_PROXYTYPE) + { + btCompoundShape * compoundshape = static_cast(shape1); + gimpact_vs_compoundshape(body0,body1,shape0,compoundshape,swapped); + return; + } + + eGIMPACT_SHAPE_TYPE shapetype0 = shape0->getGImpactShapeType(); + if(shapetype0 == CONST_GIMPACT_TRIMESH_SHAPE) + { + btGImpactMeshShape * trimesh0 = static_cast(shape0); + gimpacttrimesh_vs_shape_collision(body0,body1,trimesh0,shape1,swapped); + } + else if(shapetype0 == CONST_GIMPACT_TRIMESH_SHAPE_PART) + { + btGImpactMeshShapePart * trimeshpart0 = static_cast(shape0); + gimpacttrimeshpart_vs_shape_collision(body0,body1,trimeshpart0,shape1,swapped); + } + else// compound + { + btGImpactCompoundShape * compound0 = static_cast(shape0); + gimpactcompound_vs_shape_collision(body0,body1,compound0,shape1,swapped); + } +} + +void btGImpactCollisionAlgorithm::gimpact_vs_gimpact(btCollisionObject * body0, + btCollisionObject * body1, + btGImpactShapeInterface * shape0, + btGImpactShapeInterface * shape1) +{ + + eGIMPACT_SHAPE_TYPE shapetype0 = shape0->getGImpactShapeType(); + eGIMPACT_SHAPE_TYPE shapetype1 = shape1->getGImpactShapeType(); + + btGImpactMeshShape * trimesh0; + btGImpactMeshShape * trimesh1; + btGImpactMeshShapePart * trimeshpart0; + btGImpactMeshShapePart * trimeshpart1; + btGImpactCompoundShape * compound0; + btGImpactCompoundShape * compound1; + + + if(shapetype0 == CONST_GIMPACT_TRIMESH_SHAPE) + { + if(shapetype1 == CONST_GIMPACT_TRIMESH_SHAPE) // trimesh vs trimesh + { + trimesh0 = static_cast(shape0); + trimesh1 = static_cast(shape1); + gimpacttrimesh_vs_gimpacttrimesh(body0,body1,trimesh0,trimesh1); + } + else + { + if(shapetype1 == CONST_GIMPACT_COMPOUND_SHAPE) // trimesh vs compound + { + trimesh0 = static_cast(shape0); + compound1 = static_cast(shape1); + gimpacttrimesh_vs_gimpactcompound(body0,body1,trimesh0,compound1,false); + } + else // trimesh vs trimesh part + { + trimesh0 = static_cast(shape0); + trimeshpart1 = static_cast(shape1); + gimpacttrimesh_vs_trimeshpart(body0,body1,trimesh0,trimeshpart1,false); + } + } + } + else if(shapetype1 == CONST_GIMPACT_TRIMESH_SHAPE) + { + if(shapetype0 == CONST_GIMPACT_COMPOUND_SHAPE) // compound vs trimesh + { + compound0 = static_cast(shape0); + trimesh1 = static_cast(shape1); + gimpacttrimesh_vs_gimpactcompound(body1,body0,trimesh1,compound0,true); + } + else // trimesh part vs trimesh + { + trimeshpart0 = static_cast(shape0); + trimesh1 = static_cast(shape1); + gimpacttrimesh_vs_trimeshpart(body1,body0,trimesh1,trimeshpart0,true); + } + } + else + { + if(shapetype0 == CONST_GIMPACT_COMPOUND_SHAPE) + { + if(shapetype1 == CONST_GIMPACT_COMPOUND_SHAPE) // compound vs compound + { + compound0 = static_cast(shape0); + compound1 = static_cast(shape1); + gimpactcompound_vs_gimpactcompound_collision(body0,body1,compound0,compound1); + } + else // compound vs trimesh part + { + compound0 = static_cast(shape0); + trimeshpart1 = static_cast(shape1); + gimpactcompound_vs_gimpacttrimeshpart_collision(body0,body1,compound0,trimeshpart1,false); + } + } + else if(shapetype1 == CONST_GIMPACT_COMPOUND_SHAPE) // trimesh part vs compound + { + compound1 = static_cast(shape1); + trimeshpart0 = static_cast(shape0); + gimpactcompound_vs_gimpacttrimeshpart_collision(body1,body0,compound1,trimeshpart0,true); + } + else // trimesh part vs trimesh part + { + trimeshpart0 = static_cast(shape0); + trimeshpart1 = static_cast(shape1); + + gimpacttrimeshpart_vs_gimpacttrimeshpart_collision(body0,body1,trimeshpart0,trimeshpart1,false); + } + } +} + +void btGImpactCollisionAlgorithm::processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) +{ + clearCache(); + + m_resultOut = resultOut; + m_dispatchInfo = &dispatchInfo; + + + btGImpactShapeInterface * gimpactshape0; + btGImpactShapeInterface * gimpactshape1; + if (body0->getCollisionShape()->getShapeType()==GIMPACT_SHAPE_PROXYTYPE) + { + if( body1->getCollisionShape()->getShapeType()==GIMPACT_SHAPE_PROXYTYPE ) + { + gimpactshape0 = static_cast(body0->getCollisionShape()); + gimpactshape1 = static_cast(body1->getCollisionShape()); + gimpact_vs_gimpact(body0,body1,gimpactshape0,gimpactshape1); + } + else + { + gimpactshape0 = static_cast(body0->getCollisionShape()); + gimpact_vs_shape(body0,body1,gimpactshape0,body1->getCollisionShape(),false); + } + } + else if (body1->getCollisionShape()->getShapeType()==GIMPACT_SHAPE_PROXYTYPE ) + { + gimpactshape1 = static_cast(body1->getCollisionShape()); + gimpact_vs_shape(body1,body0,gimpactshape1,body0->getCollisionShape(),true); + } +} + + +btScalar btGImpactCollisionAlgorithm::calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) +{ + return 1.f; + +} + +///////////////////////////////////// REGISTERING ALGORITHM ////////////////////////////////////////////// + + +//! Use this function for register the algorithm externally +void btGImpactCollisionAlgorithm::registerAlgorithm(btCollisionDispatcher * dispatcher) +{ + + for (GUINT i = 0;i < MAX_BROADPHASE_COLLISION_TYPES ;i++ ) + { + dispatcher->registerCollisionCreateFunc(GIMPACT_SHAPE_PROXYTYPE,i ,new btGImpactCollisionAlgorithm::CreateFunc); + } + + for (GUINT i = 0;i < MAX_BROADPHASE_COLLISION_TYPES ;i++ ) + { + dispatcher->registerCollisionCreateFunc(i,GIMPACT_SHAPE_PROXYTYPE ,new btGImpactCollisionAlgorithm::CreateFunc); + } + + /* + dispatcher->registerCollisionCreateFunc(GIMPACT_SHAPE_PROXYTYPE,GIMPACT_SHAPE_PROXYTYPE,new btGImpactCollisionAlgorithm::CreateFunc); + dispatcher->registerCollisionCreateFunc(STATIC_PLANE_PROXYTYPE ,GIMPACT_SHAPE_PROXYTYPE,new btGImpactCollisionAlgorithm::CreateFunc); + dispatcher->registerCollisionCreateFunc(GIMPACT_SHAPE_PROXYTYPE,STATIC_PLANE_PROXYTYPE ,new btGImpactCollisionAlgorithm::CreateFunc);*/ + + +} diff --git a/Extras/GIMPACT/src/Bullet/btGImpactShape.cpp b/Extras/GIMPACT/src/Bullet/btGImpactShape.cpp new file mode 100755 index 000000000..18fccce24 --- /dev/null +++ b/Extras/GIMPACT/src/Bullet/btGImpactShape.cpp @@ -0,0 +1,194 @@ +/* +----------------------------------------------------------------------------- +This source file is part of GIMPACT Library. + +For the latest info, see http://gimpact.sourceforge.net/ + +Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371. +email: projectileman@yahoo.com + + 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 GIMPACT-LICENSE-LGPL.TXT. + (2) The BSD-style license that is included with this library in + the file GIMPACT-LICENSE-BSD.TXT. + (3) The zlib/libpng license that is included with this library in + the file GIMPACT-LICENSE-ZLIB.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 + GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details. + +----------------------------------------------------------------------------- +*/ + + +#include "GIMPACT/Bullet/btGImpactShape.h" +#include "GIMPACT/Bullet/btGImpactMassUtil.h" + + +#define CALC_EXACT_INERTIA 1 + +void btGImpactCompoundShape::calculateLocalInertia(btScalar mass,btVector3& inertia) +{ + +#ifdef CALC_EXACT_INERTIA + inertia.setValue(0.f,0.f,0.f); + + GUINT i = this->getNumChildShapes(); + GREAL shapemass = mass/btScalar(i); + + while(i--) + { + btVector3 temp_inertia; + m_childShapes[i]->calculateLocalInertia(shapemass,temp_inertia); + inertia = gim_inertia_add_transformed( inertia,temp_inertia,m_childTransforms[i]); + } + +#else + + // Calc box inertia + + btScalar lx= m_localAABB.m_max[0] - m_localAABB.m_min[0]; + btScalar ly= m_localAABB.m_max[1] - m_localAABB.m_min[1]; + btScalar lz= m_localAABB.m_max[2] - m_localAABB.m_min[2]; + const btScalar x2 = lx*lx; + const btScalar y2 = ly*ly; + const btScalar z2 = lz*lz; + const btScalar scaledmass = mass * btScalar(0.08333333); + + inertia = scaledmass * (btVector3(y2+z2,x2+z2,x2+y2)); + +#endif +} + + + +void btGImpactMeshShapePart::calculateLocalInertia(btScalar mass,btVector3& inertia) +{ + lock(); + + +#ifdef CALC_EXACT_INERTIA + inertia.setValue(0.f,0.f,0.f); + + GUINT i = this->getVertexCount(); + GREAL pointmass = mass/btScalar(i); + + while(i--) + { + btVector3 pointintertia; + this->getVertex(i,pointintertia); + pointintertia = gim_get_point_inertia(pointintertia,pointmass); + inertia+=pointintertia; + } + +#else + + // Calc box inertia + + btScalar lx= m_localAABB.m_max[0] - m_localAABB.m_min[0]; + btScalar ly= m_localAABB.m_max[1] - m_localAABB.m_min[1]; + btScalar lz= m_localAABB.m_max[2] - m_localAABB.m_min[2]; + const btScalar x2 = lx*lx; + const btScalar y2 = ly*ly; + const btScalar z2 = lz*lz; + const btScalar scaledmass = mass * btScalar(0.08333333); + + inertia = scaledmass * (btVector3(y2+z2,x2+z2,x2+y2)); + +#endif + + unlock(); +} + +void btGImpactMeshShape::calculateLocalInertia(btScalar mass,btVector3& inertia) +{ + +#ifdef CALC_EXACT_INERTIA + inertia.setValue(0.f,0.f,0.f); + + GUINT i = this->getMeshPartCount(); + GREAL partmass = mass/btScalar(i); + + while(i--) + { + btVector3 partinertia; + getMeshPart(i)->calculateLocalInertia(partmass,partinertia); + inertia+=partinertia; + } + +#else + + // Calc box inertia + + btScalar lx= m_localAABB.m_max[0] - m_localAABB.m_min[0]; + btScalar ly= m_localAABB.m_max[1] - m_localAABB.m_min[1]; + btScalar lz= m_localAABB.m_max[2] - m_localAABB.m_min[2]; + const btScalar x2 = lx*lx; + const btScalar y2 = ly*ly; + const btScalar z2 = lz*lz; + const btScalar scaledmass = mass * btScalar(0.08333333); + + inertia = scaledmass * (btVector3(y2+z2,x2+z2,x2+y2)); + +#endif +} + + + +void btGImpactCompoundShape::rayTest(const btVector3& rayFrom, const btVector3& rayTo, btCollisionWorld::RayResultCallback& resultCallback) const +{ + +} + +void btGImpactMeshShape::rayTest(const btVector3& rayFrom, const btVector3& rayTo, btCollisionWorld::RayResultCallback& resultCallback) const +{ +} + +void btGImpactMeshShapePart::rayTest(const btVector3& rayFrom, const btVector3& rayTo, btCollisionWorld::RayResultCallback& resultCallback) const +{ +} + + +void btGImpactMeshShapePart::processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const +{ + lock(); + GIM_AABB box; + box.m_min = aabbMin; + box.m_max = aabbMax; + + gim_array collided; + m_box_set.boxQuery(box,collided); + + if(collided.size()==0) + { + unlock(); + return; + } + + int part = (int)getPart(); + GIM_TRIANGLE triangle; + GUINT i = collided.size(); + while(i--) + { + this->getTriangle(collided[i],triangle); + callback->processTriangle(triangle.m_vertices,part,collided[i]); + } + unlock(); + +} + +void btGImpactMeshShape::processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const +{ + GUINT i = m_mesh_parts.size(); + while(i--) + { + m_mesh_parts[i]->processAllTriangles(callback,aabbMin,aabbMax); + } +} diff --git a/Extras/GIMPACT/src/core/gim_box_set.cpp b/Extras/GIMPACT/src/core/gim_box_set.cpp new file mode 100755 index 000000000..b9b6be991 --- /dev/null +++ b/Extras/GIMPACT/src/core/gim_box_set.cpp @@ -0,0 +1,182 @@ + +/* +----------------------------------------------------------------------------- +This source file is part of GIMPACT Library. + +For the latest info, see http://gimpact.sourceforge.net/ + +Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371. +email: projectileman@yahoo.com + + 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 GIMPACT-LICENSE-LGPL.TXT. + (2) The BSD-style license that is included with this library in + the file GIMPACT-LICENSE-BSD.TXT. + (3) The zlib/libpng license that is included with this library in + the file GIMPACT-LICENSE-ZLIB.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 + GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details. + +----------------------------------------------------------------------------- +*/ + + +#include "GIMPACT/core/gim_box_set.h" + + +GUINT GIM_BOX_TREE::_calc_splitting_axis( + gim_array & primitive_boxes, GUINT startIndex, GUINT endIndex) +{ + GUINT i; + + btVector3 means(btScalar(0.),btScalar(0.),btScalar(0.)); + btVector3 variance(btScalar(0.),btScalar(0.),btScalar(0.)); + GUINT numIndices = endIndex-startIndex; + + for (i=startIndex;i & primitive_boxes, GUINT startIndex, + GUINT endIndex, GUINT splitAxis) +{ + GUINT i; + GUINT splitIndex =startIndex; + GUINT numIndices = endIndex - startIndex; + + // average of centers + btScalar splitValue = 0.0f; + for (i=startIndex;i splitValue) + { + //swap + primitive_boxes.swap(i,splitIndex); + splitIndex++; + } + } + + //if the splitIndex causes unbalanced trees, fix this by using the center in between startIndex and endIndex + //otherwise the tree-building might fail due to stack-overflows in certain cases. + //unbalanced1 is unsafe: it can cause stack overflows + //bool unbalanced1 = ((splitIndex==startIndex) || (splitIndex == (endIndex-1))); + + //unbalanced2 should work too: always use center (perfect balanced trees) + //bool unbalanced2 = true; + + //this should be safe too: + GUINT rangeBalancedIndices = numIndices/3; + bool unbalanced = ((splitIndex<=(startIndex+rangeBalancedIndices)) || (splitIndex >=(endIndex-1-rangeBalancedIndices))); + + if (unbalanced) + { + splitIndex = startIndex+ (numIndices>>1); + } + + bool unbal = (splitIndex==startIndex) || (splitIndex == (endIndex)); + btAssert(!unbal); + + return splitIndex; +} + + +void GIM_BOX_TREE::_build_sub_tree(gim_array & primitive_boxes, GUINT startIndex, GUINT endIndex) +{ + GUINT current_index = m_num_nodes++; + + btAssert((endIndex-startIndex)>0); + + if((endIndex-startIndex) == 1) //we got a leaf + { + m_node_array[current_index].m_left = 0; + m_node_array[current_index].m_right = 0; + m_node_array[current_index].m_escapeIndex = 0; + + m_node_array[current_index].m_bound = primitive_boxes[startIndex].m_bound; + m_node_array[current_index].m_data = primitive_boxes[startIndex].m_data; + return; + } + + //configure inner node + + GUINT splitIndex; + + //calc this node bounding box + m_node_array[current_index].m_bound.invalidate(); + for (splitIndex=startIndex;splitIndex & primitive_boxes) +{ + // initialize node count to 0 + m_num_nodes = 0; + // allocate nodes + m_node_array.resize(primitive_boxes.size()*2); + + _build_sub_tree(primitive_boxes, 0, primitive_boxes.size()); +} + diff --git a/Extras/GIMPACT/src/core/gim_contact.cpp b/Extras/GIMPACT/src/core/gim_contact.cpp new file mode 100755 index 000000000..6f8e0751e --- /dev/null +++ b/Extras/GIMPACT/src/core/gim_contact.cpp @@ -0,0 +1,142 @@ + +/* +----------------------------------------------------------------------------- +This source file is part of GIMPACT Library. + +For the latest info, see http://gimpact.sourceforge.net/ + +Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371. +email: projectileman@yahoo.com + + 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 GIMPACT-LICENSE-LGPL.TXT. + (2) The BSD-style license that is included with this library in + the file GIMPACT-LICENSE-BSD.TXT. + (3) The zlib/libpng license that is included with this library in + the file GIMPACT-LICENSE-ZLIB.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 + GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details. + +----------------------------------------------------------------------------- +*/ + +#include "GIMPACT/core/gim_contact.h" + +#define MAX_COINCIDENT 8 + +void gim_contact_array::merge_contacts( + const gim_contact_array & contacts, bool normal_contact_average) +{ + clear(); + + if(contacts.size()==1) + { + push_back(contacts.back()); + return; + } + + gim_array keycontacts(contacts.size()); + keycontacts.resize(contacts.size(),false); + + //fill key contacts + + for (GUINT i = 0;im_depth - CONTACT_DIFF_EPSILON > scontact->m_depth)//) + { + *pcontact = *scontact; + coincident_count = 0; + } + else if(normal_contact_average) + { + if(btFabs(pcontact->m_depth - scontact->m_depth)m_normal; + coincident_count++; + } + } + } + } + else + {//add new contact + + if(normal_contact_average && coincident_count>0) + { + pcontact->interpolate_normals(coincident_normals,coincident_count); + coincident_count = 0; + } + + push_back(*scontact); + pcontact = &back(); + } + last_key = key; + } +} + +void gim_contact_array::merge_contacts_unique(const gim_contact_array & contacts) +{ + clear(); + + if(contacts.size()==1) + { + push_back(contacts.back()); + return; + } + + GIM_CONTACT average_contact = contacts.back(); + + for (GUINT i=1;i0.0f) + { + /* here we know that D0D2<=0.0 */ + /* that is D0, D1 are on the same side, D2 on the other or on the plane */ + scale_edge0 = -D2/(D0-D2); + scale_edge1 = -D1/(D2-D1); + edge_index0 = 2;edge_index1 = 1; + } + else if(D0D2>0.0f) + { + /* here we know that d0d1<=0.0 */ + scale_edge0 = -D0/(D1-D0); + scale_edge1 = -D1/(D2-D1); + edge_index0 = 0;edge_index1 = 1; + } + else if(D1*D2>0.0f || D0!=0.0f) + { + /* here we know that d0d1<=0.0 or that D0!=0.0 */ + scale_edge0 = -D0/(D1-D0); + scale_edge1 = -D2/(D0-D2); + edge_index0 = 0 ;edge_index1 = 2; + } + else + { + return false; + } + return true; + } + + + //! clip triangle + /*! + */ + SIMD_FORCE_INLINE GUINT clip_triangle( + const btVector4 & tri_plane, + const btVector3 * tripoints, + const btVector3 * srcpoints, + btVector3 * clip_points) + { + // edge 0 + + btVector4 edgeplane; + + EDGE_PLANE(tripoints[0],tripoints[1],tri_plane,edgeplane); + + GUINT clipped_count = PLANE_CLIP_TRIANGLE3D( + edgeplane,srcpoints[0],srcpoints[1],srcpoints[2],temp_points); + + if(clipped_count == 0) return 0; + + // edge 1 + + EDGE_PLANE(tripoints[1],tripoints[2],tri_plane,edgeplane); + + clipped_count = PLANE_CLIP_POLYGON3D( + edgeplane,temp_points,clipped_count,temp_points1); + + if(clipped_count == 0) return 0; + + // edge 2 + + EDGE_PLANE(tripoints[2],tripoints[0],tri_plane,edgeplane); + + clipped_count = PLANE_CLIP_POLYGON3D( + edgeplane,temp_points1,clipped_count,clip_points); + + return clipped_count; + + + /*GUINT i0 = (tri_plane.closestAxis()+1)%3; + GUINT i1 = (i0+1)%3; + // edge 0 + btVector3 temp_points[MAX_TRI_CLIPPING]; + btVector3 temp_points1[MAX_TRI_CLIPPING]; + + GUINT clipped_count= PLANE_CLIP_TRIANGLE_GENERIC( + 0,srcpoints[0],srcpoints[1],srcpoints[2],temp_points, + DISTANCE_EDGE(tripoints[0],tripoints[1],i0,i1)); + + + if(clipped_count == 0) return 0; + + // edge 1 + clipped_count = PLANE_CLIP_POLYGON_GENERIC( + 0,temp_points,clipped_count,temp_points1, + DISTANCE_EDGE(tripoints[1],tripoints[2],i0,i1)); + + if(clipped_count == 0) return 0; + + // edge 2 + clipped_count = PLANE_CLIP_POLYGON_GENERIC( + 0,temp_points1,clipped_count,clipped_points, + DISTANCE_EDGE(tripoints[2],tripoints[0],i0,i1)); + + return clipped_count;*/ + } + + SIMD_FORCE_INLINE void sort_isect( + GREAL & isect0,GREAL & isect1,GUINT &e0,GUINT &e1,btVector3 & vec0,btVector3 & vec1) + { + if(isect1=isect_v[1]) // face U casts face V + { + return 1; + } + else if(isect_v[0]<=isect_u[0]) // face V casts face U + { + return 2; + } + // closest points + closest_point_u = up_e1; + closest_point_v = vp_e0; + // calc edges and separation + + if(isect_u[1]+ MIN_EDGE_EDGE_DIS=isect_u[1]) // face V casts face U + { + return 2; + } + else if(isect_u[0]<=isect_v[0]) // face U casts face V + { + return 1; + } + // closest points + closest_point_u = up_e0; + closest_point_v = vp_e1; + // calc edges and separation + + if(isect_v[1]+MIN_EDGE_EDGE_DIS0.0f && du0du2>0.0f) // same sign on all of them + not equal 0 ? + { + if(du[0]<0) //we need test behind the triangle plane + { + distances[0] = GIM_MAX3(du[0],du[1],du[2]); + distances[0] = -distances[0]; + if(distances[0]>margin) return false; //never intersect + + //reorder triangle v + VEC_SWAP(tv_vertices[0],tv_vertices[1]); + VEC_SCALE_4(tv_plane,-1.0f,tv_plane); + } + else + { + distances[0] = GIM_MIN3(du[0],du[1],du[2]); + if(distances[0]>margin) return false; //never intersect + } + } + else + { + //Look if we need to invert the triangle + distances[0] = (du[0]+du[1]+du[2])/3.0f; //centroid + + if(distances[0]<0.0f) + { + //reorder triangle v + VEC_SWAP(tv_vertices[0],tv_vertices[1]); + VEC_SCALE_4(tv_plane,-1.0f,tv_plane); + + distances[0] = GIM_MAX3(du[0],du[1],du[2]); + distances[0] = -distances[0]; + } + else + { + distances[0] = GIM_MIN3(du[0],du[1],du[2]); + } + } + + + // plane U vs V points + + TRIANGLE_PLANE(tu_vertices[0],tu_vertices[1],tu_vertices[2],tu_plane); + + dv[0] = DISTANCE_PLANE_POINT(tu_plane,tv_vertices[0]); + dv[1] = DISTANCE_PLANE_POINT(tu_plane,tv_vertices[1]); + dv[2] = DISTANCE_PLANE_POINT(tu_plane,tv_vertices[2]); + + dv0dv1 = dv[0] * dv[1]; + dv0dv2 = dv[0] * dv[2]; + + + if(dv0dv1>0.0f && dv0dv2>0.0f) // same sign on all of them + not equal 0 ? + { + if(dv[0]<0) //we need test behind the triangle plane + { + distances[1] = GIM_MAX3(dv[0],dv[1],dv[2]); + distances[1] = -distances[1]; + if(distances[1]>margin) return false; //never intersect + + //reorder triangle u + VEC_SWAP(tu_vertices[0],tu_vertices[1]); + VEC_SCALE_4(tu_plane,-1.0f,tu_plane); + } + else + { + distances[1] = GIM_MIN3(dv[0],dv[1],dv[2]); + if(distances[1]>margin) return false; //never intersect + } + } + else + { + //Look if we need to invert the triangle + distances[1] = (dv[0]+dv[1]+dv[2])/3.0f; //centroid + + if(distances[1]<0.0f) + { + //reorder triangle v + VEC_SWAP(tu_vertices[0],tu_vertices[1]); + VEC_SCALE_4(tu_plane,-1.0f,tu_plane); + + distances[1] = GIM_MAX3(dv[0],dv[1],dv[2]); + distances[1] = -distances[1]; + } + else + { + distances[1] = GIM_MIN3(dv[0],dv[1],dv[2]); + } + } + + GUINT bl; + /* bl = cross_line_intersection_test(); + if(bl==3) + { + //take edge direction too + bl = distances.maxAxis(); + } + else + {*/ + bl = 0; + if(distances[0]margin) return false; + + contacts.m_penetration_depth = -distances[2] + margin; + contacts.m_points[0] = closest_point_v; + contacts.m_point_count = 1; + VEC_COPY(contacts.m_separating_normal,edge_edge_dir); + + return true; + } + + //clip face against other + + + GUINT point_count; + //TODO + if(bl == 0) //clip U points against V + { + point_count = clip_triangle(tv_plane,tv_vertices,tu_vertices,contact_points); + if(point_count == 0) return false; + contacts.merge_points(tv_plane,margin,contact_points,point_count); + } + else //clip V points against U + { + point_count = clip_triangle(tu_plane,tu_vertices,tv_vertices,contact_points); + if(point_count == 0) return false; + contacts.merge_points(tu_plane,margin,contact_points,point_count); + contacts.m_separating_normal *= -1.f; + } + if(contacts.m_point_count == 0) return false; + return true; + } + +}; + + +/*class _GIM_TRIANGLE_CALCULATION_CACHE +{ +public: + GREAL margin; + GUINT clipped_count; + btVector3 tu_vertices[3]; + btVector3 tv_vertices[3]; + btVector3 temp_points[MAX_TRI_CLIPPING]; + btVector3 temp_points1[MAX_TRI_CLIPPING]; + btVector3 clipped_points[MAX_TRI_CLIPPING]; + GIM_TRIANGLE_CONTACT_DATA contacts1; + GIM_TRIANGLE_CONTACT_DATA contacts2; + + + //! clip triangle + GUINT clip_triangle( + const btVector4 & tri_plane, + const btVector3 * tripoints, + const btVector3 * srcpoints, + btVector3 * clipped_points) + { + // edge 0 + + btVector4 edgeplane; + + EDGE_PLANE(tripoints[0],tripoints[1],tri_plane,edgeplane); + + GUINT clipped_count = PLANE_CLIP_TRIANGLE3D( + edgeplane,srcpoints[0],srcpoints[1],srcpoints[2],temp_points); + + if(clipped_count == 0) return 0; + + // edge 1 + + EDGE_PLANE(tripoints[1],tripoints[2],tri_plane,edgeplane); + + clipped_count = PLANE_CLIP_POLYGON3D( + edgeplane,temp_points,clipped_count,temp_points1); + + if(clipped_count == 0) return 0; + + // edge 2 + + EDGE_PLANE(tripoints[2],tripoints[0],tri_plane,edgeplane); + + clipped_count = PLANE_CLIP_POLYGON3D( + edgeplane,temp_points1,clipped_count,clipped_points); + + return clipped_count; + } + + + + + //! collides only on one side + bool triangle_collision( + const btVector3 & u0, + const btVector3 & u1, + const btVector3 & u2, + GREAL margin_u, + const btVector3 & v0, + const btVector3 & v1, + const btVector3 & v2, + GREAL margin_v, + GIM_TRIANGLE_CONTACT_DATA & contacts) + { + + margin = margin_u + margin_v; + + + tu_vertices[0] = u0; + tu_vertices[1] = u1; + tu_vertices[2] = u2; + + tv_vertices[0] = v0; + tv_vertices[1] = v1; + tv_vertices[2] = v2; + + //create planes + // plane v vs U points + + + TRIANGLE_PLANE(tv_vertices[0],tv_vertices[1],tv_vertices[2],contacts1.m_separating_normal); + + clipped_count = clip_triangle( + contacts1.m_separating_normal,tv_vertices,tu_vertices,clipped_points); + + if(clipped_count == 0 ) + { + return false;//Reject + } + + //find most deep interval face1 + contacts1.merge_points(contacts1.m_separating_normal,margin,clipped_points,clipped_count); + if(contacts1.m_point_count == 0) return false; // too far + + //Normal pointing to triangle1 + //contacts1.m_separating_normal *= -1.f; + + //Clip tri1 by tri2 edges + + TRIANGLE_PLANE(tu_vertices[0],tu_vertices[1],tu_vertices[2],contacts2.m_separating_normal); + + clipped_count = clip_triangle( + contacts2.m_separating_normal,tu_vertices,tv_vertices,clipped_points); + + if(clipped_count == 0 ) + { + return false;//Reject + } + + //find most deep interval face1 + contacts2.merge_points(contacts2.m_separating_normal,margin,clipped_points,clipped_count); + if(contacts2.m_point_count == 0) return false; // too far + + contacts2.m_separating_normal *= -1.f; + + ////check most dir for contacts + if(contacts2.m_penetration_depth