mesh

package
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2019 License: Unlicense Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Face

type Face struct {
	// contains filtered or unexported fields
}

func NewFace

func NewFace(offset int32, length int32, mat texture.ITexture, lightmap *texture.Lightmap) Face

func (*Face) AddLightmap

func (face *Face) AddLightmap(lightmap *texture.Lightmap)

func (*Face) AddMaterial

func (face *Face) AddMaterial(mat material.IMaterial)

func (*Face) IsLightmapped

func (face *Face) IsLightmapped() bool

func (*Face) Length

func (face *Face) Length() int32

func (*Face) Lightmap

func (face *Face) Lightmap() *texture.Lightmap

func (*Face) Material

func (face *Face) Material() material.IMaterial

func (*Face) Offset

func (face *Face) Offset() int32

type IMesh

type IMesh interface {
	AddVertex(...float32)
	AddNormal(...float32)
	AddUV(...float32)
	AddLightmapCoordinate(...float32)
	GenerateTangents()

	Vertices() []float32
	Normals() []float32
	UVs() []float32
	Tangents() []float32
	LightmapCoordinates() []float32

	GetMaterial() material.IMaterial
	SetMaterial(material.IMaterial)
	GetLightmap() texture.ITexture
	SetLightmap(texture.ITexture)
}

Generic Mesh object Most renderable objects should implement this, but there are probably many custom cases that may not

type Mesh

type Mesh struct {
	// contains filtered or unexported fields
}

func NewMesh

func NewMesh() *Mesh

func (*Mesh) AddLightmapCoordinate

func (mesh *Mesh) AddLightmapCoordinate(uv ...float32)

func (*Mesh) AddNormal

func (mesh *Mesh) AddNormal(normal ...float32)

func (*Mesh) AddTangent

func (mesh *Mesh) AddTangent(tangent ...float32)

func (*Mesh) AddUV

func (mesh *Mesh) AddUV(uv ...float32)

func (*Mesh) AddVertex

func (mesh *Mesh) AddVertex(vertex ...float32)

func (*Mesh) GenerateTangents

func (mesh *Mesh) GenerateTangents()

func (*Mesh) GetLightmap

func (mesh *Mesh) GetLightmap() texture.ITexture

func (*Mesh) GetMaterial

func (mesh *Mesh) GetMaterial() material.IMaterial

func (*Mesh) LightmapCoordinates

func (mesh *Mesh) LightmapCoordinates() []float32

func (*Mesh) Normals

func (mesh *Mesh) Normals() []float32

func (*Mesh) SetLightmap

func (mesh *Mesh) SetLightmap(mat texture.ITexture)

func (*Mesh) SetMaterial

func (mesh *Mesh) SetMaterial(mat material.IMaterial)

func (*Mesh) Tangents

func (mesh *Mesh) Tangents() []float32

func (*Mesh) UVs

func (mesh *Mesh) UVs() []float32

func (*Mesh) Vertices

func (mesh *Mesh) Vertices() []float32

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL