Table of Contents
List of Figures
Table of Contents
GIMPACT is a software library written in C language, which consists on a set of geometric tools focused designed for support projects based on Virtual Reality.
In this release it gives tools for contact surface determination for physics objects. This is important in Virtual Reality simulation and games, because bodies interact between them reacting to applied forces resulting from collisions.
GIMPACT collision functions can be used in other physics libraries, take as example Open Dynamics Engine. In this case was necessary to drop out OPCODE system in favor of GIMPACT. As consecuence of this, ODE improves its trimesh collision functionallity with a very superior performance; the buggy trimesh behavior was fixed definitively.
Another advantage of GIMPACT is that it doesn't have hierarchy structures (trees), unlike OPCODE. It gives to GIMPACT the capability of managing dynamic trimeshes like deformable bodies and cloth.
See how GIMPACT allows to implement trimesh collisions successfully in section Integration of GIMPACT with other packages.
GIMPACT collision routines were implemented optimally: it consumes very litle processor resources thanks of its simple design and it takes advantage of precalculated results in cache.
Table of Contents
GIMPACT uses the Right Hand Coordinate System:
Object surfaces are often represented as discrete aproximations which consists on a set of vertices and triangular faces.
A trimesh has the following attributes:
Take the following trimesh example:
Notice that:
GIMPACT design was developed in mind for taking advantage of multi-processing capabilities of modern computers and also for distributed architechture enviroment (GRID Processing).
For that reason GIMPACT implements a memory management system which allows getting access to data wich would comes from many memory sources (System memory, GPU video memory etc.) althougt it protects the memory access on concurrent processes. For example , in a modern PC we will found the following memory sources:
But at this moment, GIMPACT only suports system memory access. In next releases it will support paralele processing and SIMD instructions.
GIMPACT have these memory management systems: Buffers and Dynamic arrays.
A buffer refers to a memory resource which belongs to a Memory Manager. At this moment there are these avaliable memory managers :
GIMPACT requires to initialize its internal structures before using its memory routines.
![]() | Important |
---|---|
Before using GIMPACT, call this function gimpact_init() for initializing its internal structures. |
![]() | Important |
---|---|
At end call gimpact_terminate() for releasing memory resources. |
For creating memory buffers you would use the following methods:
For accessing buffers like accessing to an array, use BUFFER ARRAYS. There is an example in BUFFER ARRAYS Details
Dynamic arrays are data structures for general purpose collections. They are created on system memory, and have the hability of change their size, adding and removing their elements.
See how to use them on :DYNAMIC ARRAYS
Use this function: gim_trimesh_create_from_data, it will create a trimesh from application native data.
If you want to create a trimesh from buffers (F.E. from video hardware memory) use gim_trimesh_create_from_arrays.
Trimeshes use buffers strongly, for supporting concurrent access and multi-processing, see Buffers.
Is recommended to see trimesh reference at: TRIMESH.
GIMPACT supports collisions between moving trimeshes and deformable bodies. On each interval simulations could modify the state of the trimesh, applying a linear transformation or changing their vertices directly. Then Trimeshes will update their structures quickly in a execution time near to O(log(n)) .
GIMPACT trimeshes have their vertices contained in a GBUFFER_ARRAY. See Buffers and BUFFER ARRAYS
See how to modify trimesh vertices at: TRIMESH.
GIMPACT have matrix transformations with these types:mat2f,mat3f y mat4f. Matrices are row oriented:
Para saber como aplicar transformaciones lineales a los vertices de una superficie triángular, vease TRIMESH.
Table of Contents
For accelerating the collision process it is necessary to avoid expensive calculations detecting which pairs of objects won't intersect.
So it is necessary to approximate objects geometry to simple shapes like spheres or rectangular boxes:
AABB means Axis Aligned Bounding Box, which is used for approximating the space ocupied by a solid object:
One of the most common collision problems is finding which pairs of objects are near to intersect. This stage of process is known as Broad Phase, which consists of verify very quickly which objects could intersect, by evaluating AABB collisions. With this previus verification is posible to avoid expensive calculations implied on detailed collisions per triangle based.
See how is posible to avoid executing collision commands when objects won't intersect, independently of their geometric shape.
For avoid executing NxN compairisons, GIMPACT uses a sweep based technique which orders AABB corners, reducing the complexity to O(log(N)); In many cases we have a linear complexity of O(N). This technique is known as Box Prunning.
See how to find collision pairs on gim_aabbset_self_intersections(). Also visit BOX_PRUNNING
Will be implemented in next releases of GIMPACT.
Integrating GIMPACT with ODE has had successfully results. Now is possible to make physical collisions between moving trimeshes correctly:
Download the new version of ODE with GIMPACT at: ode-gimpact.zip.
![]() | Important |
---|---|
CODE::BLOCKS IDE with MingW compiler are highly recommended for building ODE-GIMPACT sources.
|
![]() | Important |
---|---|
Some additional commands must be called for supporting the new changes to ODE.
|
Gammaleon is a 3D engine which integrates physics on its simulations. Organizes the worlds in Rooms and Sectors.
Gammaleon uses ODE and GIMPACT for implement complex physics simulations. Its most outstanding features are:
Download Gammaleon at: gammaleon.zip.
![]() | Important |
---|---|
CODE::BLOCKS IDE with MingW compiler are highly recommended for building Gammaleon sources.
|
Table of Contents
CODE::BLOCKS has been the most successfull Free IDE for C/C++ programming. It is highly recommended for building GIMPACT sources, although Mingw compiler is strongly used:
Table of Contents