mirror of https://github.com/mosra/magnum.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
167 lines
11 KiB
167 lines
11 KiB
<?xml version="1.0" encoding="utf-8"?> |
|
|
|
<!-- |
|
This file is part of Magnum. |
|
|
|
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, |
|
2020, 2021, 2022, 2023 Vladimír Vondruš <mosra@centrum.cz> |
|
Copyright © 2021 Jonathan Hale <squareys@googlemail.com> |
|
Copyright © 2023 Pablo Escobar <mail@rvrs.in> |
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a |
|
copy of this software and associated documentation files (the "Software"), |
|
to deal in the Software without restriction, including without limitation |
|
the rights to use, copy, modify, merge, publish, distribute, sublicense, |
|
and/or sell copies of the Software, and to permit persons to whom the |
|
Software is furnished to do so, subject to the following conditions: |
|
|
|
The above copyright notice and this permission notice shall be included |
|
in all copies or substantial portions of the Software. |
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
|
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
|
DEALINGS IN THE SOFTWARE. |
|
--> |
|
|
|
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010"> |
|
<!-- Math::Range --> |
|
<Type Name="Magnum::Math::Range<*>"> |
|
<DisplayString IncludeView="simple">[{_min,g}, {_max,g}]</DisplayString> |
|
<DisplayString ExcludeView="simple">{{ min={_min,g} max={_max,g} }}</DisplayString> |
|
</Type> |
|
<!-- Math::Vector2 --> |
|
<Type Name="Magnum::Math::Vector<2,*>"> |
|
<DisplayString IncludeView="simple">{{ {_data[0],g}, {_data[1],g} }}</DisplayString> |
|
<DisplayString ExcludeView="simple">{{ x={_data[0],g} y={_data[1],g} }}</DisplayString> |
|
</Type> |
|
|
|
<!-- For Vector & Quaternion types, IsNormalized() functionality was |
|
implemented equivalently to Math::Implementation::isNormalizedSquared(), |
|
i.e. by comparing the dot() against 1.0 with 2*epsilon, where epsilon is 1.0e-5f for float and 1.0e-14 for double variants. --> |
|
<!-- Math::Vector2<Float> --> |
|
<Type Name="Magnum::Math::Vector<2,float>"> |
|
<Intrinsic Name="Dot" Expression="_data[0]*_data[0]+_data[1]*_data[1]"></Intrinsic> |
|
<Intrinsic Name="IsNormalized" Expression="Dot()>0.99980000000500002&Dot()<1.0001999999950000"></Intrinsic> |
|
<DisplayString IncludeView="simple">{{ {_data[0],g}, {_data[1],g} }}</DisplayString> |
|
<DisplayString ExcludeView="simple" Condition="!IsNormalized()">{{ x={_data[0],g} y={_data[1],g} }}</DisplayString> |
|
<DisplayString ExcludeView="simple" Condition="IsNormalized()">{{ x={_data[0],g} y={_data[1],g} (normalized) }}</DisplayString> |
|
</Type> |
|
<!-- Math::Vector2<Double> --> |
|
<Type Name="Magnum::Math::Vector<2,double>"> |
|
<Intrinsic Name="Dot" Expression="_data[0]*_data[0]+_data[1]*_data[1]"></Intrinsic> |
|
<Intrinsic Name="IsNormalized" Expression="Dot()>0.99999999999998002&Dot()<1.0000000000000200"></Intrinsic> |
|
<DisplayString IncludeView="simple">{{ {_data[0],g}, {_data[1],g} }}</DisplayString> |
|
<DisplayString ExcludeView="simple" Condition="!IsNormalized()">{{ x={_data[0],g} y={_data[1],g} }}</DisplayString> |
|
<DisplayString ExcludeView="simple" Condition="IsNormalized()">{{ x={_data[0],g} y={_data[1],g} (normalized) }}</DisplayString> |
|
</Type> |
|
<!-- Math::Vector3 --> |
|
<Type Name="Magnum::Math::Vector<3,*>"> |
|
<DisplayString IncludeView="simple">{{ {_data[0],g}, {_data[1],g}, {_data[2],g} }}</DisplayString> |
|
<DisplayString ExcludeView="simple">{{ x={_data[0],g} y={_data[1],g} z={_data[2],g} }}</DisplayString> |
|
</Type> |
|
<!-- Math::Vector3<Float> --> |
|
<Type Name="Magnum::Math::Vector<3,float>"> |
|
<Intrinsic Name="Dot" Expression="_data[0]*_data[0]+_data[1]*_data[1]+_data[2]*_data[2]"></Intrinsic> |
|
<Intrinsic Name="IsNormalized" Expression="Dot()>0.99980000000500002&Dot()<1.0001999999950000"></Intrinsic> |
|
<DisplayString IncludeView="simple">{{ {_data[0],g}, {_data[1],g} {_data[2],g} }}</DisplayString> |
|
<DisplayString ExcludeView="simple" Condition="!IsNormalized()">{{ x={_data[0],g} y={_data[1],g} z={_data[2],g} }}</DisplayString> |
|
<DisplayString ExcludeView="simple" Condition="IsNormalized()">{{ x={_data[0],g} y={_data[1],g} z={_data[2],g} (normalized) }}</DisplayString> |
|
</Type> |
|
<!-- Math::Vector3<Double> --> |
|
<Type Name="Magnum::Math::Vector<3,double>"> |
|
<Intrinsic Name="Dot" Expression="_data[0]*_data[0]+_data[1]*_data[1]+_data[2]*_data[2]"></Intrinsic> |
|
<Intrinsic Name="IsNormalized" Expression="Dot()>0.99999999999998002&Dot()<1.0000000000000200"></Intrinsic> |
|
<DisplayString IncludeView="simple">{{ {_data[0],g}, {_data[1],g} {_data[2],g} }}</DisplayString> |
|
<DisplayString ExcludeView="simple" Condition="!IsNormalized()">{{ x={_data[0],g} y={_data[1],g} z={_data[2],g} }}</DisplayString> |
|
<DisplayString ExcludeView="simple" Condition="IsNormalized()">{{ x={_data[0],g} y={_data[1],g} z={_data[2],g} (normalized) }}</DisplayString> |
|
</Type> |
|
<!-- Math::Vector4 --> |
|
<Type Name="Magnum::Math::Vector<4,*>"> |
|
<DisplayString IncludeView="simple">{{ {_data[0],g}, {_data[1],g}, {_data[2],g}, {_data[3],g} }}</DisplayString> |
|
<DisplayString ExcludeView="simple">{{ x={_data[0],g} y={_data[1],g} z={_data[2],g} w={_data[3],g} }}</DisplayString> |
|
</Type> |
|
<!-- Math::Vector4<Float> --> |
|
<Type Name="Magnum::Math::Vector<4,float>"> |
|
<Intrinsic Name="Dot" Expression="_data[0]*_data[0]+_data[1]*_data[1]+_data[2]*_data[2]+_data[3]*_data[3]"></Intrinsic> |
|
<Intrinsic Name="IsNormalized" Expression="Dot()>0.99980000000500002&Dot()<1.0001999999950000"></Intrinsic> |
|
<DisplayString IncludeView="simple">{{ {_data[0],g}, {_data[1],g} {_data[2],g} {_data[3],g} }}</DisplayString> |
|
<DisplayString ExcludeView="simple" Condition="!IsNormalized()">{{ x={_data[0],g} y={_data[1],g} z={_data[2],g} w={_data[3],g} }}</DisplayString> |
|
<DisplayString ExcludeView="simple" Condition="IsNormalized()">{{ x={_data[0],g} y={_data[1],g} z={_data[2],g} w={_data[3],g} (normalized) }}</DisplayString> |
|
</Type> |
|
<!-- Math::Vector4<Double> --> |
|
<Type Name="Magnum::Math::Vector<4,double>"> |
|
<Intrinsic Name="Dot" Expression="_data[0]*_data[0]+_data[1]*_data[1]+_data[2]*_data[2]+_data[3]*_data[3]"></Intrinsic> |
|
<Intrinsic Name="IsNormalized" Expression="Dot()>0.99999999999998002&Dot()<1.0000000000000200"></Intrinsic> |
|
<DisplayString IncludeView="simple">{{ {_data[0],g}, {_data[1],g} {_data[2],g} {_data[3],g} }}</DisplayString> |
|
<DisplayString ExcludeView="simple" Condition="!IsNormalized()">{{ x={_data[0],g} y={_data[1],g} z={_data[2],g} w={_data[3],g} }}</DisplayString> |
|
<DisplayString ExcludeView="simple" Condition="IsNormalized()">{{ x={_data[0],g} y={_data[1],g} z={_data[2],g} w={_data[3],g} (normalized) }}</DisplayString> |
|
</Type> |
|
<!-- Math::BitVector2 --> |
|
<Type Name="Magnum::Math::BitVector<2>"> |
|
<Intrinsic Name="at" Category="Method" Expression="(bool)((_data[0] >> i) & 1)"> |
|
<Parameter Name="i" Type="int" /> |
|
</Intrinsic> |
|
<DisplayString>{{ {at(0)}, {at(1)} }}</DisplayString> |
|
</Type> |
|
<!-- Math::BitVector3 --> |
|
<Type Name="Magnum::Math::BitVector<3>"> |
|
<Intrinsic Name="at" Category="Method" Expression="(bool)((_data[0] >> i) & 1)"> |
|
<Parameter Name="i" Type="int" /> |
|
</Intrinsic> |
|
<DisplayString>{{ {at(0)}, {at(1)}, {at(2)} }}</DisplayString> |
|
</Type> |
|
<!-- Math::BitVector4 --> |
|
<Type Name="Magnum::Math::BitVector<4>"> |
|
<Intrinsic Name="at" Category="Method" Expression="(bool)((_data[0] >> i) & 1)"> |
|
<Parameter Name="i" Type="int" /> |
|
</Intrinsic> |
|
<DisplayString>{{ {at(0)}, {at(1)}, {at(2)}, {at(3)} }}</DisplayString> |
|
</Type> |
|
<!-- Math::Color3 --> |
|
<Type Name="Magnum::Math::Color3<*>"> |
|
<DisplayString IncludeView="simple">{{ {_data[0],g}, {_data[1],g}, {_data[2],g} }}</DisplayString> |
|
<DisplayString ExcludeView="simple">{{ r={_data[0],g} g={_data[1],g} b={_data[2],g} }}</DisplayString> |
|
</Type> |
|
<!-- Math::Color4 --> |
|
<Type Name="Magnum::Math::Color4<*>"> |
|
<DisplayString IncludeView="simple">{{ {_data[0],g}, {_data[1],g}, {_data[2],g}, {_data[3],g} }}</DisplayString> |
|
<DisplayString ExcludeView="simple">{{ r={_data[0],g} g={_data[1],g} b={_data[2],g} a={_data[3],g} }}</DisplayString> |
|
</Type> |
|
<!-- Math::ColorHsv --> |
|
<Type Name="Magnum::Math::ColorHsv<*>"> |
|
<DisplayString IncludeView="simple">{{ {hue._value,g}, {saturation,g}, {value,g} }}</DisplayString> |
|
<DisplayString ExcludeView="simple">{{ h={hue._value,g} s={saturation,g} v={value,g} }}</DisplayString> |
|
</Type> |
|
<!-- Math::Quaternion<Float> --> |
|
<Type Name="Magnum::Math::Quaternion<float>"> |
|
<Intrinsic Name="Dot" Expression="_vector._data[0]*_vector._data[0]+_vector._data[1]*_vector._data[1]+_vector._data[2]*_vector._data[2]+_scalar*_scalar"></Intrinsic> |
|
<Intrinsic Name="IsNormalized" Expression="Dot()>0.99980000000500002&Dot()<1.0001999999950000"></Intrinsic> |
|
<DisplayString IncludeView="simple">{{ {_vector._data[0],g}, {_vector._data[1],g}, {_vector._data[2],g}, {_scalar,g} }}</DisplayString> |
|
<DisplayString ExcludeView="simple" Condition="!IsNormalized()">{{ x={_vector._data[0],g} y={_vector._data[1],g} z={_vector._data[2],g} w={_scalar,g} }}</DisplayString> |
|
<DisplayString ExcludeView="simple" Condition="IsNormalized()">{{ x={_vector._data[0],g} y={_vector._data[1],g} z={_vector._data[2],g} w={_scalar,g} (normalized) }}</DisplayString> |
|
</Type> |
|
<!-- Math::Quaternion<Double> --> |
|
<Type Name="Magnum::Math::Quaternion<double>"> |
|
<Intrinsic Name="Dot" Expression="_vector._data[0]*_vector._data[0]+_vector._data[1]*_vector._data[1]+_vector._data[2]*_vector._data[2]+_scalar*_scalar"></Intrinsic> |
|
<Intrinsic Name="IsNormalized" Expression="Dot()>0.99999999999998002&Dot()<1.0000000000000200"></Intrinsic> |
|
<DisplayString IncludeView="simple">{{ {_vector._data[0],g}, {_vector._data[1],g}, {_vector._data[2],g}, {_scalar,g} }}</DisplayString> |
|
<DisplayString ExcludeView="simple" Condition="!IsNormalized()">{{ x={_vector._data[0],g} y={_vector._data[1],g} z={_vector._data[2],g} w={_scalar,g} }}</DisplayString> |
|
<DisplayString ExcludeView="simple" Condition="IsNormalized()">{{ x={_vector._data[0],g} y={_vector._data[1],g} z={_vector._data[2],g} w={_scalar,g} (normalized) }}</DisplayString> |
|
</Type> |
|
<!-- Math::RectangularMatrix --> |
|
<Type Name="Magnum::Math::RectangularMatrix<*>"> |
|
<DisplayString>{($T3 *)_data,[$T1*$T2]nag}</DisplayString> |
|
<Expand> |
|
<ArrayItems> |
|
<Direction>Forward</Direction> |
|
<Rank>2</Rank> |
|
<Size>$i == 0 ? $T1 : $T2</Size> |
|
<ValuePointer>($T3 *)_data</ValuePointer> |
|
</ArrayItems> |
|
</Expand> |
|
</Type> |
|
</AutoVisualizer>
|
|
|