customAabb

    Overrides the AABB with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices.

    PrimitiveMesh.swift:29
    final var customAabb: AABB { get set }

    Other members in extension

    Type members

    Instance members

    • var addUv2: Bool

      If set, generates UV2 UV coordinates applying a padding using the uv2Padding setting. UV2 is needed for lightmapping.

    • var flipFaces: Bool

      If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn.

    • var material: Material?

      The current Material of the primitive mesh.

    • var uv2Padding: Double

      If addUv2 is set, specifies the padding in pixels applied along seams of the mesh. Lower padding values allow making better use of the lightmap texture (resulting in higher texel density), but may introduce visible lightmap bleeding along edges.

    • func getMeshArrays() -> GArray

      Returns mesh arrays used to constitute surface of Mesh. The result can be passed to addSurfaceFromArrays(primitive:arrays:blendShapes:lods:flags:) to create a new surface. For example:

    Show implementation details (1)

    Hide implementation details