mesh

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2019 License: Unlicense Imports: 3 Imported by: 2

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
}

Face

func NewFace

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

NewFace

func (*Face) AddLightmap

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

AddLightmap

func (*Face) AddMaterial

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

AddMaterial

func (*Face) IsLightmapped

func (face *Face) IsLightmapped() bool

IsLightmapped

func (*Face) Length

func (face *Face) Length() int32

Length

func (*Face) Lightmap

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

Lightmap

func (*Face) Material

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

Material

func (*Face) Offset

func (face *Face) Offset() int32

Offset

type IMesh

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

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

	// Material
	Material() material.IMaterial
	// SetMaterial
	SetMaterial(material.IMaterial)
	// Lightmap
	Lightmap() texture.ITexture
	// SetLightmap
	SetLightmap(texture.ITexture)
}

IMesh Generic Mesh interface 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
}

Mesh

func NewMesh

func NewMesh() *Mesh

NewMesh

func (*Mesh) AddLightmapCoordinate

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

AddLightmapCoordinate

func (*Mesh) AddNormal

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

AddNormal

func (*Mesh) AddTangent

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

AddTangent

func (*Mesh) AddUV

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

AddUV

func (*Mesh) AddVertex

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

AddVertex

func (*Mesh) GenerateTangents

func (mesh *Mesh) GenerateTangents()

GenerateTangents

func (*Mesh) Lightmap

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

Lightmap

func (*Mesh) LightmapCoordinates

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

LightmapCoordinates

func (*Mesh) Material

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

Material

func (*Mesh) Normals

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

Normals

func (*Mesh) SetLightmap

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

SetLightmap

func (*Mesh) SetMaterial

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

SetMaterial

func (*Mesh) Tangents

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

Tangents

func (*Mesh) UVs

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

UVs

func (*Mesh) Vertices

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

Vertices

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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