dl
命名空间 | 类 | 概念 | 类型定义 | 枚举 | 函数 | 变量
dl 命名空间参考

命名空间

namespace  ABGR
 ABGR专用(请优先使用RGBA,除非你知道你在做什么)
 
namespace  Accumulate
 所有元素操作,返回一个值
 
namespace  Align
 
namespace  Any
 对容器任意元素的判断
 
namespace  ARGB
 ARGB专用(请优先使用RGBA,除非你知道你在做什么)
 
namespace  BGRA
 BGRA专用(请优先使用RGBA,除非你知道你在做什么)
 
namespace  CodeCvt
 
namespace  ColorDef
 
namespace  Cpt
 子组件命名空间
 
namespace  Each
 
namespace  Erase
 移除算法
 
namespace  Every
 
namespace  File
 
namespace  FileCsv
 
namespace  Find
 查找算法
 
namespace  Img
 
namespace  Json
 
namespace  Mat
 
namespace  Math
 2维装箱算法
 
namespace  Memory
 
namespace  Numbers
 类似std::numbers的常数
 
namespace  Numeric
 类似numeric头文件的数值操作
 
namespace  RGBA
 RGBA专用
 
namespace  Select
 
namespace  Sub
 类似子串的操作
 
namespace  TexturePack
 
namespace  UI
 

类

class  Actor
 3D绘图对象 更多...
 
struct  AnimationClip
 动画片段,包含多个骨骼 更多...
 
class  AnyType
 任意类型包装 更多...
 
class  Array2
 
class  ArrayEnum
 
class  Background
 绘图背景 更多...
 
class  BoneAnimation
 骨骼动画实例 更多...
 
class  BoneData
 骨骼数据(多个骨骼) 更多...
 
struct  BoneKeyFrame
 骨骼关键帧(不变量) 更多...
 
struct  BoneKeyFrameMulti
 多个节点关键帧组成的一个骨架 更多...
 
class  Camera
 
struct  CharImage
 字符图像数据 更多...
 
struct  CharInfo
 字符信息 更多...
 
struct  CharInfoHash
 
class  Components
 组件容器还需表示对象自己(比如UI::Text) 更多...
 
class  Coor
 2d坐标系 更多...
 
struct  DeviceInfo
 设备属性 更多...
 
class  Engine
 
class  Factory
 资源工厂 @info 加载、管理、创建各种资源 更多...
 
class  FactoryImp
 
class  finally
 RAII清理操作 更多...
 
class  FreeType
 
class  GamePad
 
class  GC
 引用计数对象,通过dnd_gc宏创建 更多...
 
struct  GcRefInfo
 
class  GLFWmonitor
 
class  GLFWwindow
 
class  Graphics
 
class  Input
 
class  Language
 语言管理器 更多...
 
class  Locator
 定位器 更多...
 
class  LogLimit
 
class  LogSystem
 
struct  Material
 材质 更多...
 
class  Matrix
 
class  MemoryPool
 内存池 更多...
 
class  Model
 
class  ModelCache
 
class  ModelLoader
 
class  ModelObject
 
struct  ModelObjectMaterial
 
struct  ModelObjectSub
 
struct  ModelSub
 
struct  ModelTriangleRange
 
class  NTree
 
struct  ParamWindow
 
class  Physics
 
class  PoolList
 
struct  QueueFamilyIndices
 
class  Random
 
struct  RenderInfo2D
 绘图信息2d 更多...
 
struct  RenderInfo3D
 绘图信息3d 更多...
 
class  RigidBody
 刚体 更多...
 
class  RigidBodyImp
 
class  Sprite
 
class  Sprite9
 九图精灵 更多...
 
struct  SpriteID
 
class  SpriteSheet
 n个精灵的组合,用于帧动画或者保存n个精灵,但一次只显示其中一个 更多...
 
class  Squirrel
 
class  StreamInput
 注释参考StreamOutput 更多...
 
class  StreamOutput
 
struct  SwapChainSupportDetails
 
class  System
 
class  Text
 
struct  TextNode
 单个字符 更多...
 
struct  Texture
 
class  Time
 
class  Transform
 3D坐标系 更多...
 
class  UnorderedMap2
 
class  Vector2
 
class  VectorAny
 
struct  Vertex
 3d顶点 更多...
 
struct  Vertex2D
 2d顶点 更多...
 
struct  VertexBone
 3d顶点(带骨骼) 更多...
 
struct  VertexGfx
 顶点 更多...
 
class  VK
 

概念

concept  PopFrontAble
 
concept  IsUnsigned
 
concept  IsSigned
 
concept  IsInteger
 
concept  IsReal
 
concept  IsStandardLayout
 
concept  IsTrivial
 
concept  IsPod
 
concept  IsCopyable
 平凡可复制 唯一可以使用std::memcpy和fstream::write/read的类型
 
concept  IsBase
 是内置数据类型
 
concept  IsPointer
 是指针类型
 

类型定义

using Color3F = std::array< float, 3 >
 
using Point0 = std::array< int, 0 >
 
using Point1 = std::array< int, 1 >
 
using Point2 = std::array< int, 2 >
 
using Point3 = std::array< int, 3 >
 
using Point4 = std::array< int, 4 >
 
using Point = Point2
 
using Rect = Point4
 
using Point0U = std::array< unsigned, 0 >
 
using Point1U = std::array< unsigned, 1 >
 
using Point2U = std::array< unsigned, 2 >
 
using Point3U = std::array< unsigned, 3 >
 
using Point4U = std::array< unsigned, 4 >
 
using PointU = Point2U
 
using Size = PointU
 
using RectU = Point4U
 
using Float = float
 
using Position0 = std::array< Float, 0 >
 
using Position1 = std::array< Float, 1 >
 
using Position2 = std::array< Float, 2 >
 
using Position3 = std::array< Float, 3 >
 
using Position4 = std::array< Float, 4 >
 
using Position = Position2
 
using Triangle = std::array< Position, 3 >
 
using Quad = std::array< Position, 4 >
 
using FloatTime = float
 
using Color = std::array< float, 4 >
 
using Index2 = std::array< std::size_t, 2 >
 
using Matrix4 = Matrix< Float, 4, 4 >
 
using Buffer = std::vector< std::byte >
 
using BufferView = std::span< std::byte >
 
using gcActor = GC< Actor >
 
using Image = Vector2< uint32_t >
 
using UV = std::array< float, 2 >
 
using gcSprite = GC< Sprite >
 
using gcText = GC< Text >
 

枚举

enum class  PadCode {
  UP = 0x0001 , DOWN = 0x0002 , LEFT = 0x0004 , RIGHT = 0x0008 ,
  START = 0x0010 , BACK = 0x0020 , LS = 0x0040 , RS = 0x0080 ,
  LB = 0x0100 , RB = 0x0200 , A = 0x1000 , B = 0x2000 ,
  X = 0x4000 , Y = 0x8000
}
 
enum class  MouseCode {
  LEFT = 0 , RIGHT = 1 , MIDDLE = 2 , KEY4 = 3 ,
  KEY5 = 4 , KEY6 = 5 , KEY7 = 6 , LAST = 7 ,
  MAX_NUM = 8
}
 
enum class  KeyCode : int {
  UNKNOWN = -1 , SPACE = 32 , APOSTROPHE = 39 , COMMA = 44 ,
  MINUS = 45 , PERIOD = 46 , SLASH = 47 , KEY0 = 48 ,
  KEY1 = 49 , KEY2 = 50 , KEY3 = 51 , KEY4 = 52 ,
  KEY5 = 53 , KEY6 = 54 , KEY7 = 55 , KEY8 = 56 ,
  KEY9 = 57 , SEMICOLON = 59 , EQUAL = 61 , A = 65 ,
  B = 66 , C = 67 , D = 68 , E = 69 ,
  F = 70 , G = 71 , H = 72 , I = 73 ,
  J = 74 , K = 75 , L = 76 , M = 77 ,
  N = 78 , O = 79 , P = 80 , Q = 81 ,
  R = 82 , S = 83 , T = 84 , U = 85 ,
  V = 86 , W = 87 , X = 88 , Y = 89 ,
  Z = 90 , LEFT_BRACKET = 91 , BACKSLASH = 92 , RIGHT_BRACKET = 93 ,
  GRAVE_ACCENT = 96 , WORLD_1 = 161 , WORLD_2 = 162 , ESCAPE = 256 ,
  ENTER = 257 , TAB = 258 , BACKSPACE = 259 , INSERT = 260 ,
  DELETE = 261 , RIGHT = 262 , LEFT = 263 , DOWN = 264 ,
  UP = 265 , PAGE_UP = 266 , PAGE_DOWN = 267 , HOME = 268 ,
  END = 269 , CAPS_LOCK = 280 , SCROLL_LOCK = 281 , NUM_LOCK = 282 ,
  PRINT_SCREEN = 283 , PAUSE = 284 , F1 = 290 , F2 = 291 ,
  F3 = 292 , F4 = 293 , F5 = 294 , F6 = 295 ,
  F7 = 296 , F8 = 297 , F9 = 298 , F10 = 299 ,
  F11 = 300 , F12 = 301 , F13 = 302 , F14 = 303 ,
  F15 = 304 , F16 = 305 , F17 = 306 , F18 = 307 ,
  F19 = 308 , F20 = 309 , F21 = 310 , F22 = 311 ,
  F23 = 312 , F24 = 313 , F25 = 314 , KP_0 = 320 ,
  KP_1 = 321 , KP_2 = 322 , KP_3 = 323 , KP_4 = 324 ,
  KP_5 = 325 , KP_6 = 326 , KP_7 = 327 , KP_8 = 328 ,
  KP_9 = 329 , KP_DECIMAL = 330 , KP_DIVIDE = 331 , KP_MULTIPLY = 332 ,
  KP_SUBTRACT = 333 , KP_ADD = 334 , KP_ENTER = 335 , KP_EQUAL = 336 ,
  LEFT_SHIFT = 340 , LEFT_CONTROL = 341 , LEFT_ALT = 342 , LEFT_SUPER = 343 ,
  RIGHT_SHIFT = 344 , RIGHT_CONTROL = 345 , RIGHT_ALT = 346 , RIGHT_SUPER = 347 ,
  MENU = 348 , LAST = MENU , MAX_NUM = 350
}
 
