Camera projection queries answered by the module that owns Camera3D.
更多...
#include <SceneCameraProjection.h>
Public 成员函数 | |
| virtual | ~ISceneCameraProjection ()=default |
| Releases ISceneCameraProjection resources. | |
| virtual std::optional< ScreenRay > | screenRay (graphics::Camera3D &cam, float screenX, float screenY, float viewW, float viewH) const =0 |
| Ray through a screen pixel. | |
| virtual std::optional< CameraClip > | clipForViewport (graphics::Camera3D &cam, float viewW, float viewH) const =0 |
| Clip matrix and its inverse for a camera and viewport. | |
静态 Public 属性 | |
| static constexpr const char * | capabilityName = "ISceneCameraProjection" |
详细描述
Camera projection queries answered by the module that owns Camera3D.
@ownership The caller owns the camera it passes and keeps it alive for the duration of each call; the implementation never stores it. @lifetime A borrowed camera must outlive the call only; the returned ray or matrices are values, so no pointer to either is retained. @threadsafety Stateless implementations; screenRay carries the same caller-side serialization requirement as Camera3D::screenToRay.
在文件 SceneCameraProjection.h 第 64 行定义.
构造及析构函数说明
◆ ~ISceneCameraProjection()
|
virtualdefault |
Releases ISceneCameraProjection resources.
成员函数说明
◆ clipForViewport()
|
pure virtual |
Clip matrix and its inverse for a camera and viewport.
- 参数
-
cam Borrowed camera. viewW,viewH Viewport size; must be positive.
- 返回
- The matrices, or
std::nulloptfor a degenerate viewport. @ownership The caller retains the camera; no pointer is stored. @lifetime The camera must stay valid for this call only. @cost O(1) plus one 4x4 inverse.
◆ screenRay()
|
pure virtual |
Ray through a screen pixel.
- 参数
-
cam Borrowed camera; updated in place with the ray it computed. screenX,screenY Pixel in the viewport. viewW,viewH Viewport size.
- 返回
- The ray, or
std::nulloptwhen the camera cannot produce one. @ownership The caller retains the camera; no pointer is stored. @lifetime The camera must stay valid for this call only. @cost O(1).
类成员变量说明
◆ capabilityName
|
staticconstexpr |
在文件 SceneCameraProjection.h 第 66 行定义.
该类的文档由以下文件生成:
- src/modules/scene/SceneCameraProjection.h