I want get tow PointArray of the Geometry at different position.
But I always get the same PointArray at different Position.
Here is parts of my program:
//I use PositionInterpolator to move the Geometry via x axis.
//and I have get the Geometry.
Geometry g = myShape.getGeometry(); //myShape is a shape3D from the .obj file
Point3f p3f1 = new Point3f[ 360 ];
for( int i = 0; i < 360; i ++ )
p3f1[ i ] = new Point3f();
if( g instanceof GeometryArray )
( ( GeometryArray ) g ).getCoordinates( 0, p3f1 );
//Now I'm getting tow PointArray
Point3f pArray1 = new Point3f[ 360 ];
Point3f pArray2 = new Point3f[ 360 ];
for( int i = 0; i < 306; i ++ )
pArray1[ i ] = p3f1[ i ];
pArray1[ i ].x = 0.2f; //set PointArray at the start position of the PositionInterpolator
pArray2[ i ] = p3f1[ i ]; //get the PointArray during the moving
But When I change pArray1[ i ].x, the pArray2[ i ].x also changed and it also equals 0.2f.
What problem I have met?
How to solve it?