Matrix.types.ps1xml
|
<!-- Generated with EZOut 2.0.6: Install-Module EZOut or https://github.com/StartAutomating/EZOut --> <Types> <Type> <Name>System.Numerics.Matrix3x2</Name> <Members> <MemberSet> <Name>PSStandardMembers</Name> <Members> <PropertySet> <Name>DefaultDisplayPropertySet</Name> <ReferencedProperties> <Name>X</Name> <Name>Y</Name> <Name>Z</Name> </ReferencedProperties> </PropertySet> </Members> </MemberSet> <ScriptProperty> <Name>CSS</Name> <GetScriptBlock> return "matrix($( @( $this.M11 $this.M12 $this.M21 $this.M22 $this.M31 $this.M32 ) -join ', ' ))" </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Html</Name> <GetScriptBlock> <# .SYNOPSIS Gets Matrix Html .DESCRIPTION Gets an HTML representation of the Matrix. If there is an attached Content property, it will be rendered using the matrix. Otherwise, the Matrix's MathML representation will be rendered twice: * Once untransformed * Once transformed using itself #> param() # If we have content if ($this.Content) { # put it in the matrix. "<section style='transform:$($this.CSS)'>" if ($this.Content.OuterXml) { $this.Content.OuterXml } elseif ($this.Content.Html) { $this.Content.Html } else { "$($this.Content)" } "</section>" } else { # Otherwise, $mathML = $this.MathML $mathML.OuterXML # show the MathML # and show it again, transformed. $mathML.math.setAttribute('style', "transform:$($this.CSS)") $mathML.OuterXML } </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>MathML</Name> <GetScriptBlock> <# .SYNOPSIS Matrix MathML .DESCRIPTION Gets the Matrix as a MathML representation of itself. .NOTES Also shows the equivalent `[Numerics.Matrtix4x4]` #> [xml]@" <math display='block'> <mo>[</mo> <mtable> $( foreach ($row in 1..3) { "<mtr>" foreach ($col in 1..2) { "<mtd><mn>$($this."M${row}${col}")</mn></mtd>" } "</mtr>" } ) </mtable> <mo>]</mo> <mo>=</mo>$( [Numerics.Matrix4x4]::Create($this).MathML.math.innerXml ) </math> "@ </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Points</Name> <GetScriptBlock> $this.M11 $this.M12 $this.M21 $this.M22 $this.M31 $this.M32 </GetScriptBlock> </ScriptProperty> <NoteProperty> <Name>DefaultDisplay</Name> <Value>X Y Z</Value> </NoteProperty> </Members> </Type> <Type> <Name>System.Numerics.Matrix4x4</Name> <Members> <MemberSet> <Name>PSStandardMembers</Name> <Members> <PropertySet> <Name>DefaultDisplayPropertySet</Name> <ReferencedProperties> <Name>X</Name> <Name>Y</Name> <Name>Z</Name> <Name>W</Name> </ReferencedProperties> </PropertySet> </Members> </MemberSet> <ScriptProperty> <Name>CSS</Name> <GetScriptBlock> return "matrix3d($( @( $this.M11 $this.M12 $this.M13 $this.M14 $this.M21 $this.M22 $this.M23 $this.M24 $this.M31 $this.M32 $this.M33 $this.M34 $this.M41 $this.M42 $this.M43 $this.M44 ) -join ', ' ))" </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Html</Name> <GetScriptBlock> <# .SYNOPSIS Gets Matrix Html .DESCRIPTION Gets an HTML representation of the Matrix. If there is an attached Content property, it will be rendered using the matrix. Otherwise, the Matrix's MathML representation will be rendered twice: * Once untransformed * Once transformed using itself #> param() # If we have content if ($this.Content) { # put it in the matrix. "<section style='transform:$($this.CSS)'>" if ($this.Content.OuterXml) { $this.Content.OuterXml } elseif ($this.Content.Html) { $this.Content.Html } else { "$($this.Content)" } "</section>" } else { # Otherwise, $mathML = $this.MathML $mathML.OuterXML # show the MathML # and show it again, transformed. $mathML.math.setAttribute('style', "transform:$($this.CSS)") $mathML.OuterXML } </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>MathML</Name> <GetScriptBlock> [xml]@" <math display='block'> <mo>[</mo> <mtable> $( foreach ($row in 1..4) { "<mtr>" foreach ($col in 1..4) { "<mtd><mn>$($this."M${row}${col}")</mn></mtd>" } "</mtr>" } ) </mtable> <mo>]</mo> </math> "@ </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Points</Name> <GetScriptBlock> $this.M11 $this.M12 $this.M13 $this.M14 $this.M21 $this.M22 $this.M23 $this.M24 $this.M31 $this.M32 $this.M33 $this.M34 $this.M41 $this.M42 $this.M43 $this.M44 </GetScriptBlock> </ScriptProperty> <NoteProperty> <Name>DefaultDisplay</Name> <Value>X Y Z W</Value> </NoteProperty> </Members> </Type> <Type> <Name>System.Numerics.Quaternion</Name> <Members> <MemberSet> <Name>PSStandardMembers</Name> <Members> <PropertySet> <Name>DefaultDisplayPropertySet</Name> <ReferencedProperties> <Name>X</Name> <Name>Y</Name> <Name>Z</Name> <Name>W</Name> </ReferencedProperties> </PropertySet> </Members> </MemberSet> <ScriptProperty> <Name>CSS</Name> <GetScriptBlock> $matrix = [Numerics.Matrix4x4]::CreateFromQuaternion($this) return "matrix3d($( @( $matrix.M11 $matrix.M12 $matrix.M13 $matrix.M14 $matrix.M21 $matrix.M22 $matrix.M23 $matrix.M24 $matrix.M31 $matrix.M32 $matrix.M33 $matrix.M34 $matrix.M41 $matrix.M42 $matrix.M43 $matrix.M44 ) -join ', ' ))" </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Html</Name> <GetScriptBlock> <# .SYNOPSIS Gets Matrix Html .DESCRIPTION Gets an HTML representation of the Matrix. If there is an attached Content property, it will be rendered using the matrix. Otherwise, the Matrix's MathML representation will be rendered twice: * Once untransformed * Once transformed using itself #> param() # If we have content if ($this.Content) { # put it in the matrix. "<section style='transform:$($this.CSS)'>" if ($this.Content.OuterXml) { $this.Content.OuterXml } elseif ($this.Content.Html) { $this.Content.Html } else { "$($this.Content)" } "</section>" } else { # Otherwise, $mathML = $this.MathML $mathML.OuterXML # show the MathML # and show it again, transformed. $mathML.math.setAttribute('style', "transform:$($this.CSS)") $mathML.OuterXML } </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>MathML</Name> <GetScriptBlock> <# .SYNOPSIS Matrix MathML .DESCRIPTION Gets the Matrix as a MathML representation of itself. .NOTES Also shows the equivalent `[Numerics.Matrtix4x4]` #> param() [xml]@" <math display='block'> <mo>[</mo> <mtable> $( "<mtr>" foreach ($var in 'X','Y','Z','W') { "<mtd>" "<mi>$var</mi>" "<mo>:</mo>" "<mn>$($this.$var)</mn>" "</mtd>" } "</mtr>" ) </mtable> <mo>]</mo> <mo>=</mo>$( [Numerics.Matrix4x4]::CreateFromQuaternion($this).MathML.math.innerXml ) </math> "@ </GetScriptBlock> </ScriptProperty> <NoteProperty> <Name>DefaultDisplay</Name> <Value>X Y Z W</Value> </NoteProperty> </Members> </Type> </Types> |