enum class  Layout { X , Y , XY }
 
enum class  TextParam { NORMAL , OUTLINE , SHADOW , MAX_NUM }
 文本参数 更多...
 

函数

Color createColorRandom (float a=1.0f)
 创建随机颜色 更多...
 
constexpr Color createColor (const Color &col, float a=1.0f)
 创建指定透明度颜色 更多...
 
constexpr Color createColor (const Color3F &rgb, float a=1.0f)
 创建指定透明度颜色 更多...
 
constexpr Color createColor (uint32_t dw)
 创建颜色 更多...
 
Color createColor (const std::string &str)
 创建颜色 更多...
 
Color createColor (std::string_view str)
 
void colorSaturate (Color &col)
 限制颜色值 到[0, 1] 更多...
 
void colorInverse (Color &col)
 反色,不包含透明通道 更多...
 
Color colorInverse (const Color &col)
 
bool isColorOpaque (const Color &col)
 
Color operator""_c (unsigned long long x)
 
template<typename T1 , typename T , std::size_t N>
constexpr std::array< T1, N > toArray (const std::array< T, N > &a)
 
template<typename T , std::size_t N>
constexpr std::array< Position::value_type, N > toPosition (const std::array< T, N > &a)
 
template<typename T , std::size_t N>
constexpr std::array< Point::value_type, N > toPoint (const std::array< T, N > &a)
 
template<typename T , std::size_t N, typename T1 , typename ... Args>
constexpr void toArrayImp (std::array< T, N > &arr, const T1 &a, Args... args)
 
template<typename T , typename T1 , typename ... Args>
constexpr std::array< T, sizeof...(Args)+1 > toArray (const T1 &a, Args... args)
 
template<typename ... Args>
std::array< Position::value_type, sizeof...(Args)> toPosition (Args... args)
 
template<typename ... Args>
std::array< Point::value_type, sizeof...(Args)> toPoint (Args... args)
 
template<typename T , typename ... Args>
constexpr void CheckPositive (const T &a, Args... args)
 
template<typename ... Args>
std::array< Size::value_type, sizeof...(Args)> toSize (Args... args, bool check=true)
 
constexpr Quad createQuad (const Position &lt, const Position &rb)
 创建一个Quad,通过左上角和右下角的坐标 更多...
 
constexpr Quad createQuad (const Rect &rect)
 
Quad createQuad (const Position &p0, const Position &p1, Float d)
 创建一个Quad,通过两点和线条宽度 更多...
 
template<IsBase T>
constexpr Quad createQuad (T size, bool center=true)
 创建一个Quad,可选依据大小居中 更多...
 
constexpr Quad createQuad (Position size, bool center=true)
 创建一个Quad,可选依据大小居中 更多...
 
constexpr Quad createQuad (Size size, bool center=true)
 创建一个Quad,可选依据大小居中 更多...
 
constexpr Rect createRect (const Size &size)
 创建一个Rect,依据大小 更多...
 
constexpr Rect createRect (const Point &lt, const Size &size)
 创建一个Rect,依据左上角和大小 更多...
 
constexpr Rect createRect (const Point &lt, const Point &rb)
 创建一个Rect,依据左上角和右下角 更多...
 
constexpr RectU createRectU (const Size &size)
 创建一个RectU,依据大小 更多...
 
constexpr RectU createRectU (unsigned size)
 创建一个正方形RectU,依据大小 更多...
 
constexpr RectU createRectU (const PointU &lt, const Size &size)
 创建一个Rect,依据左上角和大小 更多...
 
constexpr Float operator""_f (long double r)
 
constexpr Float operator""_f (unsigned long long r)
 
constexpr FloatTime operator""_ft (long double r)
 
constexpr FloatTime operator""_ft (unsigned long long r)
 
constexpr std::size_t operator""z (unsigned long long i)
 
constexpr std::size_t operator""uz (unsigned long long i)
 
template<typename T , typename T1 >
constexpr T1 frac (const T &n, const T &d)
 
template<typename T >
Float frac_r (const T &n, const T &d)
 
template<typename T >
FloatTime frac_rt (const T &n, const T &d)
 
template<typename T , std::size_t N>
constexpr std::array< T, N > & operator+= (std::array< T, N > &a, const std::array< T, N > &b)
 
template<typename T , std::size_t N>
constexpr std::array< T, N > operator+ (const std::array< T, N > &a, const std::array< T, N > &b)
 
template<typename T , std::size_t N>
constexpr std::array< T, N > & operator-= (std::array< T, N > &a, const std::array< T, N > &b)
 
template<typename T , std::size_t N>
constexpr std::array< T, N > operator- (const std::array< T, N > &a, const std::array< T, N > &b)
 
template<typename T , std::size_t N>
constexpr std::array< T, N > & operator*= (std::array< T, N > &a, const std::array< T, N > &b)
 
template<typename T , std::size_t N>
constexpr std::array< T, N > operator* (const std::array< T, N > &a, const std::array< T, N > &b)
 
template<typename T , std::size_t N>
constexpr std::array< T, N > & operator/= (std::array< T, N > &a, const std::array< T, N > &b)
 
template<typename T , std::size_t N>
constexpr std::array< T, N > operator/ (const std::array< T, N > &a, const std::array< T, N > &b)
 
template<typename T , std::size_t N>
constexpr std::array< T, N > & operator+= (std::array< T, N > &a, const T &b)
 
template<typename T , std::size_t N>
constexpr std::array< T, N > operator+ (const std::array< T, N > &a, const T &b)
 
template<typename T , std::size_t N>
constexpr std::array< T, N > & operator-= (std::array< T, N > &a, const T &b)
 
template<typename T , std::size_t N>
constexpr std::array< T, N > operator- (const std::array< T, N > &a, const T &b)
 
template<typename T , std::size_t N>
constexpr std::array< T, N > & operator*= (std::array< T, N > &a, const T &b)
 
template<typename T , std::size_t N>
constexpr std::array< T, N > operator* (const std::array< T, N > &a, const T &b)
 
template<typename T , std::size_t N>
constexpr std::array< T, N > & operator/= (std::array< T, N > &a, const T &b)
 
template<typename T , std::size_t N>
constexpr std::array< T, N > operator/ (const std::array< T, N > &a, const T &b)
 
template<typename T , std::size_t N>
constexpr std::array< T, N > operator- (const std::array< T, N > &a)
 
template<typename T , std::size_t N>
constexpr std::array< T, N > operator+ (const std::array< T, N > &a)
 
template<typename T >
constexpr T saturate (const T &x)
 限制数值到 [0, 1] 更多...
 
template<typename T >
constexpr T is_saturate (const T &x)
 是否数值在[0, 1] 更多...
 
template<typename T >
constexpr std::array< T, 3 > cross (const std::array< T, 3 > &a, const std::array< T, 3 > &b)
 向量叉乘 更多...
 
template<typename T >
T cast_dynamic (void *p)
 动态类型强转 更多...
 
template<typename T , size_t N>
bool limit_bigger (std::array< T, N > &a, const std::array< T, N > &limit)
 限制到大于某个值,如果修改了原值则返回true 更多...
 
template<typename T , typename V >
void erase_head_from_last (T &container, const V &a)
 从容器container中移除 最后 匹配到的a元素 之前(包含a)的所有元素,如果没有匹配到,则什么都不做。 更多...
 
