Class: dcollider

Subclasses can perform collision detection.

Hierarchy

o-+ ode
  o-+ dcollider
    o-+ dgeom
    | o-- dgeombox
    | o-- dgeomccylinder
    | o-- dgeomcylinder
    | o-- dgeomplane
    | o-- dgeomray
    | o-- dgeomsphere
    | o-- dgeomtransform
    | o-- dgeomtrimesh
    | o-- dterrain
    o-+ dspace
    | o-- dspacehash
    | o-- dspacequad
    | o-- dspacesimple

Methods:

Method overview:


delete (dcollider)
returns: ()
deletes a dcollider
test (dcollider,dcollider, [string whichresults])
returns: (int count,[table pos, table normal, table depth, table geom, table tri])

tests two dcolliders against each other and returns the number of contacts, the position coordinates as a floatarray (x,y,z,...), the normals as a floatarray, the depth as a floatarray (d1,d2,...), the contactgeoms as a table and triangle data as floatarry (index,u,v,...).

   The whichresults string describes which kind of results are returned. Each character			   stands for a tableresult where the characters are:

* 'p': positional arrayinformation * 'n': collision normals * 'd': depth information * 'g': geom information * 't': triangle information

If no string is passed, the returned values are as shown above, otherwise the appropriate arrays are returned in the given order specified by the passed string. If the string contains other characters, an error is thrown. Triangle information is only accurate when testing with rays and raytrisresult-enabled dgeomtrimeshes, else the triangle index is -1
testnear (dcollider a, dcollider b, int maxcount)
returns: (int count,table geomi])
tests two geoms if they are near each other (aaboxes overlap).
testtriarray (dcollider a, dcollider b, int maxcount)
returns: (int count,table geomi,table tristart,table triall])
tests two geoms for intersecting triangles. Only works if triarrayresult is activated for the included trimeshgeoms. Each collision pair results into trigeom/geom pair in geomi table. Associated with startindex/numberoftris pair tristart. Startindex maps as offset index into triall, which then has numberoftris*3 int indices.

Inherited Methods: