in 
http://www.crystalspace3d.org/docs/online/manual/Api1_005f2-iPolygonMesh.php#0
it says: "The iPolygonMesh interface and everything related to that interface 
has been deprecated"

It says to use iTriangle instead.

However, I used iPolygon3DStatic and I cannot find iTriangle3DStatic so I have 
no idea how to update my code.


I made an iPolygon3DStatic out of verticies manually as you can see from my 
code.  All my code is doing is creating a cube to do "upper body collision 
detection", somewhere else is my "lower body collision detection".  Maybe since 
iPolygon3DStatic is no longer in CS 1.0, there is another way of constructing a 
cube for collision detection?

csRef<iPolygon3DStatic> p;
  csRef < iPolygonMesh > mesh;


//  printf("%f,%f",OY,DY);
//  printf("%f,%f\n",OYL,DYL);

  csRef < iPluginManager >
    plugin_mgr (CS_QUERY_REGISTRY (object_reg, iPluginManager));


ThingType= (CS_QUERY_PLUGIN_CLASS 
(plugin_mgr,"crystalspace.mesh.object.thing",iMeshObjectType));


  if (!ThingType)
    ThingType = CS_LOAD_PLUGIN (plugin_mgr,
    "crystalspace.mesh.object.thing",
    iMeshObjectType);


  csRef < iMeshObjectFactory > thing_fact (ThingType->NewFactory ());
  csRef < iMeshObject > mesh_obj = thing_fact->NewInstance();

  plbody1 = Engine->CreateMeshWrapper (mesh_obj, "Collide: Player's Body");

  csRef < iThingState > ts = SCF_QUERY_INTERFACE(mesh_obj, iThingState);
  csRef < iThingFactoryState> thing_state 
    = ts->GetFactory();

  thing_state->CreateVertex (csVector3 (-DX_2, OY, -DZ_2));
  thing_state->CreateVertex (csVector3 (-DX_2, OY, DZ_2));
  thing_state->CreateVertex (csVector3 (-DX_2, OY + DY, DZ_2));
  thing_state->CreateVertex (csVector3 (-DX_2, OY + DY, -DZ_2));
  thing_state->CreateVertex (csVector3 (DX_2, OY, -DZ_2));
  thing_state->CreateVertex (csVector3 (DX_2, OY, DZ_2));
  thing_state->CreateVertex (csVector3 (DX_2, OY + DY, DZ_2));
  thing_state->CreateVertex (csVector3 (DX_2, OY + DY, -DZ_2));

  // Left
  p = thing_state->CreatePolygon ();
  p->CreateVertex (0);
  p->CreateVertex (1);
  p->CreateVertex (2);
  p->CreateVertex (3);

  // Right
  p = thing_state->CreatePolygon ();
  p->CreateVertex (4);
  p->CreateVertex (5);
  p->CreateVertex (6);
  p->CreateVertex (7);

  // Bottom
  p = thing_state->CreatePolygon ();
  p->CreateVertex (0);
  p->CreateVertex (1);
  p->CreateVertex (5);
  p->CreateVertex (4);

  // Top
  p = thing_state->CreatePolygon ();
  p->CreateVertex (3);
  p->CreateVertex (2);
  p->CreateVertex (6);
  p->CreateVertex (7);

  // Front
  p = thing_state->CreatePolygon ();
  p->CreateVertex (1);
  p->CreateVertex (5);
  p->CreateVertex (6);
  p->CreateVertex (2);

  // Back
  p = thing_state->CreatePolygon ();
  p->CreateVertex (0);
  p->CreateVertex (4);
  p->CreateVertex (7);
  p->CreateVertex (3);




  mesh = SCF_QUERY_INTERFACE (mesh_obj, iPolygonMesh);
  body1 =
    new csColliderWrapper (plbody1->QueryObject (), cdsys, mesh);


       
---------------------------------
Luggage? GPS? Comic books? 
Check out fitting  gifts for grads at Yahoo! Search.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Crystal-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crystal-main
Unsubscribe: mailto:[EMAIL PROTECTED]

Reply via email to