Преглед изворни кода

Added SPS visibility helpers / bbox, frustum, toussa

jbousquie пре 9 година
родитељ
комит
3a4b711796
1 измењених фајлова са 12 додато и 0 уклоњено
  1. 12 0
      src/Particles/babylon.solidParticleSystem.ts

+ 12 - 0
src/Particles/babylon.solidParticleSystem.ts

@@ -46,6 +46,7 @@ module BABYLON {
         private _fakeCamPos: Vector3 = Vector3.Zero();
         private _rotMatrix: Matrix = new Matrix();
         private _invertedMatrix: Matrix = new Matrix();
+        private _scalingMatrix: Matrix = new Matrix();
         private _rotated: Vector3 = Vector3.Zero();
         private _quaternion: Quaternion = new Quaternion();
         private _vertex: Vector3 = Vector3.Zero();
@@ -543,6 +544,17 @@ module BABYLON {
             this.pickedParticles = null;
         }
 
+        // refresh the mesh bounding box
+        public refreshVisibleSize(): void {
+            this.mesh.refreshBoundingInfo();
+        }
+
+        // force the mesh to keep active in the render list
+        public forceVisibility(): void {
+            this.mesh.alwaysSelectAsActiveMesh = true;
+        }
+
+
         // Optimizer setters
         public set computeParticleRotation(val: boolean) {
             this._computeParticleRotation = val;