scax-engine 0.1.8 → 0.2.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -29
- package/dist/scax-engine.cjs +1584 -1557
- package/dist/scax-engine.js +1583 -1558
- package/dist/scax-engine.umd.js +1584 -1557
- package/dist/types/index.d.ts +4 -6
- package/dist/types/light-sources/light-source.d.ts +23 -2
- package/dist/types/optics/prism-on-ray.d.ts +19 -0
- package/dist/types/parameters/eye/eye-rigid-pose.d.ts +32 -0
- package/dist/types/parameters/eye/eyemodel-parameter.d.ts +24 -1
- package/dist/types/scax-engine.d.ts +68 -344
- package/dist/types/surfaces/st-surface.d.ts +8 -1
- package/dist/types/surfaces/surface.d.ts +7 -1
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
export { default as SCAXEngine } from "./scax-engine";
|
|
2
|
-
export { SCAXEngineCore } from "./scax-engine";
|
|
3
|
-
export type { SturmProfileWorldZBounds } from "./sturm/sturm";
|
|
4
1
|
export { default as Ray } from "./ray/ray";
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
2
|
+
export { LightSource } from "./light-sources/light-source";
|
|
3
|
+
export { default as Surface } from "./surfaces/surface";
|
|
4
|
+
export { default as SCAXEngine, SCAXEngineCore } from "./scax-engine";
|
|
5
|
+
export type { MeridianInfo, PrismPower, SCAXEngineProps, SCAXPower, SimulateResult, SturmResult } from "./scax-engine";
|
|
8
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -6,13 +6,34 @@ export declare const CHROMATIC_RED_COLOR = 16281969;
|
|
|
6
6
|
/** 프라우호퍼 e선 (초록) */
|
|
7
7
|
export declare const CHROMATIC_GREEN_NM = 546.07;
|
|
8
8
|
export declare const CHROMATIC_GREEN_COLOR = 4906624;
|
|
9
|
+
export type LightSourcePose = {
|
|
10
|
+
position?: {
|
|
11
|
+
x?: number;
|
|
12
|
+
y?: number;
|
|
13
|
+
z?: number;
|
|
14
|
+
};
|
|
15
|
+
tilt?: {
|
|
16
|
+
x?: number;
|
|
17
|
+
y?: number;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
9
20
|
export declare class LightSource {
|
|
10
21
|
protected rays: Ray[];
|
|
22
|
+
private sourcePosition;
|
|
23
|
+
private sourceRotationQuaternion;
|
|
24
|
+
private sourceRotationPivot;
|
|
11
25
|
constructor();
|
|
12
26
|
protected directionFromVergence(origin: Vector3, z: number, vergence: number): Vector3;
|
|
13
27
|
protected createRayFromPoint(origin: Vector3, z: number, vergence: number): void;
|
|
14
28
|
protected createChromaticRayFromPoint(origin: Vector3, z: number, vergence: number, line: "e" | "C", chromaticVergenceOffset?: number): void;
|
|
15
29
|
addRay(ray: Ray): void;
|
|
30
|
+
protected configurePose(pose: LightSourcePose | undefined, pivotZ?: number): void;
|
|
31
|
+
private toFiniteNumber;
|
|
32
|
+
private getRayPoints;
|
|
33
|
+
private rotatePointAroundPivot;
|
|
34
|
+
private transformRayAroundPivot;
|
|
35
|
+
private translateRay;
|
|
36
|
+
private applyPoseToRay;
|
|
16
37
|
emitRays(): Ray[];
|
|
17
38
|
}
|
|
18
39
|
export type GridLightSourceProps = {
|
|
@@ -21,7 +42,7 @@ export type GridLightSourceProps = {
|
|
|
21
42
|
division: number;
|
|
22
43
|
z: number;
|
|
23
44
|
vergence: number;
|
|
24
|
-
};
|
|
45
|
+
} & LightSourcePose;
|
|
25
46
|
export declare class GridLightSource extends LightSource {
|
|
26
47
|
private width;
|
|
27
48
|
private height;
|
|
@@ -45,7 +66,7 @@ export type RadialLightSourceProps = {
|
|
|
45
66
|
angle_division: number;
|
|
46
67
|
z: number;
|
|
47
68
|
vergence: number;
|
|
48
|
-
};
|
|
69
|
+
} & LightSourcePose;
|
|
49
70
|
export declare class RadialLightSource extends LightSource {
|
|
50
71
|
private radius;
|
|
51
72
|
private division;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import Ray from "../ray/ray";
|
|
2
|
+
export declare function normalizePrismDiopters(value: unknown): number;
|
|
3
|
+
export declare function normalizeAngle360Degrees(value: unknown): number;
|
|
4
|
+
/**
|
|
5
|
+
* 임상 프리즘 Base(Δ, 렌즈→각막 시점 °)를 내부 x/y 프리즘 벡터(Δ)로 변환합니다.
|
|
6
|
+
* `SCAXEngineCore`와 동일한 관례입니다.
|
|
7
|
+
*/
|
|
8
|
+
export declare function prismVectorFromClinicalBase(prismDiopter: unknown, baseAngleDeg: unknown): {
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* 굴절 직후 광선에 프리즘 편향(소각 근사)을 적용합니다.
|
|
14
|
+
*/
|
|
15
|
+
export declare function applyPrismVectorToRay(ray: Ray, prism: {
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
}): Ray;
|
|
19
|
+
//# sourceMappingURL=prism-on-ray.d.ts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Quaternion, Vector3 } from "three";
|
|
2
|
+
import Surface from "../../surfaces/surface";
|
|
3
|
+
/** 각막 기준 안구 회전점 z(mm). `SCAXEngineCore`와 동일. */
|
|
4
|
+
export declare const EYE_ROTATION_PIVOT_FROM_CORNEA_MM = 13;
|
|
5
|
+
/** eye 처방(Base) → 실제 안구 편향에 쓰는 역벡터(내부 x/y, Δ). */
|
|
6
|
+
export declare function eyePrismEffectVectorFromPrescription(p: unknown, p_ax: unknown): {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* eye.p / eye.p_ax(임상 Base) 및 eye.tilt(°)로부터
|
|
12
|
+
* 안구 강체 회전 쿼터니언(Euler XYZ, z=0). 기존 configure 광선 피벗 회전과 동일.
|
|
13
|
+
*/
|
|
14
|
+
export declare function eyePrismAndTiltToQuaternion(p: unknown, p_ax: unknown, tiltDeg: {
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
}): Quaternion;
|
|
18
|
+
export declare function eyeRotationPivot(): Vector3;
|
|
19
|
+
/** eye prism/tilt를 반영한 렌더용 각도(°). */
|
|
20
|
+
export declare function eyeRotationForRenderDegrees(p: unknown, p_ax: unknown, tiltDeg: {
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
}): {
|
|
24
|
+
x_deg: number;
|
|
25
|
+
y_deg: number;
|
|
26
|
+
magnitude_deg: number;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* 안구 회전점 기준 강체 회전을 각 표면의 world `position` / `tilt`에 반영합니다.
|
|
30
|
+
*/
|
|
31
|
+
export declare function applyRigidEyePoseToSurfaces(surfaces: Surface[], pivot: Vector3, rotation: Quaternion): void;
|
|
32
|
+
//# sourceMappingURL=eye-rigid-pose.d.ts.map
|
|
@@ -28,10 +28,33 @@ export interface EyeModelParameterConfig {
|
|
|
28
28
|
origin?: string;
|
|
29
29
|
surfaces: EyeSurfaceParameter[];
|
|
30
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* `SCAXEngineCore.configure`와 동일한 눈 처방 필드.
|
|
33
|
+
* - `s,c,ax`: auto refractor(굴절오차) 기준; ST 면에는 보정렌즈 관점으로 변환되어 들어갑니다.
|
|
34
|
+
* - `p,p_ax,tilt`: 안구 회전점 기준 강체 pose로 각 표면 `position`/`tilt`에 전개됩니다.
|
|
35
|
+
*/
|
|
36
|
+
export type EyeStackCreateInput = {
|
|
37
|
+
eyeModel: "gullstrand" | "navarro";
|
|
38
|
+
s: number;
|
|
39
|
+
c: number;
|
|
40
|
+
ax: number;
|
|
41
|
+
p?: number;
|
|
42
|
+
p_ax?: number;
|
|
43
|
+
tilt?: {
|
|
44
|
+
x?: number;
|
|
45
|
+
y?: number;
|
|
46
|
+
};
|
|
47
|
+
/** 0이면 동공 aperture 면을 넣지 않습니다. */
|
|
48
|
+
pupilDiameterMm: number;
|
|
49
|
+
};
|
|
31
50
|
export declare class EyeModelParameter {
|
|
32
51
|
private readonly parameter;
|
|
33
52
|
constructor(parameter: EyeModelParameterConfig);
|
|
34
|
-
|
|
53
|
+
/**
|
|
54
|
+
* 동공(선택) → eye_st(ST 복합면) → 안구 모델 해부면 순으로 생성한 뒤,
|
|
55
|
+
* `p`/`p_ax`/`tilt`를 안구 회전점 기준 강체 회전으로 반영합니다.
|
|
56
|
+
*/
|
|
57
|
+
createSurface(eye: EyeStackCreateInput): Surface[];
|
|
35
58
|
}
|
|
36
59
|
export {};
|
|
37
60
|
//# sourceMappingURL=eyemodel-parameter.d.ts.map
|
|
@@ -1,19 +1,28 @@
|
|
|
1
1
|
import Affine from "./affine/affine";
|
|
2
2
|
import { GridLightSourceProps, GridRGLightSourceProps, LightSource, RadialLightSourceProps } from "./light-sources/light-source";
|
|
3
|
+
import { EyeModelParameter } from "./parameters/eye/eyemodel-parameter";
|
|
3
4
|
import Ray from "./ray/ray";
|
|
5
|
+
import Sturm from "./sturm/sturm";
|
|
4
6
|
import Surface from "./surfaces/surface";
|
|
5
7
|
export type EyeModel = "gullstrand" | "navarro";
|
|
6
8
|
export type PupilType = "constricted" | "neutral" | "dilated" | "none";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
type Position3D = {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
z: number;
|
|
13
|
+
};
|
|
14
|
+
type Rotation2D = {
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
};
|
|
18
|
+
type PartialPosition3D = {
|
|
19
|
+
x?: number;
|
|
20
|
+
y?: number;
|
|
21
|
+
z?: number;
|
|
22
|
+
};
|
|
23
|
+
type PartialRotation2D = {
|
|
24
|
+
x?: number;
|
|
25
|
+
y?: number;
|
|
17
26
|
};
|
|
18
27
|
export type LightSourceConfig = ({
|
|
19
28
|
type: "radial";
|
|
@@ -22,27 +31,26 @@ export type LightSourceConfig = ({
|
|
|
22
31
|
} & GridLightSourceProps & LightSourceTransform) | ({
|
|
23
32
|
type: "grid_rg";
|
|
24
33
|
} & GridRGLightSourceProps & LightSourceTransform);
|
|
34
|
+
export type LightSourceTransform = {
|
|
35
|
+
position?: PartialPosition3D;
|
|
36
|
+
tilt?: PartialRotation2D;
|
|
37
|
+
};
|
|
38
|
+
type NormalizedLightSourceConfig = LightSourceConfig & {
|
|
39
|
+
position: Position3D;
|
|
40
|
+
tilt: Rotation2D;
|
|
41
|
+
};
|
|
25
42
|
export type LensConfig = {
|
|
26
43
|
s: number;
|
|
27
44
|
c: number;
|
|
28
45
|
ax: number;
|
|
29
46
|
p?: number;
|
|
30
47
|
p_ax?: number;
|
|
31
|
-
position:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
x: number;
|
|
38
|
-
y: number;
|
|
39
|
-
};
|
|
40
|
-
/**
|
|
41
|
-
* false이면 `simulate().info.astigmatism`의 `lens`·`combined` 파워 벡터 합에서 이 항목을 빼고,
|
|
42
|
-
* 광선 추적·프리즘·Sturm 등은 그대로 적용합니다. (예: 시험용 JCC/크로스실린더)
|
|
43
|
-
* @default true
|
|
44
|
-
*/
|
|
45
|
-
includeInAstigmatismSummary?: boolean;
|
|
48
|
+
position: Position3D;
|
|
49
|
+
tilt: Rotation2D;
|
|
50
|
+
};
|
|
51
|
+
type NormalizedLensConfig = LensConfig & {
|
|
52
|
+
p: number;
|
|
53
|
+
p_ax: number;
|
|
46
54
|
};
|
|
47
55
|
export type EyeConfig = {
|
|
48
56
|
s: number;
|
|
@@ -50,12 +58,13 @@ export type EyeConfig = {
|
|
|
50
58
|
ax: number;
|
|
51
59
|
p?: number;
|
|
52
60
|
p_ax?: number;
|
|
53
|
-
tilt?:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
61
|
+
tilt?: PartialRotation2D;
|
|
62
|
+
};
|
|
63
|
+
type NormalizedEyeConfig = EyeConfig & {
|
|
64
|
+
p: number;
|
|
65
|
+
p_ax: number;
|
|
66
|
+
tilt: Rotation2D;
|
|
57
67
|
};
|
|
58
|
-
export type EyePowerInput = EyeConfig;
|
|
59
68
|
export type SCAXEngineProps = {
|
|
60
69
|
eyeModel?: EyeModel;
|
|
61
70
|
eye?: EyeConfig;
|
|
@@ -63,56 +72,32 @@ export type SCAXEngineProps = {
|
|
|
63
72
|
light_source?: LightSourceConfig;
|
|
64
73
|
pupil_type?: PupilType;
|
|
65
74
|
};
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
75
|
+
type NormalizedEngineConfig = {
|
|
76
|
+
eyeModel: EyeModel;
|
|
77
|
+
eye: NormalizedEyeConfig;
|
|
78
|
+
lens: NormalizedLensConfig[];
|
|
79
|
+
light_source: NormalizedLightSourceConfig;
|
|
80
|
+
pupil_type: PupilType;
|
|
70
81
|
};
|
|
82
|
+
export declare function normalizeEngineProps(props?: SCAXEngineProps): NormalizedEngineConfig;
|
|
71
83
|
export type SimulateResult = {
|
|
72
84
|
traced_rays: Ray[];
|
|
73
|
-
info: SimulationResultInfo;
|
|
74
85
|
};
|
|
75
|
-
export type
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
magnitude: number;
|
|
79
|
-
angle_deg: number;
|
|
86
|
+
export type PrismPower = {
|
|
87
|
+
p: number;
|
|
88
|
+
p_ax: number;
|
|
80
89
|
};
|
|
81
|
-
export type
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
};
|
|
86
|
-
export type LightDeviation = {
|
|
87
|
-
eye_prism_effect: PrismVector;
|
|
88
|
-
lens_prism_total: PrismVector;
|
|
89
|
-
net_prism: PrismVector;
|
|
90
|
-
x_angle_deg: number;
|
|
91
|
-
y_angle_deg: number;
|
|
92
|
-
net_angle_deg: number;
|
|
90
|
+
export type SCAXPower = {
|
|
91
|
+
s: number;
|
|
92
|
+
c: number;
|
|
93
|
+
ax: number;
|
|
93
94
|
};
|
|
94
|
-
export type
|
|
95
|
+
export type MeridianInfo = {
|
|
95
96
|
tabo: number;
|
|
96
97
|
d: number;
|
|
97
98
|
}[];
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
p_y: number;
|
|
101
|
-
prism_angle: number;
|
|
102
|
-
magnitude: number | null;
|
|
103
|
-
};
|
|
104
|
-
export type SimulationResultInfo = {
|
|
105
|
-
astigmatism: {
|
|
106
|
-
eye: AstigmatismSummaryItem;
|
|
107
|
-
lens: AstigmatismSummaryItem;
|
|
108
|
-
combined: AstigmatismSummaryItem;
|
|
109
|
-
};
|
|
110
|
-
prism: {
|
|
111
|
-
eye: PrismSummaryItem;
|
|
112
|
-
lens: PrismSummaryItem;
|
|
113
|
-
combined: PrismSummaryItem;
|
|
114
|
-
};
|
|
115
|
-
};
|
|
99
|
+
/** `Sturm#calculate()` / `SCAXEngine#sturmCalculation()` 반환 구조 */
|
|
100
|
+
export type SturmResult = ReturnType<Sturm["calculate"]>;
|
|
116
101
|
export type AffineAnalysisResult = ReturnType<Affine["estimate"]>;
|
|
117
102
|
/**
|
|
118
103
|
* legacy simulator.js를 TypeScript로 옮긴 핵심 시뮬레이터입니다.
|
|
@@ -121,43 +106,25 @@ export type AffineAnalysisResult = ReturnType<Affine["estimate"]>;
|
|
|
121
106
|
* - Sturm 분석까지 제공합니다.
|
|
122
107
|
*/
|
|
123
108
|
export declare class SCAXEngineCore {
|
|
124
|
-
private static readonly EYE_ROTATION_PIVOT_FROM_CORNEA_MM;
|
|
125
|
-
private eyeModel;
|
|
126
109
|
private surfaces;
|
|
127
110
|
private lens;
|
|
128
111
|
private light_source;
|
|
129
|
-
private
|
|
112
|
+
private _eyeModelParameter;
|
|
130
113
|
private tracedRays;
|
|
131
114
|
private lastSourceRaysForSturm;
|
|
132
115
|
private sturm;
|
|
133
116
|
private affine;
|
|
134
117
|
private lastSturmGapAnalysis;
|
|
135
118
|
private lastAffineAnalysis;
|
|
136
|
-
private pupilDiameterMm;
|
|
137
|
-
private hasPupilStop;
|
|
138
|
-
private eyePower;
|
|
139
|
-
private lensConfigs;
|
|
140
|
-
private lensPowers;
|
|
141
|
-
private eyePrismEffectVector;
|
|
142
|
-
private lensPrismVector;
|
|
143
|
-
private eyePrismPrescription;
|
|
144
|
-
private eyeRotationQuaternion;
|
|
145
|
-
private eyeRotationQuaternionInverse;
|
|
146
|
-
private eyeRotationPivot;
|
|
147
|
-
private eyeTiltDeg;
|
|
148
|
-
private lightSourcePosition;
|
|
149
|
-
private lightSourceTiltDeg;
|
|
150
|
-
private lightSourceRotationQuaternion;
|
|
151
|
-
private lightSourceRotationPivot;
|
|
152
119
|
private sortedLensSurfaces;
|
|
153
120
|
private sortedEyeSurfaces;
|
|
154
|
-
|
|
155
|
-
constructor(
|
|
121
|
+
get eyeModelParameter(): EyeModelParameter;
|
|
122
|
+
constructor(config?: SCAXEngineProps | NormalizedEngineConfig);
|
|
156
123
|
/**
|
|
157
124
|
* 생성자와 동일한 기본값 규칙으로 광학 설정을 다시 적용합니다.
|
|
158
125
|
* 생략한 최상위 필드는 매번 기본값으로 돌아갑니다(이전 값과 병합하지 않음).
|
|
159
126
|
*/
|
|
160
|
-
update(
|
|
127
|
+
update(config?: SCAXEngineProps | NormalizedEngineConfig): void;
|
|
161
128
|
dispose(): void;
|
|
162
129
|
private configure;
|
|
163
130
|
/**
|
|
@@ -165,11 +132,6 @@ export declare class SCAXEngineCore {
|
|
|
165
132
|
* includeSturmData 값과 무관하게 확장 분석(Sturm/retinaPairs)을 항상 포함합니다.
|
|
166
133
|
*/
|
|
167
134
|
simulate(): SimulateResult;
|
|
168
|
-
/**
|
|
169
|
-
* eye.p / eye.p_ax(처방값)를 기준으로, 렌더링에서 바로 쓸 눈 회전량을 반환합니다.
|
|
170
|
-
* - x_deg/y_deg는 프리즘 회전량에 eye.tilt를 합산한 최종 렌더 회전량입니다.
|
|
171
|
-
*/
|
|
172
|
-
getEyeRotation(): EyeRotationForRender;
|
|
173
135
|
/**
|
|
174
136
|
* 1) Ray tracing 전용 함수
|
|
175
137
|
* 광원에서 시작한 광선을 표면 순서대로 굴절시켜 최종 광선 집합을 반환합니다.
|
|
@@ -184,146 +146,13 @@ export declare class SCAXEngineCore {
|
|
|
184
146
|
* 2) Sturm calculation 전용 함수
|
|
185
147
|
* traced ray 집합에서 z-scan 기반 Sturm 슬라이스/근사 중심을 계산합니다.
|
|
186
148
|
*/
|
|
187
|
-
sturmCalculation(rays?: Ray[]):
|
|
188
|
-
slices_info: {
|
|
189
|
-
count: number;
|
|
190
|
-
slices: {
|
|
191
|
-
z: number;
|
|
192
|
-
depth: number;
|
|
193
|
-
ratio: number;
|
|
194
|
-
size: number;
|
|
195
|
-
profile: {
|
|
196
|
-
at: {
|
|
197
|
-
x: number;
|
|
198
|
-
y: number;
|
|
199
|
-
z: number;
|
|
200
|
-
};
|
|
201
|
-
wMajor: number;
|
|
202
|
-
wMinor: number;
|
|
203
|
-
angleMajorDeg: number;
|
|
204
|
-
j0: number;
|
|
205
|
-
j45: number;
|
|
206
|
-
angleMinorDeg: number;
|
|
207
|
-
majorDirection: {
|
|
208
|
-
x: number;
|
|
209
|
-
y: number;
|
|
210
|
-
z: number;
|
|
211
|
-
};
|
|
212
|
-
minorDirection: {
|
|
213
|
-
x: number;
|
|
214
|
-
y: number;
|
|
215
|
-
z: number;
|
|
216
|
-
};
|
|
217
|
-
};
|
|
218
|
-
}[];
|
|
219
|
-
};
|
|
220
|
-
sturm_info: {
|
|
221
|
-
has_astigmatism: boolean;
|
|
222
|
-
method: string;
|
|
223
|
-
anterior: {
|
|
224
|
-
z: number;
|
|
225
|
-
depth: number;
|
|
226
|
-
ratio: number;
|
|
227
|
-
size: number;
|
|
228
|
-
profile: {
|
|
229
|
-
at: {
|
|
230
|
-
x: number;
|
|
231
|
-
y: number;
|
|
232
|
-
z: number;
|
|
233
|
-
};
|
|
234
|
-
wMajor: number;
|
|
235
|
-
wMinor: number;
|
|
236
|
-
angleMajorDeg: number;
|
|
237
|
-
j0: number;
|
|
238
|
-
j45: number;
|
|
239
|
-
angleMinorDeg: number;
|
|
240
|
-
majorDirection: {
|
|
241
|
-
x: number;
|
|
242
|
-
y: number;
|
|
243
|
-
z: number;
|
|
244
|
-
};
|
|
245
|
-
minorDirection: {
|
|
246
|
-
x: number;
|
|
247
|
-
y: number;
|
|
248
|
-
z: number;
|
|
249
|
-
};
|
|
250
|
-
};
|
|
251
|
-
};
|
|
252
|
-
posterior: {
|
|
253
|
-
z: number;
|
|
254
|
-
depth: number;
|
|
255
|
-
ratio: number;
|
|
256
|
-
size: number;
|
|
257
|
-
profile: {
|
|
258
|
-
at: {
|
|
259
|
-
x: number;
|
|
260
|
-
y: number;
|
|
261
|
-
z: number;
|
|
262
|
-
};
|
|
263
|
-
wMajor: number;
|
|
264
|
-
wMinor: number;
|
|
265
|
-
angleMajorDeg: number;
|
|
266
|
-
j0: number;
|
|
267
|
-
j45: number;
|
|
268
|
-
angleMinorDeg: number;
|
|
269
|
-
majorDirection: {
|
|
270
|
-
x: number;
|
|
271
|
-
y: number;
|
|
272
|
-
z: number;
|
|
273
|
-
};
|
|
274
|
-
minorDirection: {
|
|
275
|
-
x: number;
|
|
276
|
-
y: number;
|
|
277
|
-
z: number;
|
|
278
|
-
};
|
|
279
|
-
};
|
|
280
|
-
} | null;
|
|
281
|
-
approx_center: {
|
|
282
|
-
x: number;
|
|
283
|
-
y: number;
|
|
284
|
-
z: number;
|
|
285
|
-
mode: string;
|
|
286
|
-
} | null;
|
|
287
|
-
line: "g" | "F" | "e" | "d" | "C" | "r";
|
|
288
|
-
wavelength_nm: number;
|
|
289
|
-
color: number | null;
|
|
290
|
-
ray_count: number;
|
|
291
|
-
analysis_axis: {
|
|
292
|
-
x: number;
|
|
293
|
-
y: number;
|
|
294
|
-
z: number;
|
|
295
|
-
};
|
|
296
|
-
}[];
|
|
297
|
-
};
|
|
149
|
+
sturmCalculation(rays?: Ray[]): SturmResult;
|
|
298
150
|
getAffineAnalysis(): AffineAnalysisResult;
|
|
299
151
|
private surfaceOrderZ;
|
|
300
152
|
private readSurfacePosition;
|
|
301
153
|
private getRayPoints;
|
|
302
|
-
private isRayInsidePupil;
|
|
303
154
|
private powerVectorFromCylinder;
|
|
304
|
-
private aggregatePowerVector;
|
|
305
|
-
/** 난시 주경선 TABO 각도: 180° 동치이므로 표시·비교는 항상 [0, 180)으로 맞춘다. */
|
|
306
|
-
private normalizeTaboMeridian180;
|
|
307
|
-
private principalMeridiansFromVector;
|
|
308
|
-
private astigmatismSummaryLensPowers;
|
|
309
|
-
private principalMeridiansFromPowers;
|
|
310
|
-
private normalizePrismAmount;
|
|
311
|
-
private normalizeAngle360;
|
|
312
|
-
private normalizeEyeTilt;
|
|
313
|
-
private normalizeLightSourcePose;
|
|
314
|
-
private toFiniteNumber;
|
|
315
155
|
private refreshSortedSurfaces;
|
|
316
|
-
private prismVectorFromBase;
|
|
317
|
-
private vectorToPrismInfo;
|
|
318
|
-
private toPrismSummaryItem;
|
|
319
|
-
private prismComponentToAngleDeg;
|
|
320
|
-
private prismMagnitudeToAngleDeg;
|
|
321
|
-
private applyPrismVectorToRay;
|
|
322
|
-
private rotatePointAroundPivot;
|
|
323
|
-
private translateRay;
|
|
324
|
-
private transformRayAroundPivot;
|
|
325
|
-
private applyLightSourceTransformToRay;
|
|
326
|
-
private calculateLightDeviation;
|
|
327
156
|
private effectiveCylinderFromOpticSurfaces;
|
|
328
157
|
private estimateAffineDistortion;
|
|
329
158
|
private createAffinePairs;
|
|
@@ -334,6 +163,7 @@ export declare class SCAXEngineCore {
|
|
|
334
163
|
*/
|
|
335
164
|
export default class SCAXEngine {
|
|
336
165
|
private readonly core;
|
|
166
|
+
private normalizedConfig;
|
|
337
167
|
constructor(props?: SCAXEngineProps);
|
|
338
168
|
get lens(): Surface[];
|
|
339
169
|
get light_source(): LightSource;
|
|
@@ -341,119 +171,13 @@ export default class SCAXEngine {
|
|
|
341
171
|
update(props?: SCAXEngineProps): void;
|
|
342
172
|
dispose(): void;
|
|
343
173
|
simulate(): SimulateResult;
|
|
344
|
-
getEyeRotation(): EyeRotationForRender;
|
|
345
174
|
rayTracing(): Ray[];
|
|
346
|
-
sturmCalculation(rays?: Ray[]):
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
depth: number;
|
|
352
|
-
ratio: number;
|
|
353
|
-
size: number;
|
|
354
|
-
profile: {
|
|
355
|
-
at: {
|
|
356
|
-
x: number;
|
|
357
|
-
y: number;
|
|
358
|
-
z: number;
|
|
359
|
-
};
|
|
360
|
-
wMajor: number;
|
|
361
|
-
wMinor: number;
|
|
362
|
-
angleMajorDeg: number;
|
|
363
|
-
j0: number;
|
|
364
|
-
j45: number;
|
|
365
|
-
angleMinorDeg: number;
|
|
366
|
-
majorDirection: {
|
|
367
|
-
x: number;
|
|
368
|
-
y: number;
|
|
369
|
-
z: number;
|
|
370
|
-
};
|
|
371
|
-
minorDirection: {
|
|
372
|
-
x: number;
|
|
373
|
-
y: number;
|
|
374
|
-
z: number;
|
|
375
|
-
};
|
|
376
|
-
};
|
|
377
|
-
}[];
|
|
378
|
-
};
|
|
379
|
-
sturm_info: {
|
|
380
|
-
has_astigmatism: boolean;
|
|
381
|
-
method: string;
|
|
382
|
-
anterior: {
|
|
383
|
-
z: number;
|
|
384
|
-
depth: number;
|
|
385
|
-
ratio: number;
|
|
386
|
-
size: number;
|
|
387
|
-
profile: {
|
|
388
|
-
at: {
|
|
389
|
-
x: number;
|
|
390
|
-
y: number;
|
|
391
|
-
z: number;
|
|
392
|
-
};
|
|
393
|
-
wMajor: number;
|
|
394
|
-
wMinor: number;
|
|
395
|
-
angleMajorDeg: number;
|
|
396
|
-
j0: number;
|
|
397
|
-
j45: number;
|
|
398
|
-
angleMinorDeg: number;
|
|
399
|
-
majorDirection: {
|
|
400
|
-
x: number;
|
|
401
|
-
y: number;
|
|
402
|
-
z: number;
|
|
403
|
-
};
|
|
404
|
-
minorDirection: {
|
|
405
|
-
x: number;
|
|
406
|
-
y: number;
|
|
407
|
-
z: number;
|
|
408
|
-
};
|
|
409
|
-
};
|
|
410
|
-
};
|
|
411
|
-
posterior: {
|
|
412
|
-
z: number;
|
|
413
|
-
depth: number;
|
|
414
|
-
ratio: number;
|
|
415
|
-
size: number;
|
|
416
|
-
profile: {
|
|
417
|
-
at: {
|
|
418
|
-
x: number;
|
|
419
|
-
y: number;
|
|
420
|
-
z: number;
|
|
421
|
-
};
|
|
422
|
-
wMajor: number;
|
|
423
|
-
wMinor: number;
|
|
424
|
-
angleMajorDeg: number;
|
|
425
|
-
j0: number;
|
|
426
|
-
j45: number;
|
|
427
|
-
angleMinorDeg: number;
|
|
428
|
-
majorDirection: {
|
|
429
|
-
x: number;
|
|
430
|
-
y: number;
|
|
431
|
-
z: number;
|
|
432
|
-
};
|
|
433
|
-
minorDirection: {
|
|
434
|
-
x: number;
|
|
435
|
-
y: number;
|
|
436
|
-
z: number;
|
|
437
|
-
};
|
|
438
|
-
};
|
|
439
|
-
} | null;
|
|
440
|
-
approx_center: {
|
|
441
|
-
x: number;
|
|
442
|
-
y: number;
|
|
443
|
-
z: number;
|
|
444
|
-
mode: string;
|
|
445
|
-
} | null;
|
|
446
|
-
line: "g" | "F" | "e" | "d" | "C" | "r";
|
|
447
|
-
wavelength_nm: number;
|
|
448
|
-
color: number | null;
|
|
449
|
-
ray_count: number;
|
|
450
|
-
analysis_axis: {
|
|
451
|
-
x: number;
|
|
452
|
-
y: number;
|
|
453
|
-
z: number;
|
|
454
|
-
};
|
|
455
|
-
}[];
|
|
175
|
+
sturmCalculation(rays?: Ray[]): SturmResult;
|
|
176
|
+
calculateMeridians(scaxPowers: SCAXPower[]): MeridianInfo;
|
|
177
|
+
calculateEyeRotationByPrism(prism: PrismPower): {
|
|
178
|
+
x: number;
|
|
179
|
+
y: number;
|
|
456
180
|
};
|
|
457
|
-
getAffineAnalysis(): AffineAnalysisResult;
|
|
458
181
|
}
|
|
182
|
+
export {};
|
|
459
183
|
//# sourceMappingURL=scax-engine.d.ts.map
|