内容表

上一话题

Qt3DRender.QCamera

下一话题

Qt3DRender.QCameraSelector

Qt3DRender.QCameraLens

QCameraLens specifies the projection matrix that will be used to define a Camera for a 3D scene. 更多 …

Inheritance diagram of PySide2.Qt3DRender.Qt3DRender.QCameraLens

概要

函数

槽

信号

详细描述

class PySide2.Qt3DRender.Qt3DRender. QCameraLens ( [ parent=None ] )
param parent

QNode

构造 QCameraLens with given parent

PySide2.Qt3DRender.Qt3DRender.QCameraLens. ProjectionType

Specifies which parameters of QCameraLens are used to compute the projection matrix.

常量

描述

Qt3DRender.QCameraLens.OrthographicProjection

Orthogonal projection

Qt3DRender.QCameraLens.PerspectiveProjection

Perspective projection

Qt3DRender.QCameraLens.FrustumProjection

Frustum projection

Qt3DRender.QCameraLens.CustomProjection

Custom user-defined projection

PySide2.Qt3DRender.Qt3DRender.QCameraLens. aspectRatio ( )
返回类型

float

另请参阅

setAspectRatio()

PySide2.Qt3DRender.Qt3DRender.QCameraLens. aspectRatioChanged ( aspectRatio )
参数

aspectRatio – float

PySide2.Qt3DRender.Qt3DRender.QCameraLens. bottom ( )
返回类型

float

另请参阅

setBottom()

PySide2.Qt3DRender.Qt3DRender.QCameraLens. bottomChanged ( bottom )
参数

bottom – float

PySide2.Qt3DRender.Qt3DRender.QCameraLens. exposure ( )
返回类型

float

另请参阅

setExposure()

PySide2.Qt3DRender.Qt3DRender.QCameraLens. exposureChanged ( exposure )
参数

exposure – float

PySide2.Qt3DRender.Qt3DRender.QCameraLens. farPlane ( )
返回类型

float

另请参阅

setFarPlane()

PySide2.Qt3DRender.Qt3DRender.QCameraLens. farPlaneChanged ( farPlane )
参数

farPlane – float

PySide2.Qt3DRender.Qt3DRender.QCameraLens. fieldOfView ( )
返回类型

float

另请参阅

setFieldOfView()

PySide2.Qt3DRender.Qt3DRender.QCameraLens. fieldOfViewChanged ( fieldOfView )
参数

fieldOfView – float

PySide2.Qt3DRender.Qt3DRender.QCameraLens. left ( )
返回类型

float

另请参阅

setLeft()

PySide2.Qt3DRender.Qt3DRender.QCameraLens. leftChanged ( left )
参数

left – float

PySide2.Qt3DRender.Qt3DRender.QCameraLens. nearPlane ( )
返回类型

float

另请参阅

setNearPlane()

PySide2.Qt3DRender.Qt3DRender.QCameraLens. nearPlaneChanged ( nearPlane )
参数

nearPlane – float

PySide2.Qt3DRender.Qt3DRender.QCameraLens. projectionMatrix ( )
返回类型

QMatrix4x4

PySide2.Qt3DRender.Qt3DRender.QCameraLens. projectionMatrixChanged ( projectionMatrix )
参数

projectionMatrix – QMatrix4x4

PySide2.Qt3DRender.Qt3DRender.QCameraLens. projectionType ( )
返回类型

ProjectionType

PySide2.Qt3DRender.Qt3DRender.QCameraLens. projectionTypeChanged ( projectionType )
参数

projectionType – ProjectionType

PySide2.Qt3DRender.Qt3DRender.QCameraLens. right ( )
返回类型

float

另请参阅

setRight()

PySide2.Qt3DRender.Qt3DRender.QCameraLens. rightChanged ( right )
参数

right – float

PySide2.Qt3DRender.Qt3DRender.QCameraLens. setAspectRatio ( aspectRatio )
参数

aspectRatio – float

Sets the projection’s aspect ratio to aspectRatio . This triggers a projection matrix update.

注意

this has no effect if the projection type is not PerspectiveProjection .

另请参阅

aspectRatio()

PySide2.Qt3DRender.Qt3DRender.QCameraLens. setBottom ( bottom )
参数

bottom – float

Sets the projection’s bottom window coordinate to bottom . This triggers a projection matrix update.

注意

