Documentation ¶
Overview ¶
Package irmf parses and validates IRMF shader files.
Index ¶
- type IRMF
- type Order
- type Slicer
- func (s *Slicer) Close()
- func (s *Slicer) IRMF() *IRMF
- func (s *Slicer) MBB() (min, max [3]float32)
- func (s *Slicer) MaterialName(n int) string
- func (s *Slicer) NewModel(shaderSrc []byte) error
- func (s *Slicer) NumMaterials() int
- func (s *Slicer) NumXSlices() int
- func (s *Slicer) NumYSlices() int
- func (s *Slicer) NumZSlices() int
- func (s *Slicer) PrepareRenderX() error
- func (s *Slicer) PrepareRenderY() error
- func (s *Slicer) PrepareRenderZ() error
- func (s *Slicer) RenderXSlices(materialNum int, sp XSliceProcessor, order Order) error
- func (s *Slicer) RenderYSlices(materialNum int, sp YSliceProcessor, order Order) error
- func (s *Slicer) RenderZSlices(materialNum int, sp ZSliceProcessor, order Order) error
- type XSliceProcessor
- type YSliceProcessor
- type ZSliceProcessor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IRMF ¶
type IRMF struct { Author string `json:"author"` Copyright string `json:"copyright"` Date string `json:"date"` Encoding *string `json:"encoding,omitempty"` IRMF string `json:"irmf"` Materials []string `json:"materials"` Max []float32 `json:"max"` Min []float32 `json:"min"` Notes string `json:"notes"` Options json.RawMessage `json:"options"` Title string `json:"title"` Units string `json:"units"` Version string `json:"version"` Shader string `json:"-"` }
IRMF represents an IRMF shader.
type Slicer ¶
type Slicer struct {
// contains filtered or unexported fields
}
Slicer represents a slicer context.
func (*Slicer) Close ¶
func (s *Slicer) Close()
Close closes the GLFW window and releases any Slicer resources.
func (*Slicer) MaterialName ¶
MaterialName returns the name of the n-th material (1-based).
func (*Slicer) NumMaterials ¶
NumMaterials returns the number of materials in the most recent IRMF model.
func (*Slicer) NumXSlices ¶
NumXSlices returns the number of slices in the X direction.
func (*Slicer) NumYSlices ¶
NumYSlices returns the number of slices in the Y direction.
func (*Slicer) NumZSlices ¶
NumZSlices returns the number of slices in the Z direction.
func (*Slicer) PrepareRenderX ¶
PrepareRenderX prepares the GPU to render along the X axis.
func (*Slicer) PrepareRenderY ¶
PrepareRenderY prepares the GPU to render along the Y axis.
func (*Slicer) PrepareRenderZ ¶
PrepareRenderZ prepares the GPU to render along the Z axis.
func (*Slicer) RenderXSlices ¶
func (s *Slicer) RenderXSlices(materialNum int, sp XSliceProcessor, order Order) error
RenderXSlices slices the given materialNum (1-based index) to an image, calling the SliceProcessor for each slice.
func (*Slicer) RenderYSlices ¶
func (s *Slicer) RenderYSlices(materialNum int, sp YSliceProcessor, order Order) error
RenderYSlices slices the given materialNum (1-based index) to an image, calling the SliceProcessor for each slice.
func (*Slicer) RenderZSlices ¶
func (s *Slicer) RenderZSlices(materialNum int, sp ZSliceProcessor, order Order) error
RenderZSlices slices the given materialNum (1-based index) to an image, calling the SliceProcessor for each slice.
type XSliceProcessor ¶
type XSliceProcessor interface {
ProcessXSlice(sliceNum int, x, voxelRadius float32, img image.Image) error
}
XSliceProcessor represents a X slice processor.