Documentation
¶
Index ¶
- func LoadMesh(objPath string) (*modeling.Mesh, error)
- func Save(objPath string, scene Scene) error
- func SaveMesh(objPath string, meshToSave modeling.Mesh) error
- func Write(scene Scene, materialFile string, out io.Writer) error
- func WriteMaterials(scene Scene, out io.Writer) error
- func WriteMesh(m modeling.Mesh, materialFile string, out io.Writer) error
- type Artifact
- type Entry
- type EntryNode
- type Keyword
- type ManifestNode
- type Material
- type MaterialNode
- type Object
- type ObjectNode
- type ReadNode
- type Scene
- type SceneNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Save ¶
Save writes all provided meshes to the path specified in OBJ format, optionally writing an additional MTL file with all materials that are found across all meshes.
Types ¶
type ManifestNode ¶ added in v0.25.0
func (ManifestNode) Out ¶ added in v0.32.0
func (pn ManifestNode) Out(out *nodes.StructOutput[manifest.Manifest])
type Material ¶ added in v0.23.0
type Material struct {
Name string
// Account for light that is scattered about the entire scene
AmbientColor color.Color
// The main color
DiffuseColor color.Color
// Color seen where the surface is shiny and mirror like
SpecularColor color.Color
// Typically between 0 - 1000, with a high value resulting in a tight,
// concentrated highlight
//
// Defines the focus of the specular highlight
SpecularHighlight float64
// Index of refraction, between 0.001 to 10, 1.0 means light does not bend
// as it passes through the object
OpticalDensity float64
// Specifies how much this material dissolves into the background. A factor
// of 0.0 is fully opaque. A factor of 1.0 is completely transparent.
Transparency float64
ColorTextureURI *string
NormalTextureURI *string
SpecularTextureURI *string
}
Material is just a clone of obj's MTL format at the moment cause man this problem scares me.
func DefaultColorMaterial ¶ added in v0.23.0
func DefaultMaterial ¶ added in v0.23.0
func DefaultMaterial() Material
type MaterialNode ¶ added in v0.23.0
type MaterialNode struct {
Name nodes.Output[string]
AmbientColor nodes.Output[coloring.Color]
DiffuseColor nodes.Output[coloring.Color]
SpecularColor nodes.Output[coloring.Color]
SpecularHighlight nodes.Output[float64]
OpticalDensity nodes.Output[float64]
Transparency nodes.Output[float64]
}
func (MaterialNode) Out ¶ added in v0.32.0
func (pn MaterialNode) Out(out *nodes.StructOutput[Material])
type ObjectNode ¶ added in v0.23.0
func (ObjectNode) Out ¶ added in v0.32.0
func (pn ObjectNode) Out(out *nodes.StructOutput[Object])
Click to show internal directories.
Click to hide internal directories.