1 |
25010c40
|
kovi
|
using System.Collections;
|
2 |
|
|
using System.Collections.Generic;
|
3 |
|
|
using UnityEngine;
|
4 |
|
|
using DeltaRobotVr;
|
5 |
|
|
|
6 |
|
|
public class MyTools
|
7 |
|
|
{
|
8 |
|
|
public static Vector3 Single3Transform(float x, float y, float z)
|
9 |
|
|
{
|
10 |
|
|
return new Vector3(x, y, -z) * Constants.PositionScale;
|
11 |
|
|
}
|
12 |
|
|
|
13 |
|
|
public static Vector3[] Single3Transform(Single3[] curve)
|
14 |
|
|
{
|
15 |
|
|
var vectors = new Vector3[curve.Length];
|
16 |
|
|
for(int i = 0; i < curve.Length; i++)
|
17 |
|
|
{
|
18 |
|
|
var point = curve[i];
|
19 |
|
|
vectors[i] = Single3Transform(point.X, point.Y, point.Z);
|
20 |
|
|
}
|
21 |
|
|
return vectors;
|
22 |
|
|
}
|
23 |
|
|
}
|