package core:engine/geometry

⌘K
Ctrl+K
or
/

    Types

    curve_type ¶

    curve_type :: enum int {
    	Line, 
    	Unknown, 
    	Serpentine, 
    	Loop, 
    	Cusp, 
    	Quadratic, 
    }
    Related Procedures With Returns

    raw_shape ¶

    raw_shape :: struct {
    	vertices: []shape_vertex2d,
    	indices:  []u32,
    	rect:     linalg.Rect_($T=f32),
    }
    Related Procedures With Parameters
    Related Procedures With Returns

    shape_error ¶

    shape_error :: union {
    	__ShapesError, 
    	poly2tri.Trianguate_Error, 
    	runtime.Allocator_Error, 
    }
    Related Procedures With Returns

    shape_line ¶

    shape_line :: struct {
    	start:    [2]f32,
    	control0: [2]f32,
    	control1: [2]f32,
    	end:      [2]f32,
    	// / default value 'Unknown' recongnises curve type 'cubic'
    	type:     curve_type,
    }
    Related Procedures With Returns

    shape_node ¶

    shape_node :: struct {
    	lines:        []shape_line,
    	color:        [4]f32,
    	stroke_color: [4]f32,
    	thickness:    f32,
    }

    shape_vertex2d ¶

    shape_vertex2d :: struct #align (1) {
    	pos:   [2]f32,
    	uvw:   [3]f32,
    	color: [4]f32,
    }

    shapes ¶

    shapes :: struct {
    	nodes: []shape_node,
    }
    Related Procedures With Parameters

    stroke_cap ¶

    stroke_cap :: enum int {
    	Butt,   // 평평한 끝
    	Round,  // 둥근 끝
    	Square, // 사각형 끝
    }
     

    스트로크 스타일 정의

    stroke_join ¶

    stroke_join :: enum int {
    	Miter, // 뾰족한 연결
    	Round, // 둥근 연결
    	Bevel, // 베벨 연결
    }

    stroke_style ¶

    stroke_style :: struct {
    	width:       f32,
    	cap:         stroke_cap,
    	join:        stroke_join,
    	miter_limit: f32,
    }

    Constants

    This section is empty.

    Variables

    This section is empty.

    Procedures

    CvtQuadraticToCubic0 ¶

    CvtQuadraticToCubic0 :: proc "contextless" (_start: [2]f32, _control: [2]f32) -> [2]f32 {…}

    CvtQuadraticToCubic1 ¶

    CvtQuadraticToCubic1 :: proc "contextless" (_end: [2]f32, _control: [2]f32) -> [2]f32 {…}

    GetCubicCurveType ¶

    GetCubicCurveType :: proc "contextless" (_start: [2]$T, _control0: [2]$T, _control1: [2]$T, _end: [2]$T) -> (type: curve_type = .Unknown, err: shape_error = nil, outD: [3]$T) {…}

    LineSplitCubic ¶

    LineSplitCubic :: proc "contextless" (pts: [4][0]$T, t: $T) -> (outPts1: [4][0]$T, outPts2: [4][0]$T) {…}

    LineSplitLine ¶

    LineSplitLine :: proc "contextless" (pts: [2][0]$T, t: $T) -> (outPts1: [2][0]$T, outPts2: [2][0]$T) {…}

    LineSplitQuadratic ¶

    LineSplitQuadratic :: proc "contextless" (pts: [3][0]$T, t: $T) -> (outPts1: [3][0]$T, outPts2: [3][0]$T) {…}

    circle_cubic_init ¶

    circle_cubic_init :: proc "contextless" (_center: [2]f32, _r: f32) -> [4]shape_line {…}

    cubic_init ¶

    cubic_init :: proc "contextless" (_start: [2]f32, _control0: [2]f32, _control1: [2]f32, _end: [2]f32) -> shape_line {…}

    ellipse_cubic_init ¶

    ellipse_cubic_init :: proc "contextless" (_center: [2]f32, _rxy: [2]f32) -> [4]shape_line {…}

    line_init ¶

    line_init :: proc "contextless" (_start: [2]f32, _end: [2]f32) -> shape_line {…}

    poly_transform_matrix ¶

    poly_transform_matrix :: proc "contextless" (inout_poly: ^shapes, F: matrix[4, 4]f32) {…}

    quadratic_init ¶

    quadratic_init :: proc "contextless" (_start: [2]f32, _control01: [2]f32, _end: [2]f32) -> shape_line {…}

    raw_shape_clone ¶

    raw_shape_clone :: proc(self: ^raw_shape, allocator := context.allocator) -> (res: ^raw_shape = nil, err: runtime.Allocator_Error) #optional_ok {…}

    raw_shape_free ¶

    raw_shape_free :: proc(self: ^raw_shape, allocator := context.allocator) {…}
     

    Frees a raw shape and its resources

    Inputs:
    self: Pointer to the raw shape to free allocator: Allocator used for the shape (default: context.allocator)

    Returns:
    None

    rect_line_init ¶

    rect_line_init :: proc "contextless" (_rect: linalg.Rect_($T=f32)) -> [4]shape_line {…}

    round_rect_line_init ¶

    round_rect_line_init :: proc "contextless" (_rect: linalg.Rect_($T=f32), _radius: f32) -> [8]shape_line {…}

    shapes_compute_polygon ¶

    shapes_compute_polygon :: proc(poly: ^shapes, allocator := context.allocator) -> (res: ^raw_shape = nil, err: shape_error = nil) {…}

    Procedure Groups

    This section is empty.

    Source Files

    Generation Information

    Generated with odin version dev-v0.0.1 (vendor "odin") Linux_amd64 @ 2026-01-30 10:23:15.879138489 +0000 UTC