b3dMeshMinY

Returns the minimum Y coordinate of a mesh's bounding box in local mesh space. Takes entity (mesh entity handle). Returns minimum Y value, or 0.0 on error.

3D Graphics

Parameters & Returns

Parameters

entity Int

Returns

Double

Quick Summary

Returns the minimum Y coordinate of a mesh's bounding box in local mesh space. Takes entity (mesh entity handle). Returns minimum Y value, or 0.0 on error.

Technical Exegesis...

Returns the minimum Y coordinate of a mesh's bounding box in local mesh space. Takes entity (mesh entity handle). Returns minimum Y value (Double), or 0.0 on error. Validates entity exists and type is ENTITY_MESH. Validates mesh has vertex data (not empty). Iterates all vertices in mesh to find minimum Y position. Returns unscaled mesh-space coordinate (does not account for entity scale/rotation). Silently returns 0.0 on errors.

Example

Example.bam
; Place mesh with bottom at ground level (Y=0)
Local mesh:Int = b3dCreateCube(1, 0, 0)
Local minY:Double = b3dMeshMinY(mesh)
b3dPositionEntity(mesh, 0, -minY, 0)  ; Bottom edge at Y=0