Index: include/ode/collision.h
===================================================================
--- include/ode/collision.h	(revision 1689)
+++ include/ode/collision.h	(working copy)
@@ -959,10 +959,14 @@
  * These flags are currently only noticed by the trimesh collider, because
  * they can make a major differences there.
  */
-ODE_API void dGeomRaySetParams (dGeomID g, int FirstContact, int BackfaceCull);
-ODE_API void dGeomRayGetParams (dGeomID g, int *FirstContact, int *BackfaceCull);
+ODE_API void dGeomRaySetParams (dGeomID g, int FirstContact, int BackfaceCull); // depreciated
+ODE_API void dGeomRayGetParams (dGeomID g, int *FirstContact, int *BackfaceCull); // depreciated
+ODE_API void dGeomRaySetBackfaceCull (dGeomID g, int backfaceCull);
+ODE_API int dGeomRayGetBackfaceCull (dGeomID g);
 ODE_API void dGeomRaySetClosestHit (dGeomID g, int closestHit);
 ODE_API int dGeomRayGetClosestHit (dGeomID g);
+ODE_API void dGeomRaySetFirstContact (dGeomID g, int firstContact);
+ODE_API int dGeomRayGetFirstContact (dGeomID g);
 
 #include "collision_trimesh.h"
 
Index: include/ode/odecpp_collision.h
===================================================================
--- include/ode/odecpp_collision.h	(revision 1689)
+++ include/ode/odecpp_collision.h	(working copy)
@@ -363,10 +363,21 @@
     { dGeomRaySetParams (_id, firstContact, backfaceCull); }
   void getParams (int *firstContact, int *backfaceCull)
     { dGeomRayGetParams (_id, firstContact, backfaceCull); }
+    
+  void setBackfaceCull (int backfaceCull)
+    { dGeomRaySetBackfaceCull (_id, backfaceCull); }
+  int getBackfaceCull()
+    { return dGeomRayGetBackfaceCull (_id); }
+    
   void setClosestHit (int closestHit)
     { dGeomRaySetClosestHit (_id, closestHit); }
   int getClosestHit()
     { return dGeomRayGetClosestHit (_id); }
+    
+  void setFirstContact (int firstContact)
+    { dGeomRaySetFirstContact (_id, firstContact); }
+  int getFirstContact()
+    { return dGeomRayGetFirstContact (_id); }
 };
 
 
Index: ode/src/ray.cpp
===================================================================
--- ode/src/ray.cpp	(revision 1689)
+++ ode/src/ray.cpp	(working copy)
@@ -147,6 +147,7 @@
 }
 
 
+// depreciated
 void dGeomRaySetParams (dxGeom *g, int FirstContact, int BackfaceCull)
 {
   dUASSERT (g && g->type == dRayClass,"argument not a ray");
@@ -161,8 +162,6 @@
   }
   else g->gflags &= ~RAY_BACKFACECULL;
 }
-
-
 void dGeomRayGetParams (dxGeom *g, int *FirstContact, int *BackfaceCull)
 {
   dUASSERT (g && g->type == dRayClass,"argument not a ray");
@@ -172,20 +171,54 @@
 }
 
 
-void dGeomRaySetClosestHit (dxGeom *g, int closestHit)
+// set/get backface culling flag
+void dGeomRaySetBackfaceCull (dxGeom *g, int backfaceCull)
 {
-  dUASSERT (g && g->type == dRayClass,"argument not a ray");
-  if (closestHit){
-    g->gflags |= RAY_CLOSEST_HIT;
-  }
-  else g->gflags &= ~RAY_CLOSEST_HIT;
+ dUASSERT (g && g->type == dRayClass,"argument not a ray");
+ if (backfaceCull) {
+  g->gflags |= RAY_BACKFACECULL;
+ } else {
+  g->gflags &= ~RAY_BACKFACECULL;
+ }
 }
+int dGeomRayGetBackfaceCull (dxGeom *g)
+{
+ dUASSERT (g && g->type == dRayClass,"argument not a ray");
+ return ((g->gflags & RAY_BACKFACECULL) != 0);
+}
 
 
+// set/get first contact flag
+void dGeomRaySetFirstContact (dxGeom *g, int firstContact)
+{
+ dUASSERT (g && g->type == dRayClass,"argument not a ray");
+ if (firstContact) {
+  g->gflags |= RAY_FIRSTCONTACT;
+ } else {
+  g->gflags &= ~RAY_FIRSTCONTACT;
+ }
+}
+int dGeomRayGetFirstContact (dxGeom *g)
+{
+ dUASSERT (g && g->type == dRayClass,"argument not a ray");
+ return ((g->gflags & RAY_FIRSTCONTACT) != 0);
+}
+
+
+// set/get closest hit flag
+void dGeomRaySetClosestHit (dxGeom *g, int closestHit)
+{
+ dUASSERT (g && g->type == dRayClass,"argument not a ray");
+ if (closestHit) {
+  g->gflags |= RAY_CLOSEST_HIT;
+ } else {
+  g->gflags &= ~RAY_CLOSEST_HIT;
+ }
+}
 int dGeomRayGetClosestHit (dxGeom *g)
 {
-  dUASSERT (g && g->type == dRayClass,"argument not a ray");
-  return ((g->gflags & RAY_CLOSEST_HIT) != 0);
+ dUASSERT (g && g->type == dRayClass,"argument not a ray");
+ return ((g->gflags & RAY_CLOSEST_HIT) != 0);
 }
 
 
