oa::FnMesh

FnMesh namespace in the OA Ui public surface.

NsC++ public headers

Public Functions

void oa::FnMesh::computeBounds(oa::MeshData & inMesh)
oa::MeshData oa::FnMesh::createCube(oa::F32 inSize = 1.0f)
oa::MeshData oa::FnMesh::createFullscreenQuad()
oa::MeshData oa::FnMesh::createQuad(oa::F32 inWidth = 1.0f, oa::F32 inHeight = 1.0f)
void oa::FnMesh::flipUvsY(oa::MeshData & inMesh)
oa::U32 oa::FnMesh::getIndexCount(const oa::MeshData & inMesh)
oa::U32 oa::FnMesh::getVertexCount(const oa::MeshData & inMesh)
bool oa::FnMesh::hasIndices(const oa::MeshData & inMesh)
oa::Status oa::FnMesh::scale(oa::MeshData & inMesh, const oa::vlm::Vec3 & inScale)
oa::Status oa::FnMesh::transform(oa::MeshData & inMesh, const oa::vlm::Mat4 & inMatrix)
void oa::FnMesh::translate(oa::MeshData & inMesh, const oa::vlm::Vec3 & inOffset)

Function Documentation

void oa::FnMesh::computeBounds( oa::MeshData & inMesh )
─── bounds ──────────────────────────────────────────────────────────────

Parameters

inMesh
oa::MeshData &

Returns

void

The declared return value.

oa::MeshData oa::FnMesh::createCube( oa::F32 inSize = 1.0f )
Create a 3D cube (12 triangles, 24 vertices).

Parameters

inSize
oa::F32

Default: 1.0f

Returns

oa::MeshData

The declared return value.

oa::MeshData oa::FnMesh::createFullscreenQuad()
Create a fullscreen NDC quad [-1, 1] with top-origin image UVs. Used for post-processing passes.

Returns

oa::MeshData

The declared return value.

oa::MeshData oa::FnMesh::createQuad( oa::F32 inWidth = 1.0f, oa::F32 inHeight = 1.0f )
Create a centered quad (2 triangles, 4 vertices) with top-origin image UVs. UV V=0 is the source image top and world +Y is the quad top. Default is unit quad [-0.5, 0.5] in XY plane at Z=0. For image/video viewing, pass the pixel dimensions (e.g. 1920, 1080).

Parameters

inWidth
oa::F32

Default: 1.0f

inHeight
oa::F32

Default: 1.0f

Returns

oa::MeshData

The declared return value.

void oa::FnMesh::flipUvsY( oa::MeshData & inMesh )
Flip UVs vertically for explicitly bottom-origin source content.

Parameters

inMesh
oa::MeshData &

Returns

void

The declared return value.

oa::U32 oa::FnMesh::getIndexCount( const oa::MeshData & inMesh )
No public source comment is attached to this declaration.

Parameters

inMesh
const oa::MeshData &

Returns

oa::U32

The declared return value.

oa::U32 oa::FnMesh::getVertexCount( const oa::MeshData & inMesh )
─── Queries ─────────────────────────────────────────────────────────────

Parameters

inMesh
const oa::MeshData &

Returns

oa::U32

The declared return value.

bool oa::FnMesh::hasIndices( const oa::MeshData & inMesh )
No public source comment is attached to this declaration.

Parameters

inMesh
const oa::MeshData &

Returns

bool

The declared return value.

oa::Status oa::FnMesh::scale( oa::MeshData & inMesh, const oa::vlm::Vec3 & inScale )
Scale all positions and normals. Zero and non-finite scales fail without modifying the mesh.

Parameters

inMesh
oa::MeshData &

inScale
const oa::vlm::Vec3 &

Returns

oa::Status

The declared return value.

oa::Status oa::FnMesh::transform( oa::MeshData & inMesh, const oa::vlm::Mat4 & inMatrix )
Apply an affine matrix to all positions and normals. The mesh remains unchanged when the transform is singular, non-finite, or produces an invalid vertex.

Parameters

inMesh
oa::MeshData &

inMatrix
const oa::vlm::Mat4 &

Returns

oa::Status

The declared return value.

void oa::FnMesh::translate( oa::MeshData & inMesh, const oa::vlm::Vec3 & inOffset )
translate all vertices in-place.

Parameters

inMesh
oa::MeshData &

inOffset
const oa::vlm::Vec3 &

Returns

void

The declared return value.