this has no effect if the projection type is PerspectiveProjection .

另请参阅

bottom()

PySide2.Qt3DRender.Qt3DRender.QCameraLens. setExposure ( exposure )
参数

exposure – float

Sets the camera lens’ exposure

另请参阅

exposure()

PySide2.Qt3DRender.Qt3DRender.QCameraLens. setFarPlane ( farPlane )
参数

farPlane – float

Sets the projection’s far plane to farPlane . This triggers a projection matrix update.

另请参阅

farPlane()

PySide2.Qt3DRender.Qt3DRender.QCameraLens. setFieldOfView ( fieldOfView )
参数

fieldOfView – float

Sets the projection’s field of view to fieldOfView degrees. This triggers a projection matrix update.

注意

this has no effect if the projection type is not PerspectiveProjection .

另请参阅

fieldOfView()

PySide2.Qt3DRender.Qt3DRender.QCameraLens. setFrustumProjection ( left , right , bottom , top , nearPlane , farPlane )
参数
  • left – float

  • right – float

  • bottom – float

  • top – float

  • nearPlane – float

  • farPlane – float

Defines an orthographic projection based on left , right , bottom , top , nearPlane , farPlane .

PySide2.Qt3DRender.Qt3DRender.QCameraLens. setLeft ( left )
参数

left – float

Sets the projection’s lower left window coordinate to left . This triggers a projection matrix update.

注意

this has no effect if the projection type is PerspectiveProjection .

另请参阅

left()

PySide2.Qt3DRender.Qt3DRender.QCameraLens. setNearPlane ( nearPlane )
参数

nearPlane – float

Sets the projection’s near plane to nearPlane . This triggers a projection matrix update.

另请参阅

nearPlane()

PySide2.Qt3DRender.Qt3DRender.QCameraLens. setOrthographicProjection ( left , right , bottom , top , nearPlane , farPlane )
参数
  • left – float

  • right – float

  • bottom – float

  • top – float

  • nearPlane – float

  • farPlane – float

Defines an orthographic projection based on left , right , bottom , top , nearPlane , farPlane .

PySide2.Qt3DRender.Qt3DRender.QCameraLens. setPerspectiveProjection ( fieldOfView , aspect , nearPlane , farPlane )
参数
  • fieldOfView – float

  • aspect – float

  • nearPlane – float

  • farPlane – float

Defines a perspective projection based on fieldOfView , aspectRatio , nearPlane , farPlane .

PySide2.Qt3DRender.Qt3DRender.QCameraLens. setProjectionMatrix ( projectionMatrix )
参数

projectionMatrix – QMatrix4x4

Sets the project matrix to projectionMatrix .

注意

This will set the projection type to CustomProjection and thus ignore all other camera parameters that might have been specified.

PySide2.Qt3DRender.Qt3DRender.QCameraLens. setProjectionType ( projectionType )
参数

projectionType – ProjectionType

Sets the lens’ projection type projectionType .

注意

Qt3DRender::QCameraLens::Frustum and PerspectiveProjection are two different ways of specifying the same projection.

另请参阅

projectionType()

PySide2.Qt3DRender.Qt3DRender.QCameraLens. setRight ( right )
参数

right – float

Sets the projection’s upper right window coordinate to right . This triggers a projection matrix update.

注意

this has no effect if the projection type is PerspectiveProjection .

另请参阅

right()

PySide2.Qt3DRender.Qt3DRender.QCameraLens. setTop ( top )
参数

top – float

Sets the projection’s top window coordinate to top . This triggers a projection matrix update.

注意

this has no effect if the projection type is PerspectiveProjection .

另请参阅

top()

PySide2.Qt3DRender.Qt3DRender.QCameraLens. top ( )
返回类型

float

另请参阅

setTop()

PySide2.Qt3DRender.Qt3DRender.QCameraLens. topChanged ( top )
参数

top – float

PySide2.Qt3DRender.Qt3DRender.QCameraLens. viewAll ( cameraId )
参数

cameraId – QNodeId

PySide2.Qt3DRender.Qt3DRender.QCameraLens. viewEntity ( entityId , cameraId )
参数
  • entityId – QNodeId

  • cameraId – QNodeId

PySide2.Qt3DRender.Qt3DRender.QCameraLens. viewSphere ( center , radius )
参数
  • center – QVector3D

  • radius – float