template<PopFrontAble C, typename F >
void operate_front (C &container, F func)
 从容器container不断取出第一个元素,执行操作 更多...
 
template<typename T >
T * pointer (T &&x)
 查找算法 更多...
 
template<typename T >
const T & constant (T &v)
 加上const修饰 更多...
 
template<typename C >
auto find_equal (C &container)
 替换容器元素值 更多...
 
template<typename T , typename V >
T insert_per_num (const T &container, V v, size_t per_num)
 隔n个元素就插入1个分割符,首尾不会出现分割符 更多...
 
template<typename T , typename V >
T r_insert_per_num (const T &container, V v, size_t per_num)
 从后面往前,隔n个元素就插入1个值,首尾不会出现分割符 更多...
 
template<typename T , typename V >
void split (const T &container, V delimiter, std::vector< T > &ret)
 以 元素 分割 容器 更多...
 
template<typename T , typename V >
void split_no_empty (const T &container, V delimiter, std::vector< T > &ret)
 以 元素 分割 容器 更多...
 
template<typename T >
void split_sub (const T &container, const T &delimiter, std::vector< T > &ret)
 以 子串 分割 容器 更多...
 
template<typename T , typename V >
void make_sequence (T &c, const std::initializer_list< std::initializer_list< V > > &vec)
 生成序列 更多...
 
template<typename C , typename F >
void for_couple (const C &container, F func, bool ring=false)
 成对遍历 更多...
 
template<IsPointer T, typename FC , typename F >
void for_tree (T root, FC func_child, F func)
 遍历树(使用栈,深度优先) 更多...
 
template<typename T , size_t N>
constexpr T & arr_last (const T(&arr)[N])
 返回静态数组长度 更多...
 
template<IsSigned T>
constexpr T sign (const T &v)
 返回符号,正数返回1、负数返回-1、0返回0 更多...
 
template<size_t N>
consteval uint64_t str_uid (const char(&str)[N])
 固定条件的字符串,生成唯一id 更多...
 
template<typename T , size_t N>
constexpr std::array< T, N+1 > append (const std::array< T, N > &arr, const T &v)
 尾部增加1一个元素 更多...
 
template<size_t M = 1, typename T , size_t N>
constexpr std::array< T, N - M > subtract (const std::array< T, N > &arr)
 尾部舍弃M个元素 更多...
 
bool glfwInit ()
 
bool glfwWindowShouldClose (GLFWwindow *window)
 
void glfwGetFramebufferSize (GLFWwindow *window, int *w, int *h)
 
const char ** glfwGetRequiredInstanceExtensions (uint32_t *count)
 
void glfwWaitEvents ()
 
void glfwPollEvents ()
 
void glfwDestroyWindow (GLFWwindow *window)
 
void glfwTerminate ()
 
void glfwSetCursorPos (GLFWwindow *window, int x, int y)
 
void glfwGetWindowSize (GLFWwindow *window, int *w, int *h)
 
void glfwGetMonitorWorkarea (GLFWmonitor *monitor, int *x, int *y, int *w, int *h)
 
void glfwGetWindowSize (GLFWwindow *window, int x, int y)
 
void glfwSetWindowPos (GLFWwindow *window, int x, int y)
 
void log_pause0 (std::string_view str, const std::source_location location=std::source_location::current())
 输出日志 更多...
 
void log_test0 (std::string_view str, const std::source_location location=std::source_location::current())
 
void log_info0 (std::string_view str, const std::source_location location=std::source_location::current())
 
void log_msg0 (std::string_view str, const std::source_location location=std::source_location::current())
 
void log_notice0 (std::string_view str, const std::source_location location=std::source_location::current())
 
void log_warn0 (std::string_view str, const std::source_location location=std::source_location::current())
 
void log_err0 (std::string_view str, const std::source_location location=std::source_location::current())
 
void log_damage0 (std::string_view str, const std::source_location location=std::source_location::current())
 
void log (std::string_view str, const std::source_location location=std::source_location::current())
 以当前设置输出 更多...
 
void log_err0 (const std::exception &e, const std::source_location location=std::source_location::current())
 
void log (std::string_view str)
 
void log_pause0 (std::string_view str)
 
void log_test0 (std::string_view str)
 
void log_info0 (std::string_view str)
 
void log_msg0 (std::string_view str)
 
void log_notice0 (std::string_view str)
 
void log_warn0 (std::string_view str)
 
void log_err0 (std::string_view str)
 
void log_damage0 (std::string_view str)
 
void log_err0 (const std::exception &e)
 
template<typename T , size_t M, size_t N>
bool operator== (const Matrix< T, M, N > &a, const Matrix< T, M, N > &b)
 判断相等 更多...
 
template<typename T , size_t M, size_t N, size_t P>
Matrix< T, M, N > operator* (const Matrix< T, M, P > &a, const Matrix< T, P, N > &b)
 矩阵乘法 更多...
 
template<typename T , size_t M, size_t N>
std::array< T, M > operator* (const Matrix< T, M, N > &a, const std::array< T, N > &v)
 矩阵 乘 向量 更多...
 
std::string CreateString (BufferView buf)
 Buffer构造string,不一定是合法的字符串 更多...
 
BufferView CreateBufferView (std::string_view str)
 创建buffer 更多...
 
template<typename T , typename... Args>
auto get_gc (Args &&...args)
 定义一个GC变量(引用计数内存池) 更多...
 
std::string_view lang (std::string_view tag, std::string_view name)
 返回一个语言配置的字符串,传入 menu、start 更多...
 
std::string_view lang (std::string_view tag_name)
 返回一个语言配置的字符串,传入 @menu.start 更多...
 
Layout String2Layout (std::string_view str)
 
Image * createImage (const Size &size, const Color &col)
 创建图像 更多...
 
Image * createImage (std::string_view path_name)
 创建图像 更多...
 
Image * createImageSvg (std::string_view path_name, const Size &size)
 创建图像 从svg 更多...
 
bool saveImage (const Image *img, std::string_view path_name)
 保存到图像 更多...
 
std::string to_string (const SpriteID &id)
 

变量

System * g_system
 
Time * g_time
 
constexpr size_t NUM_MAX_GAME_PAD = 4
 手柄数量上限 更多...
 
Input * g_input
 
constexpr std::array< std::string_view, 9 > DL_LOG_SYSTEM_LEVLE_NAME
 
LogSystem * g_log
 
constexpr Position3 AXIS_X = { 1.0f, 0.0f, 0.0f }
 
constexpr Position3 AXIS_Y = { 0.0f, 1.0f, 0.0f }
 
constexpr Position3 AXIS_Z = { 0.0f, 0.0f, 1.0f }
 
constexpr size_t SIZE_STREAM_INPUT_CONTAINER_CHECK = 100000000
 
Language * g_lang
 
constexpr Size SIZE_SPRITE_DEFAULT = { 32, 32 }
 
constexpr std::string_view STR_PATH_2D = "2d/"
 
constexpr std::string_view STR_PATH_3D = "3d/"
 
Factory * g_factory
 
constexpr unsigned SIZE_TEXTURE_2D = 4096
 
constexpr Size SIZE_TEXTURE_2D_SIZE = { SIZE_TEXTURE_2D, SIZE_TEXTURE_2D }
 
FreeType * g_freetype
 
Graphics * g_gfx
 
constexpr uint32_t VERSION_MODEL_CACHE = 0
 
ModelLoader * g_modelLoader
 
Physics * g_physics
 
constexpr float Z_DEFAULT = 0.0f
 
constexpr float Z_DEFAULT_UI = Math::OffsetOrder(Z_DEFAULT)
 
constexpr Float LENGTH_NORMAL = 32.0f
 
constexpr Position POS_ZERO = { 0 ,0 }
 
constexpr Position POS_NORMAL = { LENGTH_NORMAL ,LENGTH_NORMAL }
 
constexpr Quad QUAD_DEFAULT_SPRITE = createQuad(POS_ZERO, POS_NORMAL)
 
constexpr Position SIZE_DEFAULT_SPRITE = { LENGTH_NORMAL, LENGTH_NORMAL }
 
Squirrel * g_squirrel
 
UI::Manager * g_ui
 
constexpr size_t NUM_BONE = 4
 
constexpr size_t NUM_MAX_FRAME_IN_FLIGHT = 2
 
constexpr size_t NUM_MAX_PRIMITIVE = 128
 
constexpr size_t NUM_MAX_DESCRIPTOR_POOL = NUM_MAX_FRAME_IN_FLIGHT * NUM_MAX_PRIMITIVE * 2
 
constexpr size_t NUM_MAX_MATERIAL = 50
 
constexpr size_t NUM_MAX_BONE = 128
 
constexpr size_t NUM_MAX_BONE_TRANS = 96
 
constexpr size_t NUM_MAX_DRAW_CALL_2D = 100
 
constexpr size_t NUM_2D_INDEX = 6 * 102400
 
