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{}
|
|
|
|
}
|
|
|
|
|