Kanzi  3.9.9
Kanzi Engine C++ API
mesh_create_info.hpp File Reference

Classes

struct  kanzi::Mesh::CreateInfo::Cluster
 Parameters for Mesh::Cluster creation. More...
 
struct  kanzi::Mesh::CreateInfo
 Use Mesh::CreateInfo to describe and create meshes. More...
 

Namespaces

 kanzi
 

Functions

void kanzi::acquireResources (Domain *domain, Mesh::CreateInfo &createInfo)
 For each cluster in mesh create info, load material from materialURL, if set. More...
 
Box kanzi::calculateBoundingVolume (const Mesh::CreateInfo &createInfo)
 Calculates bounding box from mesh vertex data. More...
 
ResourceManager::UrlContainer kanzi::collectResourceUrls (const Mesh::CreateInfo &createInfo)
 For each cluster in mesh create info, get material URL, if set. More...
 
Mesh::CreateInfo kanzi::generateBox (Vector3 size, unsigned int subdivisions, bool useHalfFloat, bool generateNormals, bool generateTangents, bool insideOut, MaterialSharedPtr material, string_view materialURL, GPUResource::MemoryType memoryType)
 Makes mesh create info for a box primitive mesh. More...
 
Mesh::CreateInfo kanzi::generateBox (Vector3 size, unsigned int subdivisions, bool useHalfFloat, bool generateNormals, bool generateTangents, MaterialSharedPtr material, string_view materialURL, GPUResource::MemoryType memoryType)
 Makes mesh create info for a box primitive mesh. More...
 
Mesh::CreateInfo kanzi::generateCone (float bottomRadius, unsigned int bottomSegmentCount, float height, bool useHalfFloat, bool generateNormals, bool generateTangents, bool insideOut, MaterialSharedPtr material, string_view materialURL, GPUResource::MemoryType memoryType)
 Makes mesh create info for a UV cone primitive mesh. More...
 
Mesh::CreateInfo kanzi::generateCone (float bottomRadius, unsigned int bottomSegmentCount, float height, bool useHalfFloat, bool generateNormals, bool generateTangents, MaterialSharedPtr material, string_view materialURL, GPUResource::MemoryType memoryType)
 Makes mesh create info for a UV cone primitive mesh. More...
 
Mesh::CreateInfo kanzi::generateIcosphere (float radius, unsigned int subdivisions, bool useHalfFloat, bool generateNormals, bool generateTangents, bool insideOut, MaterialSharedPtr material, string_view materialURL, GPUResource::MemoryType memoryType)
 Makes mesh create info for an icosphere primitive mesh. More...
 
Mesh::CreateInfo kanzi::generateIcosphere (float radius, unsigned int subdivisions, bool useHalfFloat, bool generateNormals, bool generateTangents, MaterialSharedPtr material, string_view materialURL, GPUResource::MemoryType memoryType)
 Makes mesh create info for an icosphere primitive mesh. More...
 
Mesh::CreateInfo kanzi::generatePlane (float width, float height, unsigned int subdivisions, bool invertU, bool invertV, bool useHalfFloat, bool generateNormals, bool generateTangents, MaterialSharedPtr material, string_view materialURL, GPUResource::MemoryType memoryType)
 Makes mesh create info for a plane primitive mesh. More...
 
Mesh::CreateInfo kanzi::generateQuadsphere (float radius, unsigned int subdivisions, bool useHalfFloat, bool generateNormals, bool generateTangents, bool insideOut, MaterialSharedPtr material, string_view materialURL, GPUResource::MemoryType memoryType)
 Makes mesh create info for a quad sphere primitive mesh. More...
 
Mesh::CreateInfo kanzi::generateQuadsphere (float radius, unsigned int subdivisions, bool useHalfFloat, bool generateNormals, bool generateTangents, MaterialSharedPtr material, string_view materialURL, GPUResource::MemoryType memoryType)
 Makes mesh create info for a quad sphere primitive mesh. More...
 
