From 96e2d81d8ee5e3c25fdc63305cd5b8e3c9f27af8 Mon Sep 17 00:00:00 2001 From: uc-hoba Date: Thu, 12 Apr 2018 16:30:18 +0800 Subject: [PATCH] refine --- Unity_2018_Frozen/Assets/Frozen/Script/SpaceHomography.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Unity_2018_Frozen/Assets/Frozen/Script/SpaceHomography.cs b/Unity_2018_Frozen/Assets/Frozen/Script/SpaceHomography.cs index c874a8a..684aa9f 100644 --- a/Unity_2018_Frozen/Assets/Frozen/Script/SpaceHomography.cs +++ b/Unity_2018_Frozen/Assets/Frozen/Script/SpaceHomography.cs @@ -89,10 +89,7 @@ public class SpaceHomography : MonoBehaviour right_homo = Matrix4x4.identity; FindHomography(dst.ToArray(), src.ToArray(), ref right_homo); } - } - private void Update() - { Shader.SetGlobalMatrix("front_homo", front_homo); Shader.SetGlobalMatrix("left_homo", left_homo); Shader.SetGlobalMatrix("right_homo", right_homo); @@ -100,7 +97,7 @@ public class SpaceHomography : MonoBehaviour Shader.SetGlobalVector("texture_size", texture_size); } - void FindHomography(Vector2[] src, Vector2[] dest, ref Matrix4x4 homography) + private void FindHomography(Vector2[] src, Vector2[] dest, ref Matrix4x4 homography) { float[,] P = new float[,]{ @@ -128,7 +125,7 @@ public class SpaceHomography : MonoBehaviour } - void GaussianElimination(ref float[,] A, int n) + private void GaussianElimination(ref float[,] A, int n) { int i = 0;