Skip to content

Commit fd37e7b

Browse files
committed
Applied more ignore type specifiers.
1 parent fade5f8 commit fd37e7b

File tree

2 files changed

+74
-74
lines changed

2 files changed

+74
-74
lines changed

Nu/Nu/Transform/Octree.fs

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ module internal Octnode =
214214
for element in elements do
215215
let bounds = element.Bounds
216216
if bounds.Intersects point then
217-
set.Add element |> ignore
217+
set.Add element |> ignore<bool>
218218

219219
let rec internal getElementsInBox box (set : 'e Octelement HashSet) (node : 'e Octnode) =
220220
match node.Children_ with
@@ -229,7 +229,7 @@ module internal Octnode =
229229
for element in elements do
230230
let bounds = element.Bounds
231231
if bounds.Intersects box then
232-
set.Add element |> ignore
232+
set.Add element |> ignore<bool>
233233

234234
let rec internal getElementsInFrustum frustum (set : 'e Octelement HashSet) (node : 'e Octnode) =
235235
match node.Children_ with
@@ -244,7 +244,7 @@ module internal Octnode =
244244
for element in elements do
245245
let bounds = element.Bounds
246246
if frustum.Intersects bounds then
247-
set.Add element |> ignore
247+
set.Add element |> ignore<bool>
248248

249249
let rec internal getElementsInPlayBox box (set : 'e Octelement HashSet) (node : 'e Octnode) =
250250
match node.Children_ with
@@ -261,7 +261,7 @@ module internal Octnode =
261261
if not element.StaticInPlay && not presence.IsImposter && not presence.IsOmnipresent then
262262
let bounds = element.Bounds
263263
if bounds.Intersects box then
264-
set.Add element |> ignore
264+
set.Add element |> ignore<bool>
265265

266266
let rec internal getLightProbesInViewFrustum frustum (set : 'e Octelement HashSet) (node : 'e Octnode) =
267267
match node.Children_ with
@@ -277,7 +277,7 @@ module internal Octnode =
277277
if element.LightProbe && element.VisibleInView then
278278
let bounds = element.Bounds
279279
if frustum.Intersects bounds then
280-
set.Add element |> ignore
280+
set.Add element |> ignore<bool>
281281

282282
let rec internal getLightProbesInViewBox box (set : 'e Octelement HashSet) (node : 'e Octnode) =
283283
match node.Children_ with
@@ -293,7 +293,7 @@ module internal Octnode =
293293
if element.LightProbe && element.VisibleInView then
294294
let bounds = element.Bounds
295295
if box.Intersects bounds then
296-
set.Add element |> ignore
296+
set.Add element |> ignore<bool>
297297

298298
let rec internal getLightProbes (set : 'e Octelement HashSet) (node : 'e Octnode) =
299299
match node.Children_ with
@@ -307,7 +307,7 @@ module internal Octnode =
307307
| ElementChildren elements ->
308308
for element in elements do
309309
if element.LightProbe && element.VisibleInView then
310-
set.Add element |> ignore
310+
set.Add element |> ignore<bool>
311311

312312
let rec internal getLightsInViewFrustum frustum (set : 'e Octelement HashSet) (node : 'e Octnode) =
313313
match node.Children_ with
@@ -323,7 +323,7 @@ module internal Octnode =
323323
if element.Light && element.VisibleInView then
324324
let bounds = element.Bounds
325325
if frustum.Intersects bounds then
326-
set.Add element |> ignore
326+
set.Add element |> ignore<bool>
327327

328328
let rec internal getLightsInViewBox box (set : 'e Octelement HashSet) (node : 'e Octnode) =
329329
match node.Children_ with
@@ -339,7 +339,7 @@ module internal Octnode =
339339
if element.Light && element.VisibleInView then
340340
let bounds = element.Bounds
341341
if bounds.Intersects box then
342-
set.Add element |> ignore
342+
set.Add element |> ignore<bool>
343343

344344
let rec internal getElementsInPlayFrustum frustum (set : 'e Octelement HashSet) (node : 'e Octnode) =
345345
match node.Children_ with
@@ -356,7 +356,7 @@ module internal Octnode =
356356
if not element.StaticInPlay && not presence.IsImposter && not presence.IsOmnipresent then
357357
let bounds = element.Bounds
358358
if frustum.Intersects bounds then
359-
set.Add element |> ignore
359+
set.Add element |> ignore<bool>
360360

