载入中...
搜索中...
未找到
Drawable.h
浏览该文件的文档.
1#pragma once
2
3// Incomplete glm::mat4 is enough for const-reference parameters; .cpp files that
4// read matrix elements include <glm/mat4x4.hpp> (or get it via Graphics.h).
5#include <glm/fwd.hpp>
6
7namespace eve::graphics {
8
9class Graphics;
10
18class Drawable {
19public:
21 virtual ~Drawable() {}
22
28 virtual void draw(Graphics* gfx, const glm::mat4& matrix) const = 0;
29
31 bool getCastOcclusion() const { return castOcclusion_; }
33 void setCastOcclusion(bool cast) { castOcclusion_ = cast; }
34
40 virtual void drawOcclusion(Graphics* gfx, const glm::mat4& matrix) const {
41 (void)gfx;
42 (void)matrix;
43 }
44
45private:
46 bool castOcclusion_ = true;
47};
48
49} // namespace eve::graphics
glm::dmat4 matrix
Drawable base (textures, meshes, canvases).
Definition Drawable.h:18
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 shaft...
Definition Drawable.h:40
virtual void draw(Graphics *gfx, const glm::mat4 &matrix) const =0
Draws the object with the specified transformation matrix.
bool getCastOcclusion() const
When false, skipped by Graphics::drawOcclusion / volumetric occluder passes.
Definition Drawable.h:31
void setCastOcclusion(bool cast)
Sets the cast occlusion.
Definition Drawable.h:33
virtual ~Drawable()
Releases Drawable resources.
Definition Drawable.h:21
卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局...
Definition Animation.h:25