constexpr size_t NUM_MAX_DESCRIPTOR_POOL_2D = NUM_MAX_FRAME_IN_FLIGHT * NUM_MAX_DRAW_CALL_2D
 
constexpr size_t NUM_START_2D_VERTEX = 4 * 1024
 
constexpr size_t NUM_MAX_ROOT_COOR = 32
 
constexpr bool B_OPEN_SAMPLE_SHADING = false
 
constexpr bool ENABLE_VALIDATION_LAYERS = false
 
constexpr size_t NUM_MAX_ACTOR = 10240
 
constexpr std::size_t NUM_GFX = 4
 
VK * g_vk
 

类型定义说明

◆ Buffer

using dl::Buffer = typedef std::vector<std::byte>

在文件 dl_buffer.h 第 21 行定义.

◆ BufferView

using dl::BufferView = typedef std::span<std::byte>

在文件 dl_buffer.h 第 22 行定义.

◆ Color

using dl::Color = typedef std::array<float, 4>

在文件 dl_type_def.h 第 49 行定义.

◆ Color3F

using dl::Color3F = typedef std::array<float, 3>

在文件 dl_color.h 第 23 行定义.

◆ Float

using dl::Float = typedef float

在文件 dl_type_def.h 第 37 行定义.

◆ FloatTime

using dl::FloatTime = typedef float

在文件 dl_type_def.h 第 48 行定义.

◆ gcActor

using dl::gcActor = typedef GC<Actor>

在文件 dl_actor.h 第 86 行定义.

◆ gcSprite

using dl::gcSprite = typedef GC<Sprite>

在文件 dl_sprite.h 第 183 行定义.

◆ gcText

using dl::gcText = typedef GC<Text>

在文件 dl_text.h 第 305 行定义.

◆ Image

using dl::Image = typedef Vector2<uint32_t>

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

◆ Index2

using dl::Index2 = typedef std::array<std::size_t, 2>

在文件 dl_type_def.h 第 52 行定义.

◆ Matrix4

using dl::Matrix4 = typedef Matrix<Float, 4, 4>

在文件 dl_matrix.h 第 227 行定义.

◆ Point

using dl::Point = typedef Point2

在文件 dl_type_def.h 第 23 行定义.

◆ Point0

using dl::Point0 = typedef std::array<int, 0>

在文件 dl_type_def.h 第 18 行定义.

◆ Point0U

using dl::Point0U = typedef std::array<unsigned, 0>

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

◆ Point1

using dl::Point1 = typedef std::array<int, 1>

在文件 dl_type_def.h 第 19 行定义.

◆ Point1U

using dl::Point1U = typedef std::array<unsigned, 1>

在文件 dl_type_def.h 第 28 行定义.

◆ Point2

using dl::Point2 = typedef std::array<int, 2>

在文件 dl_type_def.h 第 20 行定义.

◆ Point2U

using dl::Point2U = typedef std::array<unsigned, 2>

在文件 dl_type_def.h 第 29 行定义.

◆ Point3

using dl::Point3 = typedef std::array<int, 3>

在文件 dl_type_def.h 第 21 行定义.

◆ Point3U

using dl::Point3U = typedef std::array<unsigned, 3>

在文件 dl_type_def.h 第 30 行定义.

◆ Point4

using dl::Point4 = typedef std::array<int, 4>

在文件 dl_type_def.h 第 22 行定义.

◆ Point4U

using dl::Point4U = typedef std::array<unsigned, 4>

在文件 dl_type_def.h 第 31 行定义.

◆ PointU

using dl::PointU = typedef Point2U

在文件 dl_type_def.h 第 32 行定义.

◆ Position

using dl::Position = typedef Position2

在文件 dl_type_def.h 第 43 行定义.

◆ Position0

using dl::Position0 = typedef std::array<Float, 0>

在文件 dl_type_def.h 第 38 行定义.

◆ Position1

using dl::Position1 = typedef std::array<Float, 1>

在文件 dl_type_def.h 第 39 行定义.

◆ Position2

using dl::Position2 = typedef std::array<Float, 2>

在文件 dl_type_def.h 第 40 行定义.

◆ Position3

using dl::Position3 = typedef std::array<Float, 3>

在文件 dl_type_def.h 第 41 行定义.

◆ Position4

using dl::Position4 = typedef std::array<Float, 4>

在文件 dl_type_def.h 第 42 行定义.

◆ Quad

using dl::Quad = typedef std::array<Position, 4>

在文件 dl_type_def.h 第 46 行定义.

◆ Rect

using dl::Rect = typedef Point4

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

◆ RectU

using dl::RectU = typedef Point4U

在文件 dl_type_def.h 第 35 行定义.

◆ Size

using dl::Size = typedef PointU

在文件 dl_type_def.h 第 34 行定义.

◆ Triangle

using dl::Triangle = typedef std::array<Position, 3>

在文件 dl_type_def.h 第 45 行定义.

◆ UV

using dl::UV = typedef std::array<float, 2>

在文件 dl_sprite.h 第 34 行定义.

枚举类型说明

◆ KeyCode

enum class dl::KeyCode : int
strong
枚举值
UNKNOWN 
SPACE 
APOSTROPHE 
COMMA 
MINUS 
PERIOD 
SLASH 
KEY0 
KEY1 
KEY2 
KEY3 
KEY4 
KEY5 
KEY6 
KEY7 
KEY8 
KEY9 
SEMICOLON 
EQUAL 
A 
B 
C 
D 
E 
F 
G 
H 
I 
J 
K 
L 
M 
N 
O 
P 
Q 
R 
S 
T 
U 
V 
W 
X 
Y 
Z 
LEFT_BRACKET 
BACKSLASH 
RIGHT_BRACKET 
GRAVE_ACCENT 
WORLD_1 
WORLD_2 
ESCAPE 
ENTER 
TAB 
BACKSPACE 
INSERT 
DELETE 
RIGHT 
LEFT 
DOWN 
UP 
PAGE_UP 
PAGE_DOWN 
HOME 
END 
CAPS_LOCK 
SCROLL_LOCK 
NUM_LOCK 
PRINT_SCREEN 
PAUSE 
F1 
F2 
F3 
F4 
F5 
F6 
F7 
F8 
F9 
F10 
F11 
F12 
F13 
F14 
F15 
F16 
F17 
F18 
F19 
F20 
F21 
F22 
F23 
F24 
F25 
KP_0 
KP_1 
KP_2 
KP_3 
KP_4 
KP_5 
KP_6 
KP_7 
KP_8 
KP_9 
KP_DECIMAL 
KP_DIVIDE 
KP_MULTIPLY 
KP_SUBTRACT 
KP_ADD 
KP_ENTER 
KP_EQUAL 
LEFT_SHIFT 
LEFT_CONTROL 
LEFT_ALT 
LEFT_SUPER 
RIGHT_SHIFT 
RIGHT_CONTROL 
RIGHT_ALT 
RIGHT_SUPER 
MENU 
LAST 
MAX_NUM 

在文件 dl_input.h 第 79 行定义.

◆ Layout

enum class dl::Layout
strong
枚举值
X 

x轴移动

Y 

y轴移动

XY 

xy同时移动

在文件 dl_layout.h 第 18 行定义.

◆ MouseCode

enum class dl::MouseCode
strong
枚举值
LEFT 
RIGHT 
MIDDLE 
KEY4 
KEY5 
KEY6 
KEY7 
LAST 
MAX_NUM 

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

◆ PadCode

enum class dl::PadCode
strong
枚举值
UP 
DOWN 
LEFT 
RIGHT 
START 
BACK 
LS 
RS 
LB 
RB 
A 
B 
X 
Y 

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

◆ TextParam

enum class dl::TextParam
strong

文本参数

枚举值
NORMAL 

正常

OUTLINE 

描边

SHADOW 

阴影

MAX_NUM 

在文件 dl_text.h 第 26 行定义.

函数说明

◆ append()

template<typename T , size_t N>
constexpr std::array< T, N+1 > dl::append ( const std::array< T, N > &  arr,
const T &  v 
)
constexpr

尾部增加1一个元素

在文件 dl_algorithm.h 第 630 行定义.

◆ arr_last()

template<typename T , size_t N>
constexpr T & dl::arr_last ( const T(&)  arr[N])
constexpr

返回静态数组长度

注解
使用std::size,类似C::a时才需使用自己

返回数组最后一个元素

在文件 dl_algorithm.h 第 571 行定义.

◆ cast_dynamic()

template<typename T >
T dl::cast_dynamic ( void *  p)
inline

动态类型强转

注解
记得传入指针进行多态

在文件 dl_algorithm.h 第 61 行定义.

◆ CheckPositive()

template<typename T , typename ... Args>
constexpr void dl::CheckPositive ( const T &  a,
Args...  args 
)
constexpr

