Documentation ¶
Index ¶
Constants ¶
View Source
const ( LineSetType = iota TextType PointCloudType MeshType ImageType )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Geometry ¶
type Geometry interface { Name() string SetName(name string) Valid() bool Type() GeometryType Dimension() int }
Geometry is the base interface for any geometry object
type Geometry2D ¶
type Geometry3D ¶
type Geometry3D interface { Geometry // MinBound returns min bounds for geometry coordinates MinBound() mgl32.Vec3 // MaxBound returns max bounds for geometry coordinates MaxBound() mgl32.Vec3 // Center returns the center of the geometry coordinates Center() mgl32.Vec3 // Translate translates the geometry by the given 3D vector Translate(t mgl32.Vec3) // Scale scales the geometry by the given 3D sx, sy, sz values Scale(s mgl32.Vec3) // Rotate rotates the geometry by the given quaternion Rotate(q mgl32.Quat) // SetVertices replaces all vertices SetVertices(vertices []mgl32.Vec3) // Vertices returns the raw vertices of the geometry (coordinates) Vertices() []mgl32.Vec3 // Returns a specific vertex of the vertex list Vertex(idx int) mgl32.Vec3 }
type GeometryType ¶
type GeometryType int
type Image ¶
type Image interface { Geometry2D // RGBA converts the image to an RGBA image, return nil if image cannot be converted RGBA() *image.RGBA }
type PointCloud ¶
type PointCloud interface { Geometry3D }
type TriangleMesh ¶
type TriangleMesh interface { Geometry3D // Triangles returns the topology information Triangles() []Triangle // SetTriangles replaces all triangles SetTriangles(triangles []Triangle) }
func NewTriangleMesh ¶
func NewTriangleMesh(name string, vertices []mgl32.Vec3, triangles []Triangle) TriangleMesh
Click to show internal directories.
Click to hide internal directories.