载入中...
搜索中...
未找到
eve::scene::ISceneCameraProjection类 参考abstract

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()

virtual eve::scene::ISceneCameraProjection::~ISceneCameraProjection ( )
virtualdefault

Releases ISceneCameraProjection resources.

成员函数说明

◆ clipForViewport()

virtual std::optional< CameraClip > eve::scene::ISceneCameraProjection::clipForViewport ( graphics::Camera3D &  cam,
float  viewW,
float  viewH 
) const
pure virtual

Clip matrix and its inverse for a camera and viewport.

参数
camBorrowed camera.
viewW,viewHViewport size; must be positive.
返回
The matrices, or std::nullopt for 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()

virtual std::optional< ScreenRay > eve::scene::ISceneCameraProjection::screenRay ( graphics::Camera3D &  cam,
float  screenX,
float  screenY,
float  viewW,
float  viewH 
) const
pure virtual

Ray through a screen pixel.

参数
camBorrowed camera; updated in place with the ray it computed.
screenX,screenYPixel in the viewport.
viewW,viewHViewport size.
返回
The ray, or std::nullopt when 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

constexpr const char* eve::scene::ISceneCameraProjection::capabilityName = "ISceneCameraProjection"
staticconstexpr

在文件 SceneCameraProjection.h 第 66 行定义.


该类的文档由以下文件生成: