MVRXML

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseList

func ParseList[Source ConvertToDestinationStruct[Destination], Destination any](config ParseConfigData, source *[]Source) []Destination

func ParseMap

func ParseMap[Source ConvertToDestinationMapStruct[Destination], Destination any](config ParseConfigData, source *[]Source) map[string]*Destination

Types

type Address

type Address struct {
	Break int    `xml:"break,attr"`
	Value string `xml:",innerxml"` // needs to be converted into numeric, with seperate universe field at another time
}

func (*Address) Parse

func (a *Address) Parse(config ParseConfigData) *MVRTypes.Address

type Addresses

type Addresses struct {
	Addresses []*Address `xml:"Address"`
	Networks  []*Network `xml:"Network"`
}

func (*Addresses) Parse

func (a *Addresses) Parse(config ParseConfigData) *MVRTypes.Addresses

type Alignment

type Alignment struct {
	Geometry  string `xml:"geometry,attr"`  // Defines the Beam Geometry that gets aligned.
	Up        Vector `xml:"up,attr"`        // default: 0,0,1
	Direction Vector `xml:"direction,attr"` // default: 0,0,-1
}

func (*Alignment) Parse

func (a *Alignment) Parse(config ParseConfigData) *MVRTypes.Alignment

type AuxData

type AuxData struct {
	SymDefs            []*SymDef            `xml:"Symdef"`
	Positions          []*Position          `xml:"Position"`
	MappingDefinitions []*MappingDefinition `xml:"MappingDefinition"`
	Classes            []*Class             `xml:"Class"`
}

func (*AuxData) Parse

func (a *AuxData) Parse(config ParseConfigData) *MVRTypes.AuxData

type ChildList

type ChildList struct {
	SceneObjects []*SceneObject `xml:"ChildList>SceneObject,omitempty"`
	GroupObjects []*GroupObject `xml:"ChildList>GroupObject,omitempty"`
	FocusPoints  []*FocusPoint  `xml:"ChildList>FocusPoint,omitempty"`
	Fixtures     []*Fixture     `xml:"ChildList>Fixture,omitempty"`
	Supports     []*Support     `xml:"ChildList>Support,omitempty"`
	Trusses      []*Truss       `xml:"ChildList>Truss,omitempty"`
	VideoScreens []*VideoScreen `xml:"ChildList>VideoScreen,omitempty"`
	Projectors   []*Projector   `xml:"ChildList>Projector,omitempty"`
}

func (*ChildList) Parse

func (a *ChildList) Parse(config ParseConfigData) MVRTypes.ChildList

type Class

type Class struct {
	UUID string `xml:"uuid,attr"`
	Name string `xml:"name,attr"`
}

func (*Class) Parse

func (a *Class) Parse(config ParseConfigData) *MVRTypes.Class

type ColorCIE

type ColorCIE struct {
	X  float32
	Y  float32
	Y2 float32
}

format xyY (X,Y,Y2)

func (*ColorCIE) UnmarshalXML

func (c *ColorCIE) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

func (*ColorCIE) UnmarshalXMLAttr

func (dest *ColorCIE) UnmarshalXMLAttr(attr xml.Attr) error

type Connection

type Connection struct {
	Own      string `xml:"own,attr"`      // Node Link to the Geometry with DIN SPEC 15800 Type Wiring Object . Starting point is the Geometry Collect of the linked GDTF.
	Other    string `xml:"other,attr"`    // Node Link to the Geometry with DIN SPEC 15800 Type Wiring Object . Starting point is the Geometry Collect of the linked GDTF of the object defined in toObject.
	ToObject string `xml:"toObject,attr"` // UUID of an other object in the scene.
}

func (*Connection) Parse

func (a *Connection) Parse(config ParseConfigData) *MVRTypes.Connection

type ConvertToDestinationMapStruct

type ConvertToDestinationMapStruct[T any] interface {
	ConvertToDestinationStruct[T]
	ParseKey() string
}

type ConvertToDestinationStruct

type ConvertToDestinationStruct[T any] interface {
	Parse(config ParseConfigData) T
}

type CustomCommand

type CustomCommand string

func (*CustomCommand) Parse

type Data

type Data struct {
	Provider string `xml:"provider,attr"`
	Version  string `xml:"ver,attr"`
}

