Blender V5.3
MikkMeshWrapper Struct Reference

Public Member Functions

 MikkMeshWrapper (const Mesh *mesh, const packed_normal *vertex_normal, const packed_normal *corner_normal, const float2 *uv, packed_float3 *tangent, float *tangent_sign)
int GetNumFaces ()
int GetNumVerticesOfFace (const int)
int CornerIndex (const int face_num, const int vert_num)
int VertexIndex (const int face_num, const int vert_num)
mikk::float3 GetPosition (const int face_num, const int vert_num)
mikk::float3 GetTexCoord (const int face_num, const int vert_num)
mikk::float3 GetNormal (const int face_num, const int vert_num)
void SetTangentSpace (const int face_num, const int vert_num, mikk::float3 T, bool orientation)
bool has_uv () const

Public Attributes

const Mesh * mesh
const packed_float3 * position
const packed_normal * vertex_normal
const packed_normal * corner_normal
const float2 * uv
packed_float3 * tangent
float * tangent_sign

Detailed Description

Definition at line 29 of file scene/mesh.cpp.

Constructor & Destructor Documentation

◆ MikkMeshWrapper()

MikkMeshWrapper::MikkMeshWrapper ( const Mesh * mesh,
const packed_normal * vertex_normal,
const packed_normal * corner_normal,
const float2 * uv,
packed_float3 * tangent,
float * tangent_sign )
inline

Definition at line 30 of file scene/mesh.cpp.

References corner_normal, mesh, position, tangent, tangent_sign, uv, and vertex_normal.

Member Function Documentation

◆ CornerIndex()

int MikkMeshWrapper::CornerIndex ( const int face_num,
const int vert_num )
inline

Definition at line 56 of file scene/mesh.cpp.

Referenced by GetNormal(), GetTexCoord(), SetTangentSpace(), and VertexIndex().

◆ GetNormal()

mikk::float3 MikkMeshWrapper::GetNormal ( const int face_num,
const int vert_num )
inline

◆ GetNumFaces()

int MikkMeshWrapper::GetNumFaces ( )
inline

Definition at line 46 of file scene/mesh.cpp.

References mesh, and Mesh::num_triangles().

◆ GetNumVerticesOfFace()

int MikkMeshWrapper::GetNumVerticesOfFace ( const int )
inline

Definition at line 51 of file scene/mesh.cpp.

◆ GetPosition()

mikk::float3 MikkMeshWrapper::GetPosition ( const int face_num,
const int vert_num )
inline

Definition at line 67 of file scene/mesh.cpp.

References position, VertexIndex(), float3::x, float3::y, and float3::z.

◆ GetTexCoord()

mikk::float3 MikkMeshWrapper::GetTexCoord ( const int face_num,
const int vert_num )
inline

Definition at line 73 of file scene/mesh.cpp.

References CornerIndex(), has_uv(), map_to_sphere(), position, uv, VertexIndex(), float2::x, and float2::y.

◆ has_uv()

bool MikkMeshWrapper::has_uv ( ) const
inline

Definition at line 112 of file scene/mesh.cpp.

References uv.

Referenced by GetTexCoord().

◆ SetTangentSpace()

void MikkMeshWrapper::SetTangentSpace ( const int face_num,
const int vert_num,
mikk::float3 T,
bool orientation )
inline

Definition at line 103 of file scene/mesh.cpp.

References CornerIndex(), make_float3(), T, tangent, and tangent_sign.

◆ VertexIndex()

int MikkMeshWrapper::VertexIndex ( const int face_num,
const int vert_num )
inline

Definition at line 61 of file scene/mesh.cpp.

References CornerIndex(), and mesh.

Referenced by GetNormal(), GetPosition(), and GetTexCoord().

Member Data Documentation

◆ corner_normal

const packed_normal* MikkMeshWrapper::corner_normal

Definition at line 121 of file scene/mesh.cpp.

Referenced by GetNormal(), and MikkMeshWrapper().

◆ mesh

const Mesh* MikkMeshWrapper::mesh

Definition at line 117 of file scene/mesh.cpp.

Referenced by GetNormal(), GetNumFaces(), MikkMeshWrapper(), and VertexIndex().

◆ position

const packed_float3* MikkMeshWrapper::position

Definition at line 118 of file scene/mesh.cpp.

Referenced by GetNormal(), GetPosition(), GetTexCoord(), and MikkMeshWrapper().

◆ tangent

packed_float3* MikkMeshWrapper::tangent

Definition at line 124 of file scene/mesh.cpp.

Referenced by MikkMeshWrapper(), and SetTangentSpace().

◆ tangent_sign

float* MikkMeshWrapper::tangent_sign

Definition at line 125 of file scene/mesh.cpp.

Referenced by MikkMeshWrapper(), and SetTangentSpace().

◆ uv

const float2* MikkMeshWrapper::uv

Definition at line 122 of file scene/mesh.cpp.

Referenced by GetTexCoord(), has_uv(), and MikkMeshWrapper().

◆ vertex_normal

const packed_normal* MikkMeshWrapper::vertex_normal

Definition at line 120 of file scene/mesh.cpp.

Referenced by GetNormal(), and MikkMeshWrapper().


The documentation for this struct was generated from the following file: