Kanzi 3.9.10
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

namespace  kanzi
 

Functions

void kanzi::acquireResources (Domain *domain, Mesh::CreateInfo &createInfo)
 For each cluster in mesh create info, load material from materialURL, if set.
 
Box kanzi::calculateBoundingVolume (const Mesh::CreateInfo &createInfo)
 Calculates bounding box from mesh vertex data.
 
ResourceManager::UrlContainer kanzi::collectResourceUrls (const Mesh::CreateInfo &createInfo)
 For each cluster in mesh create info, get material URL, if set.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
Mesh::CreateInfo kanzi::loadMeshCreateInfo (Domain *domain, KzbFile &kzbFile, ReadOnlyMemoryFile &file, KzbMemoryParser &parser)
 Loads mesh create info from KZB.
 
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.
 
float kanzi::readVertexAttributeFloat (const Mesh::CreateInfo &createInfo, unsigned int vertexIndex, unsigned int attributeIndex)
 Reads float attribute of given vertex from mesh.
 
Vector2 kanzi::readVertexAttributeVector2 (const Mesh::CreateInfo &createInfo, unsigned int vertexIndex, unsigned int attributeIndex)
 Reads Vector2 attribute of given vertex from mesh.
 
Vector3 kanzi::readVertexAttributeVector3 (const Mesh::CreateInfo &createInfo, unsigned int vertexIndex, unsigned int attributeIndex)
 Reads Vector3 attribute of given vertex from mesh.
 
Vector4 kanzi::readVertexAttributeVector4 (const Mesh::CreateInfo &createInfo, unsigned int vertexIndex, unsigned int attributeIndex)
 Reads Vector4 attribute of given vertex from mesh.
 
void kanzi::swap (Mesh::CreateInfo &createInfo1, Mesh::CreateInfo &createInfo2)
 
void kanzi::swap (Mesh::CreateInfo::Cluster &cluster1, Mesh::CreateInfo::Cluster &cluster2)
 
void kanzi::updateVertexAttributeOffsetsAndVertexSize (Mesh::CreateInfo &createInfo)
 Sets offsets for vertex attributes in mesh create info.
 
void kanzi::updateVertexAttributeStrides (Mesh::CreateInfo &createInfo)
 Calculates vertex format size and updates stride to all vertex attributes in mesh create info.
 
void kanzi::writeVertexAttribute (Mesh::CreateInfo &createInfo, unsigned int vertexIndex, unsigned int attributeIndex, float v)
 Writes one float attribute value to vertex data.
 
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.
 
void kanzi::writeVertexAttribute (Mesh::CreateInfo &createInfo, unsigned int vertexIndex, unsigned int attributeIndex, Vector2 v)
 Writes one Vector2 attribute value to vertex data.
 
void kanzi::writeVertexAttribute (Mesh::CreateInfo &createInfo, unsigned int vertexIndex, unsigned int attributeIndex, Vector3 v)
 Writes one Vector3 attribute value to vertex data.
 
void kanzi::writeVertexAttribute (Mesh::CreateInfo &createInfo, unsigned int vertexIndex, unsigned int attributeIndex, Vector4 v)
 Writes one Vector3 attribute value to vertex data.