GSDL::Triangle
Inherits GSDL::Collidable < GSDL::Shape < GSDL::Centerable < GSDL::Tweenable < Reference < Object
Constructors
new(x1 : Num = 0, y1 : Num = 0, x2 : Num = 0, y2 : Num = 0, x3 : Num = 0, y3 : Num = 0, origin : Tuple(Float32, Float32) = {0_f32, 0_f32}, scale : Tuple(Num, Num) = {1_f32, 1_f32}, rotation : Num = 0, color : Color = Color::White, z_index : Int32 = 0, draw_mode : GSDL::Shape::DrawMode = GSDL::Shape::DrawMode::Fill, border_thickness : Num = 1, border_color : Color = Color::White)
Sourcenew(p1 : Tuple(Num, Num), p2 : Tuple(Num, Num), p3 : Tuple(Num, Num), origin : Tuple(Float32, Float32) = {0_f32, 0_f32}, scale : Tuple(Num, Num) = {1_f32, 1_f32}, rotation : Num = 0, color : Color = Color::White, z_index : Int32 = 0, draw_mode : GSDL::Shape::DrawMode = GSDL::Shape::DrawMode::Fill, border_thickness : Num = 1, border_color : Color = Color::White)
SourceInstance methods
center(x : Num = 0, y : Num = 0, width : Num = 1, height : Num = 1)
Sourcecollision_shape
Sourceheight
Sourceindices
Sourcerender_x1
Sourcerender_x2
Sourcerender_x3
Sourcerender_y1
Sourcerender_y2
Sourcerender_y3
Sourceupdate_geometry
needs to be called at the end of initialization, and in every #draw method (only if #changed?)
vertices
Sourcewidth
Sourcex1
Sourcex1=(x1 : Num)
Sourcex2
x2=(value : Num)
Sourcex3
x3=(value : Num)
Sourcey1
Sourcey1=(y1 : Num)
Sourcey2
y2=(value : Num)
Sourcey3
y3=(value : Num)
Sourcey=(y : Num)
Source