Project

General

Profile

« Previous | Next » 

Revision 4f81e0c8

Added by Leszek Koltunski almost 4 years ago

In library: allow a mixture of a deep and shallow copy of a Mesh ( mVertAttribs1 might be copied deeply or shallowly, mVertAttribs2 are always copied deeeply).
Port RubikCube to the new library.

View differences:

src/main/java/org/distorted/library/mesh/MeshCubes.java
935 935

  
936 936
///////////////////////////////////////////////////////////////////////////////////////////////////
937 937
/**
938
 * deep copy.
938
 * Copy constructor.
939 939
 */
940
 public MeshCubes(MeshCubes mesh)
940
 public MeshCubes(MeshCubes mesh, boolean deep)
941 941
   {
942
   super(mesh);
942
   super(mesh,deep);
943 943
   }
944 944

  
945 945
///////////////////////////////////////////////////////////////////////////////////////////////////
946 946
/**
947
 * deep copy.
947
 * Copy the Mesh.
948
 *
949
 * @param deep If to be a deep or shallow copy of mVertAttribs1, i.e. the array holding vertices,
950
 *             normals and inflates (the rest, in particular the mVertAttribs2 containing texture
951
 *             coordinates and effect assocciations, is always deep copied).
948 952
 */
949
 public MeshCubes deepCopy()
953
 public MeshCubes copy(boolean deep)
950 954
   {
951
   return new MeshCubes(this);
955
   return new MeshCubes(this,deep);
952 956
   }
953 957
 }

Also available in: Unified diff