func (Data) Parse

func (u Data) Parse(config ParseConfigData) MVRTypes.Data

type Fixture

type Fixture struct {
	UUID             string           `xml:"uuid,attr"`
	Name             string           `xml:"name,attr"`
	Multipatch       *string          `xml:"multipatch,attr,omitempty"`
	Matrix           *Matrix          `xml:"Matrix,omitempty"`
	Class            *string          `xml:"Classing,omitempty"`
	GDTFSpec         fileName         `xml:"GDTFSpec"`
	GDTFMode         string           `xml:"GDTFMode"`
	Focus            string           `xml:"Foces"`
	CastShadow       bool             `xml:"CastShadow"`
	DMXInvertPan     bool             `xml:"DMXInvertPan"`
	DMXInvertTilt    bool             `xml:"DMXInvertTilt"`
	Position         *string          `xml:"Position,omitempty"`
	Function         *string          `xml:"Function,omitempty"`
	FixtureID        string           `xml:"FixtureID"`
	FixtureIDNumeric int              `xml:"FixtureIDNumeric"`
	UnitNumber       int              `xml:"UnitNumber"`
	ChildPosition    string           `xml:"ChildPosition"`
	Addresses        *Addresses       `xml:"Addresses"`
	Protocols        []*Protocol      `xml:"Protocols>Protocol"`
	Alignments       []*Alignment     `xml:"Alignments>Alignment"`
	CustomCommands   []*CustomCommand `xml:"CustomCommands>CustomCommand"`
	Overwrites       []*Overwrite     `xml:"Overwrites>Overwrite"`
	Connections      []*Connection    `xml:"Connections>Connection"`
	Color            *ColorCIE        `xml:"Color"`
	CustomId         int              `xml:"CustomId"`
	CustomIdType     int              `xml:"CustomIdType"`
	Mappings         []*Mapping       `xml:"Mappings>Mapping"`
	Gobo             *Gobo            `xml:"Gobo,omitempty"`
	ChildList
}

func (*Fixture) Parse

func (a *Fixture) Parse(config ParseConfigData) *MVRTypes.Fixture

type FocusPoint

type FocusPoint struct {
	UUID       string     `xml:"uuid,attr"`
	Name       string     `xml:"name,attr"`
	Matrix     *Matrix    `xml:"Matrix,omitempty"`
	Class      *string    `xml:"Classing,omitempty"`
	Geometries Geometries `xml:"Geometries"`
}

func (*FocusPoint) Parse

func (a *FocusPoint) Parse(config ParseConfigData) *MVRTypes.FocusPoint

type GeneralSceneDescription

type GeneralSceneDescription struct {
	VersionMajor    int       `xml:"verMajor,attr"`
	VersionMinor    int       `xml:"verMinor,attr"`
	Provider        string    `xml:"provider,attr"`
	ProviderVersion string    `xml:"providerVersion,attr"`
	UserData        *UserData `xml:"UserData"`
	Scene           Scene     `xml:"Scene"`
}

func (*GeneralSceneDescription) Parse

type Geometries

type Geometries struct {
	Geometry3D []*Geometry3D `xml:"Geometry3D"`
	Symbol     []*Symbol     `xml:"Symbol"`
}

func (*Geometries) Parse

func (a *Geometries) Parse(config ParseConfigData) *MVRTypes.Geometries

type Geometry3D

type Geometry3D struct {
	FileName fileName `xml:"fileName,attr"`
	Matrix   *Matrix  `xml:"Matrix,omitempty"`
}

func (*Geometry3D) Parse

func (a *Geometry3D) Parse(config ParseConfigData) *MVRTypes.Geometry3D

type Gobo

type Gobo struct {
	Rotation float32
}

type GroupObject

type GroupObject struct {
	UUID   string  `xml:"uuid,attr"`
	Name   string  `xml:"name,attr"`
	Matrix *Matrix `xml:"Matrix"`
	Class  *string `xml:"Classing"`
	ChildList
}

func (*GroupObject) Parse

func (a *GroupObject) Parse(config ParseConfigData) *MVRTypes.GroupObject

type IPv4

type IPv4 = string

type IPv6

type IPv6 = string

type Layer

type Layer struct {
	UUID   string  `xml:"uuid,attr"`
	Name   string  `xml:"name,attr"`
	Matrix *Matrix `xml:"Matrix"`
	ChildList
}

