python类c_float()的实例源码

vrep.py 文件源码 项目:mazerunner 作者: lucasdavid 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def simxGetObjectFloatParameter(clientID, objectHandle, parameterID, operationMode):
    '''
    Please have a look at the function description/documentation in the V-REP user manual
    '''

    parameterValue = ct.c_float()
    return c_GetObjectFloatParameter(clientID, objectHandle, parameterID, ct.byref(parameterValue), operationMode), parameterValue.value
vrep.py 文件源码 项目:mazerunner 作者: lucasdavid 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def simxGetObjectVelocity(clientID, objectHandle, operationMode):
    '''
    Please have a look at the function description/documentation in the V-REP user manual
    '''
    linearVel  = (ct.c_float*3)()
    angularVel = (ct.c_float*3)()
    ret = c_GetObjectVelocity(clientID, objectHandle, linearVel, angularVel, operationMode)
    arr1 = []
    for i in range(3):
        arr1.append(linearVel[i])
    arr2 = []
    for i in range(3):
        arr2.append(angularVel[i])
    return ret, arr1, arr2
shader.py 文件源码 项目:pycraft 作者: traverseda 项目源码 文件源码 阅读 43 收藏 0 点赞 0 评论 0
def uniform_matrixf(self, name, mat):
        # obtian the uniform location
        loc = glGetUniformLocation(self.handle, name)
        # uplaod the 4x4 floating point matrix
        glUniformMatrix4fv(loc, 1, False, (c_float * 16)(*mat))
vrep.py 文件源码 项目:vrep-env 作者: ycps 项目源码 文件源码 阅读 27 收藏 0 点赞 0 评论 0
def simxGetJointPosition(clientID, jointHandle, operationMode):
    '''
    Please have a look at the function description/documentation in the V-REP user manual
    '''
    position = ct.c_float()
    return c_GetJointPosition(clientID, jointHandle, ct.byref(position), operationMode), position.value
vrep.py 文件源码 项目:vrep-env 作者: ycps 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def simxGetJointMatrix(clientID, jointHandle, operationMode):
    '''
    Please have a look at the function description/documentation in the V-REP user manual
    '''
    matrix = (ct.c_float*12)()
    ret = c_GetJointMatrix(clientID, jointHandle, matrix, operationMode)
    arr = []
    for i in range(12):
        arr.append(matrix[i])
    return ret, arr
vrep.py 文件源码 项目:vrep-env 作者: ycps 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def simxSetSphericalJointMatrix(clientID, jointHandle, matrix, operationMode):
    '''
    Please have a look at the function description/documentation in the V-REP user manual
    '''
    matrix = (ct.c_float*12)(*matrix)
    return c_SetSphericalJointMatrix(clientID, jointHandle, matrix, operationMode)
vrep.py 文件源码 项目:vrep-env 作者: ycps 项目源码 文件源码 阅读 27 收藏 0 点赞 0 评论 0
def simxJointGetForce(clientID, jointHandle, operationMode):
    '''
    Please have a look at the function description/documentation in the V-REP user manual
    '''
    force = ct.c_float()
    return c_GetJointForce(clientID, jointHandle, ct.byref(force), operationMode), force.value
vrep.py 文件源码 项目:vrep-env 作者: ycps 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def simxGetJointForce(clientID, jointHandle, operationMode):
    '''
    Please have a look at the function description/documentation in the V-REP user manual
    '''
    force = ct.c_float()
    return c_GetJointForce(clientID, jointHandle, ct.byref(force), operationMode), force.value
vrep.py 文件源码 项目:vrep-env 作者: ycps 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def simxGetObjectOrientation(clientID, objectHandle, relativeToObjectHandle, operationMode):
    '''
    Please have a look at the function description/documentation in the V-REP user manual
    '''
    eulerAngles = (ct.c_float*3)()
    ret = c_GetObjectOrientation(clientID, objectHandle, relativeToObjectHandle, eulerAngles, operationMode)
    arr = []
    for i in range(3):
        arr.append(eulerAngles[i])
    return ret, arr
vrep.py 文件源码 项目:vrep-env 作者: ycps 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def simxSetObjectOrientation(clientID, objectHandle, relativeToObjectHandle, eulerAngles, operationMode):
    '''
    Please have a look at the function description/documentation in the V-REP user manual
    '''

    angles = (ct.c_float*3)(*eulerAngles)
    return c_SetObjectOrientation(clientID, objectHandle, relativeToObjectHandle, angles, operationMode)
