
*************************************************************************
*                                                                       *
*  TCollisionTester3DX  vs 1.01                                          *
*                                                                       *
*************************************************************************

 This Delphi 4.0 component is CopyRight:

 Henrik Fabricius, 16th of August 1999
 http://users.cybercity.dk/~bbl6194/delphi3dx.htm
 E-mail: henrik_og_bodil@vip.cybercity.dk

 You may use this component for free on the following conditions:
 1) this text must remain part of the unit.
 2) Any proposals for changes or improvements should be addressed directly to
    the copyright owner Henrik Fabricius
 3) The use of this component is on your own risk. The software is provided
    as is without any garanties and warranty. The CopyRight Owner is not
    responsible for any damage or losses of any kind caused by the use of this
    software or the software it is intended to be used with.

 To place a link for down-loads of this component on your homepage
 please place a link to the Delphi3DX page where the latest version
 is available.

 To use this component you must have
 1) Delphi 4
 2) MS-DirectX 6.0 or higher
 3) the DelphiX components from Hori in Japan

 MS-DirectX is a trademark of the Microsoft Corporation
 Delphi 4 is a trademark of the Inprise Corporation

 Use this component to check for collisions between 3D objects in
 Direct3D games.
 Place your 3D-objects in a world described by :
 - DXDrawUsed -

 Surround each of your 3D object by at least one collision object
 which must be a member of the following primitives :
 - box3D - sphere3D - ellipsoid3D - cylinder3D - conus3D -
 available CollOrientations are :
 - Symmetric_X - Symmetric_Y - Symmetric_Z -
 available material properties are :
 - solid3D - water3D - air3D
 the size of the small end of the conus is described by the property
 - PercentLeftatTop -
 a negative value means that the top is downwards
 available functional properties are :
 - Pickable - Shootable - Fixed3DObject

 Add each object by specifying :
 - FrameSeries - NextAddMesh - CoverWholeMesh -
 - IndexOf3DSeries - IndexOf3DObject - IndexOf3DElement -
 if coverWholeMesh is false then specify a box containing the part of the
 3D object which should be covered by the coll object by the commands
 - BoxPartMin(x,y,z) - BoxPartMax(x,y,z) -
 Finally add the collision object by executing the command
 - AddCollisionObject -

 Group the 3D-objects in series with different material
 or functional properties

 Bullets are described by the following properties :
 - BulletRadius - BulletRange - BulletFrame - LongShots -
 LongShots moves with a unlimited speed reaching the objects immediately

 The actor is described by :
 - FrontDistance - HeadRadius -

 The camera-frame and the bullet-frames move each time the move command
 is used in the main program.
 Execute the following commands prior to each move command :
  - GetOldEyePos - GetOldBulletPos -
 The collisionTester needs this information to test for a possible collision
 in between the starting and the ending points of the Eye/bullet

 Test for collision with the following function calls :
 - if CollisionTester3DX1.Collision then ..
 - if CollisionTester3DX1.BulletCollision then ..
 On collision read the HitLinkNr and the properties of the collision object

 Destroy 3D collisionobjects by specifying :
  - NextDestroyNr - IndexOfSeries -
 and the executing command DestroyCollisionObject

 Initialize the collisionTester with the command :
 - CollisionTester3DX1.ZeroSetIt -
 This must always be done when DXDraw is initialized


 To install the component:
 -------------------------
 1) place this unit and the dcr file in the same directory as DelphiX
 2) In Delphi you must click on Component - Install Component
 3) Select the colli3DX.pas file and choose the DelphiX package to  install it
 4) Rebuild the library
 5) Look for a new icon with a bomb on the page named DelphiX

 To learn to use the component:
 ------------------------------
 1) Go to the Delphi3DX page at http://users.cybercity.dk/~bbl6194/delphi3dx.htm 
 2) Download the tutorial example (a 3D shoot them up game).


 History
 --------------------
 15th of August 1999 : TCollisionTester3DX was uploaded to the DELPHI3DX page.
 16th of August 1999 : The command ZeroSetIt was included.

 Good Luck
 Henrik Fabricius


 Look for Delphi3DX components, updates and gaming examples at the Delphi3DX home

 http://users.cybercity.dk/~bbl6194/delphi3dx.htm




