Hey Guys, I’ve got the following float array…
public static float camObjCoord[] = new float[] {
-2.0f, -1.5f, -6.0f,
2.0f, -1.5f, -6.0f,
-2.0f, 1.5f, -6.0f,
2.0f, 1.5f, -6.0f,
-2.0f, -1.5f, -10.0f,
-2.0f, 1.5f, -10.0f,
2.0f, -1.5f, -10.0f,
2.0f, 1.5f, -10.0f,
-2.0f, -1.5f, -6.0f,
-2.0f, 1.5f, -6.0f,
-2.0f, -1.5f, -10.0f,
-2.0f, 1.5f, -10.0f,
2.0f, -1.5f, -10.0f,
2.0f, 1.5f, -10.0f,
2.0f, -1.5f, -6.0f,
2.0f, 1.5f, -6.0f,
-2.0f, 1.5f, -6.0f,
2.0f, 1.5f, -6.0f,
-2.0f, 1.5f, -6.0f,
2.0f, 1.5f, -10.0f,
-2.0f, -1.5f, -6.0f,
-2.0f, -1.5f, -10.0f,
2.0f, -1.5f, -6.0f,
2.0f, -1.5f, -10.0f,
-2.0f, 2.5f, -6.0f,
2.0f, 2.5f, -6.0f,
-2.0f, 4.5f, -6.0f,
2.0f, 4.5f, -6.0f,
-2.0f, 2.5f, -10.0f,
-2.0f, 4.5f, -10.0f,
2.0f, 2.5f, -10.0f,
2.0f, 4.5f, -10.0f,
-2.0f, 2.5f, -6.0f,
-2.0f, 4.5f, -6.0f,
-2.0f, 2.5f, -10.0f,
-2.0f, 4.5f, -10.0f,
2.0f, 2.5f, -10.0f,
2.0f, 4.5f, -10.0f,
2.0f, 2.5f, -6.0f,
2.0f, 4.5f, -6.0f,
-2.0f, 4.5f, -6.0f,
2.0f, 4.5f, -6.0f,
-2.0f, 4.5f, -6.0f,
2.0f, 4.5f, -10.0f,
-2.0f, 2.5f, -6.0f,
-2.0f, 2.5f, -10.0f,
2.0f, 2.5f, -6.0f,
2.0f, 2.5f, -10.0f,
};
I’ve got a method after it which I would like to add values to the end of the array but it’s telling me it can’t find camObjCoord, any idea why?
Some important points:
N+1, copying allNelements, and then adding the extra element, but this is a costly highly-inefficientO(N)operation to add a single elementfloatis a 3D point. You should seriously considering defining aPoint3Dcustom type to hold your data.List<Point3d>float, you should usedoubleinstead