This repository was archived by the owner on Aug 17, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvault.py
More file actions
576 lines (467 loc) · 21.9 KB
/
vault.py
File metadata and controls
576 lines (467 loc) · 21.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
import math
import numpy as np
from ctypes import *
from enum import IntEnum, unique
import platform
import os
import logging
logger = logging.getLogger(__name__)
class VdkException(Exception):
def printout(this):
vaultError = this.args[1]
if (vaultError == vdkError.ConnectionFailure):
logger.error("Could not connect to server.")
elif (vaultError == vdkError.AuthFailure):
logger.error("Username or Password incorrect.")
elif (vaultError == vdkError.OutOfSync):
logger.error("Your clock doesn't match the remote server clock.")
elif (vaultError == vdkError.SecurityFailure):
logger.error("Could not open a secure channel to the server.")
elif (vaultError == vdkError.ServerFailure):
logger.error("Unable to negotiate with server, please confirm the server address")
elif (vaultError != vdkError.Success):
logger.error("Error {}: {}; please consult Vault SDK documentation".format(this.args[1], this.args[0]))
def LoadVaultSDK(SDKPath):
global vaultSDK
try:
vaultSDK = CDLL(SDKPath)
except OSError:
logger.info(
"No local Vault shared object/dll found in current working directory, trying path in VAULTSDK_HOME environment variable...")
SDKPath = os.environ.get("VAULTSDK_HOME")
if SDKPath == None:
raise FileNotFoundError("Environment variable VAULTSDK_HOME not set, please refer to Vault SDK documentation")
if platform.system() == 'Windows':
SDKPath += "/lib/win_x64/vaultSDK"
# TODO Add support for these paths:
elif platform.system() == "Linux":
SDKPath +="/lib/ubuntu18.04_GCC_x64/libvaultSDK.so"
# elif platform.system() == "Darwin":
# print("Platform not supported"
else:
logger.error("Platform {} not supported by this sample".format(platform.system()))
exit()
logger.info("Using Vault SDK shared object located at {}".format(SDKPath))
vaultSDK = CDLL(SDKPath)
@unique
class vdkError(IntEnum):
Success = 0 # Indicates the operation was successful
Failure = 1 # A catch-all value that is rarely used, internally the below values are favored
InvalidParameter = 2 # One or more parameters is not of the expected format
InvalidConfiguration = 3 # Something in the request is not correctly configured or has conflicting settings
InvalidLicense = 4 # The required license isn't available or has expired
SessionExpired = 5 # The Vault Server has terminated your session
NotAllowed = 6 # The requested operation is not allowed (usually this is because the operation isn't allowed in the current state)
NotSupported = 7 # This functionality has not yet been implemented (usually some combination of inputs isn't compatible yet)
NotFound = 8 # The requested item wasn't found or isn't currently available
NotInitialized = 9 # The request can't be processed because an object hasn't been configured yet
ConnectionFailure = 10 # There was a connection failure
MemoryAllocationFailure = 11 # VDK wasn't able to allocate enough memory for the requested feature
ServerFailure = 12 # The server reported an error trying to fufil the request
AuthFailure = 13 # The provided credentials were declined (usually username or password issue)
SecurityFailure = 14 # There was an issue somewhere in the security system- usually creating or verifying of digital signatures or cryptographic key pairs
OutOfSync = 15 # There is an inconsistency between the internal VDK state and something external. This is usually because of a time difference between the local machine and a remote server
ProxyError = 16 # There was some issue with the provided proxy information (either a proxy is in the way or the provided proxy info wasn't correct)
ProxyAuthRequired = 17 # A proxy has requested authentication
OpenFailure = 18 # A requested resource was unable to be opened
ReadFailure = 19 # A requested resourse was unable to be read
WriteFailure = 20 # A requested resource was unable to be written
ParseError = 21 # A requested resource or input was unable to be parsed
ImageParseError = 22 # An image was unable to be parsed. This is usually an indication of either a corrupt or unsupported image format
Pending = 23 # A requested operation is pending.
TooManyRequests = 24 # This functionality is currently being rate limited or has exhausted a shared resource. Trying again later may be successful
Cancelled = 25 # The requested operation was cancelled (usually by the user)
Count = 26 # Internally used to verify return values
def _HandleReturnValue(retVal):
if retVal != vdkError.Success:
err = vdkError(retVal)
raise VdkException(err.name, err.value)
@unique
class vdkRenderViewMatrix(IntEnum):
Camera = 0 # The local to world-space transform of the camera (View is implicitly set as the inverse)
View = 1 # The view-space transform for the model (does not need to be set explicitly)
Projection = 2 # The projection matrix (default is 60 degree LH)
Viewport = 3 # Viewport scaling matrix (default width and height of viewport)
Count = 4
@unique
class vdkLicenseType(IntEnum):
Render = 0
Convert = 1
Count = 2
class vdkAttributeSet(Structure):
_fields_ = [("standardContent", c_uint64),
("count", c_uint32),
("allocated", c_uint32),
("pDescriptors", c_void_p)
]
class vdkPointCloudHeader(Structure):
_fields_ = [("scaledRange", c_double),
("unitMeterScale", c_double),
("totalLODLayers", c_uint32),
("convertedResolution", c_double),
("storedMatrix", c_double * 16),
("attributes", vdkAttributeSet),
("baseOffset", c_double * 3),
("pivot", c_double * 3),
("boundingBoxCenter", c_double * 3),
("boundingBoxExtents", c_double * 3)
]
class vdkRenderInstance(Structure):
"""
Represents a renderInstance;
position, rotation and scale can be modified
directly to update the transformation matrix of the instance
This object is passed to vdkRenderContext.Render in order to
define the properties of the models to be rendered
"""
_fields_ = [("pPointCloud", c_void_p),
("matrix", c_double * 16),
("modelFlags", c_uint64),
("pFilter", c_void_p),
("pVoxelShader", c_void_p),
("pVoxelUserData", c_void_p)
]
position = [0, 0, 0] #the position of the instance in world space
rotation = [0, 0, 0] #the rotation about the point pivot
scale = [1, 1, 1] # x, y and z scaling factors
pivot = [0, 0, 0] #point to rotate about
def __init__(self, model):
super().__init__()
self.model = model
self.pivot = [*model.header.pivot]
self.pPointCloud = model.pPointCloud
self.position = [0, 0, 0]
self.rotation = [0, 0, 0]
self.scale = [1, 1, 1]
self.skew = [0, 0, 0]
self.matrix[15] = 1
@property
def scaleMode(self):
return self.__scaleMode
@scaleMode.setter
def scaleMode(self, mode):
if mode == 'modelSpace':
self.scale = 1 / 2 / np.max(self.model.header.boundingBoxExtents)
elif mode == 'minDim':
self.scale = 1 / 2 / np.min(self.model.header.boundingBoxExtents)
elif mode == 'fsCentreOrigin':
self.scale = self.model.header.scaledRange
else:
raise AttributeError("Invalid scaling mode: "+ mode)
centrePos = [-self.model.header.pivot[0] * self.scale[0], -self.model.header.pivot[1] * self.scale[1], -self.model.header.pivot[2] * self.scale[2]]
self.position = centrePos
self.__scaleMode = mode
@property
def position(self):
return self.__position
@position.setter
def position(self, position):
self.matrix[12:15] = position
self.__position = tuple(position)
@property
def scale(self):
try:
return self.__scale
except AttributeError:
return (1, 1, 1)
@scale.setter
def scale(self, scale):
#support either scalar of vecor scaling:
try:
assert(len(scale) == 3)
except TypeError:
scale = [scale, scale, scale]
self.update_transformation(self.rotation, scale, self.skew)
@property
def rotation(self):
return self.__rotation
@rotation.setter
def rotation(self, rotation):
rotation = [rotation[0] % (2*np.pi), rotation[1] % (2*np.pi), rotation[2] % (2*np.pi)]
self.update_transformation(rotation, self.scale, self.skew)
@property
def skew(self):
try:
return self.__skew
except AttributeError:
self.__skew = (0, 0, 0)
return self.__skew
@skew.setter
def skew(self, skew):
self.update_transformation(self.rotation, self.scale, skew)
def update_transformation(self, rotation, scale, skew=(0, 0, 0)):
"""
sets the rotation and scaling elements of the renderInstance
We are setting the parameters of the 4x4 homogeneous transformation matrix
"""
self.__rotation = tuple(rotation)
self.__scale = tuple(scale)
self.__skew = tuple(skew)
sy = math.sin(rotation[2])
cy = math.cos(rotation[2])
sp = math.sin(rotation[0])
cp = math.cos(rotation[0])
sr = math.sin(rotation[1])
cr = math.cos(rotation[1])
trans = np.identity(4)
piv = np.identity(4)
piv[3] = -np.array([*self.pivot, -1])
smat = np.identity(4)
smat[0, 0] = scale[0]
smat[1, 1] = scale[1]
smat[2, 2] = scale[2]
smat[0, 3] = skew[0]
smat[1, 3] = skew[1]
smat[2, 3] = skew[2]
trans[0] = [cy * cp, cy * sp * sr - sy * cr, cy * sp * cr + sy * sr, 0]
trans[1] = [sy * cp, (sy * sp * sr + cy * cr), sy * sp * cr - cy * sr, 0]
trans[2] = [-sp, cp * sr, cp * cr, 0]
trans = smat.dot(trans)
trans[3] = [*self.position, 1]
self.matrix = (c_double * 16)(*(piv.dot(trans).dot(np.linalg.inv(piv))).flatten())
class vdkContext:
def __init__(self):
self.vdkContext_Connect = getattr(vaultSDK, "vdkContext_Connect")
self.vdkContext_Disconnect = getattr(vaultSDK, "vdkContext_Disconnect")
self.vdkContext_RequestLicense = getattr(vaultSDK, "vdkContext_RequestLicense")
self.vdkContext_CheckLicense = getattr(vaultSDK, "vdkContext_CheckLicense")
self.vdkContext_TryResume = getattr(vaultSDK, "vdkContext_TryResume")
self.context = c_void_p(0)
self.url = ""
self.username = ""
def Connect(self, url=None, applicationName=None, username=None, password=None):
if password is None:
raise Exception("Password must be set")
if url is not None:
self.url = url
if applicationName is not None:
self.appName =applicationName
if username is not None:
self.username = username
username = self.username.encode('utf8')
applicationName = self.appName.encode('utf8')
url = self.url.encode('utf8')
password = password.encode('utf8')
_HandleReturnValue(self.vdkContext_Connect(byref(self.context), url, applicationName,
username, password))
def Disconnect(self):
_HandleReturnValue(self.vdkContext_Disconnect(byref(self.context)))
def RequestLicense(self, licenseType):
_HandleReturnValue(self.vdkContext_RequestLicense(self.context, licenseType))
def CheckLicense(self, licenseType):
_HandleReturnValue(self.vdkContext_CheckLicense(self.context, licenseType))
def try_resume(self, url=None, applicationName=None, username=None, tryDongle = False):
if url is not None:
self.url = url
url = self.url.encode('utf8')
if applicationName is not None:
self.appName = applicationName
applicationName = self.appName.encode('utf8')
if username is not None:
self.username = username
username = self.username.encode('utf8')
_HandleReturnValue(self.vdkContext_TryResume(byref(self.context), url, applicationName, username, tryDongle))
class vdkRenderContext:
def __init__(self):
self.vdkRenderContext_Create = getattr(vaultSDK, "vdkRenderContext_Create")
self.vdkRenderContext_Destroy = getattr(vaultSDK, "vdkRenderContext_Destroy")
self.vdkRenderContext_Render = getattr(vaultSDK, "vdkRenderContext_Render")
self.renderer = c_void_p(0)
self.context = None
def Create(self, context):
self.context = context
_HandleReturnValue(self.vdkRenderContext_Create(context.context, byref(self.renderer)))
def Destroy(self):
_HandleReturnValue(self.vdkRenderContext_Destroy(byref(self.renderer), True))
print("Logged out of Vault")
def Render(self, renderView, renderInstances):
_HandleReturnValue(
self.vdkRenderContext_Render(self.renderer, renderView.renderView, renderInstances, len(renderInstances),
c_void_p(0)))
def __del__(self):
self.Destroy()
class vdkRenderView:
def __init__(self, width=1280, height=720, clearColour=0, context=None, renderContext=None):
self.vdkRenderView_Create = getattr(vaultSDK, "vdkRenderView_Create")
self.vdkRenderView_Destroy = getattr(vaultSDK, "vdkRenderView_Destroy")
self.vdkRenderView_SetTargets = getattr(vaultSDK, "vdkRenderView_SetTargets")
self.vdkRenderView_SetMatrix = getattr(vaultSDK, "vdkRenderView_SetMatrix")
self.renderView = c_void_p(0)
self.width = width
self.height = height
self.clearColour = clearColour
self.context = context
self.renderContext = renderContext
# if the contexts are not set we assume the user is setting them manually
if context is None or renderContext is None:
return
# these are initialised when setting the size:
self.colourBuffer = None
self.depthBuffer = None
self.set_size()
self.cameraMatrix = None
self.set_view()
def set_view(self, x=0, y=-5, z=0, roll=0, pitch=0, yaw=0):
"""
Sets the postion and rotation of the matrix to that specified;
rotations are about the global axes
"""
sy = math.sin(yaw)
cy = math.cos(yaw)
sp = math.sin(pitch)
cp = math.cos(pitch)
sr = math.sin(roll)
cr = math.cos(roll)
self.cameraMatrix = [
cy * cp, cy * sp * sr - sy * cr, cy * sp * cr + sy * sr, 0,
sy * cp, sy * sp * sr + cy * cr, sy * sp * cr - cy * sr, 0,
-sp, cp * sr, cp * cr, 0,
x, y, z, 1
]
self.SetMatrix(vdkRenderViewMatrix.Camera, self.cameraMatrix)
def set_size(self, width=None, height=None):
if width is None:
width = self.width
if height is None:
height = self.height
self.colourBuffer = (c_int32 * (width * height))()
self.depthBuffer = (c_float * (width * height))()
if self.context is not None and self.renderContext is not None:
self.Create(self.context, self.renderContext, width, height)
self.SetTargets(self.colourBuffer, self.clearColour, self.depthBuffer)
else:
raise Exception("Context and renderer must be created before calling set_size")
def Create(self, context, vaultRenderer, width, height):
self.context = context
self.renderContext = vaultRenderer
self.width = width
self.height = height
if self.renderView is not c_void_p(0):
self.Destroy()
_HandleReturnValue(
self.vdkRenderView_Create(vaultRenderer.context.context, byref(self.renderView), vaultRenderer.renderer, width,
height))
def Destroy(self):
_HandleReturnValue(self.vdkRenderView_Destroy(byref(self.renderView)))
def SetTargets(self, colorBuffer, clearColor, depthBuffer):
_HandleReturnValue(
self.vdkRenderView_SetTargets(self.renderView, byref(colorBuffer), clearColor, byref(depthBuffer)))
def SetMatrix(self, matrixType, matrix):
cMatrix = (c_double * 16)(*matrix)
_HandleReturnValue(self.vdkRenderView_SetMatrix(self.renderView, matrixType, byref(cMatrix)))
def __del__(self):
self.Destroy()
class vdkPointCloud:
def __init__(self):
self.vdkPointCloud_Load = getattr(vaultSDK, "vdkPointCloud_Load")
self.vdkPointCloud_Unload = getattr(vaultSDK, "vdkPointCloud_Unload")
self.vdkPointCloud_GetMetadata = getattr(vaultSDK, "vdkPointCloud_GetMetadata")
self.pPointCloud = c_void_p(0)
self.header = vdkPointCloudHeader()
def Load(self, context, modelLocation):
_HandleReturnValue(
self.vdkPointCloud_Load(context.context, byref(self.pPointCloud), modelLocation.encode('utf8'), byref(self.header)))
def Unload(self):
_HandleReturnValue(self.vdkPointCloud_Unload(byref(self.pPointCloud)))
def GetMetadata(self):
pMetadata = c_char_p(0)
_HandleReturnValue(self.vdkPointCloud_GetMetadata(self.pPointCloud, byref(pMetadata)))
return pMetadata.value.decode('utf8')
def __del__(self):
self.Unload()
class vdkConvertContext:
def __init__(self):
self.vdkConvert_CreateContext = getattr(vaultSDK, "vdkConvert_CreateContext")
self.vdkConvert_DestroyContext = getattr(vaultSDK, "vdkConvert_DestroyContext")
self.vdkConvert_SetOutputFilename = getattr(vaultSDK, "vdkConvert_SetOutputFilename")
self.vdkConvert_AddItem = getattr(vaultSDK, "vdkConvert_AddItem")
self.vdkConvert_DoConvert = getattr(vaultSDK, "vdkConvert_DoConvert")
self.convertContext = c_void_p(0)
def Create(self, context):
_HandleReturnValue(self.vdkConvert_CreateContext(context.context, byref(self.convertContext)))
def Destroy(self):
_HandleReturnValue(self.vdkConvert_DestroyContext(byref(self.convertContext)))
def Output(self, fileName):
_HandleReturnValue(self.vdkConvert_SetOutputFilename(self.convertContext, fileName.encode('utf8')))
def AddItem(self, modelName):
_HandleReturnValue(self.vdkConvert_AddItem(self.convertContext, modelName.encode('utf8')))
def DoConvert(self):
_HandleReturnValue(self.vdkConvert_DoConvert(self.convertContext))
class vdkPointBufferI64(Structure):
_fields_ = [
("pPositions", c_void_p), # !< Flat array of XYZ positions in the format XYZXYZXYZXYZXYZXYZXYZ...
("attributes", vdkAttributeSet), # !< Information on the attributes that are available in this point buffer
("positionStride", c_uint32),
# !< Total bytes between the start of one position and the start of the next (currently always 24 (8 bytes per int64 * 3 int64))
("attributeStride", c_uint32),
# !< Total number of bytes between the start of the attibutes of one point and the first byte of the next attribute
("pointCount", c_uint32), # !< How many points are currently contained in this buffer
("pointsAllocated", c_uint32), # !< Total number of points that can fit in this vdkPointBufferF64
("_reserved", c_uint32) # !< Reserved for internal use
]
class vdkPointBufferF64(Structure):
_fields_ = [
("pPositions", c_void_p), # !< Flat array of XYZ positions in the format XYZXYZXYZXYZXYZXYZXYZ...
("attributes", vdkAttributeSet), # !< Information on the attributes that are available in this point buffer
("positionStride", c_uint32),
# !< Total bytes between the start of one position and the start of the next (currently always 24 (8 bytes per int64 * 3 int64))
("attributeStride", c_uint32),
# !< Total number of bytes between the start of the attibutes of one point and the first byte of the next attribute
("pointCount", c_uint32), # !< How many points are currently contained in this buffer
("pointsAllocated", c_uint32), # !< Total number of points that can fit in this vdkPointBufferF64
("_reserved", c_uint32) # !< Reserved for internal use
]
class vdkQueryFilter:
def __init__(self):
self.vdkQueryFilter_Create = getattr(vaultSDK, "vdkQueryFilter_Create")
self.vdkQueryFilter_Destroy = getattr(vaultSDK, "vdkQueryFilter_Destroy")
self.vdkQueryFilter_SetInverted = getattr(vaultSDK, "vdkQueryFilter_SetInverted")
self.vdkQueryFilter_SetAsBox = getattr(vaultSDK, "vdkQueryFilter_SetAsBox")
self.vdkQueryFilter_SetAsCylinder = getattr(vaultSDK, "vdkQueryFilter_SetAsCylinder")
self.vdkQueryFilter_SetAsSphere = getattr(vaultSDK, "vdkQueryFilter_SetAsSphere")
self.queryFilter = c_void_p(0)
self.create()
def create(self):
_HandleReturnValue(self.vdkQueryFilter_Create(byref(self.queryFilter)))
def __del__(self):
_HandleReturnValue(self.vdkQueryFilter_Destroy(byref(self.queryFilter)))
def SetInverted(self, inverted: bool):
_HandleReturnValue(self.vdkQueryFilter_SetInverted(self.queryFilter, inverted))
def SetAsBox(self, centrePoint, halfSize, yawPitchRoll):
_HandleReturnValue(self.vdkQueryFilter_SetAsBox(self.queryFilter, centrePoint, halfSize, yawPitchRoll))
def SetAsCylinder(self, centrePoint, radius, halfHeight, yawPitchRoll):
_HandleReturnValue(
self.vdkQueryFilter_SetAsCylinder(self.queryFilter, centrePoint, radius, halfHeight, yawPitchRoll))
def SetAsSphere(self, centrePoint, radius):
_HandleReturnValue(self.vdkQueryFilter_SetAsSphere(self.queryFilter, centrePoint, radius))
class vdkQuery:
def __init__(self, context: vdkContext):
self.vdkQuery_Create = getattr(vaultSDK, "vdkQuery_Create")
self.vdkQuery_ChangeFilter = getattr(vaultSDK, "vdkQuery_ChangeFilter")
self.vdkQuery_ChangeModel = getattr(vaultSDK, "vdkQuery_ChangeModel")
self.vdkQuery_ExecuteF64 = getattr(vaultSDK, "vdkQuery_ExecuteF64")
self.vdkQuery_ExecuteI64 = getattr(vaultSDK, "vdkQuery_ExecuteI64")
self.vdkQuery_Destroy = getattr(vaultSDK, "vdkQuery_Destroy")
self.context = context
self.query = c_void_p(0)
self.Create()
def Create(self, pPointCloud, pFilter):
_HandleReturnValue(self.vdkQuery_Create(self.context.context, byref(self.query), pPointCloud, pFilter))
def ChangeFilter(self, pFilter):
_HandleReturnValue(self.vdkQuery_ChangeFilter(self.query, pFilter))
def ChangeModel(self, pPointCloud):
_HandleReturnValue(self.vdkQuery_ChangeModel(self.query, pPointCloud))
def ExecuteF64(self, pPoints):
retVal = self.vdkQuery_ExecuteF64(self.query, pPoints)
if retVal == vdkError.NotFound:
return True
_HandleReturnValue(retVal)
return False
def ExecuteI64(self, pPoints):
retVal = self.vdkQuery_ExecuteI64(self.query, pPoints)
if retVal == vdkError.NotFound:
return True
_HandleReturnValue(retVal)
return False
def Destroy(self):
_HandleReturnValue(self.vdkQuery_Destroy(byref(self.query)))