func (*Layer) Parse

func (a *Layer) Parse(config ParseConfigData) *MVRTypes.Layer

type Mapping

type Mapping struct {
	LinkedDef string
	Ux        int
	Uy        int
	Ox        int
	Oy        int
	Rz        float32
}

func (*Mapping) Parse

func (a *Mapping) Parse(config ParseConfigData) *MVRTypes.Mapping

type MappingDefinition

type MappingDefinition struct {
	UUID           string  `xml:"uuid,attr"`
	Name           string  `xml:"name,attr"`
	SizeX          int     `xml:"SizeX"`
	SizeY          int     `xml:"SizeY"`
	Source         Source  `xml:"Source"`
	ScaleHandeling *string `xml:"ScaleHandeling"` // ScaleKeepRatio or ScaleIgnoreRatio or KeepSizeCenter
}

func (*MappingDefinition) Parse

type Matrix

type Matrix [4][3]float64

func (*Matrix) ToMeshMatrix

func (m *Matrix) ToMeshMatrix() MeshTypes.Matrix

func (*Matrix) UnmarshalXML

func (m *Matrix) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

func (*Matrix) UnmarshalXMLAttr

func (dest *Matrix) UnmarshalXMLAttr(attr xml.Attr) error

type Network

type Network struct {
	Geometry   string  `xml:"geometry,attr"`
	IPv4       *IPv4   `xml:"ipv4,attr"`
	SubNetMask *IPv4   `xml:"subnetmask,attr"`
	IPv6       *IPv6   `xml:"ipv6,attr"`
	DHCP       bool    `xml:"dhcp,attr"`
	Hostname   *string `xml:"hostname,attr"`
}

func (*Network) Parse

func (a *Network) Parse(config ParseConfigData) *MVRTypes.Network

type Overwrite

type Overwrite struct {
	Universal string `xml:"universal,attr"` // Node Link to the Wheel, Emitter or Filter. Starting point is the the collect of the Universal GDTF.
	Target    string `xml:"target,attr"`    // Node Link to the Wheel, Emitter or Filter. Starting point is the the collect of the linked GDTF of the fixture. When no target is given, it will be like a static gobo or filter that you attach in front of all beams
}

This node defines an overwrite with the Universal.gdtt GDTF template inside the MVR to overwrite Wheel Slots, Emitters and Filters for the fixture

func (*Overwrite) Parse

func (a *Overwrite) Parse(config ParseConfigData) *MVRTypes.Overwrite

type ParseConfigData

type ParseConfigData struct {
	GDTFTaskMap *map[string]*GDTFReader.GDTFTask
}

type Position

type Position struct {
	UUID string `xml:"uuid,attr"`
	Name string `xml:"name,attr"`
}

func (*Position) Parse

func (a *Position) Parse(config ParseConfigData) *MVRTypes.Position

type Projection

type Projection struct {
	Source         Source `xml:"Source"`
	ScaleHandeling string `xml:"ScaleHandeling"`
}

func (*Projection) Parse

func (a *Projection) Parse(config ParseConfigData) *MVRTypes.Projection

type Projector

type Projector struct {
	UUID             string           `xml:"uuid,attr"`
	Name             string           `xml:"name,attr"`
	Multipatch       string           `xml:"multipatch,attr,omitempty"`
	Matrix           *Matrix          `xml:"Matrix,omitempty"`
	Class            *string          `xml:"Classing,omitempty"`
	Geometries       Geometries       `xml:"Geometries"`
	Projections      []*Projection    `xml:"Projections>Projection"`
	Function         *string          `xml:"Function,omitempty"`
	GDTFSpec         fileName         `xml:"GDTFSpec"`
	GDTFMode         string           `xml:"GDTFMode"`
	CastShadow       bool             `xml:"CastShadow"`
	Addresses        *Addresses       `xml:"Addresses"`
	Alignments       []*Alignment     `xml:"Alignments>Alignment"`
	CustomCommands   []*CustomCommand `xml:"CustomCommands>CustomCommand"`
	Overwrites       []*Overwrite     `xml:"Overwrites>Overwrite"`
	Connections      []*Connection    `xml:"Connections>Connection"`
	FixtureID        string           `xml:"FixtureID"`
	FixtureIDNumeric int              `xml:"FixtureIDNumeric"`
	UnitNumber       int              `xml:"UnitNumber"`
	CustomId         int              `xml:"CustomId"`
	CustomIdType     int              `xml:"CustomIdType"`
	ChildList
}

