@@ -93,7 +93,7 @@ type I3dmFeatureTableView struct {
93
93
ScaleNONUniform [][3 ]float32
94
94
BatchId interface {}
95
95
InstanceLength int
96
- RtcCenter []float32
96
+ RtcCenter []float64
97
97
QuantizedVolumeOffset []float32
98
98
QuantizedVolumeScale []float32
99
99
EastNorthUp * bool
@@ -103,23 +103,23 @@ func I3dmFeatureTableDecode(header map[string]interface{}, buff []byte) map[stri
103
103
ret := make (map [string ]interface {})
104
104
instanceLength := getIntegerScalarFeatureValue (header , buff , I3DM_PROP_INSTANCES_LENGTH )
105
105
ret [I3DM_PROP_INSTANCES_LENGTH ] = instanceLength
106
- ret [I3DM_PROP_RTC_CENTER ] = getFloatVec3FeatureValue (header , buff , I3DM_PROP_RTC_CENTER )
107
- ret [I3DM_PROP_QUANTIZED_VOLUME_OFFSET ] = getFloatVec3FeatureValue (header , buff , I3DM_PROP_QUANTIZED_VOLUME_OFFSET )
108
- ret [I3DM_PROP_QUANTIZED_VOLUME_SCALE ] = getFloatVec3FeatureValue (header , buff , I3DM_PROP_QUANTIZED_VOLUME_SCALE )
109
-
110
- floatArrayValue := getFloatArrayFeatureValue (header , buff , I3DM_PROP_POSITION , int (instanceLength )* 3 )
106
+ ret [I3DM_PROP_RTC_CENTER ] = getFloat64Vec3FeatureValue (header , buff , I3DM_PROP_RTC_CENTER )
107
+ floatArrayValue := getFloatVec3ArrayFeatureValue (header , buff , I3DM_PROP_POSITION , int (instanceLength ))
111
108
if floatArrayValue != nil {
112
109
ret [I3DM_PROP_POSITION ] = floatArrayValue
113
110
}
114
111
unsignedShortArrayValue := getUnsignedShortVec3ArrayFeatureValue (header , buff , I3DM_PROP_POSITION_QUANTIZED , int (instanceLength ))
115
112
if unsignedShortArrayValue != nil {
116
113
ret [I3DM_PROP_POSITION_QUANTIZED ] = unsignedShortArrayValue
114
+ ret [I3DM_PROP_QUANTIZED_VOLUME_OFFSET ] = getFloatVec3FeatureValue (header , buff , I3DM_PROP_QUANTIZED_VOLUME_OFFSET )
115
+ ret [I3DM_PROP_QUANTIZED_VOLUME_SCALE ] = getFloatVec3FeatureValue (header , buff , I3DM_PROP_QUANTIZED_VOLUME_SCALE )
117
116
}
118
- floatArrayValue = getFloatArrayFeatureValue (header , buff , I3DM_PROP_NORMAL_UP , int (instanceLength )* 3 )
117
+
118
+ floatArrayValue = getFloatVec3ArrayFeatureValue (header , buff , I3DM_PROP_NORMAL_UP , int (instanceLength ))
119
119
if floatArrayValue != nil {
120
120
ret [I3DM_PROP_NORMAL_UP ] = floatArrayValue
121
121
}
122
- floatArrayValue = getFloatArrayFeatureValue (header , buff , I3DM_PROP_NORMAL_RIGHT , int (instanceLength )* 3 )
122
+ floatArrayValue = getFloatVec3ArrayFeatureValue (header , buff , I3DM_PROP_NORMAL_RIGHT , int (instanceLength ))
123
123
if floatArrayValue != nil {
124
124
ret [I3DM_PROP_NORMAL_RIGHT ] = floatArrayValue
125
125
}
@@ -131,11 +131,11 @@ func I3dmFeatureTableDecode(header map[string]interface{}, buff []byte) map[stri
131
131
if unsignedShortArrayValue != nil {
132
132
ret [I3DM_PROP_NORMAL_RIGHT_OCT32P ] = unsignedShortArrayValue
133
133
}
134
- floatArrayValue = getFloatArrayFeatureValue (header , buff , I3DM_PROP_SCALE , int (instanceLength ))
135
- if floatArrayValue != nil {
136
- ret [I3DM_PROP_SCALE ] = floatArrayValue
134
+ floatArrayValue1 : = getFloatArrayFeatureValue (header , buff , I3DM_PROP_SCALE , int (instanceLength ))
135
+ if floatArrayValue1 != nil {
136
+ ret [I3DM_PROP_SCALE ] = floatArrayValue1
137
137
}
138
- floatArrayValue = getFloatArrayFeatureValue (header , buff , I3DM_PROP_SCALE_NON_UNIFORM , int (instanceLength )* 3 )
138
+ floatArrayValue = getFloatVec3ArrayFeatureValue (header , buff , I3DM_PROP_SCALE_NON_UNIFORM , int (instanceLength ))
139
139
if floatArrayValue != nil {
140
140
ret [I3DM_PROP_SCALE_NON_UNIFORM ] = floatArrayValue
141
141
}
@@ -221,15 +221,15 @@ func I3dmFeatureTableEncode(header map[string]interface{}, data map[string]inter
221
221
switch dt := data [I3DM_PROP_BATCH_ID ].(type ) {
222
222
case []uint8 :
223
223
binary .Write (buf , littleEndian , dt )
224
- header [PNTS_PROP_BATCH_ID ] = BinaryBodyReference {ByteOffset : uint32 (offset ), ComponentType : COMPONENT_TYPE_UNSIGNED_BYTE }
224
+ header [I3DM_PROP_BATCH_ID ] = BinaryBodyReference {ByteOffset : uint32 (offset ), ComponentType : COMPONENT_TYPE_UNSIGNED_BYTE }
225
225
offset += len (dt )
226
226
case []uint16 :
227
227
binary .Write (buf , littleEndian , dt )
228
- header [PNTS_PROP_BATCH_ID ] = BinaryBodyReference {ByteOffset : uint32 (offset ), ComponentType : COMPONENT_TYPE_UNSIGNED_SHORT }
228
+ header [I3DM_PROP_BATCH_ID ] = BinaryBodyReference {ByteOffset : uint32 (offset ), ComponentType : COMPONENT_TYPE_UNSIGNED_SHORT }
229
229
offset += (len (dt ) * 2 )
230
230
case []uint32 :
231
231
binary .Write (buf , littleEndian , dt )
232
- header [PNTS_PROP_BATCH_ID ] = BinaryBodyReference {ByteOffset : uint32 (offset ), ComponentType : COMPONENT_TYPE_UNSIGNED_INT }
232
+ header [I3DM_PROP_BATCH_ID ] = BinaryBodyReference {ByteOffset : uint32 (offset ), ComponentType : COMPONENT_TYPE_UNSIGNED_INT }
233
233
offset += (len (dt ) * 4 )
234
234
}
235
235
pad := createPaddingBytes ([]byte {}, uint32 (offset ), 4 , 0x20 )
@@ -396,7 +396,7 @@ func (m *I3dm) GetFeatureTableView() I3dmFeatureTableView {
396
396
ret .InstanceLength = m .FeatureTable .Header [I3DM_PROP_INSTANCES_LENGTH ].(int )
397
397
398
398
if m .FeatureTable .Header [I3DM_PROP_RTC_CENTER ] != nil {
399
- ret .RtcCenter = m .FeatureTable .Header [I3DM_PROP_RTC_CENTER ].([]float32 )
399
+ ret .RtcCenter = m .FeatureTable .Header [I3DM_PROP_RTC_CENTER ].([]float64 )
400
400
}
401
401
402
402
if m .FeatureTable .Header [I3DM_PROP_QUANTIZED_VOLUME_OFFSET ] != nil {
0 commit comments