Exemplo n.º 1
0
  // -----------------------------------------------------------------------
  public void AssignMesh(int id) {
    if (id >= 0) {
      this.mesh_id = id;
      this.BBOX.CalcFromMesh(this.mesh_id);
      F3D.Log.info("TF3D_Body", "Assigned mesh = '" + F3D.Meshes.Get(this.mesh_id).name + "'");
      this.ReadAssignedSurfaces();

    } else {
      F3D.Log.error(
          "TF3D_Body",
          "AssignMesh() : index of assigned MeshName is -1 (Mesh name doesn't exist.)");
    }
  }
Exemplo n.º 2
0
  // -----------------------------------------------------------------------
  public void AssignMesh(String meshname) {
    int id = F3D.Meshes.FindByName(meshname);

    if (id >= 0) {
      this.mesh_id = id;
      this.BBOX.CalcFromMesh(this.mesh_id);
      F3D.Log.info("TF3D_Body", "Assigned mesh = '" + name + "'");

      this.ReadAssignedSurfaces();
    } else {
      F3D.Log.error(
          "TF3D_Body",
          "AssignMesh() : index of assigned MeshName is -1 (Mesh '"
              + meshname
              + "' doesn't exist.)");
    }
  }
Exemplo n.º 3
0
 public void AssignCollisionMesh(String coll_mesh_name) {
   int id = F3D.Meshes.FindByName(coll_mesh_name);
   if (id > 0) {
     this.collision_mesh_id = id;
   }
 }