@@ -340,40 +340,40 @@ cdef class PyTrackingParameters:
340
340
341
341
cdef class PySpatialMappingParameters:
342
342
cdef SpatialMappingParameters* spatial
343
- def __cinit__ (self , resolution = PyRESOLUTION.PyRESOLUTION_HIGH, range = PyRANGE.PyRANGE_MEDIUM,
343
+ def __cinit__ (self , resolution = PyRESOLUTION.PyRESOLUTION_HIGH, mapping_range = PyRANGE.PyRANGE_MEDIUM,
344
344
max_memory_usage = 2048 , save_texture = True , use_chunk_only = True ,
345
345
reverse_vertex_order = False ):
346
- if (isinstance (resolution, PyRESOLUTION) and isinstance (range , PyRANGE) and
346
+ if (isinstance (resolution, PyRESOLUTION) and isinstance (mapping_range , PyRANGE) and
347
347
isinstance (use_chunk_only, bool ) and isinstance (reverse_vertex_order, bool )):
348
- self .spatial = new SpatialMappingParameters(resolution.value, range .value, max_memory_usage, save_texture,
348
+ self .spatial = new SpatialMappingParameters(resolution.value, mapping_range .value, max_memory_usage, save_texture,
349
349
use_chunk_only, reverse_vertex_order)
350
350
else :
351
351
raise TypeError ()
352
352
353
- def get_resolution (self , resolution = PyRESOLUTION.PyRESOLUTION_HIGH):
354
- if isinstance (resolution, PyRESOLUTION):
355
- return self .spatial.get(< MAPPING_RESOLUTION> resolution.value)
356
- else :
357
- raise TypeError (" Argument is not of PyRESOLUTION type." )
358
-
359
353
def set_resolution (self , resolution = PyRESOLUTION.PyRESOLUTION_HIGH):
360
354
if isinstance (resolution, PyRESOLUTION):
361
355
self .spatial.set(< MAPPING_RESOLUTION> resolution.value)
362
356
else :
363
357
raise TypeError (" Argument is not of PyRESOLUTION type." )
364
358
365
- def get_range (self , range = PyRANGE.PyRANGE_MEDIUM):
366
- if isinstance (range , PyRANGE):
367
- return self .spatial.get (< MAPPING_RANGE> range .value)
359
+ def set_range (self , mapping_range = PyRANGE.PyRANGE_MEDIUM):
360
+ if isinstance (mapping_range , PyRANGE):
361
+ self .spatial.set (< MAPPING_RANGE> mapping_range .value)
368
362
else :
369
363
raise TypeError (" Argument is not of PyRANGE type." )
370
364
371
- def set_range (self , range = PyRANGE.PyRANGE_MEDIUM ):
372
- if isinstance (range , PyRANGE):
373
- self .spatial.set (< MAPPING_RANGE> range .value)
365
+ def get_range_preset (self , mapping_range ):
366
+ if isinstance (mapping_range , PyRANGE):
367
+ return self .spatial.get (< MAPPING_RANGE> mapping_range .value)
374
368
else :
375
369
raise TypeError (" Argument is not of PyRANGE type." )
376
370
371
+ def get_resolution_preset (self , resolution ):
372
+ if isinstance (resolution, PyRESOLUTION):
373
+ return self .spatial.get(< MAPPING_RESOLUTION> resolution.value)
374
+ else :
375
+ raise TypeError (" Argument is not of PyRESOLUTION type." )
376
+
377
377
@property
378
378
def max_memory_usage (self ):
379
379
return self .spatial.max_memory_usage
@@ -416,7 +416,12 @@ cdef class PySpatialMappingParameters:
416
416
417
417
@range_meter.setter
418
418
def range_meter (self , float value ):
419
+ print (" THERE !" )
420
+ print (value)
419
421
self .spatial.range_meter = value
422
+ print (self .spatial.range_meter)
423
+ print (" -" )
424
+
420
425
421
426
@property
422
427
def allowed_resolution (self ):
0 commit comments