public void step(int pause)
{
ds.SetColor(1.0f, 1.0f, 0.0f);
ds.SetTexture(ds.Texture.Wood);
lock (_prims)
{
foreach (OdePrim prm in _prims)
{
//IntPtr body = d.GeomGetBody(prm.prim_geom);
if (prm.prim_geom != IntPtr.Zero)
{
d.Vector3 pos;
d.GeomCopyPosition(prm.prim_geom, out pos);
//d.BodyCopyPosition(body, out pos);
d.Matrix3 R;
d.GeomCopyRotation(prm.prim_geom, out R);
//d.BodyCopyRotation(body, out R);
d.Vector3 sides = new d.Vector3();
sides.X = prm.Size.X;
sides.Y = prm.Size.Y;
sides.Z = prm.Size.Z;
ds.DrawBox(ref pos, ref R, ref sides);
}
}
}
ds.SetColor(1.0f, 0.0f, 0.0f);
lock (_characters)
{
foreach (OdeCharacter chr in _characters)
{
if (chr.Shell != IntPtr.Zero)
{
IntPtr body = d.GeomGetBody(chr.Shell);
d.Vector3 pos;
d.GeomCopyPosition(chr.Shell, out pos);
//d.BodyCopyPosition(body, out pos);
d.Matrix3 R;
d.GeomCopyRotation(chr.Shell, out R);
//d.BodyCopyRotation(body, out R);
ds.DrawCapsule(ref pos, ref R, chr.Size.Z, 0.35f);
d.Vector3 sides = new d.Vector3();
sides.X = 0.5f;
sides.Y = 0.5f;
sides.Z = 0.5f;
ds.DrawBox(ref pos, ref R, ref sides);
}
}
}
}