SW 중심대학 OSS GIT 서버
박건태, 이승준, 고기완, 이준호
새로운 배포
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
using UnityEngine;
namespace ARLocation{ public sealed class LinearSpline : Spline { public LinearSpline(Vector3[] points) { Points = (Vector3[])points.Clone();
CalculateSegments(100); }
public override void CalculateSegments(int n) { segmentCount = (Points.Length - 1); segments = new Curve[segmentCount]; lengths = new float[segmentCount];
Length = 0.0f; for (var i = 0; i < segmentCount; i++) { segments[i] = new Line(Points[i], Points[i + 1]); Length += segments[i].EstimateLength(); lengths[i] = Length; } } }}
|