# FuncGodot Geometry Generator

Geometry generation class that is instantiated by a FuncGodotMap node.

# Signals

Signal Description
declarestep Emitted when a step in the geometry generation process is completed. It is connected to FuncGodotUtil's print_profile_info() method if the FuncGodotMap's Show Profiling Info build flag is set.

# Methods

Method Description Return type
Tools
isskip(face: FaceData) Returns whether a given face is skipped entirely for both collision shape and visual mesh generation. Local method bound to the supplied Map Settings. Bool
isclip(face: FaceData) Returns whether a given face is considered only for collision shape generation only. Local method bound to the supplied Map Settings. Bool
isorigin(face: FaceData) Returns whether a given face is considered only for entity origin calculations only. Local method bound to the supplied Map Settings. Bool
Patches
samplebeziercurve(controls: Array[Vector3], t: float) Sample a Bezier curve defined by an array of control points at a given parametric value t. While not limited to [0.0, 1.0], it is assumed to be normalized unless extrapolation is desired. Vector3
samplebeziersurface(controls: Array[Vector3], width: int, height: int, u: float, v: float) Sample a Bezier surface defined by a flat array of control points with a given width M and height N, along two parametric values U and V. Note: U and V here are not related to texture UV coordinates. Vector3
gettriangleindices(width: int, height: int) Returns an integer index array for triangulation of a vertex grid with a given size width x height. Array[int]
createpatchmesh(data: Array[PatchData], mesh: Mesh) Not yet implemented.
Brushes
generatebrushvertices(entityindex: int, brushindex: int) Performs planar intersections for each face in a single brush to populate the vertex, normal, UV and tangent arrays. Void
generateentityvertices(entityindex: int) Generates vertex data for each brush in a given Solid Class entity. Void
determineentityorigins(entityindex: int) Calculates entity origin information depending on its Solid Class Origin Type. Void
windentityfaces(entityindex: int) Winds and indexes each face's vertices in each brush of a given Solid Class entity. Void
generateentitysurfaces(entityindex: int) Generates visual and collision shapes for a given entity. Optionally generates surface metadata, if defined by the entity's definition. Void
unwrapuv2s(entityindex: int, texelsize: float) Performs UV2 unwrapping for a given entity. Void
Main Build Process
build(buildflags: int, entities: Array[EntityData]) Main entrypoint for generating geometry given entities retrieved from parsing a map file. Perform entity and brush vertex generation, determines entity origins, winds and indexes each face, then generates output surfaces and collision shapes for each entity. Error