Mesh::CreateInfo kanzi::generateSphere (float radius, unsigned int segmentCount, unsigned int rowCount, bool useHalfFloat, bool generateNormals, bool generateTangents, bool insideOut, MaterialSharedPtr material, string_view materialURL, GPUResource::MemoryType memoryType)
 Makes mesh create info for a UV sphere primitive mesh. More...
 
Mesh::CreateInfo kanzi::generateSphere (float radius, unsigned int segmentCount, unsigned int rowCount, bool useHalfFloat, bool generateNormals, bool generateTangents, MaterialSharedPtr material, string_view materialURL, GPUResource::MemoryType memoryType)
 Makes mesh create info for a UV sphere primitive mesh. More...
 
Mesh::CreateInfo kanzi::loadMeshCreateInfo (Domain *domain, KzbFile &kzbFile, ReadOnlyMemoryFile &file, KzbMemoryParser &parser)
 Loads mesh create info from KZB. More...
 
float kanzi::readVertexAttributeComponent (const Mesh::CreateInfo &createInfo, unsigned int vertexIndex, unsigned int attributeIndex, unsigned int component)
 Reads one attribute component of given vertex from mesh create info. More...
 
float kanzi::readVertexAttributeFloat (const Mesh::CreateInfo &createInfo, unsigned int vertexIndex, unsigned int attributeIndex)
 Reads float attribute of given vertex from mesh. More...
 
Vector2 kanzi::readVertexAttributeVector2 (const Mesh::CreateInfo &createInfo, unsigned int vertexIndex, unsigned int attributeIndex)
 Reads Vector2 attribute of given vertex from mesh. More...
 
Vector3 kanzi::readVertexAttributeVector3 (const Mesh::CreateInfo &createInfo, unsigned int vertexIndex, unsigned int attributeIndex)
 Reads Vector3 attribute of given vertex from mesh. More...
 
Vector4 kanzi::readVertexAttributeVector4 (const Mesh::CreateInfo &createInfo, unsigned int vertexIndex, unsigned int attributeIndex)
 Reads Vector4 attribute of given vertex from mesh. More...
 
void kanzi::swap (Mesh::CreateInfo::Cluster &cluster1, Mesh::CreateInfo::Cluster &cluster2)
 
void kanzi::swap (Mesh::CreateInfo &createInfo1, Mesh::CreateInfo &createInfo2)
 
void kanzi::updateVertexAttributeOffsetsAndVertexSize (Mesh::CreateInfo &createInfo)
 Sets offsets for vertex attributes in mesh create info. More...
 
void kanzi::updateVertexAttributeStrides (Mesh::CreateInfo &createInfo)
 Calculates vertex format size and updates stride to all vertex attributes in mesh create info. More...
 
void kanzi::writeVertexAttribute (Mesh::CreateInfo &createInfo, unsigned int vertexIndex, unsigned int attributeIndex, unsigned int component, float v)
 Writes one float attribute component to vertex data. More...
 
void kanzi::writeVertexAttribute (Mesh::CreateInfo &createInfo, unsigned int vertexIndex, unsigned int attributeIndex, float v)
 Writes one float attribute value to vertex data. More...
 
void kanzi::writeVertexAttribute (Mesh::CreateInfo &createInfo, unsigned int vertexIndex, unsigned int attributeIndex, Vector2 v)
 Writes one Vector2 attribute value to vertex data. More...
 
void kanzi::writeVertexAttribute (Mesh::CreateInfo &createInfo, unsigned int vertexIndex, unsigned int attributeIndex, Vector3 v)
 Writes one Vector3 attribute value to vertex data. More...
 
void kanzi::writeVertexAttribute (Mesh::CreateInfo &createInfo, unsigned int vertexIndex, unsigned int attributeIndex, Vector4 v)
 Writes one Vector3 attribute value to vertex data. More...