@@ -5,5 +5,139 @@ open DynamicObj
55open System
66open System.Runtime .InteropServices
77
8+
9+
10+ type CameraCenter () =
11+ inherit DynamicObj ()
12+
13+ static member init
14+ (
15+ [<Optional; DefaultParameterValue( null ) >] ? X : float ,
16+ [<Optional; DefaultParameterValue( null ) >] ? Y : float ,
17+ [<Optional; DefaultParameterValue( null ) >] ? Z : float
18+
19+
20+ ) =
21+ CameraCenter()
22+ |> CameraCenter.style (
23+ ?X = X,
24+ ?Y = Y,
25+ ?Z = Z
26+ )
27+
28+ static member style
29+ (
30+ [<Optional; DefaultParameterValue( null ) >] ? X : float ,
31+ [<Optional; DefaultParameterValue( null ) >] ? Y : float ,
32+ [<Optional; DefaultParameterValue( null ) >] ? Z : float
33+ ) =
34+
35+ fun ( cameraCenter : CameraCenter ) ->
36+
37+ X |> DynObj.setValueOpt cameraCenter " x"
38+ Y |> DynObj.setValueOpt cameraCenter " y"
39+ Z |> DynObj.setValueOpt cameraCenter " z"
40+
41+ cameraCenter
42+
43+ type CameraEye () =
44+ inherit DynamicObj ()
45+
46+ static member init
47+ (
48+ [<Optional; DefaultParameterValue( null ) >] ? X : float ,
49+ [<Optional; DefaultParameterValue( null ) >] ? Y : float ,
50+ [<Optional; DefaultParameterValue( null ) >] ? Z : float
51+
52+
53+ ) =
54+ CameraEye()
55+ |> CameraEye.style (
56+ ?X = X,
57+ ?Y = Y,
58+ ?Z = Z
59+ )
60+
61+ static member style
62+ (
63+ [<Optional; DefaultParameterValue( null ) >] ? X : float ,
64+ [<Optional; DefaultParameterValue( null ) >] ? Y : float ,
65+ [<Optional; DefaultParameterValue( null ) >] ? Z : float
66+ ) =
67+
68+ fun ( cameraEye : CameraEye ) ->
69+
70+ X |> DynObj.setValueOpt cameraEye " x"
71+ Y |> DynObj.setValueOpt cameraEye " y"
72+ Z |> DynObj.setValueOpt cameraEye " z"
73+
74+ cameraEye
75+
76+ type CameraUp () =
77+ inherit DynamicObj ()
78+
79+ static member init
80+ (
81+ [<Optional; DefaultParameterValue( null ) >] ? X : float ,
82+ [<Optional; DefaultParameterValue( null ) >] ? Y : float ,
83+ [<Optional; DefaultParameterValue( null ) >] ? Z : float
84+
85+
86+ ) =
87+ CameraUp()
88+ |> CameraUp.style (
89+ ?X = X,
90+ ?Y = Y,
91+ ?Z = Z
92+ )
93+
94+ static member style
95+ (
96+ [<Optional; DefaultParameterValue( null ) >] ? X : float ,
97+ [<Optional; DefaultParameterValue( null ) >] ? Y : float ,
98+ [<Optional; DefaultParameterValue( null ) >] ? Z : float
99+ ) =
100+
101+ fun ( cameraUp : CameraUp ) ->
102+
103+ X |> DynObj.setValueOpt cameraUp " x"
104+ Y |> DynObj.setValueOpt cameraUp " y"
105+ Z |> DynObj.setValueOpt cameraUp " z"
106+
107+ cameraUp
108+
8109type Camera () =
9110 inherit DynamicObj ()
111+
112+ static member init
113+ (
114+ [<Optional; DefaultParameterValue( null ) >] ? Center : CameraCenter ,
115+ [<Optional; DefaultParameterValue( null ) >] ? Eye : CameraEye ,
116+ [<Optional; DefaultParameterValue( null ) >] ? Projection : StyleParam.CameraProjection ,
117+ [<Optional; DefaultParameterValue( null ) >] ? Up : CameraUp
118+
119+ ) =
120+ Camera()
121+ |> Camera.style (
122+ ?Center = Center ,
123+ ?Eye = Eye ,
124+ ?Projection = Projection,
125+ ?Up = Up
126+ )
127+
128+ static member style
129+ (
130+ [<Optional; DefaultParameterValue( null ) >] ? Center : CameraCenter ,
131+ [<Optional; DefaultParameterValue( null ) >] ? Eye : CameraEye ,
132+ [<Optional; DefaultParameterValue( null ) >] ? Projection : StyleParam.CameraProjection ,
133+ [<Optional; DefaultParameterValue( null ) >] ? Up : CameraUp
134+ ) =
135+
136+ fun ( camera : Camera ) ->
137+
138+ Center |> DynObj.setValueOpt camera " center"
139+ Eye |> DynObj.setValueOpt camera " eye"
140+ Projection |> DynObj.setValueOptBy camera " projection" StyleParam.CameraProjection.convert
141+ Up |> DynObj.setValueOpt camera " up"
142+
143+ camera
0 commit comments