x_ite 11.2.3 → 11.3.1
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 +4 -4
- package/dist/assets/components/AnnotationComponent.js +3 -3
- package/dist/assets/components/AnnotationComponent.min.js +2 -2
- package/dist/assets/components/CADGeometryComponent.js +104 -42
- package/dist/assets/components/CADGeometryComponent.min.js +2 -2
- package/dist/assets/components/CubeMapTexturingComponent.js +4 -4
- package/dist/assets/components/CubeMapTexturingComponent.min.js +2 -2
- package/dist/assets/components/DISComponent.js +2 -2
- package/dist/assets/components/DISComponent.min.js +2 -2
- package/dist/assets/components/EventUtilitiesComponent.js +2 -2
- package/dist/assets/components/EventUtilitiesComponent.min.js +2 -2
- package/dist/assets/components/Geometry2DComponent.js +2 -2
- package/dist/assets/components/Geometry2DComponent.min.js +2 -2
- package/dist/assets/components/GeospatialComponent.js +90 -125
- package/dist/assets/components/GeospatialComponent.min.js +2 -2
- package/dist/assets/components/HAnimComponent.js +16 -13
- package/dist/assets/components/HAnimComponent.min.js +2 -2
- package/dist/assets/components/KeyDeviceSensorComponent.js +2 -2
- package/dist/assets/components/KeyDeviceSensorComponent.min.js +2 -2
- package/dist/assets/components/LayoutComponent.js +16 -7
- package/dist/assets/components/LayoutComponent.min.js +2 -2
- package/dist/assets/components/NURBSComponent.js +2 -2
- package/dist/assets/components/NURBSComponent.min.js +2 -2
- package/dist/assets/components/ParticleSystemsComponent.js +37 -96
- package/dist/assets/components/ParticleSystemsComponent.min.js +2 -2
- package/dist/assets/components/PickingComponent.js +78 -81
- package/dist/assets/components/PickingComponent.min.js +2 -2
- package/dist/assets/components/RigidBodyPhysicsComponent.js +249 -292
- package/dist/assets/components/RigidBodyPhysicsComponent.min.js +2 -2
- package/dist/assets/components/ScriptingComponent.js +2 -2
- package/dist/assets/components/ScriptingComponent.min.js +2 -2
- package/dist/assets/components/TextComponent.js +2 -2
- package/dist/assets/components/TextComponent.min.js +2 -2
- package/dist/assets/components/TextureProjectionComponent.js +2 -2
- package/dist/assets/components/TextureProjectionComponent.min.js +2 -2
- package/dist/assets/components/Texturing3DComponent.js +4310 -4310
- package/dist/assets/components/Texturing3DComponent.min.js +2 -2
- package/dist/assets/components/VolumeRenderingComponent.js +14 -9
- package/dist/assets/components/VolumeRenderingComponent.min.js +2 -2
- package/dist/assets/components/WebXRComponent.js +2 -2
- package/dist/assets/components/WebXRComponent.min.js +2 -2
- package/dist/assets/components/X_ITEComponent.js +5 -65
- package/dist/assets/components/X_ITEComponent.min.js +2 -2
- package/dist/assets/hatching/1.png +0 -0
- package/dist/assets/hatching/10.png +0 -0
- package/dist/assets/hatching/11.png +0 -0
- package/dist/assets/hatching/12.png +0 -0
- package/dist/assets/hatching/13.png +0 -0
- package/dist/assets/hatching/14.png +0 -0
- package/dist/assets/hatching/15.png +0 -0
- package/dist/assets/hatching/16.png +0 -0
- package/dist/assets/hatching/17.png +0 -0
- package/dist/assets/hatching/18.png +0 -0
- package/dist/assets/hatching/19.png +0 -0
- package/dist/assets/hatching/2.png +0 -0
- package/dist/assets/hatching/3.png +0 -0
- package/dist/assets/hatching/4.png +0 -0
- package/dist/assets/hatching/5.png +0 -0
- package/dist/assets/hatching/6.png +0 -0
- package/dist/assets/hatching/7.png +0 -0
- package/dist/assets/hatching/8.png +0 -0
- package/dist/assets/hatching/9.png +0 -0
- package/dist/assets/images/ExamineViewer.png +0 -0
- package/dist/assets/images/FlyViewer.png +0 -0
- package/dist/assets/images/NoneViewer.png +0 -0
- package/dist/assets/images/PlaneViewer.png +0 -0
- package/dist/assets/images/PrimitiveQuality.png +0 -0
- package/dist/assets/images/Shading.png +0 -0
- package/dist/assets/images/TextureQuality.png +0 -0
- package/dist/assets/images/Time.png +0 -0
- package/dist/assets/images/Viewpoint.png +0 -0
- package/dist/assets/images/WalkViewer.png +0 -0
- package/dist/assets/images/go-next.png +0 -0
- package/dist/assets/images/gtk-fullscreen.png +0 -0
- package/dist/assets/images/gtk-leave-fullscreen.png +0 -0
- package/dist/assets/images/gtk-zoom-fit.png +0 -0
- package/dist/assets/images/gtk-zoom-in.png +0 -0
- package/dist/assets/images/help-about.png +0 -0
- package/dist/assets/images/icon.bw.png +0 -0
- package/dist/assets/images/icon.png +0 -0
- package/dist/assets/images/logo.128.png +0 -0
- package/dist/assets/images/logo.bw.png +0 -0
- package/dist/assets/images/logo.png +0 -0
- package/dist/assets/lib/lut_charlie.png +0 -0
- package/dist/assets/lib/lut_ggx.png +0 -0
- package/dist/assets/lib/lut_sheen_E.png +0 -0
- package/dist/assets/linetype/linetypes.png +0 -0
- package/dist/example.html +1 -1
- package/dist/x_ite.css +1 -1
- package/dist/x_ite.js +55579 -55335
- package/dist/x_ite.min.js +2 -2
- package/dist/x_ite.min.mjs +2 -2
- package/dist/x_ite.mjs +55256 -55012
- package/dist/x_ite.zip +0 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* X_ITE v11.
|
|
2
|
-
const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-11.
|
|
1
|
+
/* X_ITE v11.3.1 */
|
|
2
|
+
const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-11.3.1")];
|
|
3
3
|
/******/ (() => { // webpackBootstrap
|
|
4
4
|
/******/ var __webpack_modules__ = ({
|
|
5
5
|
|
|
@@ -618,6 +618,9 @@ var external_X_ITE_X3D_X3DChildNode_default = /*#__PURE__*/__webpack_require__.n
|
|
|
618
618
|
;// external "__X_ITE_X3D__ .X3DBoundedObject"
|
|
619
619
|
const external_X_ITE_X3D_X3DBoundedObject_namespaceObject = __X_ITE_X3D__ .X3DBoundedObject;
|
|
620
620
|
var external_X_ITE_X3D_X3DBoundedObject_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_X3DBoundedObject_namespaceObject);
|
|
621
|
+
;// external "__X_ITE_X3D__ .TraverseType"
|
|
622
|
+
const external_X_ITE_X3D_TraverseType_namespaceObject = __X_ITE_X3D__ .TraverseType;
|
|
623
|
+
var external_X_ITE_X3D_TraverseType_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_TraverseType_namespaceObject);
|
|
621
624
|
;// ./src/x_ite/Components/RigidBodyPhysics/X3DNBodyCollidableNode.js
|
|
622
625
|
/*******************************************************************************
|
|
623
626
|
*
|
|
@@ -675,6 +678,8 @@ var external_X_ITE_X3D_X3DBoundedObject_default = /*#__PURE__*/__webpack_require
|
|
|
675
678
|
|
|
676
679
|
|
|
677
680
|
|
|
681
|
+
|
|
682
|
+
|
|
678
683
|
function X3DNBodyCollidableNode (executionContext)
|
|
679
684
|
{
|
|
680
685
|
external_X_ITE_X3D_X3DChildNode_default().call (this, executionContext);
|
|
@@ -682,8 +687,14 @@ function X3DNBodyCollidableNode (executionContext)
|
|
|
682
687
|
|
|
683
688
|
this .addType ((external_X_ITE_X3D_X3DConstants_default()).X3DNBodyCollidableNode);
|
|
684
689
|
|
|
685
|
-
this .addChildObjects ((external_X_ITE_X3D_X3DConstants_default()).
|
|
686
|
-
(external_X_ITE_X3D_X3DConstants_default()).outputOnly,
|
|
690
|
+
this .addChildObjects ((external_X_ITE_X3D_X3DConstants_default()).outputOnly, "body", new (external_X_ITE_X3D_Fields_default()).SFNode (),
|
|
691
|
+
(external_X_ITE_X3D_X3DConstants_default()).outputOnly, "compoundShape", new (external_X_ITE_X3D_Fields_default()).SFTime (),
|
|
692
|
+
(external_X_ITE_X3D_X3DConstants_default()).outputOnly, "rebuild", new (external_X_ITE_X3D_Fields_default()).SFTime ());
|
|
693
|
+
|
|
694
|
+
this .setPointingObject (true);
|
|
695
|
+
this .setCollisionObject (true);
|
|
696
|
+
this .setShadowObject (true);
|
|
697
|
+
this .setVisibleObject (true);
|
|
687
698
|
|
|
688
699
|
// Units
|
|
689
700
|
|
|
@@ -691,9 +702,9 @@ function X3DNBodyCollidableNode (executionContext)
|
|
|
691
702
|
|
|
692
703
|
// Members
|
|
693
704
|
|
|
694
|
-
this .compoundShape
|
|
695
|
-
this .offset
|
|
696
|
-
this .matrix
|
|
705
|
+
this .compoundShape = new AmmoClass .btCompoundShape ()
|
|
706
|
+
this .offset = new (external_X_ITE_X3D_Vector3_default()) ();
|
|
707
|
+
this .matrix = new (external_X_ITE_X3D_Matrix4_default()) ();
|
|
697
708
|
}
|
|
698
709
|
|
|
699
710
|
Object .assign (Object .setPrototypeOf (X3DNBodyCollidableNode .prototype, (external_X_ITE_X3D_X3DChildNode_default()).prototype),
|
|
@@ -704,20 +715,29 @@ Object .assign (Object .setPrototypeOf (X3DNBodyCollidableNode .prototype, (exte
|
|
|
704
715
|
external_X_ITE_X3D_X3DChildNode_default().prototype .initialize .call (this);
|
|
705
716
|
external_X_ITE_X3D_X3DBoundedObject_default().prototype .initialize .call (this);
|
|
706
717
|
|
|
718
|
+
this ._rebuild .addInterest ("set_child__", this);
|
|
719
|
+
|
|
707
720
|
this .addInterest ("eventsProcessed", this);
|
|
708
721
|
|
|
709
722
|
this .eventsProcessed ();
|
|
710
723
|
},
|
|
724
|
+
getBBox (bbox, shadows)
|
|
725
|
+
{
|
|
726
|
+
if (this .isDefaultBBoxSize ())
|
|
727
|
+
return this .boundedObject ?.getBBox (bbox, shadows) .multRight (this .matrix) ?? bbox .set ();
|
|
728
|
+
|
|
729
|
+
return bbox .set (this ._bboxSize .getValue (), this ._bboxCenter .getValue ());
|
|
730
|
+
},
|
|
711
731
|
getLocalTransform: (() =>
|
|
712
732
|
{
|
|
713
|
-
|
|
733
|
+
const
|
|
714
734
|
m = new (external_X_ITE_X3D_Matrix4_default()) (),
|
|
715
735
|
o = new AmmoClass .btVector3 (0, 0, 0),
|
|
716
736
|
l = new AmmoClass .btTransform ();
|
|
717
737
|
|
|
718
738
|
return function ()
|
|
719
739
|
{
|
|
720
|
-
m .assign (this .
|
|
740
|
+
m .assign (this .matrix);
|
|
721
741
|
m .translate (this .offset);
|
|
722
742
|
|
|
723
743
|
//this .localTransform .setFromOpenGLMatrix (m);
|
|
@@ -757,6 +777,110 @@ Object .assign (Object .setPrototypeOf (X3DNBodyCollidableNode .prototype, (exte
|
|
|
757
777
|
{
|
|
758
778
|
return this .matrix;
|
|
759
779
|
},
|
|
780
|
+
getChild ()
|
|
781
|
+
{
|
|
782
|
+
return this .childNode;
|
|
783
|
+
},
|
|
784
|
+
setChild (childNode)
|
|
785
|
+
{
|
|
786
|
+
// Remove node.
|
|
787
|
+
|
|
788
|
+
if (this .childNode)
|
|
789
|
+
{
|
|
790
|
+
const childNode = this .childNode;
|
|
791
|
+
|
|
792
|
+
childNode ._isPointingObject .removeInterest ("requestRebuild", this);
|
|
793
|
+
childNode ._isCameraObject .removeInterest ("requestRebuild", this);
|
|
794
|
+
childNode ._isPickableObject .removeInterest ("requestRebuild", this);
|
|
795
|
+
childNode ._isCollisionObject .removeInterest ("requestRebuild", this);
|
|
796
|
+
childNode ._isShadowObject .removeInterest ("requestRebuild", this);
|
|
797
|
+
childNode ._isVisibleObject .removeInterest ("requestRebuild", this);
|
|
798
|
+
|
|
799
|
+
if (external_X_ITE_X3D_X3DCast_default() ((external_X_ITE_X3D_X3DConstants_default()).X3DBoundedObject, childNode))
|
|
800
|
+
{
|
|
801
|
+
childNode ._display .removeInterest ("requestRebuild", this);
|
|
802
|
+
childNode ._bboxDisplay .removeInterest ("requestRebuild", this);
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
// Clear node.
|
|
807
|
+
|
|
808
|
+
this .childNode = null;
|
|
809
|
+
this .pointingNode = null;
|
|
810
|
+
this .cameraObject = null;
|
|
811
|
+
this .pickableObject = null;
|
|
812
|
+
this .collisionObject = null;
|
|
813
|
+
this .shadowObject = null;
|
|
814
|
+
this .visibleNode = null;
|
|
815
|
+
this .boundedObject = null;
|
|
816
|
+
this .bboxObject = null;
|
|
817
|
+
|
|
818
|
+
// Add node.
|
|
819
|
+
|
|
820
|
+
if (childNode)
|
|
821
|
+
{
|
|
822
|
+
childNode ._isPointingObject .addInterest ("requestRebuild", this);
|
|
823
|
+
childNode ._isCameraObject .addInterest ("requestRebuild", this);
|
|
824
|
+
childNode ._isPickableObject .addInterest ("requestRebuild", this);
|
|
825
|
+
childNode ._isCollisionObject .addInterest ("requestRebuild", this);
|
|
826
|
+
childNode ._isShadowObject .addInterest ("requestRebuild", this);
|
|
827
|
+
childNode ._isVisibleObject .addInterest ("requestRebuild", this);
|
|
828
|
+
|
|
829
|
+
this .childNode = childNode;
|
|
830
|
+
|
|
831
|
+
if (childNode .isVisible ())
|
|
832
|
+
{
|
|
833
|
+
if (childNode .isPointingObject ())
|
|
834
|
+
this .pointingNode = childNode;
|
|
835
|
+
|
|
836
|
+
if (childNode .isCameraObject ())
|
|
837
|
+
this .cameraObject = childNode;
|
|
838
|
+
|
|
839
|
+
if (childNode .isPickableObject ())
|
|
840
|
+
this .pickableObject = childNode;
|
|
841
|
+
|
|
842
|
+
if (childNode .isCollisionObject ())
|
|
843
|
+
this .collisionObject = childNode;
|
|
844
|
+
|
|
845
|
+
if (childNode .isShadowObject ())
|
|
846
|
+
this .shadowObject = childNode;
|
|
847
|
+
|
|
848
|
+
if (childNode .isVisibleObject ())
|
|
849
|
+
this .visibleNode = childNode;
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
if (childNode .isVisible () && childNode .getBBox)
|
|
853
|
+
this .boundedObject = childNode;
|
|
854
|
+
|
|
855
|
+
if (external_X_ITE_X3D_X3DCast_default() ((external_X_ITE_X3D_X3DConstants_default()).X3DBoundedObject, childNode))
|
|
856
|
+
{
|
|
857
|
+
childNode ._display .addInterest ("requestRebuild", this);
|
|
858
|
+
childNode ._bboxDisplay .addInterest ("requestRebuild", this);
|
|
859
|
+
|
|
860
|
+
if (childNode .isBBoxVisible ())
|
|
861
|
+
this .bboxObject = childNode;
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
delete this .traverse;
|
|
865
|
+
}
|
|
866
|
+
else
|
|
867
|
+
{
|
|
868
|
+
this .traverse = Function .prototype;
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
this .setPointingObject (this .pointingNode);
|
|
872
|
+
this .setCameraObject (this .cameraObject);
|
|
873
|
+
this .setPickableObject (this .pickableObject);
|
|
874
|
+
this .setCollisionObject (this .collisionObject);
|
|
875
|
+
this .setShadowObject (this .shadowObject);
|
|
876
|
+
this .setVisibleObject (this .visibleNode || this .bboxObject);
|
|
877
|
+
},
|
|
878
|
+
requestRebuild ()
|
|
879
|
+
{
|
|
880
|
+
this ._rebuild .addEvent ();
|
|
881
|
+
},
|
|
882
|
+
set_child__ ()
|
|
883
|
+
{ },
|
|
760
884
|
eventsProcessed ()
|
|
761
885
|
{
|
|
762
886
|
this .matrix .set (this ._translation .getValue (),
|
|
@@ -765,6 +889,61 @@ Object .assign (Object .setPrototypeOf (X3DNBodyCollidableNode .prototype, (exte
|
|
|
765
889
|
if (this .compoundShape .getNumChildShapes ())
|
|
766
890
|
this .compoundShape .updateChildTransform (0, this .getLocalTransform (), true);
|
|
767
891
|
},
|
|
892
|
+
traverse (type, renderObject)
|
|
893
|
+
{
|
|
894
|
+
const modelViewMatrix = renderObject .getModelViewMatrix ();
|
|
895
|
+
|
|
896
|
+
modelViewMatrix .push ();
|
|
897
|
+
modelViewMatrix .multLeft (this .matrix);
|
|
898
|
+
|
|
899
|
+
switch (type)
|
|
900
|
+
{
|
|
901
|
+
case (external_X_ITE_X3D_TraverseType_default()).POINTER:
|
|
902
|
+
{
|
|
903
|
+
this .pointingNode ?.traverse (type, renderObject);
|
|
904
|
+
break;
|
|
905
|
+
}
|
|
906
|
+
case (external_X_ITE_X3D_TraverseType_default()).CAMERA:
|
|
907
|
+
{
|
|
908
|
+
this .cameraObject ?.traverse (type, renderObject);
|
|
909
|
+
break;
|
|
910
|
+
}
|
|
911
|
+
case (external_X_ITE_X3D_TraverseType_default()).PICKING:
|
|
912
|
+
{
|
|
913
|
+
const
|
|
914
|
+
browser = this .getBrowser (),
|
|
915
|
+
pickingHierarchy = browser .getPickingHierarchy ();
|
|
916
|
+
|
|
917
|
+
pickingHierarchy .push (this);
|
|
918
|
+
|
|
919
|
+
if (browser .getPickable () .at (-1))
|
|
920
|
+
this .visibleNode ?.traverse (type, renderObject);
|
|
921
|
+
else
|
|
922
|
+
this .pickableObject ?.traverse (type, renderObject);
|
|
923
|
+
|
|
924
|
+
pickingHierarchy .pop ();
|
|
925
|
+
break;
|
|
926
|
+
}
|
|
927
|
+
case (external_X_ITE_X3D_TraverseType_default()).COLLISION:
|
|
928
|
+
{
|
|
929
|
+
this .collisionObject ?.traverse (type, renderObject);
|
|
930
|
+
break;
|
|
931
|
+
}
|
|
932
|
+
case (external_X_ITE_X3D_TraverseType_default()).SHADOW:
|
|
933
|
+
{
|
|
934
|
+
this .shadowObject ?.traverse (type, renderObject);
|
|
935
|
+
break;
|
|
936
|
+
}
|
|
937
|
+
case (external_X_ITE_X3D_TraverseType_default()).DISPLAY:
|
|
938
|
+
{
|
|
939
|
+
this .visibleNode ?.traverse (type, renderObject);
|
|
940
|
+
this .bboxObject ?.displayBBox (type, renderObject);
|
|
941
|
+
break;
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
modelViewMatrix .pop ();
|
|
946
|
+
},
|
|
768
947
|
dispose ()
|
|
769
948
|
{
|
|
770
949
|
external_X_ITE_X3D_X3DBoundedObject_default().prototype .dispose .call (this);
|
|
@@ -778,9 +957,6 @@ const X3DNBodyCollidableNode_default_ = X3DNBodyCollidableNode;
|
|
|
778
957
|
;
|
|
779
958
|
|
|
780
959
|
/* harmony default export */ const RigidBodyPhysics_X3DNBodyCollidableNode = (external_X_ITE_X3D_Namespace_default().add ("X3DNBodyCollidableNode", X3DNBodyCollidableNode_default_));
|
|
781
|
-
;// external "__X_ITE_X3D__ .TraverseType"
|
|
782
|
-
const external_X_ITE_X3D_TraverseType_namespaceObject = __X_ITE_X3D__ .TraverseType;
|
|
783
|
-
var external_X_ITE_X3D_TraverseType_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_TraverseType_namespaceObject);
|
|
784
960
|
;// ./src/x_ite/Components/RigidBodyPhysics/CollidableOffset.js
|
|
785
961
|
/*******************************************************************************
|
|
786
962
|
*
|
|
@@ -837,7 +1013,6 @@ var external_X_ITE_X3D_TraverseType_default = /*#__PURE__*/__webpack_require__.n
|
|
|
837
1013
|
|
|
838
1014
|
|
|
839
1015
|
|
|
840
|
-
|
|
841
1016
|
function CollidableOffset (executionContext)
|
|
842
1017
|
{
|
|
843
1018
|
RigidBodyPhysics_X3DNBodyCollidableNode .call (this, executionContext);
|
|
@@ -852,153 +1027,45 @@ Object .assign (Object .setPrototypeOf (CollidableOffset .prototype, RigidBodyPh
|
|
|
852
1027
|
RigidBodyPhysics_X3DNBodyCollidableNode .prototype .initialize .call (this);
|
|
853
1028
|
|
|
854
1029
|
this ._enabled .addInterest ("set_collidableGeometry__", this);
|
|
855
|
-
this ._collidable .addInterest ("
|
|
1030
|
+
this ._collidable .addInterest ("requestRebuild", this);
|
|
856
1031
|
|
|
857
|
-
this .
|
|
1032
|
+
this .set_child__ ();
|
|
858
1033
|
},
|
|
859
|
-
|
|
1034
|
+
set_child__ ()
|
|
860
1035
|
{
|
|
861
|
-
|
|
862
|
-
return this .visibleNode ?.getBBox (bbox, shadows) .multRight (this .getMatrix ()) ?? bbox .set ();
|
|
1036
|
+
// Remove node.
|
|
863
1037
|
|
|
864
|
-
|
|
865
|
-
},
|
|
866
|
-
set_collidable__ ()
|
|
867
|
-
{
|
|
868
|
-
if (this .collidableNode)
|
|
1038
|
+
if (this .getChild ())
|
|
869
1039
|
{
|
|
870
|
-
|
|
871
|
-
this .collidableNode ._compoundShape_changed .removeFieldInterest (this ._compoundShape_changed);
|
|
872
|
-
|
|
873
|
-
this .collidableNode ._isCameraObject .removeFieldInterest (this ._isCameraObject);
|
|
874
|
-
this .collidableNode ._isPickableObject .removeFieldInterest (this ._isPickableObject);
|
|
1040
|
+
const collidableNode = this .getChild ();
|
|
875
1041
|
|
|
876
|
-
|
|
877
|
-
|
|
1042
|
+
collidableNode .removeInterest ("addNodeEvent", this);
|
|
1043
|
+
collidableNode ._compoundShape .removeFieldInterest (this ._compoundShape);
|
|
878
1044
|
}
|
|
879
1045
|
|
|
880
|
-
|
|
1046
|
+
// Add node.
|
|
881
1047
|
|
|
882
|
-
|
|
883
|
-
{
|
|
884
|
-
this .collidableNode .addInterest ("addNodeEvent", this);
|
|
885
|
-
this .collidableNode ._compoundShape_changed .addFieldInterest (this ._compoundShape_changed);
|
|
886
|
-
|
|
887
|
-
this .collidableNode ._isCameraObject .addFieldInterest (this ._isCameraObject);
|
|
888
|
-
this .collidableNode ._isPickableObject .addFieldInterest (this ._isPickableObject);
|
|
1048
|
+
const collidableNode = external_X_ITE_X3D_X3DCast_default() ((external_X_ITE_X3D_X3DConstants_default()).X3DNBodyCollidableNode, this ._collidable);
|
|
889
1049
|
|
|
890
|
-
|
|
891
|
-
this .collidableNode ._bboxDisplay .addInterest ("set_bboxDisplay__", this);
|
|
1050
|
+
this .setChild (collidableNode);
|
|
892
1051
|
|
|
893
|
-
|
|
894
|
-
this .setPickableObject (this .collidableNode .isPickableObject ());
|
|
895
|
-
|
|
896
|
-
delete this .traverse;
|
|
897
|
-
}
|
|
898
|
-
else
|
|
1052
|
+
if (collidableNode)
|
|
899
1053
|
{
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
this .traverse = Function .prototype;
|
|
1054
|
+
collidableNode .addInterest ("addNodeEvent", this);
|
|
1055
|
+
collidableNode ._compoundShape .addFieldInterest (this ._compoundShape);
|
|
904
1056
|
}
|
|
905
1057
|
|
|
906
|
-
this .set_display__ ();
|
|
907
|
-
this .set_bboxDisplay__ ();
|
|
908
1058
|
this .set_collidableGeometry__ ();
|
|
909
1059
|
},
|
|
910
|
-
set_cameraObject__ ()
|
|
911
|
-
{
|
|
912
|
-
this .setCameraObject (this .visibleNode ?.isCameraObject ());
|
|
913
|
-
},
|
|
914
|
-
set_display__ ()
|
|
915
|
-
{
|
|
916
|
-
if (this .collidableNode)
|
|
917
|
-
this .visibleNode = this .collidableNode ._display .getValue () ? this .collidableNode : null;
|
|
918
|
-
else
|
|
919
|
-
this .visibleNode = this .collidableNode;
|
|
920
|
-
|
|
921
|
-
this .set_cameraObject__ ();
|
|
922
|
-
},
|
|
923
|
-
set_bboxDisplay__ ()
|
|
924
|
-
{
|
|
925
|
-
if (this .collidableNode)
|
|
926
|
-
this .boundedObject = this .collidableNode ._bboxDisplay .getValue () ? this .collidableNode : null;
|
|
927
|
-
else
|
|
928
|
-
this .boundedObject = null;
|
|
929
|
-
},
|
|
930
1060
|
set_collidableGeometry__ ()
|
|
931
1061
|
{
|
|
932
1062
|
if (this .getCompoundShape () .getNumChildShapes ())
|
|
933
1063
|
this .getCompoundShape () .removeChildShapeByIndex (0);
|
|
934
1064
|
|
|
935
|
-
if (this .
|
|
936
|
-
this .getCompoundShape () .addChildShape (this .getLocalTransform (), this .
|
|
937
|
-
|
|
938
|
-
this ._compoundShape_changed = this .getBrowser () .getCurrentTime ();
|
|
939
|
-
},
|
|
940
|
-
traverse (type, renderObject)
|
|
941
|
-
{
|
|
942
|
-
switch (type)
|
|
943
|
-
{
|
|
944
|
-
case (external_X_ITE_X3D_TraverseType_default()).POINTER:
|
|
945
|
-
case (external_X_ITE_X3D_TraverseType_default()).CAMERA:
|
|
946
|
-
case (external_X_ITE_X3D_TraverseType_default()).SHADOW:
|
|
947
|
-
{
|
|
948
|
-
const modelViewMatrix = renderObject .getModelViewMatrix ();
|
|
949
|
-
|
|
950
|
-
modelViewMatrix .push ();
|
|
951
|
-
modelViewMatrix .multLeft (this .getMatrix ());
|
|
952
|
-
|
|
953
|
-
this .visibleNode ?.traverse (type, renderObject);
|
|
954
|
-
|
|
955
|
-
modelViewMatrix .pop ();
|
|
956
|
-
return;
|
|
957
|
-
}
|
|
958
|
-
case (external_X_ITE_X3D_TraverseType_default()).PICKING:
|
|
959
|
-
{
|
|
960
|
-
const
|
|
961
|
-
browser = this .getBrowser (),
|
|
962
|
-
pickingHierarchy = browser .getPickingHierarchy (),
|
|
963
|
-
modelViewMatrix = renderObject .getModelViewMatrix ();
|
|
964
|
-
|
|
965
|
-
pickingHierarchy .push (this);
|
|
966
|
-
modelViewMatrix .push ();
|
|
967
|
-
modelViewMatrix .multLeft (this .getMatrix ());
|
|
968
|
-
|
|
969
|
-
this .visibleNode ?.traverse (type, renderObject);
|
|
970
|
-
|
|
971
|
-
modelViewMatrix .pop ();
|
|
972
|
-
pickingHierarchy .pop ();
|
|
973
|
-
break;
|
|
974
|
-
}
|
|
975
|
-
case (external_X_ITE_X3D_TraverseType_default()).COLLISION:
|
|
976
|
-
{
|
|
977
|
-
const modelViewMatrix = renderObject .getModelViewMatrix ();
|
|
978
|
-
|
|
979
|
-
modelViewMatrix .push ();
|
|
980
|
-
modelViewMatrix .multLeft (this .getMatrix ());
|
|
981
|
-
|
|
982
|
-
this .visibleNode ?.traverse (type, renderObject);
|
|
983
|
-
|
|
984
|
-
modelViewMatrix .pop ();
|
|
985
|
-
break;
|
|
986
|
-
}
|
|
987
|
-
case (external_X_ITE_X3D_TraverseType_default()).DISPLAY:
|
|
988
|
-
{
|
|
989
|
-
const modelViewMatrix = renderObject .getModelViewMatrix ();
|
|
990
|
-
|
|
991
|
-
modelViewMatrix .push ();
|
|
992
|
-
modelViewMatrix .multLeft (this .getMatrix ());
|
|
1065
|
+
if (this .getChild () && this ._enabled .getValue ())
|
|
1066
|
+
this .getCompoundShape () .addChildShape (this .getLocalTransform (), this .getChild () .getCompoundShape ());
|
|
993
1067
|
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
this .boundedObject ?.displayBBox (type, renderObject);
|
|
997
|
-
|
|
998
|
-
modelViewMatrix .pop ();
|
|
999
|
-
return;
|
|
1000
|
-
}
|
|
1001
|
-
}
|
|
1068
|
+
this ._compoundShape = this .getBrowser () .getCurrentTime ();
|
|
1002
1069
|
},
|
|
1003
1070
|
});
|
|
1004
1071
|
|
|
@@ -1083,13 +1150,14 @@ const CollidableOffset_default_ = CollidableOffset;
|
|
|
1083
1150
|
|
|
1084
1151
|
|
|
1085
1152
|
|
|
1086
|
-
|
|
1087
1153
|
function CollidableShape (executionContext)
|
|
1088
1154
|
{
|
|
1089
1155
|
RigidBodyPhysics_X3DNBodyCollidableNode .call (this, executionContext);
|
|
1090
1156
|
|
|
1091
1157
|
this .addType ((external_X_ITE_X3D_X3DConstants_default()).CollidableShape);
|
|
1092
1158
|
|
|
1159
|
+
// Private properties
|
|
1160
|
+
|
|
1093
1161
|
this .convex = false;
|
|
1094
1162
|
}
|
|
1095
1163
|
|
|
@@ -1100,39 +1168,32 @@ Object .assign (Object .setPrototypeOf (CollidableShape .prototype, RigidBodyPhy
|
|
|
1100
1168
|
RigidBodyPhysics_X3DNBodyCollidableNode .prototype .initialize .call (this);
|
|
1101
1169
|
|
|
1102
1170
|
this ._enabled .addInterest ("set_collidableGeometry__", this);
|
|
1103
|
-
this ._shape .addInterest ("
|
|
1171
|
+
this ._shape .addInterest ("requestRebuild", this);
|
|
1104
1172
|
|
|
1105
|
-
this .
|
|
1173
|
+
this .set_child__ ();
|
|
1106
1174
|
},
|
|
1107
|
-
|
|
1175
|
+
isConvex ()
|
|
1108
1176
|
{
|
|
1109
|
-
|
|
1110
|
-
return this .visibleNode ?.getBBox (bbox, shadows) .multRight (this .getMatrix ()) ?? bbox .set ();
|
|
1111
|
-
|
|
1112
|
-
return bbox .set (this ._bboxSize .getValue (), this ._bboxCenter .getValue ());
|
|
1177
|
+
return this .convex;
|
|
1113
1178
|
},
|
|
1114
1179
|
setConvex (value)
|
|
1115
1180
|
{
|
|
1116
1181
|
this .convex = value;
|
|
1117
1182
|
},
|
|
1118
|
-
getConvex ()
|
|
1119
|
-
{
|
|
1120
|
-
return this .convex;
|
|
1121
|
-
},
|
|
1122
1183
|
createConvexGeometry: (() =>
|
|
1123
1184
|
{
|
|
1124
|
-
|
|
1185
|
+
const p = new AmmoClass .btVector3 ();
|
|
1125
1186
|
|
|
1126
1187
|
return function ()
|
|
1127
1188
|
{
|
|
1128
|
-
|
|
1189
|
+
const vertices = this .geometryNode .getVertices () .getValue ();
|
|
1129
1190
|
|
|
1130
1191
|
if (vertices .length === 0)
|
|
1131
1192
|
return null;
|
|
1132
1193
|
|
|
1133
|
-
|
|
1194
|
+
const convexHull = new AmmoClass .btConvexHullShape ();
|
|
1134
1195
|
|
|
1135
|
-
for (
|
|
1196
|
+
for (let i = 0, length = vertices .length; i < length; i += 4)
|
|
1136
1197
|
{
|
|
1137
1198
|
p .setValue (vertices [i], vertices [i + 1], vertices [i + 2]);
|
|
1138
1199
|
convexHull .addPoint (p, false);
|
|
@@ -1145,21 +1206,21 @@ Object .assign (Object .setPrototypeOf (CollidableShape .prototype, RigidBodyPhy
|
|
|
1145
1206
|
})(),
|
|
1146
1207
|
createConcaveGeometry: (() =>
|
|
1147
1208
|
{
|
|
1148
|
-
|
|
1209
|
+
const
|
|
1149
1210
|
p1 = new AmmoClass .btVector3 (),
|
|
1150
1211
|
p2 = new AmmoClass .btVector3 (),
|
|
1151
1212
|
p3 = new AmmoClass .btVector3 ();
|
|
1152
1213
|
|
|
1153
1214
|
return function ()
|
|
1154
1215
|
{
|
|
1155
|
-
|
|
1216
|
+
const vertices = this .geometryNode .getVertices () .getValue ();
|
|
1156
1217
|
|
|
1157
1218
|
if (vertices .length === 0)
|
|
1158
1219
|
return null;
|
|
1159
1220
|
|
|
1160
1221
|
this .triangleMesh = new AmmoClass .btTriangleMesh ();
|
|
1161
1222
|
|
|
1162
|
-
for (
|
|
1223
|
+
for (let i = 0, length = vertices .length; i < length; i += 12)
|
|
1163
1224
|
{
|
|
1164
1225
|
p1 .setValue (vertices [i], vertices [i + 1], vertices [i + 2]);
|
|
1165
1226
|
p2 .setValue (vertices [i + 4], vertices [i + 5], vertices [i + 6]);
|
|
@@ -1171,76 +1232,35 @@ Object .assign (Object .setPrototypeOf (CollidableShape .prototype, RigidBodyPhy
|
|
|
1171
1232
|
return new AmmoClass .btBvhTriangleMeshShape (this .triangleMesh, false);
|
|
1172
1233
|
};
|
|
1173
1234
|
})(),
|
|
1174
|
-
|
|
1235
|
+
set_child__ ()
|
|
1175
1236
|
{
|
|
1176
|
-
|
|
1177
|
-
{
|
|
1178
|
-
this .shapeNode ._isCameraObject .removeFieldInterest (this ._isCameraObject);
|
|
1179
|
-
this .shapeNode ._isPickableObject .removeFieldInterest (this ._isPickableObject);
|
|
1237
|
+
// Remove node.
|
|
1180
1238
|
|
|
1181
|
-
|
|
1182
|
-
|
|
1239
|
+
if (this .getChild ())
|
|
1240
|
+
{
|
|
1241
|
+
const shapeNode = this .getChild ();
|
|
1183
1242
|
|
|
1184
|
-
|
|
1243
|
+
shapeNode ._geometry .removeInterest ("set_geometry__", this);
|
|
1185
1244
|
}
|
|
1186
1245
|
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
if (this .shapeNode)
|
|
1190
|
-
{
|
|
1191
|
-
this .shapeNode ._isCameraObject .addFieldInterest (this ._isCameraObject);
|
|
1192
|
-
this .shapeNode ._isPickableObject .addFieldInterest (this ._isPickableObject);
|
|
1193
|
-
|
|
1194
|
-
this .shapeNode ._display .addInterest ("set_display__", this);
|
|
1195
|
-
this .shapeNode ._bboxDisplay .addInterest ("set_bboxDisplay__", this);
|
|
1246
|
+
// Add node.
|
|
1196
1247
|
|
|
1197
|
-
|
|
1248
|
+
const shapeNode = external_X_ITE_X3D_X3DCast_default() ((external_X_ITE_X3D_X3DConstants_default()).Shape, this ._shape);
|
|
1198
1249
|
|
|
1199
|
-
|
|
1200
|
-
this .setPickableObject (this .shapeNode .isPickableObject ());
|
|
1250
|
+
this .setChild (shapeNode);
|
|
1201
1251
|
|
|
1202
|
-
|
|
1203
|
-
}
|
|
1204
|
-
else
|
|
1252
|
+
if (shapeNode)
|
|
1205
1253
|
{
|
|
1206
|
-
|
|
1207
|
-
this .setPickableObject (false);
|
|
1208
|
-
|
|
1209
|
-
this .traverse = Function .prototype;
|
|
1254
|
+
shapeNode ._geometry .addInterest ("set_geometry__", this);
|
|
1210
1255
|
}
|
|
1211
1256
|
|
|
1212
|
-
this .set_display__ ();
|
|
1213
|
-
this .set_bboxDisplay__ ();
|
|
1214
1257
|
this .set_geometry__ ();
|
|
1215
1258
|
},
|
|
1216
|
-
set_cameraObject__ ()
|
|
1217
|
-
{
|
|
1218
|
-
this .setCameraObject (this .visibleNode ?.isCameraObject ());
|
|
1219
|
-
},
|
|
1220
|
-
set_display__ ()
|
|
1221
|
-
{
|
|
1222
|
-
if (this .shapeNode)
|
|
1223
|
-
this .visibleNode = this .shapeNode ._display .getValue () ? this .shapeNode : null;
|
|
1224
|
-
else
|
|
1225
|
-
this .visibleNode = this .shapeNode;
|
|
1226
|
-
|
|
1227
|
-
this .set_cameraObject__ ();
|
|
1228
|
-
},
|
|
1229
|
-
set_bboxDisplay__ ()
|
|
1230
|
-
{
|
|
1231
|
-
if (this .shapeNode)
|
|
1232
|
-
this .boundedObject = this .shapeNode ._bboxDisplay .getValue () ? this .shapeNode : null;
|
|
1233
|
-
else
|
|
1234
|
-
this .boundedObject = null;
|
|
1235
|
-
},
|
|
1236
1259
|
set_geometry__ ()
|
|
1237
1260
|
{
|
|
1238
1261
|
this .geometryNode ?._rebuild .removeInterest ("set_collidableGeometry__", this);
|
|
1239
1262
|
|
|
1240
|
-
|
|
1241
|
-
this .geometryNode = this .shapeNode .getGeometry ();
|
|
1242
|
-
else
|
|
1243
|
-
this .geometryNode = null;
|
|
1263
|
+
this .geometryNode = this .getChild () ?.getGeometry () ?? null;
|
|
1244
1264
|
|
|
1245
1265
|
this .geometryNode ?._rebuild .addInterest ("set_collidableGeometry__", this);
|
|
1246
1266
|
|
|
@@ -1248,13 +1268,13 @@ Object .assign (Object .setPrototypeOf (CollidableShape .prototype, RigidBodyPhy
|
|
|
1248
1268
|
},
|
|
1249
1269
|
set_collidableGeometry__: (() =>
|
|
1250
1270
|
{
|
|
1251
|
-
|
|
1271
|
+
const
|
|
1252
1272
|
localScaling = new AmmoClass .btVector3 (),
|
|
1253
1273
|
defaultScaling = new AmmoClass .btVector3 (1, 1, 1);
|
|
1254
1274
|
|
|
1255
1275
|
return function ()
|
|
1256
1276
|
{
|
|
1257
|
-
|
|
1277
|
+
const ls = this .getCompoundShape () .getLocalScaling ();
|
|
1258
1278
|
localScaling .setValue (ls .x (), ls .y (), ls .z ());
|
|
1259
1279
|
|
|
1260
1280
|
this .removeCollidableGeometry ();
|
|
@@ -1263,15 +1283,15 @@ Object .assign (Object .setPrototypeOf (CollidableShape .prototype, RigidBodyPhy
|
|
|
1263
1283
|
|
|
1264
1284
|
if (this ._enabled .getValue () && this .geometryNode && this .geometryNode .getGeometryType () > 1)
|
|
1265
1285
|
{
|
|
1266
|
-
|
|
1286
|
+
const type = this .geometryNode .getType ();
|
|
1267
1287
|
|
|
1268
|
-
for (
|
|
1288
|
+
for (let t = type .length - 1; t >= 0; -- t)
|
|
1269
1289
|
{
|
|
1270
1290
|
switch (type [t])
|
|
1271
1291
|
{
|
|
1272
1292
|
case (external_X_ITE_X3D_X3DConstants_default()).Box:
|
|
1273
1293
|
{
|
|
1274
|
-
|
|
1294
|
+
const
|
|
1275
1295
|
box = this .geometryNode,
|
|
1276
1296
|
size = box ._size .getValue ();
|
|
1277
1297
|
|
|
@@ -1280,7 +1300,7 @@ Object .assign (Object .setPrototypeOf (CollidableShape .prototype, RigidBodyPhy
|
|
|
1280
1300
|
}
|
|
1281
1301
|
case (external_X_ITE_X3D_X3DConstants_default()).Cone:
|
|
1282
1302
|
{
|
|
1283
|
-
|
|
1303
|
+
const cone = this .geometryNode;
|
|
1284
1304
|
|
|
1285
1305
|
if (cone ._side .getValue () && cone ._bottom .getValue ())
|
|
1286
1306
|
this .collisionShape = new AmmoClass .btConeShape (cone ._bottomRadius .getValue (), cone ._height .getValue ());
|
|
@@ -1291,7 +1311,7 @@ Object .assign (Object .setPrototypeOf (CollidableShape .prototype, RigidBodyPhy
|
|
|
1291
1311
|
}
|
|
1292
1312
|
case (external_X_ITE_X3D_X3DConstants_default()).Cylinder:
|
|
1293
1313
|
{
|
|
1294
|
-
|
|
1314
|
+
const
|
|
1295
1315
|
cylinder = this .geometryNode,
|
|
1296
1316
|
radius = cylinder ._radius .getValue (),
|
|
1297
1317
|
height1_2 = cylinder ._height .getValue () * 0.5;
|
|
@@ -1305,19 +1325,19 @@ Object .assign (Object .setPrototypeOf (CollidableShape .prototype, RigidBodyPhy
|
|
|
1305
1325
|
}
|
|
1306
1326
|
case (external_X_ITE_X3D_X3DConstants_default()).ElevationGrid:
|
|
1307
1327
|
{
|
|
1308
|
-
|
|
1328
|
+
const elevationGrid = this .geometryNode;
|
|
1309
1329
|
|
|
1310
1330
|
if (elevationGrid ._xDimension .getValue () > 1 && elevationGrid ._zDimension .getValue () > 1)
|
|
1311
1331
|
{
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1332
|
+
const heightField = this .heightField = AmmoClass ._malloc (4 * elevationGrid ._xDimension .getValue () * elevationGrid ._zDimension .getValue ());
|
|
1333
|
+
|
|
1334
|
+
let
|
|
1335
|
+
min = Number .POSITIVE_INFINITY,
|
|
1336
|
+
max = Number .NEGATIVE_INFINITY;
|
|
1317
1337
|
|
|
1318
|
-
for (
|
|
1338
|
+
for (let i = 0, i4 = 0, length = elevationGrid ._height .length; i < length; ++ i)
|
|
1319
1339
|
{
|
|
1320
|
-
|
|
1340
|
+
const value = elevationGrid ._height [i];
|
|
1321
1341
|
|
|
1322
1342
|
min = Math .min (min, value);
|
|
1323
1343
|
max = Math .max (max, value);
|
|
@@ -1348,7 +1368,7 @@ Object .assign (Object .setPrototypeOf (CollidableShape .prototype, RigidBodyPhy
|
|
|
1348
1368
|
}
|
|
1349
1369
|
case (external_X_ITE_X3D_X3DConstants_default()).Sphere:
|
|
1350
1370
|
{
|
|
1351
|
-
|
|
1371
|
+
const sphere = this .geometryNode;
|
|
1352
1372
|
|
|
1353
1373
|
this .collisionShape = new AmmoClass .btSphereShape (sphere ._radius .getValue ());
|
|
1354
1374
|
break;
|
|
@@ -1382,7 +1402,7 @@ Object .assign (Object .setPrototypeOf (CollidableShape .prototype, RigidBodyPhy
|
|
|
1382
1402
|
this .getCompoundShape () .setLocalScaling (localScaling);
|
|
1383
1403
|
|
|
1384
1404
|
this .addNodeEvent ();
|
|
1385
|
-
this .
|
|
1405
|
+
this ._compoundShape = this .getBrowser () .getCurrentTime ();
|
|
1386
1406
|
};
|
|
1387
1407
|
})(),
|
|
1388
1408
|
removeCollidableGeometry ()
|
|
@@ -1406,69 +1426,6 @@ Object .assign (Object .setPrototypeOf (CollidableShape .prototype, RigidBodyPhy
|
|
|
1406
1426
|
this .triangleMesh = null;
|
|
1407
1427
|
}
|
|
1408
1428
|
},
|
|
1409
|
-
traverse (type, renderObject)
|
|
1410
|
-
{
|
|
1411
|
-
switch (type)
|
|
1412
|
-
{
|
|
1413
|
-
case (external_X_ITE_X3D_TraverseType_default()).POINTER:
|
|
1414
|
-
case (external_X_ITE_X3D_TraverseType_default()).CAMERA:
|
|
1415
|
-
case (external_X_ITE_X3D_TraverseType_default()).SHADOW:
|
|
1416
|
-
{
|
|
1417
|
-
const modelViewMatrix = renderObject .getModelViewMatrix ();
|
|
1418
|
-
|
|
1419
|
-
modelViewMatrix .push ();
|
|
1420
|
-
modelViewMatrix .multLeft (this .getMatrix ());
|
|
1421
|
-
|
|
1422
|
-
this .visibleNode ?.traverse (type, renderObject);
|
|
1423
|
-
|
|
1424
|
-
modelViewMatrix .pop ();
|
|
1425
|
-
return;
|
|
1426
|
-
}
|
|
1427
|
-
case (external_X_ITE_X3D_TraverseType_default()).PICKING:
|
|
1428
|
-
{
|
|
1429
|
-
const
|
|
1430
|
-
browser = this .getBrowser (),
|
|
1431
|
-
pickingHierarchy = browser .getPickingHierarchy (),
|
|
1432
|
-
modelViewMatrix = renderObject .getModelViewMatrix ();
|
|
1433
|
-
|
|
1434
|
-
pickingHierarchy .push (this);
|
|
1435
|
-
modelViewMatrix .push ();
|
|
1436
|
-
modelViewMatrix .multLeft (this .getMatrix ());
|
|
1437
|
-
|
|
1438
|
-
this .visibleNode ?.traverse (type, renderObject);
|
|
1439
|
-
|
|
1440
|
-
modelViewMatrix .pop ();
|
|
1441
|
-
pickingHierarchy .pop ();
|
|
1442
|
-
return;
|
|
1443
|
-
}
|
|
1444
|
-
case (external_X_ITE_X3D_TraverseType_default()).COLLISION:
|
|
1445
|
-
{
|
|
1446
|
-
const modelViewMatrix = renderObject .getModelViewMatrix ();
|
|
1447
|
-
|
|
1448
|
-
modelViewMatrix .push ();
|
|
1449
|
-
modelViewMatrix .multLeft (this .getMatrix ());
|
|
1450
|
-
|
|
1451
|
-
this .visibleNode ?.traverse (type, renderObject);
|
|
1452
|
-
|
|
1453
|
-
modelViewMatrix .pop ();
|
|
1454
|
-
return;
|
|
1455
|
-
}
|
|
1456
|
-
case (external_X_ITE_X3D_TraverseType_default()).DISPLAY:
|
|
1457
|
-
{
|
|
1458
|
-
const modelViewMatrix = renderObject .getModelViewMatrix ();
|
|
1459
|
-
|
|
1460
|
-
modelViewMatrix .push ();
|
|
1461
|
-
modelViewMatrix .multLeft (this .getMatrix ());
|
|
1462
|
-
|
|
1463
|
-
this .visibleNode ?.traverse (type, renderObject);
|
|
1464
|
-
|
|
1465
|
-
this .boundedObject ?.displayBBox (type, renderObject);
|
|
1466
|
-
|
|
1467
|
-
modelViewMatrix .pop ();
|
|
1468
|
-
return;
|
|
1469
|
-
}
|
|
1470
|
-
}
|
|
1471
|
-
},
|
|
1472
1429
|
dispose ()
|
|
1473
1430
|
{
|
|
1474
1431
|
this .removeCollidableGeometry ();
|
|
@@ -3171,7 +3128,7 @@ Object .assign (Object .setPrototypeOf (RigidBody .prototype, (external_X_ITE_X3
|
|
|
3171
3128
|
var geometryNode = geometryNodes [i];
|
|
3172
3129
|
|
|
3173
3130
|
geometryNode .removeInterest ("addEvent", this ._transform);
|
|
3174
|
-
geometryNode .
|
|
3131
|
+
geometryNode ._compoundShape .removeInterest ("set_compoundShape__", this);
|
|
3175
3132
|
|
|
3176
3133
|
geometryNode .setBody (null);
|
|
3177
3134
|
|
|
@@ -3211,7 +3168,7 @@ Object .assign (Object .setPrototypeOf (RigidBody .prototype, (external_X_ITE_X3
|
|
|
3211
3168
|
var geometryNode = geometryNodes [i];
|
|
3212
3169
|
|
|
3213
3170
|
geometryNode .addInterest ("addEvent", this ._transform);
|
|
3214
|
-
geometryNode .
|
|
3171
|
+
geometryNode ._compoundShape .addInterest ("set_compoundShape__", this);
|
|
3215
3172
|
|
|
3216
3173
|
geometryNode ._translation .addFieldInterest (this ._position);
|
|
3217
3174
|
geometryNode ._rotation .addFieldInterest (this ._orientation);
|