在文件 dl_type_convert.h 第 75 行定义.

◆ colorInverse() [1/2]

void dl::colorInverse ( Color &  col)
inline

反色,不包含透明通道

在文件 dl_color.h 第 99 行定义.

◆ colorInverse() [2/2]

Color dl::colorInverse ( const Color &  col)
inline

在文件 dl_color.h 第 105 行定义.

◆ colorSaturate()

void dl::colorSaturate ( Color &  col)
inline

限制颜色值 到[0, 1]

在文件 dl_color.h 第 91 行定义.

◆ constant()

template<typename T >
const T & dl::constant ( T &  v)
inline

加上const修饰

在文件 dl_algorithm.h 第 186 行定义.

◆ CreateBufferView()

BufferView dl::CreateBufferView ( std::string_view  str)
inline

创建buffer

在文件 dl_buffer.h 第 28 行定义.

◆ createColor() [1/5]

constexpr Color dl::createColor ( const Color &  col,
float  a = 1.0f 
)
constexpr

创建指定透明度颜色

参数
[in]col纯色部分
[in]a指定透明度

在文件 dl_color.h 第 45 行定义.

◆ createColor() [2/5]

constexpr Color dl::createColor ( const Color3F &  rgb,
float  a = 1.0f 
)
constexpr

创建指定透明度颜色

参数
[in]col纯色部分
[in]a指定透明度

在文件 dl_color.h 第 55 行定义.

◆ createColor() [3/5]

Color dl::createColor ( const std::string &  str)
inline

创建颜色

参数
[in]str十六进制RGBA

在文件 dl_color.h 第 78 行定义.

◆ createColor() [4/5]

Color dl::createColor ( std::string_view  str)
inline

在文件 dl_color.h 第 83 行定义.

◆ createColor() [5/5]

constexpr Color dl::createColor ( uint32_t  dw)
constexpr

创建颜色

参数
[in]uint32_t颜色值

在文件 dl_color.h 第 64 行定义.

◆ createColorRandom()

Color dl::createColorRandom ( float  a = 1.0f)
inline

创建随机颜色

参数
[in]a指定透明度

在文件 dl_color.h 第 29 行定义.

◆ createImage() [1/2]

Image * dl::createImage ( const Size &  size,
const Color &  col 
)

创建图像

参数
[in]size大小
[in]color颜色
返回值
用户需要使用delete释放获得的指针,除非失败返回了nullptr

◆ createImage() [2/2]

Image * dl::createImage ( std::string_view  path_name)

创建图像

参数
[in]path_name路径
返回值
用户需要使用delete释放获得的指针,除非失败返回了nullptr

◆ createImageSvg()

Image * dl::createImageSvg ( std::string_view  path_name,
const Size &  size 
)

创建图像 从svg

参数
[in]path_name路径
[in]size大小
返回值
用户需要使用delete释放获得的指针,除非失败返回了nullptr

◆ createQuad() [1/6]

constexpr Quad dl::createQuad ( const Position &  lt,
const Position &  rb 
)
inlineconstexpr

创建一个Quad,通过左上角和右下角的坐标

参数
[in]lt左上角坐标
[in]rb右下角坐标

在文件 dl_type_create.h 第 30 行定义.

◆ createQuad() [2/6]

Quad dl::createQuad ( const Position &  p0,
const Position &  p1,
Float  d 
)
inline

创建一个Quad,通过两点和线条宽度

在文件 dl_type_create.h 第 42 行定义.

◆ createQuad() [3/6]

constexpr Quad dl::createQuad ( const Rect &  rect)
inlineconstexpr

在文件 dl_type_create.h 第 35 行定义.

◆ createQuad() [4/6]

constexpr Quad dl::createQuad ( Position  size,
bool  center = true 
)
inlineconstexpr

创建一个Quad,可选依据大小居中

参数
[in]size大小

在文件 dl_type_create.h 第 81 行定义.

◆ createQuad() [5/6]

constexpr Quad dl::createQuad ( Size  size,
bool  center = true 
)
constexpr

创建一个Quad,可选依据大小居中

参数
[in]size大小

在文件 dl_type_create.h 第 99 行定义.

◆ createQuad() [6/6]

template<IsBase T>
constexpr Quad dl::createQuad ( T  size,
bool  center = true 
)
constexpr

创建一个Quad,可选依据大小居中

参数
[in]size大小

在文件 dl_type_create.h 第 61 行定义.

◆ createRect() [1/3]

constexpr Rect dl::createRect ( const Point &  lt,
const Point &  rb 
)
constexpr

创建一个Rect,依据左上角和右下角

参数
[in]lt左上角
[in]rb右下角

在文件 dl_type_create.h 第 128 行定义.

◆ createRect() [2/3]

constexpr Rect dl::createRect ( const Point &  lt,
const Size &  size 
)
constexpr

创建一个Rect,依据左上角和大小

参数
[in]lt左上角
[in]size大小

在文件 dl_type_create.h 第 119 行定义.

◆ createRect() [3/3]

constexpr Rect dl::createRect ( const Size &  size)
constexpr

创建一个Rect,依据大小

参数
[in]size大小

在文件 dl_type_create.h 第 110 行定义.

◆ createRectU() [1/3]

constexpr RectU dl::createRectU ( const PointU &  lt,
const Size &  size 
)
constexpr

创建一个Rect,依据左上角和大小

参数
[in]lt左上角
[in]size大小

在文件 dl_type_create.h 第 155 行定义.

◆ createRectU() [2/3]

constexpr RectU dl::createRectU ( const Size &  size)
constexpr

创建一个RectU,依据大小

参数
[in]size大小

在文件 dl_type_create.h 第 138 行定义.

◆ createRectU() [3/3]

constexpr RectU dl::createRectU ( unsigned  size)
constexpr

创建一个正方形RectU,依据大小

参数
[in]size大小

在文件 dl_type_create.h 第 146 行定义.

◆ CreateString()

std::string dl::CreateString ( BufferView  buf)

Buffer构造string,不一定是合法的字符串

◆ cross()

template<typename T >
constexpr std::array< T, 3 > dl::cross ( const std::array< T, 3 > &  a,
const std::array< T, 3 > &  b 
)
constexpr

向量叉乘

在文件 dl_algorithm.h 第 45 行定义.

◆ erase_head_from_last()

template<typename T , typename V >
void dl::erase_head_from_last ( T &  container,
const V &  a 
)

从容器container中移除 最后 匹配到的a元素 之前(包含a)的所有元素,如果没有匹配到,则什么都不做。

参数
container操作的容器
[in]a要匹配的元素
备注
{"data/image/cat.png", '/'} -> "cat.png"

在文件 dl_algorithm.h 第 95 行定义.

◆ find_equal()

template<typename C >
auto dl::find_equal ( C &  container)

替换容器元素值

返回 重复元素位置,没有返回end

在文件 dl_algorithm.h 第 210 行定义.

◆ for_couple()

template<typename C , typename F >
void dl::for_couple ( const C &  container,
F  func,
bool  ring = false 
)

成对遍历

参数
[in]container容器
[in]func操作函数
[in]ring为真时,末尾元素 与 首元素成对再操作一次
注解
ring为真时,1个元素操作{0, 0},2个元素操作{0, 1}, {1, 0}

在文件 dl_algorithm.h 第 491 行定义.

◆ for_tree()

template<IsPointer T, typename FC , typename F >
void dl::for_tree ( T  root,
FC  func_child,
F  func 
)

遍历树(使用栈,深度优先)

参数
[in]root根节点
[in]func_child获取子节点函数
[in]func操作节点函数
注解
注意T为指针类型。可以尝试使用NTree类

在文件 dl_algorithm.h 第 520 行定义.

◆ frac()

template<typename T , typename T1 >
constexpr T1 dl::frac ( const T &  n,
const T &  d 
)
constexpr

在文件 dl_type_def.h 第 82 行定义.

◆ frac_r()

template<typename T >
Float dl::frac_r ( const T &  n,
const T &  d 
)

在文件 dl_type_def.h 第 88 行定义.

◆ frac_rt()

template<typename T >
FloatTime dl::frac_rt ( const T &  n,
const T &  d 
)

在文件 dl_type_def.h 第 93 行定义.

◆ get_gc()

template<typename T , typename... Args>
auto dl::get_gc ( Args &&...  args)

定义一个GC变量(引用计数内存池)

参数
[in]T类型名
[in]args构造参数

在文件 dl_memory_pool.h 第 285 行定义.

◆ glfwDestroyWindow()

void dl::glfwDestroyWindow ( GLFWwindow *  window)
inline

在文件 dl_wrap_glfw.h 第 45 行定义.

◆ glfwGetFramebufferSize()

void dl::glfwGetFramebufferSize ( GLFWwindow *  window,
int *  w,
int *  h 
)
inline

在文件 dl_wrap_glfw.h 第 31 行定义.

