Berserk
Static Public Member Functions | List of all members
Geometry Class Reference

Util class to manipulate 3d geometry. More...

#include <Geometry.hpp>

Static Public Member Functions

static BRK_API void GenTangentSpace (const std::array< Vec3f, 3 > &positions, const std::array< Vec3f, 3 > &normals, const std::array< Vec2f, 3 > &texCoords, std::array< Vec3f, 3 > &tangents, std::array< Vec3f, 3 > &bitangents)
 Generates tangent vectors from provided vertex data. More...
 

Detailed Description

Util class to manipulate 3d geometry.

Member Function Documentation

◆ GenTangentSpace()

BRK_NS_BEGIN void Geometry::GenTangentSpace ( const std::array< Vec3f, 3 > &  positions,
const std::array< Vec3f, 3 > &  normals,
const std::array< Vec2f, 3 > &  texCoords,
std::array< Vec3f, 3 > &  tangents,
std::array< Vec3f, 3 > &  bitangents 
)
static

Generates tangent vectors from provided vertex data.

Note
cross(tangent,bitangent) = normal
cross(normal,tangent) = bitangent
Parameters
positionsCounterclockwise vertices positions
normalsCounterclockwise vertices positions
texCoordsCounterclockwise vertices texture coords
tangentsOutput tangents vector
bitangentsOutput bitangents vector

The documentation for this class was generated from the following files: