Revize 25010c40
Přidáno uživatelem Miloslav Kovář před téměř 4 roky(ů)
deltarobot-vr/Assets/CDArrowMaterial.mat | ||
---|---|---|
1 |
%YAML 1.1 |
|
2 |
%TAG !u! tag:unity3d.com,2011: |
|
3 |
--- !u!21 &2100000 |
|
4 |
Material: |
|
5 |
serializedVersion: 6 |
|
6 |
m_ObjectHideFlags: 0 |
|
7 |
m_CorrespondingSourceObject: {fileID: 0} |
|
8 |
m_PrefabInstance: {fileID: 0} |
|
9 |
m_PrefabAsset: {fileID: 0} |
|
10 |
m_Name: CDArrowMaterial |
|
11 |
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} |
|
12 |
m_ShaderKeywords: |
|
13 |
m_LightmapFlags: 4 |
|
14 |
m_EnableInstancingVariants: 0 |
|
15 |
m_DoubleSidedGI: 0 |
|
16 |
m_CustomRenderQueue: -1 |
|
17 |
stringTagMap: {} |
|
18 |
disabledShaderPasses: [] |
|
19 |
m_SavedProperties: |
|
20 |
serializedVersion: 3 |
|
21 |
m_TexEnvs: |
|
22 |
- _BumpMap: |
|
23 |
m_Texture: {fileID: 0} |
|
24 |
m_Scale: {x: 1, y: 1} |
|
25 |
m_Offset: {x: 0, y: 0} |
|
26 |
- _DetailAlbedoMap: |
|
27 |
m_Texture: {fileID: 0} |
|
28 |
m_Scale: {x: 1, y: 1} |
|
29 |
m_Offset: {x: 0, y: 0} |
|
30 |
- _DetailMask: |
|
31 |
m_Texture: {fileID: 0} |
|
32 |
m_Scale: {x: 1, y: 1} |
|
33 |
m_Offset: {x: 0, y: 0} |
|
34 |
- _DetailNormalMap: |
|
35 |
m_Texture: {fileID: 0} |
|
36 |
m_Scale: {x: 1, y: 1} |
|
37 |
m_Offset: {x: 0, y: 0} |
|
38 |
- _EmissionMap: |
|
39 |
m_Texture: {fileID: 0} |
|
40 |
m_Scale: {x: 1, y: 1} |
|
41 |
m_Offset: {x: 0, y: 0} |
|
42 |
- _MainTex: |
|
43 |
m_Texture: {fileID: 0} |
|
44 |
m_Scale: {x: 1, y: 1} |
|
45 |
m_Offset: {x: 0, y: 0} |
|
46 |
- _MetallicGlossMap: |
|
47 |
m_Texture: {fileID: 0} |
|
48 |
m_Scale: {x: 1, y: 1} |
|
49 |
m_Offset: {x: 0, y: 0} |
|
50 |
- _OcclusionMap: |
|
51 |
m_Texture: {fileID: 0} |
|
52 |
m_Scale: {x: 1, y: 1} |
|
53 |
m_Offset: {x: 0, y: 0} |
|
54 |
- _ParallaxMap: |
|
55 |
m_Texture: {fileID: 0} |
|
56 |
m_Scale: {x: 1, y: 1} |
|
57 |
m_Offset: {x: 0, y: 0} |
|
58 |
m_Floats: |
|
59 |
- _BumpScale: 1 |
|
60 |
- _Cutoff: 0.5 |
|
61 |
- _DetailNormalMapScale: 1 |
|
62 |
- _DstBlend: 0 |
|
63 |
- _GlossMapScale: 1 |
|
64 |
- _Glossiness: 0.5 |
|
65 |
- _GlossyReflections: 1 |
|
66 |
- _Metallic: 0 |
|
67 |
- _Mode: 0 |
|
68 |
- _OcclusionStrength: 1 |
|
69 |
- _Parallax: 0.02 |
|
70 |
- _SmoothnessTextureChannel: 0 |
|
71 |
- _SpecularHighlights: 1 |
|
72 |
- _SrcBlend: 1 |
|
73 |
- _UVSec: 0 |
|
74 |
- _ZWrite: 1 |
|
75 |
m_Colors: |
|
76 |
- _Color: {r: 0, g: 0.61987686, b: 1, a: 1} |
|
77 |
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} |
|
78 |
m_BuildTextureStacks: [] |
deltarobot-vr/Assets/CDArrowMaterial.mat.meta | ||
---|---|---|
1 |
fileFormatVersion: 2 |
|
2 |
guid: ba5e94541fd24e84d8a7cef22c83d162 |
|
3 |
NativeFormatImporter: |
|
4 |
externalObjects: {} |
|
5 |
mainObjectFileID: 2100000 |
|
6 |
userData: |
|
7 |
assetBundleName: |
|
8 |
assetBundleVariant: |
deltarobot-vr/Assets/CubeScript.cs | ||
---|---|---|
1 |
using DeltaRobotVr; |
|
2 |
using UnityEngine; |
|
3 |
|
|
4 |
public class CubeScript : MonoBehaviour |
|
5 |
{ |
|
6 |
private const float PositionScale = 0.001f; |
|
7 |
private const float LerpParam = 0.5f; |
|
8 |
|
|
9 |
private Transform _transform; |
|
10 |
|
|
11 |
void Start() |
|
12 |
{ |
|
13 |
_transform = GetComponent<Transform>(); |
|
14 |
|
|
15 |
Client.Instance.Start(); |
|
16 |
} |
|
17 |
|
|
18 |
void Update() |
|
19 |
{ |
|
20 |
if (Client.Instance.IsConnected) |
|
21 |
{ |
|
22 |
var serverPosition = Client.Instance.ActuatorPosition; |
|
23 |
var newPosition = new Vector3(serverPosition.X, serverPosition.Y, -serverPosition.Z) * PositionScale; |
|
24 |
_transform.position = Vector3.Lerp(_transform.position, newPosition, LerpParam); |
|
25 |
} |
|
26 |
} |
|
27 |
|
|
28 |
private void OnDestroy() |
|
29 |
{ |
|
30 |
Client.Instance.Stop(); |
|
31 |
} |
|
32 |
} |
deltarobot-vr/Assets/CubeScript.cs.meta | ||
---|---|---|
1 |
fileFormatVersion: 2 |
|
2 |
guid: cfafba4e0e8b6e0adb6dda9dbc5076f8 |
|
3 |
MonoImporter: |
|
4 |
externalObjects: {} |
|
5 |
serializedVersion: 2 |
|
6 |
defaultReferences: [] |
|
7 |
executionOrder: 0 |
|
8 |
icon: {instanceID: 0} |
|
9 |
userData: |
|
10 |
assetBundleName: |
|
11 |
assetBundleVariant: |
deltarobot-vr/Assets/CurveMaterial 1.mat | ||
---|---|---|
1 |
%YAML 1.1 |
|
2 |
%TAG !u! tag:unity3d.com,2011: |
|
3 |
--- !u!21 &2100000 |
|
4 |
Material: |
|
5 |
serializedVersion: 6 |
|
6 |
m_ObjectHideFlags: 0 |
|
7 |
m_CorrespondingSourceObject: {fileID: 0} |
|
8 |
m_PrefabInstance: {fileID: 0} |
|
9 |
m_PrefabAsset: {fileID: 0} |
|
10 |
m_Name: CurveMaterial 1 |
|
11 |
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} |
|
12 |
m_ShaderKeywords: |
|
13 |
m_LightmapFlags: 4 |
|
14 |
m_EnableInstancingVariants: 0 |
|
15 |
m_DoubleSidedGI: 0 |
|
16 |
m_CustomRenderQueue: -1 |
|
17 |
stringTagMap: {} |
|
18 |
disabledShaderPasses: [] |
|
19 |
m_SavedProperties: |
|
20 |
serializedVersion: 3 |
|
21 |
m_TexEnvs: |
|
22 |
- _BumpMap: |
|
23 |
m_Texture: {fileID: 0} |
|
24 |
m_Scale: {x: 1, y: 1} |
|
25 |
m_Offset: {x: 0, y: 0} |
|
26 |
- _DetailAlbedoMap: |
|
27 |
m_Texture: {fileID: 0} |
|
28 |
m_Scale: {x: 1, y: 1} |
|
29 |
m_Offset: {x: 0, y: 0} |
|
30 |
- _DetailMask: |
|
31 |
m_Texture: {fileID: 0} |
|
32 |
m_Scale: {x: 1, y: 1} |
|
33 |
m_Offset: {x: 0, y: 0} |
|
34 |
- _DetailNormalMap: |
|
35 |
m_Texture: {fileID: 0} |
|
36 |
m_Scale: {x: 1, y: 1} |
|
37 |
m_Offset: {x: 0, y: 0} |
|
38 |
- _EmissionMap: |
|
39 |
m_Texture: {fileID: 0} |
|
40 |
m_Scale: {x: 1, y: 1} |
|
41 |
m_Offset: {x: 0, y: 0} |
|
42 |
- _MainTex: |
|
43 |
m_Texture: {fileID: 0} |
|
44 |
m_Scale: {x: 1, y: 1} |
|
45 |
m_Offset: {x: 0, y: 0} |
|
46 |
- _MetallicGlossMap: |
|
47 |
m_Texture: {fileID: 0} |
|
48 |
m_Scale: {x: 1, y: 1} |
|
49 |
m_Offset: {x: 0, y: 0} |
|
50 |
- _OcclusionMap: |
|
51 |
m_Texture: {fileID: 0} |
|
52 |
m_Scale: {x: 1, y: 1} |
|
53 |
m_Offset: {x: 0, y: 0} |
|
54 |
- _ParallaxMap: |
|
55 |
m_Texture: {fileID: 0} |
|
56 |
m_Scale: {x: 1, y: 1} |
|
57 |
m_Offset: {x: 0, y: 0} |
|
58 |
m_Floats: |
|
59 |
- _BumpScale: 1 |
|
60 |
- _Cutoff: 0.5 |
|
61 |
- _DetailNormalMapScale: 1 |
|
62 |
- _DstBlend: 0 |
|
63 |
- _GlossMapScale: 1 |
|
64 |
- _Glossiness: 0.5 |
|
65 |
- _GlossyReflections: 1 |
|
66 |
- _Metallic: 0 |
|
67 |
- _Mode: 0 |
|
68 |
- _OcclusionStrength: 1 |
|
69 |
- _Parallax: 0.02 |
|
70 |
- _SmoothnessTextureChannel: 0 |
|
71 |
- _SpecularHighlights: 1 |
|
72 |
- _SrcBlend: 1 |
|
73 |
- _UVSec: 0 |
|
74 |
- _ZWrite: 1 |
|
75 |
m_Colors: |
|
76 |
- _Color: {r: 0, g: 0.61987686, b: 1, a: 1} |
|
77 |
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} |
|
78 |
m_BuildTextureStacks: [] |
deltarobot-vr/Assets/CurveMaterial 1.mat.meta | ||
---|---|---|
1 |
fileFormatVersion: 2 |
|
2 |
guid: 4fccf519985fbac4cafe474b1888cf3c |
|
3 |
NativeFormatImporter: |
|
4 |
externalObjects: {} |
|
5 |
mainObjectFileID: 2100000 |
|
6 |
userData: |
|
7 |
assetBundleName: |
|
8 |
assetBundleVariant: |
deltarobot-vr/Assets/DDArrowMaterial.mat | ||
---|---|---|
1 |
%YAML 1.1 |
|
2 |
%TAG !u! tag:unity3d.com,2011: |
|
3 |
--- !u!21 &2100000 |
|
4 |
Material: |
|
5 |
serializedVersion: 6 |
|
6 |
m_ObjectHideFlags: 0 |
|
7 |
m_CorrespondingSourceObject: {fileID: 0} |
|
8 |
m_PrefabInstance: {fileID: 0} |
|
9 |
m_PrefabAsset: {fileID: 0} |
|
10 |
m_Name: DDArrowMaterial |
|
11 |
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} |
|
12 |
m_ShaderKeywords: |
|
13 |
m_LightmapFlags: 4 |
|
14 |
m_EnableInstancingVariants: 0 |
|
15 |
m_DoubleSidedGI: 0 |
|
16 |
m_CustomRenderQueue: -1 |
|
17 |
stringTagMap: {} |
|
18 |
disabledShaderPasses: [] |
|
19 |
m_SavedProperties: |
|
20 |
serializedVersion: 3 |
|
21 |
m_TexEnvs: |
|
22 |
- _BumpMap: |
|
23 |
m_Texture: {fileID: 0} |
|
24 |
m_Scale: {x: 1, y: 1} |
|
25 |
m_Offset: {x: 0, y: 0} |
|
26 |
- _DetailAlbedoMap: |
|
27 |
m_Texture: {fileID: 0} |
|
28 |
m_Scale: {x: 1, y: 1} |
|
29 |
m_Offset: {x: 0, y: 0} |
|
30 |
- _DetailMask: |
|
31 |
m_Texture: {fileID: 0} |
|
32 |
m_Scale: {x: 1, y: 1} |
|
33 |
m_Offset: {x: 0, y: 0} |
|
34 |
- _DetailNormalMap: |
|
35 |
m_Texture: {fileID: 0} |
|
36 |
m_Scale: {x: 1, y: 1} |
|
37 |
m_Offset: {x: 0, y: 0} |
|
38 |
- _EmissionMap: |
|
39 |
m_Texture: {fileID: 0} |
|
40 |
m_Scale: {x: 1, y: 1} |
|
41 |
m_Offset: {x: 0, y: 0} |
|
42 |
- _MainTex: |
|
43 |
m_Texture: {fileID: 0} |
|
44 |
m_Scale: {x: 1, y: 1} |
|
45 |
m_Offset: {x: 0, y: 0} |
|
46 |
- _MetallicGlossMap: |
|
47 |
m_Texture: {fileID: 0} |
|
48 |
m_Scale: {x: 1, y: 1} |
|
49 |
m_Offset: {x: 0, y: 0} |
|
50 |
- _OcclusionMap: |
|
51 |
m_Texture: {fileID: 0} |
|
52 |
m_Scale: {x: 1, y: 1} |
|
53 |
m_Offset: {x: 0, y: 0} |
|
54 |
- _ParallaxMap: |
|
55 |
m_Texture: {fileID: 0} |
|
56 |
m_Scale: {x: 1, y: 1} |
|
57 |
m_Offset: {x: 0, y: 0} |
|
58 |
m_Floats: |
|
59 |
- _BumpScale: 1 |
|
60 |
- _Cutoff: 0.5 |
|
61 |
- _DetailNormalMapScale: 1 |
|
62 |
- _DstBlend: 0 |
|
63 |
- _GlossMapScale: 1 |
|
64 |
- _Glossiness: 0.5 |
|
65 |
- _GlossyReflections: 1 |
|
66 |
- _Metallic: 0 |
|
67 |
- _Mode: 0 |
|
68 |
- _OcclusionStrength: 1 |
|
69 |
- _Parallax: 0.02 |
|
70 |
- _SmoothnessTextureChannel: 0 |
|
71 |
- _SpecularHighlights: 1 |
|
72 |
- _SrcBlend: 1 |
|
73 |
- _UVSec: 0 |
|
74 |
- _ZWrite: 1 |
|
75 |
m_Colors: |
|
76 |
- _Color: {r: 0, g: 0.61987686, b: 1, a: 1} |
|
77 |
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} |
|
78 |
m_BuildTextureStacks: [] |
deltarobot-vr/Assets/DDArrowMaterial.mat.meta | ||
---|---|---|
1 |
fileFormatVersion: 2 |
|
2 |
guid: b01c4eddab52a9d47b02db54cc78e6c2 |
|
3 |
NativeFormatImporter: |
|
4 |
externalObjects: {} |
|
5 |
mainObjectFileID: 2100000 |
|
6 |
userData: |
|
7 |
assetBundleName: |
|
8 |
assetBundleVariant: |
deltarobot-vr/Assets/DeltaRobotVr/ArrowScript.cs | ||
---|---|---|
1 |
using System.Collections; |
|
2 |
using System.Collections.Generic; |
|
3 |
using UnityEngine; |
|
4 |
using DeltaRobotVr; |
|
5 |
|
|
6 |
public abstract class ArrowScript : MonoBehaviour |
|
7 |
{ |
|
8 |
protected LineRenderer lr; |
|
9 |
void Start() |
|
10 |
{ |
|
11 |
lr = GetComponent<LineRenderer>(); |
|
12 |
} |
|
13 |
|
|
14 |
void Update() |
|
15 |
{ |
|
16 |
if (Client.Instance.IsConnected) |
|
17 |
{ |
|
18 |
var vector = getVector(); |
|
19 |
lr.SetPositions(new Vector3[] { Vector3.zero, MyTools.Single3Transform(vector.X, vector.Y, vector.Z) }); |
|
20 |
} |
|
21 |
} |
|
22 |
|
|
23 |
protected abstract Single3 getVector(); |
|
24 |
} |
deltarobot-vr/Assets/DeltaRobotVr/ArrowScript.cs.meta | ||
---|---|---|
1 |
fileFormatVersion: 2 |
|
2 |
guid: e8091905fe5149d40a4fb2711bb82b8b |
|
3 |
MonoImporter: |
|
4 |
externalObjects: {} |
|
5 |
serializedVersion: 2 |
|
6 |
defaultReferences: [] |
|
7 |
executionOrder: 0 |
|
8 |
icon: {instanceID: 0} |
|
9 |
userData: |
|
10 |
assetBundleName: |
|
11 |
assetBundleVariant: |
deltarobot-vr/Assets/DeltaRobotVr/Constants.cs | ||
---|---|---|
1 |
using System.Collections; |
|
2 |
using System.Collections.Generic; |
|
3 |
using UnityEngine; |
|
4 |
|
|
5 |
public class Constants |
|
6 |
{ |
|
7 |
public const float PositionScale = 0.001f; |
|
8 |
public const float LerpParam = 0.5f; |
|
9 |
public const string nameOfActuatorObj = "MyTestCube"; |
|
10 |
} |
deltarobot-vr/Assets/DeltaRobotVr/Constants.cs.meta | ||
---|---|---|
1 |
fileFormatVersion: 2 |
|
2 |
guid: ee69b242cddf8f742b438dc939f4f413 |
|
3 |
MonoImporter: |
|
4 |
externalObjects: {} |
|
5 |
serializedVersion: 2 |
|
6 |
defaultReferences: [] |
|
7 |
executionOrder: 0 |
|
8 |
icon: {instanceID: 0} |
|
9 |
userData: |
|
10 |
assetBundleName: |
|
11 |
assetBundleVariant: |
deltarobot-vr/Assets/DeltaRobotVr/CubeScript.cs | ||
---|---|---|
1 |
using DeltaRobotVr; |
|
2 |
using UnityEngine; |
|
3 |
|
|
4 |
public class CubeScript : MonoBehaviour |
|
5 |
{ |
|
6 |
private Transform _transform; |
|
7 |
|
|
8 |
void Start() |
|
9 |
{ |
|
10 |
_transform = GetComponent<Transform>(); |
|
11 |
|
|
12 |
Client.Instance.Start(); |
|
13 |
} |
|
14 |
|
|
15 |
void Update() |
|
16 |
{ |
|
17 |
if (Client.Instance.IsConnected) |
|
18 |
{ |
|
19 |
var actPosition = Client.Instance.ActuatorPosition; |
|
20 |
var newPosition = MyTools.Single3Transform(actPosition.X, actPosition.Y, actPosition.Z); |
|
21 |
_transform.position = Vector3.Lerp(_transform.position, newPosition, Constants.LerpParam); |
|
22 |
} |
|
23 |
} |
|
24 |
|
|
25 |
private void OnDestroy() |
|
26 |
{ |
|
27 |
Client.Instance.Stop(); |
|
28 |
} |
|
29 |
} |
deltarobot-vr/Assets/DeltaRobotVr/CubeScript.cs.meta | ||
---|---|---|
1 |
fileFormatVersion: 2 |
|
2 |
guid: cfafba4e0e8b6e0adb6dda9dbc5076f8 |
|
3 |
MonoImporter: |
|
4 |
externalObjects: {} |
|
5 |
serializedVersion: 2 |
|
6 |
defaultReferences: [] |
|
7 |
executionOrder: 0 |
|
8 |
icon: {instanceID: 0} |
|
9 |
userData: |
|
10 |
assetBundleName: |
|
11 |
assetBundleVariant: |
deltarobot-vr/Assets/DeltaRobotVr/CurrentDirectionArrow.cs | ||
---|---|---|
1 |
using System.Collections; |
|
2 |
using System.Collections.Generic; |
|
3 |
using UnityEngine; |
|
4 |
using DeltaRobotVr; |
|
5 |
|
|
6 |
public class CurrentDirectionArrow : ArrowScript |
|
7 |
{ |
|
8 |
protected override Single3 getVector() |
|
9 |
{ |
|
10 |
return Client.Instance.CurrentDirectionVector; |
|
11 |
} |
|
12 |
} |
deltarobot-vr/Assets/DeltaRobotVr/CurrentDirectionArrow.cs.meta | ||
---|---|---|
1 |
fileFormatVersion: 2 |
|
2 |
guid: 7d92319639667d643a9722c4c835a70b |
|
3 |
MonoImporter: |
|
4 |
externalObjects: {} |
|
5 |
serializedVersion: 2 |
|
6 |
defaultReferences: [] |
|
7 |
executionOrder: 0 |
|
8 |
icon: {instanceID: 0} |
|
9 |
userData: |
|
10 |
assetBundleName: |
|
11 |
assetBundleVariant: |
deltarobot-vr/Assets/DeltaRobotVr/CurveScript.cs | ||
---|---|---|
1 |
using System.Collections; |
|
2 |
using System.Collections.Generic; |
|
3 |
using UnityEngine; |
|
4 |
using DeltaRobotVr; |
|
5 |
|
|
6 |
public class CurveScript : MonoBehaviour |
|
7 |
{ |
|
8 |
private long _curentCounter; |
|
9 |
private LineRenderer lr; |
|
10 |
void Start() |
|
11 |
{ |
|
12 |
_curentCounter = Client.Instance.CurveCounter; |
|
13 |
lr = GetComponent<LineRenderer>(); |
|
14 |
} |
|
15 |
|
|
16 |
void Update() |
|
17 |
{ |
|
18 |
if (Client.Instance.IsConnected) |
|
19 |
{ |
|
20 |
var _counter = Client.Instance.CurveCounter; |
|
21 |
if(_counter != _curentCounter && Client.Instance.Curve != null) |
|
22 |
{ |
|
23 |
lr.positionCount = Client.Instance.Curve.Length; |
|
24 |
lr.SetPositions(MyTools.Single3Transform(Client.Instance.Curve)); |
|
25 |
} |
|
26 |
} |
|
27 |
} |
|
28 |
} |
deltarobot-vr/Assets/DeltaRobotVr/CurveScript.cs.meta | ||
---|---|---|
1 |
fileFormatVersion: 2 |
|
2 |
guid: bb50b983128c52b48ae66147e4978d5f |
|
3 |
MonoImporter: |
|
4 |
externalObjects: {} |
|
5 |
serializedVersion: 2 |
|
6 |
defaultReferences: [] |
|
7 |
executionOrder: 0 |
|
8 |
icon: {instanceID: 0} |
|
9 |
userData: |
|
10 |
assetBundleName: |
|
11 |
assetBundleVariant: |
deltarobot-vr/Assets/DeltaRobotVr/DesiredDirectionArrow.cs | ||
---|---|---|
1 |
using System.Collections; |
|
2 |
using System.Collections.Generic; |
|
3 |
using UnityEngine; |
|
4 |
using DeltaRobotVr; |
|
5 |
|
|
6 |
public class DesiredDirectionArrow : ArrowScript |
|
7 |
{ |
|
8 |
protected override Single3 getVector() |
|
9 |
{ |
|
10 |
return Client.Instance.DesiredDirectionVector; |
|
11 |
} |
|
12 |
} |
deltarobot-vr/Assets/DeltaRobotVr/DesiredDirectionArrow.cs.meta | ||
---|---|---|
1 |
fileFormatVersion: 2 |
|
2 |
guid: 0405dab141f621d4aae1935de042ed9d |
|
3 |
MonoImporter: |
|
4 |
externalObjects: {} |
|
5 |
serializedVersion: 2 |
|
6 |
defaultReferences: [] |
|
7 |
executionOrder: 0 |
|
8 |
icon: {instanceID: 0} |
|
9 |
userData: |
|
10 |
assetBundleName: |
|
11 |
assetBundleVariant: |
deltarobot-vr/Assets/DeltaRobotVr/MyTools.cs | ||
---|---|---|
1 |
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 |
} |
deltarobot-vr/Assets/DeltaRobotVr/MyTools.cs.meta | ||
---|---|---|
1 |
fileFormatVersion: 2 |
|
2 |
guid: a7cefdb594c0bba4085f6f3ab5ab77e4 |
|
3 |
MonoImporter: |
|
4 |
externalObjects: {} |
|
5 |
serializedVersion: 2 |
|
6 |
defaultReferences: [] |
|
7 |
executionOrder: 0 |
|
8 |
icon: {instanceID: 0} |
|
9 |
userData: |
|
10 |
assetBundleName: |
|
11 |
assetBundleVariant: |
Také k dispozici: Unified diff
Re #8739 - Visualization