BufferGeometry
Object3D
Raycaster
Camera
CubeCamera
PerspectiveCamera
OrthographicCamera
StereoCamera
Clock
Curve
CurvePath
Path
Shape
ShapePath
ArrowHelper
AxesHelper
BoxHelper
Box3Helper
CameraHelper
DirectionalLightHelper
GridHelper
PolarGridHelper
HemisphereLightHelper
PlaneHelper
PointLightHelper
SkeletonHelper
SpotLightHelper
Light
PointLight
RectAreaLight
SpotLight
DirectionalLight
HemisphereLight
LightShadow
PointLightShadow
AnimationLoader
AudioLoader
BufferGeometryLoader
CompressedTextureLoader
CubeTextureLoader
DataTextureLoader
FileLoader
ImageBitmapLoader
ImageLoader
Loader
LoaderUtils
MaterialLoader
ObjectLoader
TextureLoader
LoadingManager
Material
Box2
Box3
Color
Cylindrical
Euler
Frustum
Interpolant
Line3
MathUtils
Matrix3
Matrix4
Plane
Quaternion
AnimationAction
AnimationClip
AnimationMixer
AnimationObjectGroup
AnimationUtils
keyframeTrack
PropertyBinding
PropertyMixer
BooleanKeyframeTrack
QuaternionKeyframeTrack
StringKeyframeTrack
Audio
AudioAnalyser
AudioContext
AudioListener
PositionalAudio

Frustum.containsPoint()

Frustum.containsPoint() 方法用于检测给定的点是否在视锥体内。

语法

Frustum.containsPoint( point )

参数

  • point - 要检测的点。

返回值

如果点在视锥体内,则返回 true,否则返回 false

示例

var frustum = new THREE.Frustum( ... );
var point = new THREE.Vector3( x, y, z );
if ( frustum.containsPoint( point ) ) {
  // point 在视锥体内
} else {
  // point 不在视锥体内
}

注意事项

Frustum.containsPoint() 方法需要在当前相机的投影变换矩阵和模型视图变换矩阵确定的视锥体内求解。

在使用 Frustum.containsPoint() 方法前,需要确保当前相机的投影变换矩阵和模型视图变换矩阵已经更新。

参考链接