载入中...
搜索中...
未找到
eve::graphics::Canvas类 参考abstract

Canvas public API. 更多...

#include <Canvas.h>

类 eve::graphics::Canvas 继承关系图:
eve::graphics::Drawable eve::graphics::Graphics eve::graphics::vulkan::OffscreenCanvas eve::graphics::webgpu::OffscreenCanvas eve::graphics::vulkan::Graphics eve::graphics::webgpu::Graphics

Public 成员函数

 Canvas ()
 Constructs a Canvas.
 
 ~Canvas () override
 Releases Canvas resources.
 
virtual int getWidth () const =0
 Returns the width.
 
virtual int getHeight () const =0
 Returns the height.
 
virtual Texture * getTexture ()=0
 Sampleable color buffer; screen Canvas returns nullptr.
 
virtual void clear (std::optional< Color > color, std::optional< int > stencil, std::optional< double > depth)=0
 Clears .
 
virtual Color getPixel (int x, int y)=0
 Returns the pixel.
 
virtual image::ImageData * newImageData ()=0
 Creates a image data. @ownership Caller deletes unless documented otherwise.
 
virtual image::ImageData * newHDRImageData ()
 Copy an HDR Canvas as linear RGBA16F without tone mapping.
 
virtual void draw (Canvas *C, const glm::mat4 &matrix) const =0
 Draws this canvas into another canvas with a transform.
 
virtual void draw (Graphics *gfx, const glm::mat4 &matrix) const=0
 Draws the object with the specified transformation matrix.
 
- Public 成员函数 继承自 eve::graphics::Drawable
virtual ~Drawable ()
 Releases Drawable resources.
 
bool getCastOcclusion () const
 When false, skipped by Graphics::drawOcclusion / volumetric occluder passes.
 
void setCastOcclusion (bool cast)
 Sets the cast occlusion.
 
virtual void drawOcclusion (Graphics *gfx, const glm::mat4 &matrix) const
 Draw as an opaque black silhouette for volumetric occlusion maps (screen-space god rays / light shafts). Default is a no-op; Texture / Mesh override with 2D black rects (alpha preserved for textures).
 

详细描述

Canvas public API.

在文件 Canvas.h 第 17 行定义.

构造及析构函数说明

◆ Canvas()

eve::graphics::Canvas::Canvas ( )
inline

Constructs a Canvas.

在文件 Canvas.h 第 25 行定义.

◆ ~Canvas()

eve::graphics::Canvas::~Canvas ( )
inlineoverride

Releases Canvas resources.

在文件 Canvas.h 第 27 行定义.

成员函数说明

◆ clear()

◆ draw() [1/2]

virtual void eve::graphics::Canvas::draw ( Canvas *  C,
const glm::mat4 &  matrix 
) const
pure virtual

◆ draw() [2/2]

virtual void eve::graphics::Drawable::draw ( Graphics *  gfx,
const glm::mat4 &  matrix 
) const
virtual

Draws the object with the specified transformation matrix.

参数
gfxBorrowed graphics backend for the draw.
matrixColumn-major model transform; borrowed for the call only.

实现了 eve::graphics::Drawable.

被 eve::graphics::vulkan::OffscreenCanvas, eve::graphics::webgpu::OffscreenCanvas, eve::graphics::vulkan::Graphics , 以及 eve::graphics::webgpu::Graphics 重载.

◆ getHeight()

◆ getPixel()

virtual Color eve::graphics::Canvas::getPixel ( int  x,
int  y 
)
pure virtual

◆ getTexture()

virtual Texture * eve::graphics::Canvas::getTexture ( )
pure virtual

Sampleable color buffer; screen Canvas returns nullptr.

返回
Borrowed texture owned by this canvas, or nullptr for the screen canvas. @ownership Borrowed; the canvas retains ownership and may invalidate the pointer when the canvas is destroyed or its backing store is recreated. @lifetime Valid until the owning canvas is destroyed or replaces its color buffer.

在 eve::graphics::vulkan::OffscreenCanvas, eve::graphics::vulkan::Graphics, eve::graphics::webgpu::OffscreenCanvas , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::stylize::StyleChain::apply(), eve::graphics::Bloom::apply(), eve::graphics::Exposure::apply(), eve::graphics::DepthOfField::apply(), eve::stylize::StyleRecipe::applyCanvas(), eve::graphics::GlobalIllumination::applyFromSceneTo(), eve::graphics::ScreenSpaceReflection::applyFromSceneTo(), eve::graphics::raytracing::VulkanRayTracing::applyReflections(), eve::graphics::AntiAliasing::applyTemporal(), eve::graphics::AntiAliasing::applyTemporalRect(), eve::graphics::DepthPyramid::build(), eve::graphics::Graphics::drawCanvasRGBA(), eve::ui::UISystem::ensureViewport(), eve::graphics::exposeCanvasScriptBindings(), eve::graphics::ScreenSpaceReflection::getReflectionTexture(), eve::graphics::AntiAliasing::getTemporalReadTexture(), eve::graphics::webgpu::Graphics::getTexture(), eve::graphics::GlobalIllumination::getWorkingTexture(), eve::graphics::RenderSystem3D::render(), eve::graphics::AntiAliasing::resolveTemporal() , 以及 eve::graphics::Volumetric::scatterFromSceneLights2D().

◆ getWidth()

◆ newHDRImageData()

virtual image::ImageData * eve::graphics::Canvas::newHDRImageData ( )
inlinevirtual

Copy an HDR Canvas as linear RGBA16F without tone mapping.

返回
Caller-owned ImageData, or nullptr when this Canvas is not HDR. @ownership The caller owns the returned image data.

被 eve::graphics::vulkan::OffscreenCanvas , 以及 eve::graphics::webgpu::OffscreenCanvas 重载.

在文件 Canvas.h 第 58 行定义.

被这些函数引用 eve::graphics::exposeCanvasScriptBindings().

◆ newImageData()

virtual image::ImageData * eve::graphics::Canvas::newImageData ( )
pure virtual

Creates a image data. @ownership Caller deletes unless documented otherwise.

Full RGBA8 copy; caller owns ImageData*.

在 eve::graphics::vulkan::OffscreenCanvas, eve::graphics::vulkan::Graphics, eve::graphics::webgpu::OffscreenCanvas , 以及 eve::graphics::webgpu::Graphics 内被实现.

被这些函数引用 eve::graphics::exposeCanvasScriptBindings() , 以及 eve::graphics_editing::GraphicsOffscreenPreviewService::render().


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