◆ glfwGetMonitorWorkarea()

void dl::glfwGetMonitorWorkarea ( GLFWmonitor *  monitor,
int *  x,
int *  y,
int *  w,
int *  h 
)
inline

在文件 dl_wrap_glfw.h 第 50 行定义.

◆ glfwGetRequiredInstanceExtensions()

const char ** dl::glfwGetRequiredInstanceExtensions ( uint32_t *  count)
inline

在文件 dl_wrap_glfw.h 第 37 行定义.

◆ glfwGetWindowSize() [1/2]

void dl::glfwGetWindowSize ( GLFWwindow *  window,
int *  w,
int *  h 
)
inline

在文件 dl_wrap_glfw.h 第 49 行定义.

◆ glfwGetWindowSize() [2/2]

void dl::glfwGetWindowSize ( GLFWwindow *  window,
int  x,
int  y 
)
inline

在文件 dl_wrap_glfw.h 第 51 行定义.

◆ glfwInit()

bool dl::glfwInit ( )
inline

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

◆ glfwPollEvents()

void dl::glfwPollEvents ( )
inline

在文件 dl_wrap_glfw.h 第 44 行定义.

◆ glfwSetCursorPos()

void dl::glfwSetCursorPos ( GLFWwindow *  window,
int  x,
int  y 
)
inline

在文件 dl_wrap_glfw.h 第 47 行定义.

◆ glfwSetWindowPos()

void dl::glfwSetWindowPos ( GLFWwindow *  window,
int  x,
int  y 
)
inline

在文件 dl_wrap_glfw.h 第 52 行定义.

◆ glfwTerminate()

void dl::glfwTerminate ( )
inline

在文件 dl_wrap_glfw.h 第 46 行定义.

◆ glfwWaitEvents()

void dl::glfwWaitEvents ( )
inline

在文件 dl_wrap_glfw.h 第 43 行定义.

◆ glfwWindowShouldClose()

bool dl::glfwWindowShouldClose ( GLFWwindow *  window)
inline

在文件 dl_wrap_glfw.h 第 29 行定义.

◆ insert_per_num()

template<typename T , typename V >
T dl::insert_per_num ( const T &  container,
V  v,
size_t  per_num 
)

隔n个元素就插入1个分割符,首尾不会出现分割符

备注
{ "1234567890", ',', 3} -> 123,456,789,0

在文件 dl_algorithm.h 第 231 行定义.

◆ is_saturate()

template<typename T >
constexpr T dl::is_saturate ( const T &  x)
constexpr

是否数值在[0, 1]

在文件 dl_algorithm.h 第 36 行定义.

◆ isColorOpaque()

bool dl::isColorOpaque ( const Color &  col)
inline

在文件 dl_color.h 第 112 行定义.

◆ lang() [1/2]

std::string_view dl::lang ( std::string_view  tag,
std::string_view  name 
)
inline

返回一个语言配置的字符串,传入 menu、start

返回值
失败返回特定字符串,并输出错误

在文件 dl_language.h 第 119 行定义.

◆ lang() [2/2]

std::string_view dl::lang ( std::string_view  tag_name)

返回一个语言配置的字符串,传入 @menu.start

返回值
失败返回特定字符串,并输出错误

◆ limit_bigger()

template<typename T , size_t N>
bool dl::limit_bigger ( std::array< T, N > &  a,
const std::array< T, N > &  limit 
)

限制到大于某个值,如果修改了原值则返回true

在文件 dl_algorithm.h 第 71 行定义.

◆ log() [1/2]

void dl::log ( std::string_view  str)

◆ log() [2/2]

void dl::log ( std::string_view  str,
const std::source_location  location = std::source_location::current() 
)

以当前设置输出

◆ log_damage0() [1/2]

void dl::log_damage0 ( std::string_view  str)
inline

在文件 dl_log.h 第 178 行定义.

◆ log_damage0() [2/2]

void dl::log_damage0 ( std::string_view  str,
const std::source_location  location = std::source_location::current() 
)

◆ log_err0() [1/4]

void dl::log_err0 ( const std::exception &  e)

◆ log_err0() [2/4]

void dl::log_err0 ( const std::exception &  e,
const std::source_location  location = std::source_location::current() 
)

◆ log_err0() [3/4]

void dl::log_err0 ( std::string_view  str)
inline

在文件 dl_log.h 第 177 行定义.

◆ log_err0() [4/4]

void dl::log_err0 ( std::string_view  str,
const std::source_location  location = std::source_location::current() 
)

◆ log_info0() [1/2]

void dl::log_info0 ( std::string_view  str)
inline

在文件 dl_log.h 第 173 行定义.

◆ log_info0() [2/2]

void dl::log_info0 ( std::string_view  str,
const std::source_location  location = std::source_location::current() 
)

◆ log_msg0() [1/2]

void dl::log_msg0 ( std::string_view  str)
inline

在文件 dl_log.h 第 174 行定义.

◆ log_msg0() [2/2]

void dl::log_msg0 ( std::string_view  str,
const std::source_location  location = std::source_location::current() 
)

◆ log_notice0() [1/2]

void dl::log_notice0 ( std::string_view  str)
inline

在文件 dl_log.h 第 175 行定义.

◆ log_notice0() [2/2]

void dl::log_notice0 ( std::string_view  str,
const std::source_location  location = std::source_location::current() 
)

◆ log_pause0() [1/2]

void dl::log_pause0 ( std::string_view  str)
inline

在文件 dl_log.h 第 171 行定义.

◆ log_pause0() [2/2]

void dl::log_pause0 ( std::string_view  str,
const std::source_location  location = std::source_location::current() 
)

输出日志

◆ log_test0() [1/2]

void dl::log_test0 ( std::string_view  str)
inline

在文件 dl_log.h 第 172 行定义.

◆ log_test0() [2/2]

void dl::log_test0 ( std::string_view  str,
const std::source_location  location = std::source_location::current() 
)

◆ log_warn0() [1/2]

void dl::log_warn0 ( std::string_view  str)
inline

在文件 dl_log.h 第 176 行定义.

◆ log_warn0() [2/2]

void dl::log_warn0 ( std::string_view  str,
const std::source_location  location = std::source_location::current() 
)

◆ make_sequence()

template<typename T , typename V >
void dl::make_sequence ( T &  c,
const std::initializer_list< std::initializer_list< V > > &  vec 
)

生成序列

参数
[in]container容器
注解
前闭后开区间

在文件 dl_algorithm.h 第 467 行定义.

◆ operate_front()

template<PopFrontAble C, typename F >
void dl::operate_front ( C &  container,
F  func 
)

从容器container不断取出第一个元素,执行操作

参数
container操作的容器
[in]func对元素执行的操作
注解
将容器置空可以中断执行

在文件 dl_algorithm.h 第 112 行定义.

◆ operator""_c()

Color dl::operator""_c ( unsigned long long  x)
inline

在文件 dl_color.h 第 117 行定义.

◆ operator""_f() [1/2]

constexpr Float dl::operator""_f ( long double  r)
inlineconstexpr

在文件 dl_type_def.h 第 54 行定义.

◆ operator""_f() [2/2]

constexpr Float dl::operator""_f ( unsigned long long  r)
inlineconstexpr

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

◆ operator""_ft() [1/2]

constexpr FloatTime dl::operator""_ft ( long double  r)
inlineconstexpr

在文件 dl_type_def.h 第 62 行定义.

◆ operator""_ft() [2/2]

constexpr FloatTime dl::operator""_ft ( unsigned long long  r)
inlineconstexpr

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

◆ operator""uz()

constexpr std::size_t dl::operator""uz ( unsigned long long  i)
inlineconstexpr

在文件 dl_type_def.h 第 76 行定义.

◆ operator""z()

constexpr std::size_t dl::operator""z ( unsigned long long  i)
inlineconstexpr

在文件 dl_type_def.h 第 72 行定义.

◆ operator*() [1/4]

template<typename T , size_t M, size_t N>
std::array< T, M > dl::operator* ( const Matrix< T, M, N > &  a,
const std::array< T, N > &  v 
)

矩阵 乘 向量

注解
不满足交换律,将向量看为 n x 1的矩阵
返回的还是列向量

在文件 dl_matrix.h 第 268 行定义.

◆ operator*() [2/4]

template<typename T , size_t M, size_t N, size_t P>
Matrix< T, M, N > dl::operator* ( const Matrix< T, M, P > &  a,
const Matrix< T, P, N > &  b 
)

矩阵乘法

注解
数学定义:A为m X p矩阵,B为p X n矩阵。得C = AB,其中C为m X n矩阵

在文件 dl_matrix.h 第 247 行定义.

◆ operator*() [3/4]

template<typename T , std::size_t N>
constexpr std::array< T, N > dl::operator* ( const std::array< T, N > &  a,
const std::array< T, N > &  b 
)
constexpr

