gg/src/gx/polygon.go

30 lines
367 B
Go
Raw Normal View History

2023-06-03 22:41:00 +03:00
package gx
2023-06-15 20:18:58 +03:00
type PolygonTriangle struct {
P, S int
2023-06-10 17:43:04 +03:00
}
2023-06-15 20:18:58 +03:00
type Polygon struct {
Transform
base Triangle
triangles []PolygonTriangle
2023-06-10 17:43:04 +03:00
}
2023-06-15 20:18:58 +03:00
type DrawablePolygon struct {
Polygon
ShaderOptions
2023-06-10 17:43:04 +03:00
}
2023-06-15 20:18:58 +03:00
func NewPolygon(base Triangle) *Polygon {
ret := &Polygon{
Transform: T(),
base: base,
2023-06-10 17:43:04 +03:00
}
2023-06-03 22:41:00 +03:00
return ret
}
2023-06-15 20:18:58 +03:00
func (p *Polygon) Triangles() Triangles {
2023-06-10 17:43:04 +03:00
return Triangles{}
}