Graphics v0.0.0
A simple abstraction layer for the modern graphics APIs.
载入中...
搜索中...
未找到
Mesh类 参考

网格. 更多...

#include <Mesh.h>

struct  Vertex
 

Public 成员函数

 Mesh (std::string_view name, const std::vector< Vertex > &vertices, const std::vector< unsigned int > &indices, Material *mat=nullptr)
 
float compress ()
 压缩. 更多...
 
void decompress ()
 解压.
 
bool is_compressed () const noexcept
 

Public 属性

std::string name
 
std::vector< Vertexvertices
 
std::vector< unsigned int > indices
 
Materialmaterial = nullptr
 
uint32_t vertexCount = 0
 
uint32_t indexCount = 0
 
std::shared_ptr< VertexBuffervertexBuffer
 
std::shared_ptr< IndexBufferindexBuffer
 

详细描述

网格.

成员函数说明

◆ compress()

float Mesh::compress ( )

压缩.

返回
压缩率.
警告
压缩前应先进行优化, 以提高压缩率.

◆ is_compressed()

bool Mesh::is_compressed ( ) const
noexcept

是否已经过压缩.


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