AR + GPS Location
3.0.0
Main Page
Related Pages
Packages
Packages
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
x
Functions
c
d
e
f
g
h
l
n
o
p
r
s
t
u
v
Variables
a
c
d
h
i
l
m
o
p
s
t
u
x
Properties
Events
Files
File List
▼
AR + GPS Location
3.5.1
Unity AR+GPS Location
►
Packages
►
Classes
▼
Files
▼
File List
▼
Assets
▼
ARLocation
►
Editor
▼
Scripts
►
ARSession
►
Components
►
Location
▼
Math
AngleLowPassFilter.cs
CatmullRomCurve.cs
CatmullRomSpline.cs
Curve.cs
DVector2.cs
DVector3.cs
Line.cs
LinearSpline.cs
LowPassFilter.cs
MathUtils.cs
Spline.cs
►
ScriptableObjects
►
Utils
ARLocation.cs
•
All
Classes
Namespaces
Functions
Variables
Properties
Events
Pages
LinearSpline.cs
1
using
UnityEngine;
2
3
namespace
ARLocation
4
{
5
public
sealed
class
LinearSpline
:
Spline
6
{
7
public
LinearSpline
(Vector3[] points)
8
{
9
Points
= (Vector3[])points.Clone();
10
11
CalculateSegments
(100);
12
}
13
14
public
override
void
CalculateSegments
(
int
n)
15
{
16
segmentCount
= (
Points
.Length - 1);
17
segments
=
new
Curve
[
segmentCount
];
18
lengths =
new
float
[
segmentCount
];
19
20
Length
= 0.0f;
21
for
(var i = 0; i <
segmentCount
; i++)
22
{
23
segments
[i] =
new
Line
(
Points
[i],
Points
[i + 1]);
24
Length
+=
segments
[i].EstimateLength();
25
lengths[i] =
Length
;
26
}
27
}
28
}
29
}
ARLocation.Spline.segmentCount
int segmentCount
The number of segments that make up the spline.
Definition:
Spline.cs:28
ARLocation.Spline.segments
Curve[] segments
The CatmullRom curve-segments of the spline.
Definition:
Spline.cs:23
ARLocation.Spline.Length
float Length
The full (estimated) length of the spline.
Definition:
Spline.cs:33
ARLocation.LinearSpline.CalculateSegments
override void CalculateSegments(int n)
Calculate the catmull-rom segments. Also estimates the curve's length.
Definition:
LinearSpline.cs:14
ARLocation.Curve
Definition:
Curve.cs:17
ARLocation.Spline
Definition:
Spline.cs:13
ARLocation
Definition:
ARLocationConfigInspector.cs:7
ARLocation.Line
Definition:
Line.cs:6
ARLocation.Spline.Points
Vector3[] Points
The points interpolated of the spline.
Definition:
Spline.cs:18
ARLocation.LinearSpline
Definition:
LinearSpline.cs:6
Assets
ARLocation
Scripts
Math
LinearSpline.cs
Generated by
1.8.20