361361
let rec internal getElementsInViewFrustum interior exterior frustum (set : 'e Octelement HashSet) (node : 'e Octnode) =
362362
match node.Children_ with
@@ -373,11 +373,11 @@ module internal Octnode =
373373
if interior then
374374
if presence.IsInterior || presence.IsExterior then
375375
if element.VisibleInView && frustum.Intersects element.Bounds then
376-
set.Add element |> ignore
376+
set.Add element |> ignore<bool>
377377
elif exterior then
378378
if presence.IsExterior then
379379
if element.VisibleInView && frustum.Intersects element.Bounds then
380-
set.Add element |> ignore
380+
set.Add element |> ignore<bool>
381381

382382
let rec internal getElementsInViewBox box (set : 'e Octelement HashSet) (node : 'e Octnode) =
383383
match node.Children_ with
@@ -391,7 +391,7 @@ module internal Octnode =
391391
| ElementChildren elements ->
392392
for element in elements do
393393
if element.VisibleInView && box.Intersects element.Bounds then
394-
set.Add element |> ignore
394+
set.Add element |> ignore<bool>
395395

396396
let rec internal getElementsInView frustumInterior frustumExterior lightBox (set : 'e Octelement HashSet) (node : 'e Octnode) =
397397
match node.Children_ with
@@ -499,49 +499,49 @@ module Octree =
499499

500500
// add to imposter when such
501501
if presence.IsImposter then
502-
tree.Imposter.Remove element |> ignore
503-
tree.Imposter.Add element |> ignore
502+
tree.Imposter.Remove element |> ignore<bool>
503+
tree.Imposter.Add element |> ignore<bool>
504504

505505
// add to omnipresent when such
506506
if presence.IsOmnipresent then
507-
tree.Omnipresent.Remove element |> ignore
508-
tree.Omnipresent.Add element |> ignore
507+
tree.Omnipresent.Remove element |> ignore<bool>
508+
tree.Omnipresent.Add element |> ignore<bool>
509509

510510
// add to omnipresent-in-play-only when appropriate
511511
let omnipresentInPlayOnly = not presence.IsOmnipresent && presenceInPlay.IsOmnipresent
512512
if omnipresentInPlayOnly then
513-
tree.OmnipresentInPlayOnly.Remove element |> ignore
514-
tree.OmnipresentInPlayOnly.Add element |> ignore
513+
tree.OmnipresentInPlayOnly.Remove element |> ignore<bool>
514+
tree.OmnipresentInPlayOnly.Add element |> ignore<bool>
515515

516516
// add to node tree or ubiquitous fallback
517517
let outOfBounds = not (Octnode.isIntersectingBox bounds tree.Node)
518518
let tooLargeForNode = bounds.Size.Magnitude >= Constants.Engine.OctreeElementMagnitudeMax
519519
if outOfBounds || tooLargeForNode then
520-
tree.UbiquitousFallback.Remove element |> ignore
521-
tree.UbiquitousFallback.Add element |> ignore
522-
else Octnode.addElement bounds &element tree.Node |> ignore
520+
tree.UbiquitousFallback.Remove element |> ignore<bool>
521+
tree.UbiquitousFallback.Add element |> ignore<bool>
522+
else Octnode.addElement bounds &element tree.Node |> ignore<int>
523523

