Camera (interface)

バージョン 1.15.0 で追加.

Camera interface is implemented in case we require different kinds of camera objects to support the same interface. Any manipulable camera should implements this interface.

参考

InlineCamera, SGCameraToRTR

Camera Camera Camera InlineCamera InlineCamera InlineCamera->Camera

Functions

  getAxis ? ( io Vec3 xAxis, io Vec3 yAxis, io Vec3 zAxis )
Scalar getFarDistance ? ()
Scalar getFocalDistance ? ()
Scalar getFovY ? ()
Vec3 getGoalAngularVelocity ? ()
Vec3 getGoalLinearVelocity ? ()
Mat44 getMat44 ? ()
Scalar getNearDistance ? ()
Scalar getOrthographicFrustumHeight ? ()
Mat44 getProjection ? ()
Boolean isOrthographic ? ()
  setFarDistance ! ( in Scalar farDistance )
  setFocalDistance ! ( in Scalar focalDistance )
  setFovY ! ( in Scalar fov )
  setFromMat44 ! ( in Mat44 mat44 )
  setFromPositionAndTarget ! ( in Vec3 position, in Vec3 target )
  setGoalAngularVelocity ! ( in Vec3 velocity )
  setGoalLinearVelocity ! ( in Vec3 velocity )
  setNearDistance ! ( in Scalar nearDistance )
  setOrthographic ! ( in Boolean ortho )
  setOrthographicFrustumHeight ! ( in Scalar height )

Functions in detail

Camera.getAxis? ( io Vec3 xAxis, io Vec3 yAxis, io Vec3 zAxis )


Scalar Camera.getFarDistance? ()

Get the far field distance


Scalar Camera.getFocalDistance? ()

Get the focal distance


Scalar Camera.getFovY? ()

Get the vertical field of view in radians


Vec3 Camera.getGoalAngularVelocity? ()

Get the angular velocity (camera’s rotation)


Vec3 Camera.getGoalLinearVelocity? ()

Get the linear velocity (camera’s translation)


Mat44 Camera.getMat44? ()

Get the world matrix of this camera


Scalar Camera.getNearDistance? ()

Get the near field distance


Scalar Camera.getOrthographicFrustumHeight? ()

Get the orthographic frustrum height


Mat44 Camera.getProjection? ()

Get the projection matrix of this camera


Boolean Camera.isOrthographic? ()

Check if this camera uses orthographic projection


Camera.setFarDistance! ( in Scalar farDistance )

Set the far field distance

farDistance The frustrum far distance


Camera.setFocalDistance! ( in Scalar focalDistance )

Set the focal distance

focalDistance The focal distance


Camera.setFovY! ( in Scalar fov )

Set the vertical field of view in radians

fov The field of view


Camera.setFromMat44! ( in Mat44 mat44 )

Set the current transform of the camera using a mat44.

mat44 The camera transform


Camera.setFromPositionAndTarget! ( in Vec3 position, in Vec3 target )

Set the current transform of the camera using a position and target values.

position The camera position
target The target position (where to look)


Camera.setGoalAngularVelocity! ( in Vec3 velocity )

Set the angular velocity

velocity The velocity


Camera.setGoalLinearVelocity! ( in Vec3 velocity )

Set the linear velocity

velocity The velocity


Camera.setNearDistance! ( in Scalar nearDistance )

Set the near field distance

nearDistance The frustrum near distance


Camera.setOrthographic! ( in Boolean ortho )

Set the camera as orthographic

ortho The boolean to set the camera type


Camera.setOrthographicFrustumHeight! ( in Scalar height )

Set the orthographic frustrum height

height The frustrum height