Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Vector3
- {
- float[] mainArray; //referencja na główną tablicę
- static List<Vector3> CreateForArray(float[] mainArray)
- {
- List<Vector3> arrayList = new ArrayList<Vector
- for(int i = 0; i < mainArray.length / 3; i++)
- {
- Vector3 v3 = new Vector3(i*3, mainArray);
- arrayList.add(v3);
- }
- return arrayList;
- }
- int offset;
- Vector3(int offset, float[] mainArray)
- {
- this.offset = offset;
- this.mainArray = mainArray;
- }
- float getX()
- {
- return mainArray[offset];
- }
- float getY()
- {
- return mainArray[offset + 1];
- }
- float getZ()
- {
- return mainArray[offset + 2];
- }
- void set(float x, float y, float z)
- {
- mainArray[offset] = x;
- mainArray[offset + 1] = y;
- mainArray[offset + 2] = z;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement