Skip to content
Snippets Groups Projects
Commit 8bab72ea authored by Alexander Rose's avatar Alexander Rose
Browse files

support more ply type names

parent 8bdbe950
No related branches found
No related tags found
No related merge requests found
...@@ -139,11 +139,11 @@ function parseElements(state: State) { ...@@ -139,11 +139,11 @@ function parseElements(state: State) {
function getColumnSchema(type: PlyType): Column.Schema { function getColumnSchema(type: PlyType): Column.Schema {
switch (type) { switch (type) {
case 'char': case 'uchar': case 'char': case 'uchar': case 'int8': case 'uint8':
case 'short': case 'ushort': case 'short': case 'ushort': case 'int16': case 'uint16':
case 'int': case 'uint': case 'int': case 'uint': case 'int32': case 'uint32':
return Column.Schema.int return Column.Schema.int
case 'float': case 'double': case 'float': case 'double': case 'float32': case 'float64':
return Column.Schema.float return Column.Schema.float
} }
} }
......
...@@ -17,7 +17,16 @@ export const PlyTypeByteLength = { ...@@ -17,7 +17,16 @@ export const PlyTypeByteLength = {
'int': 4, 'int': 4,
'uint': 4, 'uint': 4,
'float': 4, 'float': 4,
'double': 8 'double': 8,
'int8': 1,
'uint8': 1,
'int16': 2,
'uint16': 2,
'int32': 4,
'uint32': 4,
'float32': 4,
'float64': 8
} }
export type PlyType = keyof typeof PlyTypeByteLength export type PlyType = keyof typeof PlyTypeByteLength
export const PlyTypes = new Set(Object.keys(PlyTypeByteLength)) export const PlyTypes = new Set(Object.keys(PlyTypeByteLength))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment