Skip to content

Commit cad9d3a

Browse files
committed
[Patterns] Add missing vector and matrix types
1 parent 917e5b9 commit cad9d3a

File tree

1 file changed

+33
-2
lines changed

1 file changed

+33
-2
lines changed

src/Aardvark.Base.FSharp/Reflection/TypeInfo.fs

+33-2
Original file line numberDiff line numberDiff line change
@@ -88,17 +88,34 @@ module TypeInfo =
8888
let TV2i = { vectorType = typeof<V2i>; baseType = TInt32; dimension = 2 }
8989
let TV3i = { vectorType = typeof<V3i>; baseType = TInt32; dimension = 3 }
9090
let TV4i = { vectorType = typeof<V4i>; baseType = TInt32; dimension = 4 }
91+
92+
let TV2l = { vectorType = typeof<V2l>; baseType = TInt64; dimension = 2 }
93+
let TV3l = { vectorType = typeof<V3l>; baseType = TInt64; dimension = 3 }
94+
let TV4l = { vectorType = typeof<V4l>; baseType = TInt64; dimension = 4 }
95+
9196
let TV2f = { vectorType = typeof<V2f>; baseType = TFloat32; dimension = 2 }
9297
let TV3f = { vectorType = typeof<V3f>; baseType = TFloat32; dimension = 3 }
9398
let TV4f = { vectorType = typeof<V4f>; baseType = TFloat32; dimension = 4 }
99+
94100
let TV2d = { vectorType = typeof<V2d>; baseType = TFloat64; dimension = 2 }
95101
let TV3d = { vectorType = typeof<V3d>; baseType = TFloat64; dimension = 3 }
96102
let TV4d = { vectorType = typeof<V4d>; baseType = TFloat64; dimension = 4 }
97103

104+
let TM22i = { matrixType = typeof<M22i>; baseType = TInt32; dimension = V2i(2,2) }
105+
let TM33i = { matrixType = typeof<M33i>; baseType = TInt32; dimension = V2i(3,3) }
106+
let TM34i = { matrixType = typeof<M34i>; baseType = TInt32; dimension = V2i(4,3) }
107+
let TM44i = { matrixType = typeof<M44i>; baseType = TInt32; dimension = V2i(4,4) }
108+
109+
let TM22l = { matrixType = typeof<M22l>; baseType = TInt64; dimension = V2i(2,2) }
110+
let TM33l = { matrixType = typeof<M33l>; baseType = TInt64; dimension = V2i(3,3) }
111+
let TM34l = { matrixType = typeof<M34l>; baseType = TInt64; dimension = V2i(4,3) }
112+
let TM44l = { matrixType = typeof<M44l>; baseType = TInt64; dimension = V2i(4,4) }
113+
98114
let TM22f = { matrixType = typeof<M22f>; baseType = TFloat32; dimension = V2i(2,2) }
99115
let TM33f = { matrixType = typeof<M33f>; baseType = TFloat32; dimension = V2i(3,3) }
100116
let TM34f = { matrixType = typeof<M34f>; baseType = TFloat32; dimension = V2i(4,3) }
101117
let TM44f = { matrixType = typeof<M44f>; baseType = TFloat32; dimension = V2i(4,4) }
118+
102119
let TM22d = { matrixType = typeof<M22d>; baseType = TFloat64; dimension = V2i(2,2) }
103120
let TM33d = { matrixType = typeof<M33d>; baseType = TFloat64; dimension = V2i(3,3) }
104121
let TM34d = { matrixType = typeof<M34d>; baseType = TFloat64; dimension = V2i(4,3) }
@@ -107,8 +124,22 @@ module TypeInfo =
107124
let IntegralTypes : Set<ITypeInfo> = Set.ofList [TByte; TSByte; TInt16; TUInt16; TInt32; TUInt32; TInt64; TUInt64]
108125
let FractionalTypes : Set<ITypeInfo> = Set.ofList [TFloat32; TFloat64; TDecimal]
109126
let NumTypes : Set<ITypeInfo> = Set.union IntegralTypes FractionalTypes
110-
let VectorTypes : Set<ITypeInfo> = Set.ofList [TV2i; TV3i; TV4i; TV2f; TV3f; TV4f; TV2d; TV3d; TV4d]
111-
let MatrixTypes : Set<ITypeInfo> = Set.ofList [TM22f; TM33f; TM34f; TM44f; TM22d; TM33d; TM34d; TM44d]
127+
128+
let VectorTypes : Set<ITypeInfo> =
129+
Set.ofList [
130+
TV2i; TV3i; TV4i
131+
TV2l; TV3l; TV4l
132+
TV2f; TV3f; TV4f
133+
TV2d; TV3d; TV4d
134+
]
135+
136+
let MatrixTypes : Set<ITypeInfo> =
137+
Set.ofList [
138+
TM22i; TM33i; TM34i; TM44i
139+
TM22l; TM33l; TM34l; TM44l
140+
TM22f; TM33f; TM34f; TM44f
141+
TM22d; TM33d; TM34d; TM44d
142+
]
112143

113144
let TRef = { simpleType = typeof<ref<int>>.GetGenericTypeDefinition() }
114145
let TList = { simpleType = typeof<list<int>>.GetGenericTypeDefinition() }

0 commit comments

Comments
 (0)