524524
/// Remove an element with the given presence and bounds from the tree.
525525
let removeElement (presence : Presence) (presenceInPlay : Presence) bounds (element : 'e Octelement) tree =
526526

527527
// remove from imposter when appropriate
528528
if presence.IsImposter then
529-
tree.Imposter.Remove element |> ignore
529+
tree.Imposter.Remove element |> ignore<bool>
530530

531531
// remove from omnipresent when appropriate
532532
if presence.IsOmnipresent then
533-
tree.Omnipresent.Remove element |> ignore
533+
tree.Omnipresent.Remove element |> ignore<bool>
534534

535535
// remove from omnipresent-in-play-only when appropriate
536536
let omnipresentInPlayOnly = not presence.IsOmnipresent && presenceInPlay.IsOmnipresent
537537
if omnipresentInPlayOnly then
538-
tree.OmnipresentInPlayOnly.Remove element |> ignore
538+
tree.OmnipresentInPlayOnly.Remove element |> ignore<bool>
539539

540540
// remove from node tree or ubiquitous fallback
541541
let inNode = Octnode.isIntersectingBox bounds tree.Node && bounds.Size.Magnitude < Constants.Engine.OctreeElementMagnitudeMax
542542
if inNode
543-
then Octnode.removeElement bounds &element tree.Node |> ignore
544-
else tree.UbiquitousFallback.Remove element |> ignore
543+
then Octnode.removeElement bounds &element tree.Node |> ignore<int>
544+
else tree.UbiquitousFallback.Remove element |> ignore<bool>
545545

546546
// HACK: because the above logic maintains that a fallback'd element can't also be in a tree node doesn't
547547
// hold (likely due to a subtle bug), we unconditionally remove the element from the tree here.
@@ -556,18 +556,18 @@ module Octree =
556556
let updateElement (presenceOld : Presence) (presenceInPlayOld : Presence) boundsOld (presenceNew : Presence) (presenceInPlayNew : Presence) boundsNew element tree =
557557

558558
// update imposter where appropriate
559-
if presenceOld.IsImposter then tree.Imposter.Remove element |> ignore
560-
if presenceNew.IsImposter then tree.Imposter.Add element |> ignore
559+
if presenceOld.IsImposter then tree.Imposter.Remove element |> ignore<bool>
560+
if presenceNew.IsImposter then tree.Imposter.Add element |> ignore<bool>
561561

562562
// update omnipresent where appropriate
563-
if presenceOld.IsOmnipresent then tree.Omnipresent.Remove element |> ignore
564-
if presenceNew.IsOmnipresent then tree.Omnipresent.Add element |> ignore
563+
if presenceOld.IsOmnipresent then tree.Omnipresent.Remove element |> ignore<bool>
564+
if presenceNew.IsOmnipresent then tree.Omnipresent.Add element |> ignore<bool>
565565

566566
// update omnipresent-in-play-only where appropriate
567567
let omnipresentInPlayOnlyOld = not presenceOld.IsOmnipresent && presenceInPlayOld.IsOmnipresent
568568
let omnipresentInPlayOnlyNew = not presenceNew.IsOmnipresent && presenceInPlayNew.IsOmnipresent
569-
if omnipresentInPlayOnlyOld then tree.OmnipresentInPlayOnly.Remove element |> ignore
570-
if omnipresentInPlayOnlyNew then tree.OmnipresentInPlayOnly.Add element |> ignore
569+
if omnipresentInPlayOnlyOld then tree.OmnipresentInPlayOnly.Remove element |> ignore<bool>
570+
if omnipresentInPlayOnlyNew then tree.OmnipresentInPlayOnly.Add element |> ignore<bool>
571571

572572
// update in node tree or ubiquitous fallback
573573
let wasOutOfBounds = not (Octnode.isIntersectingBox boundsOld tree.Node)
@@ -583,22 +583,22 @@ module Octree =
583583
match tryFindLeafFast boundsNew tree with
584584
| Some leafNew ->
585585
if leafOld.Id = leafNew.Id
586-
then Octnode.updateElement boundsOld boundsNew &element leafNew |> ignore
587-
else Octnode.updateElement boundsOld boundsNew &element tree.Node |> ignore
588-
| None -> Octnode.updateElement boundsOld boundsNew &element tree.Node |> ignore
589-
| None -> Octnode.updateElement boundsOld boundsNew &element tree.Node |> ignore
586+
then Octnode.updateElement boundsOld boundsNew &element leafNew |> ignore<int>
587+
else Octnode.updateElement boundsOld boundsNew &element tree.Node |> ignore<int>
588+
| None -> Octnode.updateElement boundsOld boundsNew &element tree.Node |> ignore<int>
589+
| None -> Octnode.updateElement boundsOld boundsNew &element tree.Node |> ignore<int>
590590
else
591-
tree.UbiquitousFallback.Remove element |> ignore
592-
tree.UbiquitousFallback.Add element |> ignore
593-
Octnode.removeElement boundsOld &element tree.Node |> ignore
591+
tree.UbiquitousFallback.Remove element |> ignore<bool>
592+
tree.UbiquitousFallback.Add element |> ignore<bool>
593+
Octnode.removeElement boundsOld &element tree.Node |> ignore<int>
594594
if isOutOfBounds then logOutOfBounds element tree
595595
else
596596
if isInNode then
597-
tree.UbiquitousFallback.Remove element |> ignore
598-
Octnode.addElement boundsNew &element tree.Node |> ignore
597+
tree.UbiquitousFallback.Remove element |> ignore<bool>
598+
Octnode.addElement boundsNew &element tree.Node |> ignore<int>
599599
else
600-
tree.UbiquitousFallback.Remove element |> ignore
601-
tree.UbiquitousFallback.Add element |> ignore
600+
tree.UbiquitousFallback.Remove element |> ignore<bool>
601+
tree.UbiquitousFallback.Add element |> ignore<bool>
602602
if isOutOfBounds then logOutOfBounds element tree
603603

604604
/// Clear the contents of the tree.

0 commit comments

Comments
 (0)