在文件 dl_type_op.h 第 59 行定义.

◆ operator*() [4/4]

template<typename T , std::size_t N>
constexpr std::array< T, N > dl::operator* ( const std::array< T, N > &  a,
const T &  b 
)
constexpr

在文件 dl_type_op.h 第 120 行定义.

◆ operator*=() [1/2]

template<typename T , std::size_t N>
constexpr std::array< T, N > & dl::operator*= ( std::array< T, N > &  a,
const std::array< T, N > &  b 
)
constexpr

在文件 dl_type_op.h 第 51 行定义.

◆ operator*=() [2/2]

template<typename T , std::size_t N>
constexpr std::array< T, N > & dl::operator*= ( std::array< T, N > &  a,
const T &  b 
)
constexpr

在文件 dl_type_op.h 第 112 行定义.

◆ operator+() [1/3]

template<typename T , std::size_t N>
constexpr std::array< T, N > dl::operator+ ( const std::array< T, N > &  a)
constexpr

在文件 dl_type_op.h 第 152 行定义.

◆ operator+() [2/3]

template<typename T , std::size_t N>
constexpr std::array< T, N > dl::operator+ ( const std::array< T, N > &  a,
const std::array< T, N > &  b 
)
constexpr

在文件 dl_type_op.h 第 29 行定义.

◆ operator+() [3/3]

template<typename T , std::size_t N>
constexpr std::array< T, N > dl::operator+ ( const std::array< T, N > &  a,
const T &  b 
)
constexpr

在文件 dl_type_op.h 第 90 行定义.

◆ operator+=() [1/2]

template<typename T , std::size_t N>
constexpr std::array< T, N > & dl::operator+= ( std::array< T, N > &  a,
const std::array< T, N > &  b 
)
constexpr

在文件 dl_type_op.h 第 21 行定义.

◆ operator+=() [2/2]

template<typename T , std::size_t N>
constexpr std::array< T, N > & dl::operator+= ( std::array< T, N > &  a,
const T &  b 
)
constexpr

在文件 dl_type_op.h 第 82 行定义.

◆ operator-() [1/3]

template<typename T , std::size_t N>
constexpr std::array< T, N > dl::operator- ( const std::array< T, N > &  a)
constexpr

在文件 dl_type_op.h 第 143 行定义.

◆ operator-() [2/3]

template<typename T , std::size_t N>
constexpr std::array< T, N > dl::operator- ( const std::array< T, N > &  a,
const std::array< T, N > &  b 
)
constexpr

在文件 dl_type_op.h 第 44 行定义.

◆ operator-() [3/3]

template<typename T , std::size_t N>
constexpr std::array< T, N > dl::operator- ( const std::array< T, N > &  a,
const T &  b 
)
constexpr

在文件 dl_type_op.h 第 105 行定义.

◆ operator-=() [1/2]

template<typename T , std::size_t N>
constexpr std::array< T, N > & dl::operator-= ( std::array< T, N > &  a,
const std::array< T, N > &  b 
)
constexpr

在文件 dl_type_op.h 第 36 行定义.

◆ operator-=() [2/2]

template<typename T , std::size_t N>
constexpr std::array< T, N > & dl::operator-= ( std::array< T, N > &  a,
const T &  b 
)
constexpr

在文件 dl_type_op.h 第 97 行定义.

◆ operator/() [1/2]

template<typename T , std::size_t N>
constexpr std::array< T, N > dl::operator/ ( const std::array< T, N > &  a,
const std::array< T, N > &  b 
)
constexpr

在文件 dl_type_op.h 第 74 行定义.

◆ operator/() [2/2]

template<typename T , std::size_t N>
constexpr std::array< T, N > dl::operator/ ( const std::array< T, N > &  a,
const T &  b 
)
constexpr

在文件 dl_type_op.h 第 135 行定义.

◆ operator/=() [1/2]

template<typename T , std::size_t N>
constexpr std::array< T, N > & dl::operator/= ( std::array< T, N > &  a,
const std::array< T, N > &  b 
)
constexpr

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

◆ operator/=() [2/2]

template<typename T , std::size_t N>
constexpr std::array< T, N > & dl::operator/= ( std::array< T, N > &  a,
const T &  b 
)
constexpr

在文件 dl_type_op.h 第 127 行定义.

◆ operator==()

template<typename T , size_t M, size_t N>
bool dl::operator== ( const Matrix< T, M, N > &  a,
const Matrix< T, M, N > &  b 
)

判断相等

在文件 dl_matrix.h 第 232 行定义.

◆ pointer()

template<typename T >
T * dl::pointer ( T &&  x)
inline

查找算法

取地址,可用于右值

注解
注意对象生命周期

在文件 dl_algorithm.h 第 177 行定义.

◆ r_insert_per_num()

template<typename T , typename V >
T dl::r_insert_per_num ( const T &  container,
V  v,
size_t  per_num 
)

从后面往前,隔n个元素就插入1个值,首尾不会出现分割符

备注
{ "123456789", ',', 3} -> 123,456,789

在文件 dl_algorithm.h 第 261 行定义.

◆ saturate()

template<typename T >
constexpr T dl::saturate ( const T &  x)
constexpr

限制数值到 [0, 1]

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

◆ saveImage()

bool dl::saveImage ( const Image *  img,
std::string_view  path_name 
)

保存到图像

◆ sign()

template<IsSigned T>
constexpr T dl::sign ( const T &  v)
constexpr

返回符号,正数返回1、负数返回-1、0返回0

在文件 dl_algorithm.h 第 580 行定义.

◆ split()

template<typename T , typename V >
void dl::split ( const T &  container,
V  delimiter,
std::vector< T > &  ret 
)

以 元素 分割 容器

参数
[in]container容器
[in]delimiter分割符
[out]ret返回分割之后的
注解
返回数量必定为分割符数量+1
备注
{1,2,2,5,} -> {1 2 2 5 0}
{,1,2,2,5} -> {0 1 2 2 5}
{,,1,,,2,2,5} -> {0 0 1 0 0 2 2 5}

在文件 dl_algorithm.h 第 299 行定义.

◆ split_no_empty()

template<typename T , typename V >
void dl::split_no_empty ( const T &  container,
V  delimiter,
std::vector< T > &  ret 
)

以 元素 分割 容器

参数
[in]container容器
[in]delimiter分割符
[out]ret返回分割之后的
注解
不会构造空元素
备注
{1,2,2,5,} -> {1 2 2 5}
{,1,2,2,5} -> {1 2 2 5}
{,,1,,,2,2,5} -> {1 2 2 5}

在文件 dl_algorithm.h 第 350 行定义.

◆ split_sub()

template<typename T >
void dl::split_sub ( const T &  container,
const T &  delimiter,
std::vector< T > &  ret 
)

以 子串 分割 容器

参数
[in]container容器
[in]delimiter分割符
[out]ret返回分割之后的
备注
"xxABCxxABCxxABC",xx" -> {"", "ABC", "ABC", "ABC"}

在文件 dl_algorithm.h 第 394 行定义.

◆ str_uid()

template<size_t N>
consteval uint64_t dl::str_uid ( const char(&)  str[N])

固定条件的字符串,生成唯一id

参数
[in]str字符数组
注解
最多10个字符,可包含 字母、数字、下划线、点
与base64一致,下划线替换+,点替换/

在文件 dl_algorithm.h 第 599 行定义.

◆ String2Layout()

Layout dl::String2Layout ( std::string_view  str)
inline

在文件 dl_layout.h 第 26 行定义.

◆ subtract()

template<size_t M = 1, typename T , size_t N>
constexpr std::array< T, N - M > dl::subtract ( const std::array< T, N > &  arr)
constexpr

尾部舍弃M个元素

在文件 dl_algorithm.h 第 643 行定义.

◆ to_string()

std::string dl::to_string ( const SpriteID &  id)
inline

在文件 dl_sprite.h 第 50 行定义.

◆ toArray() [1/2]

template<typename T1 , typename T , std::size_t N>
constexpr std::array< T1, N > dl::toArray ( const std::array< T, N > &  a)
constexpr

在文件 dl_type_convert.h 第 22 行定义.

◆ toArray() [2/2]

template<typename T , typename T1 , typename ... Args>
constexpr std::array< T, sizeof...(Args)+1 > dl::toArray ( const T1 &  a,
Args...  args 
)
constexpr

在文件 dl_type_convert.h 第 54 行定义.

◆ toArrayImp()

template<typename T , std::size_t N, typename T1 , typename ... Args>
constexpr void dl::toArrayImp ( std::array< T, N > &  arr,
const T1 &  a,
Args...  args 
)
constexpr

在文件 dl_type_convert.h 第 46 行定义.

◆ toPoint() [1/2]

template<typename ... Args>
std::array< Point::value_type, sizeof...(Args)> dl::toPoint ( Args...  args)