func (*Projector) Parse

func (a *Projector) Parse(config ParseConfigData) *MVRTypes.Projector

type Protocol

type Protocol struct {
	Geometry     string // defaults to NetworkInOut_1
	Name         string // Custom Name of the protocol to identify the protocol. Needs to be unique for this instance of object.
	Type         string // Name of the protocol.
	Version      string // This is the protocol version if available.
	Transmission string // Unicast, Multicast, Broadcast, Anycast
}

func (*Protocol) Parse

func (a *Protocol) Parse(config ParseConfigData) *MVRTypes.Protocol

type Scene

type Scene struct {
	AuxData *AuxData `xml:"AUXData"`
	Layers  []*Layer `xml:"Layers>Layer"`
}

func (*Scene) Parse

func (s *Scene) Parse(config ParseConfigData) *MVRTypes.Scene

type SceneObject

type SceneObject struct {
	UUID             string           `xml:"uuid,attr"`
	Name             string           `xml:"name,attr"`
	Multipatch       string           `xml:"multipatch,attr,omitempty"`
	Matrix           *Matrix          `xml:"Matrix,omitempty"`
	Class            *string          `xml:"Classing,omitempty"`
	Geometries       Geometries       `xml:"Geometries"`
	GDTFSpec         fileName         `xml:"GDTFSpec"`
	GDTFMode         string           `xml:"GDTFMode"`
	CastShadow       bool             `xml:"CastShadow"`
	Addresses        *Addresses       `xml:"Addresses"`
	Alignments       []*Alignment     `xml:"Alignments>Alignment"`
	CustomCommands   []*CustomCommand `xml:"CustomCommands>CustomCommand"`
	Overwrites       []*Overwrite     `xml:"Overwrites>Overwrite"`
	Connections      []*Connection    `xml:"Connections>Connection"`
	FixtureID        string           `xml:"FixtureID"`
	FixtureIDNumeric int              `xml:"FixtureIDNumeric"`
	UnitNumber       int              `xml:"UnitNumber"`
	CustomId         int              `xml:"CustomId"`
	CustomIdType     int              `xml:"CustomIdType"`
	ChildList
}

func (*SceneObject) Parse

func (a *SceneObject) Parse(config ParseConfigData) *MVRTypes.SceneObject

type Source

type Source struct {
	LinkedGeometry string `xml:"linkedGeometry,attr"`
	Type           string `xml:"type,attr"`
	Value          string `xml:",innerxml"`
}

func (*Source) Parse

func (a *Source) Parse(config ParseConfigData) *MVRTypes.Source

type Support

type Support struct {
	UUID             string           `xml:"uuid,attr"`
	Name             string           `xml:"name,attr"`
	Multipatch       string           `xml:"multipatch,attr,omitempty"`
	Matrix           *Matrix          `xml:"Matrix,omitempty"`
	Class            *string          `xml:"Classing,omitempty"`
	Position         *string          `xml:"Position,omitempty"`
	Geometries       Geometries       `xml:"Geometries"`
	Function         *string          `xml:"Function,omitempty"`
	ChainLength      float32          `xml:"ChainLength"`
	GDTFSpec         fileName         `xml:"GDTFSpec"`
	GDTFMode         string           `xml:"GDTFMode"`
	CastShadow       bool             `xml:"CastShadow"`
	Addresses        *Addresses       `xml:"Addresses"`
	Alignments       []*Alignment     `xml:"Alignments>Alignment"`
	CustomCommands   []*CustomCommand `xml:"CustomCommands>CustomCommand"`
	Overwrites       []*Overwrite     `xml:"Overwrites>Overwrite"`
	Connections      []*Connection    `xml:"Connections>Connection"`
	FixtureID        string           `xml:"FixtureID"`
	FixtureIDNumeric int              `xml:"FixtureIDNumeric"`
	UnitNumber       int              `xml:"UnitNumber"`
	CustomId         int              `xml:"CustomId"`
	CustomIdType     int              `xml:"CustomIdType"`
	ChildList
}

