载入中...
搜索中...
未找到
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 .
 
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

◆ getHeight()

◆ getPixel()

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

◆ getTexture()

◆ 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 第 53 行定义.

被这些函数引用 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().


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