视锥由6个平面定义。每个平面都由
       
        
      
         Cartesian4
        
       
       对象表示,其中x,y和z分量定义垂直于平面的单位矢量,w分量是从原点/相机位置开始的平面。
      | Name | Type | Description | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 
           options
           | Object | 可选
          
          具有以下属性的对象: 
 | 
Example:
var frustum = new LSGlobe.PerspectiveOffCenterFrustum({
    left : -1.0,
    right : 1.0,
    top : 1.0,
    bottom : -1.0,
    near : 1.0,
    far : 100.0
});See:
Members
      定义底部裁剪平面。
     
     - 
      
       Default Value:
      
      
       undefined
      
     
      远平面的距离。
     
     - 
      
       Default Value:
      
      
       500000000.0
      
     readonly infiniteProjectionMatrix : Matrix4
      获取从具有无限远平面的视锥中计算出的透视投影矩阵。
     
     
     
     
      定义左剪切平面。
     
     - 
      
       Default Value:
      
      
       undefined
      
     
      近平面的距离。
     
     - 
      
       Default Value:
      
      
       1.0
      
     readonly projectionMatrix : Matrix4
      获取从视锥视图计算出的透视投影矩阵。
     
     
     
     
      定义正确的剪切平面。
     
     - 
      
       Default Value:
      
      
       undefined
      
     
      定义顶部剪切平面。
     
     - 
      
       Default Value:
      
      
       undefined
      
     Methods
clone ( result ) → PerspectiveOffCenterFrustum
      返回PerspectiveOffCenterFrustum实例的副本。
     
     | Name | Type | Description | 
|---|---|---|
| 
          result
          | PerspectiveOffCenterFrustum | 可选 将结果存储到的对象。 | 
Returns:
   修改后的结果参数;如果未提供,则为新的PerspectiveFrustum实例。
  
 
     computeCullingVolume (position, direction, up) → CullingVolume
      为此平截头体创建剔除体积。
     
     | Name | Type | Description | 
|---|---|---|
| 
          position
          | Cartesian3 | 眼睛位置。 | 
| 
          direction
          | Cartesian3 | 查看方向。 | 
| 
          up
          | Cartesian3 | 向上的方向。 | 
Returns:
   给定位置和方向的剔除体积。
  
 
     Example:
// Check if a bounding volume intersects the frustum.
var cullingVolume = frustum.computeCullingVolume(cameraPosition, cameraDirection, cameraUp);
var intersect = cullingVolume.computeVisibility(boundingVolume);
      比较提供的PerspectiveOffCenterFrustum组件并返回如果相等,则为
      
     
       true
      
      ,否则为
      
       false
      
      。
     | Name | Type | Description | 
|---|---|---|
| 
          other
          | PerspectiveOffCenterFrustum | 可选 右侧PerspectiveOffCenterFrustum。 | 
Returns:
    真正
   
   如果相等,
   
    假
   
   除此以外。
  
      比较提供的PerspectiveOffCenterFrustum组件并返回
      
     
       true
      
      如果它们通过绝对或相对公差测试,否则为
      
       false
      
      。
     | Name | Type | Default | Description | 
|---|---|---|---|
| 
          other
          | PerspectiveOffCenterFrustum | 右侧PerspectiveOffCenterFrustum。 | |
| 
          relativeEpsilon
          | Number | 用于相等性测试的相对epsilon公差。 | |
| 
          absoluteEpsilon
          | Number | 
          relativeEpsilon
          | 可选 用于相等性测试的绝对epsilon公差。 | 
Returns:
    真正
   
   如果此等在提供的epsilon内,
   
    假
   
   除此以外。
  getPixelDimensions (drawingBufferWidth, drawingBufferHeight, distance, pixelRatio, result) → Cartesian2
      返回像素的宽度和高度(以米为单位)。
     
     | Name | Type | Description | 
|---|---|---|
| 
          drawingBufferWidth
          | Number | 绘图缓冲区的宽度。 | 
| 
          drawingBufferHeight
          | Number | 绘图缓冲区的高度。 | 
| 
          distance
          | Number | 到附近飞机的距离,以米为单位。 | 
| 
          pixelRatio
          | Number | 从像素空间到坐标空间的比例因子。 | 
| 
          result
          | Cartesian2 | 将结果存储到的对象。 | 
Returns:
   修改后的结果参数或的新实例
   
    
 
     
     笛卡尔2
    
   
   分别在x和y属性中使用像素的宽度和高度。
  Throws:
- 
 
  DeveloperError :drawingBufferWidth必须大于零。
- 
 
  DeveloperError :drawingBufferHeight必须大于零。
- 
 
  DeveloperError :pixelRatio必须大于零。
Examples:
// Example 1
// Get the width and height of a pixel.
var pixelSize = camera.frustum.getPixelDimensions(scene.drawingBufferWidth, scene.drawingBufferHeight, 1.0, scene.pixelRatio, new LSGlobe.Cartesian2());// Example 2
// Get the width and height of a pixel if the near plane was set to 'distance'.
// For example, get the size of a pixel of an image on a billboard.
var position = camera.position;
var direction = camera.direction;
var toCenter = LSGlobe.Cartesian3.subtract(primitive.boundingVolume.center, position, new LSGlobe.Cartesian3());      // vector from camera to a primitive
var toCenterProj = LSGlobe.Cartesian3.multiplyByScalar(direction, LSGlobe.Cartesian3.dot(direction, toCenter), new LSGlobe.Cartesian3()); // project vector onto camera direction vector
var distance = LSGlobe.Cartesian3.magnitude(toCenterProj);
var pixelSize = camera.frustum.getPixelDimensions(scene.drawingBufferWidth, scene.drawingBufferHeight, distance, scene.pixelRatio, new LSGlobe.Cartesian2());