|
@@ -100,6 +100,18 @@ module BABYLON {
|
|
*/
|
|
*/
|
|
public parentId: Nullable<number> = null;
|
|
public parentId: Nullable<number> = null;
|
|
/**
|
|
/**
|
|
|
|
+ * The culling strategy to use to check whether the solid particle must be culled or not when using isInFrustum().
|
|
|
|
+ * The possible values are :
|
|
|
|
+ * - AbstractMesh.CULLINGSTRATEGY_STANDARD
|
|
|
|
+ * - AbstractMesh.CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY
|
|
|
|
+ * - AbstractMesh.CULLINGSTRATEGY_OPTIMISTIC_INCLUSION
|
|
|
|
+ * - AbstractMesh.CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY
|
|
|
|
+ * The default value for solid particles is AbstractMesh.CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY
|
|
|
|
+ * Please read each static variable documentation in the class AbstractMesh to get details about the culling process.
|
|
|
|
+ * */
|
|
|
|
+ public cullingStrategy = AbstractMesh.CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY;
|
|
|
|
+
|
|
|
|
+ /**
|
|
* @hidden Internal global position in the SPS.
|
|
* @hidden Internal global position in the SPS.
|
|
*/
|
|
*/
|
|
public _globalPosition: Vector3 = Vector3.Zero();
|
|
public _globalPosition: Vector3 = Vector3.Zero();
|
|
@@ -174,6 +186,16 @@ module BABYLON {
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
|
|
+ * Returns `true` if the solid particle is within the frustum defined by the passed array of planes.
|
|
|
|
+ * A particle is in the frustum if its bounding box intersects the frustum
|
|
|
|
+ * @param frustumPlanes defines the frustum to test
|
|
|
|
+ * @returns true if the particle is in the frustum planes
|
|
|
|
+ */
|
|
|
|
+ public isInFrustum(frustumPlanes: Plane[]): boolean {
|
|
|
|
+ return this._boundingInfo !== null && this._boundingInfo.isInFrustum(frustumPlanes, this.cullingStrategy);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
* get the rotation matrix of the particle
|
|
* get the rotation matrix of the particle
|
|
* @hidden
|
|
* @hidden
|
|
*/
|
|
*/
|