跳转至

CFBDGraphic_Triangle

Module: Triangle Drawing

Represents a triangle defined by three vertices. More...

#include <triangle.h>

Public Attributes

Name
CFBDGraphic_Point p1
CFBDGraphic_Point p2
CFBDGraphic_Point p3

Detailed Description

struct CFBDGraphic_Triangle;

Represents a triangle defined by three vertices.

This structure defines a triangle in 2D space using three corner points. Triangles are fundamental geometric shapes used for creating complex graphics, UI elements, and efficient polygon rendering through triangulation.

The triangle is defined by:

  • p1: First vertex of the triangle
  • p2: Second vertex of the triangle
  • p3: Third vertex of the triangle

The vertices can be specified in any order. For consistent rendering and efficient backface culling, vertices are typically ordered counter-clockwise.

Key properties:

  • Vertices can form acute, obtuse, or right triangles
  • Degenerate triangles (collinear points) result in no visible output
  • Rendering may use barycentric interpolation for shading

Public Attributes Documentation

variable p1

CFBDGraphic_Point p1;

First vertex of the triangle

variable p2

CFBDGraphic_Point p2;

Second vertex of the triangle

variable p3

CFBDGraphic_Point p3;

Third vertex of the triangle


Updated on 2026-02-03 at 13:21:55 +0000