Castor3D 0.12.0
Multiplatform 3D engine
Static Public Member Functions | List of all members
castor3d::SubmeshUtils Class Reference

Submesh utility functions. More...

#include <SubmeshUtils.hpp>

Static Public Member Functions

static C3D_API void computeFacesFromPolygonVertex (InterleavedVertexArray &points, TriFaceMapping &triFace)
 Creates faces from the points. More...
 
static C3D_API void computeNormals (InterleavedVertexArray &points, TriFaceMapping const &triFace, bool reverted=false)
 Generates normals and tangents. More...
 
static C3D_API void computeTangentsFromNormals (InterleavedVertexArray &points, TriFaceMapping const &triFace)
 Computes tangent for each vertex of the submesh. More...
 
static C3D_API void computeNormals (InterleavedVertexArray &points, Face const &face)
 Computes normal and tangent for each vertex of the given face. More...
 
static C3D_API void computeTangents (InterleavedVertexArray &points, Face const &face)
 Computes tangent for each vertex of the given face. More...
 

Detailed Description

Submesh utility functions.

Member Function Documentation

◆ computeFacesFromPolygonVertex()

static C3D_API void castor3d::SubmeshUtils::computeFacesFromPolygonVertex ( InterleavedVertexArray points,
TriFaceMapping triFace 
)
static

Creates faces from the points.

Remarks
This function assumes the points are sorted like triangles fan.
Parameters
[in,out]pointsThe points.
[in,out]triFaceThe component that will receive the computed triangles.

◆ computeNormals() [1/2]

static C3D_API void castor3d::SubmeshUtils::computeNormals ( InterleavedVertexArray points,
Face const &  face 
)
static

Computes normal and tangent for each vertex of the given face.

Parameters
[in,out]pointsThe points.
[in]faceThe face.

◆ computeNormals() [2/2]

static C3D_API void castor3d::SubmeshUtils::computeNormals ( InterleavedVertexArray points,
TriFaceMapping const &  triFace,
bool  reverted = false 
)
static

Generates normals and tangents.

Parameters
[in,out]pointsThe points.
[in]revertedTells if the normals must be inverted.
[in]triFaceThe component that will receive the computed triangles.

◆ computeTangents()

static C3D_API void castor3d::SubmeshUtils::computeTangents ( InterleavedVertexArray points,
Face const &  face 
)
static

Computes tangent for each vertex of the given face.

Parameters
[in,out]pointsThe points.
[in]faceThe face.

◆ computeTangentsFromNormals()

static C3D_API void castor3d::SubmeshUtils::computeTangentsFromNormals ( InterleavedVertexArray points,
TriFaceMapping const &  triFace 
)
static

Computes tangent for each vertex of the submesh.

Remarks
This function supposes the normals are defined.
Parameters
[in,out]pointsThe points.
[in]triFaceThe component that will receive the computed triangles.

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