vrep.py 文件源码 项目:vrep-env 作者: ycps 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def simxSetObjectPosition(clientID, objectHandle, relativeToObjectHandle, position, operationMode):
    '''
    Please have a look at the function description/documentation in the V-REP user manual
    '''

    c_position = (ct.c_float*3)(*position)
    return c_SetObjectPosition(clientID, objectHandle, relativeToObjectHandle, c_position, operationMode)
vrep.py 文件源码 项目:vrep-env 作者: ycps 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def simxGetArrayParameter(clientID, paramIdentifier, operationMode):
    '''
    Please have a look at the function description/documentation in the V-REP user manual
    '''
    paramValues = (ct.c_float*3)()
    ret = c_GetArrayParameter(clientID, paramIdentifier, paramValues, operationMode)
    arr = []
    for i in range(3):
        arr.append(paramValues[i])
    return ret, arr
vrep.py 文件源码 项目:vrep-env 作者: ycps 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def simxSetArrayParameter(clientID, paramIdentifier, paramValues, operationMode):
    '''
    Please have a look at the function description/documentation in the V-REP user manual
    '''

    c_paramValues = (ct.c_float*3)(*paramValues)
    return c_SetArrayParameter(clientID, paramIdentifier, c_paramValues, operationMode)
vrep.py 文件源码 项目:vrep-env 作者: ycps 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def simxGetFloatingParameter(clientID, paramIdentifier, operationMode):
    '''
    Please have a look at the function description/documentation in the V-REP user manual
    '''

    paramValue = ct.c_float()
    return c_GetFloatingParameter(clientID, paramIdentifier, ct.byref(paramValue), operationMode), paramValue.value
vrep.py 文件源码 项目:vrep-env 作者: ycps 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def simxGetObjectFloatParameter(clientID, objectHandle, parameterID, operationMode):
    '''
    Please have a look at the function description/documentation in the V-REP user manual
    '''

    parameterValue = ct.c_float()
    return c_GetObjectFloatParameter(clientID, objectHandle, parameterID, ct.byref(parameterValue), operationMode), parameterValue.value
openni2.py 文件源码 项目:openni-python 作者: severin-lemaignan 项目源码 文件源码 阅读 29 收藏 0 点赞 0 评论 0
def get_speed(self):
        return self.device.get_property(c_api.ONI_DEVICE_PROPERTY_PLAYBACK_SPEED, ctypes.c_float)
openni2.py 文件源码 项目:openni-python 作者: severin-lemaignan 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def get_horizontal_fov(self):
        return self.get_property(c_api.ONI_STREAM_PROPERTY_HORIZONTAL_FOV, ctypes.c_float).value
openni2.py 文件源码 项目:openni-python 作者: severin-lemaignan 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def get_vertical_fov(self):
        return self.get_property(c_api.ONI_STREAM_PROPERTY_VERTICAL_FOV, ctypes.c_float).value
openni2.py 文件源码 项目:openni-python 作者: severin-lemaignan 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def convert_world_to_depth(depthStream, worldX, worldY, worldZ):
    """const VideoStream& depthStream, float worldX, float worldY, float worldZ"""
    out_depthX = ctypes.c_float()
    out_depthY = ctypes.c_float()
    out_depthZ = ctypes.c_float()
    c_api.oniCoordinateConverterWorldToDepth(depthStream._handle, worldX, worldY, worldZ,
        ctypes.byref(out_depthX), ctypes.byref(out_depthY), ctypes.byref(out_depthZ))
    return out_depthX.value, out_depthY.value, out_depthZ.value
openni2.py 文件源码 项目:openni-python 作者: severin-lemaignan 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def convert_depth_to_world(depthStream, depthX, depthY, depthZ):
    """const VideoStream& depthStream, float depthX, float depthY, float depthZ, float* pWorldX, float* pWorldY, float* pWorldZ"""
    out_depthX = ctypes.c_float()
    out_depthY = ctypes.c_float()
    out_depthZ = ctypes.c_float()
    c_api.oniCoordinateConverterDepthToWorld(depthStream._handle, depthX, depthY, depthZ,
        ctypes.byref(out_depthX), ctypes.byref(out_depthY), ctypes.byref(out_depthZ))
    return out_depthX.value, out_depthY.value, out_depthZ.value


问题


面经


文章

微信
公众号

扫码关注公众号