在文件 dl_type_convert.h 第 68 行定义.

◆ toPoint() [2/2]

template<typename T , std::size_t N>
constexpr std::array< Point::value_type, N > dl::toPoint ( const std::array< T, N > &  a)
constexpr

在文件 dl_type_convert.h 第 39 行定义.

◆ toPosition() [1/2]

template<typename ... Args>
std::array< Position::value_type, sizeof...(Args)> dl::toPosition ( Args...  args)

在文件 dl_type_convert.h 第 62 行定义.

◆ toPosition() [2/2]

template<typename T , std::size_t N>
constexpr std::array< Position::value_type, N > dl::toPosition ( const std::array< T, N > &  a)
constexpr

在文件 dl_type_convert.h 第 33 行定义.

◆ toSize()

template<typename ... Args>
std::array< Size::value_type, sizeof...(Args)> dl::toSize ( Args...  args,
bool  check = true 
)

在文件 dl_type_convert.h 第 82 行定义.

变量说明

◆ AXIS_X

constexpr Position3 dl::AXIS_X = { 1.0f, 0.0f, 0.0f }
constexpr

在文件 dl_transform.h 第 35 行定义.

◆ AXIS_Y

constexpr Position3 dl::AXIS_Y = { 0.0f, 1.0f, 0.0f }
constexpr

在文件 dl_transform.h 第 36 行定义.

◆ AXIS_Z

constexpr Position3 dl::AXIS_Z = { 0.0f, 0.0f, 1.0f }
constexpr

在文件 dl_transform.h 第 37 行定义.

◆ B_OPEN_SAMPLE_SHADING

constexpr bool dl::B_OPEN_SAMPLE_SHADING = false
constexpr

在文件 dl_vk.h 第 105 行定义.

◆ DL_LOG_SYSTEM_LEVLE_NAME

constexpr std::array<std::string_view, 9> dl::DL_LOG_SYSTEM_LEVLE_NAME
constexpr
初始值:
= {
"damage", "err", "warn", "notice", "msg", "info", "test", "pause",
}

在文件 dl_log.h 第 30 行定义.

◆ ENABLE_VALIDATION_LAYERS

constexpr bool dl::ENABLE_VALIDATION_LAYERS = false
constexpr

在文件 dl_vk.h 第 113 行定义.

◆ g_factory

Factory* dl::g_factory
extern

◆ g_freetype

FreeType* dl::g_freetype
extern

◆ g_gfx

Graphics* dl::g_gfx
extern

◆ g_input

Input* dl::g_input
extern

◆ g_lang

Language* dl::g_lang
extern

◆ g_log

LogSystem* dl::g_log
extern

◆ g_modelLoader

ModelLoader* dl::g_modelLoader

在文件 dl_model_loader.h 第 28 行定义.

◆ g_physics

Physics* dl::g_physics
extern

◆ g_squirrel

Squirrel* dl::g_squirrel
extern

◆ g_system

System* dl::g_system
extern

◆ g_time

Time* dl::g_time
extern

◆ g_ui

UI::Manager* dl::g_ui
extern

◆ g_vk

VK* dl::g_vk
extern

◆ LENGTH_NORMAL

constexpr Float dl::LENGTH_NORMAL = 32.0f
constexpr

在文件 dl_sprite.h 第 28 行定义.

◆ NUM_2D_INDEX

constexpr size_t dl::NUM_2D_INDEX = 6 * 102400
constexpr

在文件 dl_vk.h 第 96 行定义.

◆ NUM_BONE

constexpr size_t dl::NUM_BONE = 4
constexpr

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

◆ NUM_GFX

constexpr std::size_t dl::NUM_GFX = 4
constexpr

在文件 dl_vk.h 第 124 行定义.

◆ NUM_MAX_ACTOR

constexpr size_t dl::NUM_MAX_ACTOR = 10240
constexpr

在文件 dl_vk.h 第 121 行定义.

◆ NUM_MAX_BONE

constexpr size_t dl::NUM_MAX_BONE = 128
constexpr

在文件 dl_vk.h 第 89 行定义.

◆ NUM_MAX_BONE_TRANS

constexpr size_t dl::NUM_MAX_BONE_TRANS = 96
constexpr

在文件 dl_vk.h 第 91 行定义.

◆ NUM_MAX_DESCRIPTOR_POOL

constexpr size_t dl::NUM_MAX_DESCRIPTOR_POOL = NUM_MAX_FRAME_IN_FLIGHT * NUM_MAX_PRIMITIVE * 2
constexpr

在文件 dl_vk.h 第 85 行定义.

◆ NUM_MAX_DESCRIPTOR_POOL_2D

constexpr size_t dl::NUM_MAX_DESCRIPTOR_POOL_2D = NUM_MAX_FRAME_IN_FLIGHT * NUM_MAX_DRAW_CALL_2D
constexpr

在文件 dl_vk.h 第 98 行定义.

◆ NUM_MAX_DRAW_CALL_2D

constexpr size_t dl::NUM_MAX_DRAW_CALL_2D = 100
constexpr

在文件 dl_vk.h 第 94 行定义.

◆ NUM_MAX_FRAME_IN_FLIGHT

constexpr size_t dl::NUM_MAX_FRAME_IN_FLIGHT = 2
constexpr

在文件 dl_vk.h 第 81 行定义.

◆ NUM_MAX_GAME_PAD

constexpr size_t dl::NUM_MAX_GAME_PAD = 4
constexpr

手柄数量上限

在文件 dl_input.h 第 23 行定义.

◆ NUM_MAX_MATERIAL

constexpr size_t dl::NUM_MAX_MATERIAL = 50
constexpr

在文件 dl_vk.h 第 87 行定义.

◆ NUM_MAX_PRIMITIVE

constexpr size_t dl::NUM_MAX_PRIMITIVE = 128
constexpr

在文件 dl_vk.h 第 83 行定义.

◆ NUM_MAX_ROOT_COOR

constexpr size_t dl::NUM_MAX_ROOT_COOR = 32
constexpr

在文件 dl_vk.h 第 102 行定义.

◆ NUM_START_2D_VERTEX

constexpr size_t dl::NUM_START_2D_VERTEX = 4 * 1024
constexpr

在文件 dl_vk.h 第 100 行定义.

◆ POS_NORMAL

constexpr Position dl::POS_NORMAL = { LENGTH_NORMAL ,LENGTH_NORMAL }
constexpr

在文件 dl_sprite.h 第 30 行定义.

◆ POS_ZERO

constexpr Position dl::POS_ZERO = { 0 ,0 }
constexpr

在文件 dl_sprite.h 第 29 行定义.

◆ QUAD_DEFAULT_SPRITE

constexpr Quad dl::QUAD_DEFAULT_SPRITE = createQuad(POS_ZERO, POS_NORMAL)
constexpr

在文件 dl_sprite.h 第 31 行定义.

◆ SIZE_DEFAULT_SPRITE

constexpr Position dl::SIZE_DEFAULT_SPRITE = { LENGTH_NORMAL, LENGTH_NORMAL }
constexpr

在文件 dl_sprite.h 第 32 行定义.

◆ SIZE_SPRITE_DEFAULT

constexpr Size dl::SIZE_SPRITE_DEFAULT = { 32, 32 }
constexpr

在文件 dl_factory.h 第 29 行定义.

◆ SIZE_STREAM_INPUT_CONTAINER_CHECK

constexpr size_t dl::SIZE_STREAM_INPUT_CONTAINER_CHECK = 100000000
constexpr

在文件 dl_stream_input.h 第 28 行定义.

◆ SIZE_TEXTURE_2D

constexpr unsigned dl::SIZE_TEXTURE_2D = 4096
constexpr

在文件 dl_factory_imp.h 第 23 行定义.

◆ SIZE_TEXTURE_2D_SIZE

constexpr Size dl::SIZE_TEXTURE_2D_SIZE = { SIZE_TEXTURE_2D, SIZE_TEXTURE_2D }
constexpr

在文件 dl_factory_imp.h 第 24 行定义.

◆ STR_PATH_2D

constexpr std::string_view dl::STR_PATH_2D = "2d/"
constexpr

在文件 dl_factory.h 第 30 行定义.

◆ STR_PATH_3D

constexpr std::string_view dl::STR_PATH_3D = "3d/"
constexpr

在文件 dl_factory.h 第 31 行定义.

◆ VERSION_MODEL_CACHE

constexpr uint32_t dl::VERSION_MODEL_CACHE = 0
constexpr

在文件 dl_model_cache.h 第 23 行定义.

◆ Z_DEFAULT

constexpr float dl::Z_DEFAULT = 0.0f
constexpr

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

◆ Z_DEFAULT_UI

constexpr float dl::Z_DEFAULT_UI = Math::OffsetOrder(Z_DEFAULT)
constexpr

在文件 dl_sprite.h 第 26 行定义.