MCPcopy Create free account
hub / github.com/StereoKit/StereoKit / Step

Method Step

Examples/StereoKitTest/Program.cs:135–166  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

133 //////////////////////
134
135 static void Step()
136 {
137 CheckFocus();
138
139 Tests.Update();
140
141 if (Input.Key(Key.Esc).IsJustActive())
142 SK.Quit();
143
144 /// :CodeSample: Projection Renderer.Projection
145 /// ### Toggling the projection mode
146 /// Only in flatscreen apps, there is the option to change the main
147 /// camera's projection mode between perspective and orthographic.
148 if (SK.ActiveDisplayMode == DisplayMode.Flatscreen &&
149 Input.Key(Key.P).IsJustActive())
150 {
151 Renderer.Projection = Renderer.Projection == Projection.Perspective
152 ? Projection.Ortho
153 : Projection.Perspective;
154 }
155 /// :End:
156
157 // If we can't see the world, we'll draw a floor!
158 if (SK.System.displayType == Display.Opaque)
159 Renderer.Add(floorMesh, World.HasBounds ? World.BoundsPose.ToMatrix() : floorTr, Color.White);
160
161 // Skip selection window if we're in test mode
162 if (Tests.IsTesting)
163 return;
164
165 WindowDemoStep();
166 }
167
168 static void WindowDemoStep()
169 {

Callers

nothing calls this directly

Calls 6

UpdateMethod · 0.80
IsJustActiveMethod · 0.80
KeyMethod · 0.80
QuitMethod · 0.80
ToMatrixMethod · 0.80
AddMethod · 0.45

Tested by

no test coverage detected