func (*Support) Parse

func (a *Support) Parse(config ParseConfigData) *MVRTypes.Support

type SymDef

type SymDef struct {
	UUID       string     `xml:"uuid,attr"`
	Name       string     `xml:"name,attr"`
	Geometries Geometries `xml:"ChildList"`
}

func (*SymDef) Parse

func (a *SymDef) Parse(config ParseConfigData) *MVRTypes.SymDef

type Symbol

type Symbol struct {
	UUID   string  `xml:"uuid,attr"`
	SymDef string  `xml:"symdef,attr"`
	Matrix *Matrix `xml:"Matrix,omitempty"`
}

func (*Symbol) Parse

func (a *Symbol) Parse(config ParseConfigData) *MVRTypes.Symbol

type Truss

type Truss struct {
	UUID             string           `xml:"uuid,attr"`
	Name             string           `xml:"name,attr"`
	Multipatch       string           `xml:"multipatch,attr,omitempty"`
	Matrix           *Matrix          `xml:"Matrix,omitempty"`
	Class            *string          `xml:"Classing,omitempty"`
	Position         *string          `xml:"Position,omitempty"`
	Geometries       Geometries       `xml:"Geometries"`
	Function         *string          `xml:"Function,omitempty"`
	GDTFSpec         fileName         `xml:"GDTFSpec"`
	GDTFMode         string           `xml:"GDTFMode"`
	CastShadow       bool             `xml:"CastShadow"`
	Addresses        *Addresses       `xml:"Addresses"`
	Alignments       []*Alignment     `xml:"Alignments>Alignment"`
	CustomCommands   []*CustomCommand `xml:"CustomCommands>CustomCommand"`
	Overwrites       []*Overwrite     `xml:"Overwrites>Overwrite"`
	Connections      []*Connection    `xml:"Connections>Connection"`
	ChildPosition    *string          `xml:"ChildPosition,omitempty"` // Node link to the geometry. Starting point is the Geometry Collect of the linked parent GDTF of this object.
	FixtureID        string           `xml:"FixtureID"`
	FixtureIDNumeric int              `xml:"FixtureIDNumeric"` // v1.6 only, MA exports 1.5
	UnitNumber       int              `xml:"UnitNumber"`
	CustomId         int              `xml:"CustomId"`
	CustomIdType     int              `xml:"CustomIdType"`
	ChildList
}

func (*Truss) Parse

func (a *Truss) Parse(config ParseConfigData) *MVRTypes.Truss

type UserData

type UserData struct {
	Data []Data `xml:"Data"`
}

func (*UserData) Parse

func (u *UserData) Parse(config ParseConfigData) *MVRTypes.UserData

type Vector

type Vector = string

type VideoScreen

type VideoScreen struct {
	UUID             string           `xml:"uuid,attr"`
	Name             string           `xml:"name,attr"`
	Multipatch       string           `xml:"multipatch,attr,omitempty"`
	Matrix           *Matrix          `xml:"Matrix,omitempty"`
	Class            *string          `xml:"Classing,omitempty"`
	Geometries       Geometries       `xml:"Geometries"`
	Sources          []*Source        `xml:"Sources>Source"`
	Function         *string          `xml:"Function,omitempty"`
	GDTFSpec         fileName         `xml:"GDTFSpec"`
	GDTFMode         string           `xml:"GDTFMode"`
	CastShadow       bool             `xml:"CastShadow"`
	Addresses        *Addresses       `xml:"Addresses"`
	Alignments       []*Alignment     `xml:"Alignments>Alignment"`
	CustomCommands   []*CustomCommand `xml:"CustomCommands>CustomCommand"`
	Overwrites       []*Overwrite     `xml:"Overwrites>Overwrite"`
	Connections      []*Connection    `xml:"Connections>Connection"`
	FixtureID        string           `xml:"FixtureID"`
	FixtureIDNumeric int              `xml:"FixtureIDNumeric"`
	UnitNumber       int              `xml:"UnitNumber"`
	CustomId         int              `xml:"CustomId"`
	CustomIdType     int              `xml:"CustomIdType"`
	ChildList
}

func (*VideoScreen) Parse

func (a *VideoScreen) Parse(config ParseConfigData) *MVRTypes.VideoScreen

Jump to

Keyboard shortcuts

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