Pass-through Module¶
In this page will introduce the API and data you can use from See-through module.
Pass-through module API¶
-
int
ViveSR::SRWork::PassThrough
::
GetPassThroughData
(PassThroughData *data)¶ Gets the PassThroughData from SRWorks engine.
- Return
Indicates the resulting ViveSR::Error status of this method.
- Parameters
[out] data
: ViveSR::SRWork::PassThrough::PassThroughData
-
int
ViveSR::SRWork::PassThrough
::
GetCameraParams
(double *camera_params)¶ Get the camera parameters from SRWorks engine.
- Return
Indicates the resulting ViveSR::Error status of this method.
- Parameters
[out] camera_params
: The camera parameter array. The array of ViveSR::SRWork::PassThrough::CAMERA_Param
-
int
ViveSR::SRWork::PassThrough
::
GetPassThrougParameterBool
(int parameter_name, bool *param_value)¶ Get the pass through parameter boolean from module.
- Return
Indicates the resulting ViveSR::Error status of this method.
- Parameters
[in] parameter_name
: ViveSR::SRWork::PassThrough::Param[out] param_value
: The parameter output value pointer.
-
int
ViveSR::SRWork::PassThrough
::
GetPassThrougParameterInt
(int parameter_name, int *param_value)¶ Get the pass through parameter integer from module.
- Return
Indicates the resulting ViveSR::Error status of this method.
- Parameters
[in] parameter_name
: ViveSR::SRWork::PassThrough::Param[out] param_value
: The parameter output value pointer.
-
int
ViveSR::SRWork::PassThrough
::
GetPassThrougParameterFloat
(int parameter_name, float *param_value)¶ Get the pass through parameter float from module.
- Return
Indicates the resulting ViveSR::Error status of this method.
- Parameters
[in] parameter_name
: ViveSR::SRWork::PassThrough::Param[out] param_value
: The parameter output value pointer.
-
int
ViveSR::SRWork::PassThrough
::
GetPassThrougParameterDouble
(int parameter_name, double *param_value)¶ Get the pass through parameter double from module.
- Return
Indicates the resulting ViveSR::Error status of this method.
- Parameters
[in] parameter_name
: ViveSR::SRWork::PassThrough::Param[out] param_value
: The parameter output value pointer.
-
int
ViveSR::SRWork::PassThrough
::
GetCameraStatus
(int camera_control_type, int32_t *status)¶ Get camera control status.
- Return
Indicate the API’s error code.
- Parameters
[in] camera_control_type
: Which camera control type would you want to get.The parameters reference from ViveSR::PassThrough::Param::CameraControlType.[out] status
: The camera status pointer.
-
int
ViveSR::SRWork::PassThrough
::
GetCameraDefaultValue
(int camera_control_type, int32_t *default_value)¶ Get camera control default value.
- Return
Indicate the API’s error code.
- Parameters
[in] camera_control_type
: Which camera control type would you want to get.The parameters reference from ViveSR::PassThrough::Param::CameraControlType.[out] default_value
: The camera default value pointer.
-
int
ViveSR::SRWork::PassThrough
::
GetCameraMin
(int camera_control_type, int32_t *min)¶ Get camera control min.
- Return
Indicate the API’s error code.
- Parameters
[in] camera_control_type
: Which camera control type would you want to get.The parameters reference from ViveSR::PassThrough::Param::CameraControlType.[out] min
: The camera min pointer.
-
int
ViveSR::SRWork::PassThrough
::
GetCameraMax
(int camera_control_type, int32_t *max)¶ Get camera control max.
- Return
Indicate the API’s error code.
- Parameters
[in] camera_control_type
: Which camera control type would you want to get.The parameters reference from ViveSR::PassThrough::Param::CameraControlType.[out] max
: The camera max pointer.
-
int
ViveSR::SRWork::PassThrough
::
GetCameraDefaultMode
(int camera_control_type, int32_t *default_mode)¶ Get camera control default mode.
- Return
Indicate the API’s error code.
- Parameters
[in] camera_control_type
: Which camera control type would you want to get.The parameters reference from ViveSR::PassThrough::Param::CameraControlType.[out] default_mode
: The camera default mode pointer.
-
int
ViveSR::SRWork::PassThrough
::
GetCameraValue
(int camera_control_type, int32_t *value)¶ Get camera control value.
- Return
Indicate the API’s error code.
- Parameters
[in] camera_control_type
: Which camera control type would you want to get.The parameters reference from ViveSR::PassThrough::Param::CameraControlType.[out] value
: The camera value pointer.
-
int
ViveSR::SRWork::PassThrough
::
GetCameraMode
(int camera_control_type, int32_t *mode)¶ Get camera control mode.
- Return
Indicate the API’s error code.
- Parameters
[in] camera_control_type
: Which camera control type would you want to get.The parameters reference from ViveSR::PassThrough::Param::CameraControlType.[out] mode
: The camera mode pointer.
-
int
ViveSR::SRWork::PassThrough
::
SetCameraStatus
(int camera_control_type, int32_t status)¶ Set camera control status.
- Return
Indicate the API’s error code.
- Parameters
[in] camera_control_type
: Which camera control type would you want to get.The parameters reference from ViveSR::PassThrough::Param::CameraControlType.[out] status
: The camera status pointer.
-
int
ViveSR::SRWork::PassThrough
::
SetCameraDefaultValue
(int camera_control_type, int32_t default_value)¶ Set camera control default value.
- Return
Indicate the API’s error code.
- Parameters
[in] camera_control_type
: Which camera control type would you want to get.The parameters reference from ViveSR::PassThrough::Param::CameraControlType.[out] default_value
: The camera default value pointer.
-
int
ViveSR::SRWork::PassThrough
::
SetCameraMin
(int camera_control_type, int32_t min)¶ Set camera control min.
- Return
Indicate the API’s error code.
- Parameters
[in] camera_control_type
: Which camera control type would you want to get.The parameters reference from ViveSR::PassThrough::Param::CameraControlType.[out] min
: The camera min pointer.
-
int
ViveSR::SRWork::PassThrough
::
SetCameraMax
(int camera_control_type, int32_t max)¶ Set camera control max.
- Return
Indicate the API’s error code.
- Parameters
[in] camera_control_type
: Which camera control type would you want to get.The parameters reference from ViveSR::PassThrough::Param::CameraControlType.[out] max
: The camera max pointer.
-
int
ViveSR::SRWork::PassThrough
::
SetCameraStep
(int camera_control_type, int32_t step)¶ Set camera control step.
- Return
Indicate the API’s error code.
- Parameters
[in] camera_control_type
: Which camera control type would you want to get.The parameters reference from ViveSR::PassThrough::Param::CameraControlType.[out] step
: The camera step pointer.
-
int
ViveSR::SRWork::PassThrough
::
SetCameraDefaultMode
(int camera_control_type, int32_t default_mode)¶ Set camera control default mode.
- Return
Indicate the API’s error code.
- Parameters
[in] camera_control_type
: Which camera control type would you want to get.The parameters reference from ViveSR::PassThrough::Param::CameraControlType.[out] default_mode
: The camera default mode pointer.
-
int
ViveSR::SRWork::PassThrough
::
SetPassThroughMaxFps
(int max_fps)¶ Set the pass through maximum update interval of SRWorks engine.
- Return
Indicates the resulting ViveSR::Error status of this method.
- Parameters
[in] max_fps
: The maximum fps want to set.
-
int
ViveSR::SRWork::PassThrough
::
GetControllerTrackingPose
(TrackingPoseInfo *pPoses)¶ Get the controller tracking pose from pass through module.
- Return
Indicates the resulting ViveSR::Error status of this method.
- Parameters
[out] pPoses
: The pointer of pose struct.
Pass-through module data type¶
-
struct
PassThroughData
¶ Public Members
-
char *
distorted_frame_left
¶
-
char *
distorted_frame_right
¶
-
char *
undistorted_frame_left
¶
-
char *
undistorted_frame_right
¶
-
unsigned int
frameSeq
¶
-
unsigned int
timeStp
¶
-
float *
pose_left
¶
-
float *
pose_right
¶
-
int
lux_left
¶
-
int
lux_right
¶
-
int
color_temperature_left
¶
-
int
color_temperature_right
¶
-
int
exposure_time_left
¶
-
int
exposure_time_right
¶
-
int
analog_gain_left
¶
-
int
analog_gain_right
¶
-
int
digital_gain_left
¶
-
int
digital_gain_right
¶
-
char *
camera_params
¶
-
unsigned int
d3d11_texture2d_buffer_index
¶
-
float
gamma
¶
-
char *
-
struct
TrackingPoseInfo
¶
Pass-through module enums type¶
-
enum
ViveSR::PassThrough
::
Param
¶ An enum type for pass through parameters.
Values:
-
VR_INIT
= 0¶
-
VR_INIT_TYPE
¶
-
OUTPUT_DISTORTED_WIDTH
¶
-
OUTPUT_DISTORTED_HEIGHT
¶
-
OUTPUT_DISTORTED_CHANNEL
¶
-
OUTPUT_UNDISTORTED_WIDTH
¶
-
OUTPUT_UNDISTORTED_HEIGHT
¶
-
OUTPUT_UNDISTORTED_CHANNEL
¶
-
OUTPUT_FPS
¶
-
OFFSET_HEAD_TO_CAMERA
¶
-
PLAY_AREA_RECT
¶
-
VIDEO_RES_NATIVE_PTR
¶
-
VIDEO_RES_VIEW_NATIVE_PTR
¶
-
IMAGE_NATIVE_TEXTURE_PTR_L
¶
-
IMAGE_NATIVE_TEXTURE_PTR_R
¶
-
CAMERA_BRIGHTNESS
= 100¶
-
CAMERA_CONTRAST
¶
-
CAMERA_HUE
¶
-
CAMERA_SATURATION
¶
-
CAMERA_SHARPNESS
¶
-
CAMERA_GAMMA
¶
-
CAMERA_COLOR_ENABLE
¶
-
CAMERA_WHITE_BALANCE
¶
-
CAMERA_BACKLIGHT_COMPENSATION
¶
-
CAMERA_GAIN
¶
-
CAMERA_PAN
¶
-
CAMERA_TILT
¶
-
CAMERA_ROLL
¶
-
CAMERA_ZOOM
¶
-
CAMERA_EXPOSURE
¶
-
CAMERA_IRIS
¶
-
CAMERA_FOCUS
¶
-
DEVICE_SYSTEM_TYPE
¶
-
UNDISTORTION_MODE
= 200¶
-
UNDISTORTION_CX
¶
-
UNDISTORTION_CY
¶
-
UNDISTORTION_FOCAL_LENGTH
¶
-
UNDISTORTION_FMAT_RM_L
¶
-
UNDISTORTION_FMAT_RM_R
¶
-
UNDISTORTION_INTRINSIC_L
¶
-
UNDISTORTION_INTRINSIC_R
¶
-
UNDISTORTION_R_RECTIFY_L
¶
-
UNDISTORTION_R_RECTIFY_R
¶
-
UNDISTORTION_COEFFS_L
¶
-
UNDISTORTION_COEFFS_R
¶
-
UNDISTORTION_P_NEWPROJ_L
¶
-
UNDISTORTION_P_NEWPROJ_R
¶
-
UNDISTORTION_MAP_SIZE
¶
-
UNDISTORTION_MAP_L
¶
-
UNDISTORTION_MAP_R
¶
-
UNDISTORTION_CENTER
¶
-
MESH_NATIVE_VERTEX_BUFFER_PTR_L
¶
-
MESH_NATIVE_VERTEX_BUFFER_PTR_R
¶
-
MESH_NATIVE_VERTEX_ARRAY_L
¶
-
MESH_NATIVE_VERTEX_ARRAY_R
¶
-
MESH_CALIB_NATIVE_VERTEX_BUFFER_PTR_L
¶
-
MESH_CALIB_NATIVE_VERTEX_BUFFER_PTR_R
¶
-
MESH_CALIB_NATIVE_VERTEX_ARRAY_L
¶
-
MESH_CALIB_NATIVE_VERTEX_ARRAY_R
¶
-
ENABLE_IMAGE_PLANE_MESH_L
¶
-
ENABLE_IMAGE_PLANE_MESH_R
¶
-
ENABLE_CALIB_IMAGE_PLANE_MESH_L
¶
-
ENABLE_CALIB_IMAGE_PLANE_MESH_R
¶
-
CAMERA_PARAMETERS
= 300¶
-
OFFSET_HEAD_TO_CAMERA_x0
¶
-
OFFSET_HEAD_TO_CAMERA_y0
¶
-
OFFSET_HEAD_TO_CAMERA_z0
¶
-
OFFSET_HEAD_TO_CAMERA_x1
¶
-
OFFSET_HEAD_TO_CAMERA_y1
¶
-
OFFSET_HEAD_TO_CAMERA_z1
¶
-
CAMERA_CONTROL_STATUS
= 400¶
-
CAMERA_CONTROL_DEFAULT_VALUE
¶
-
CAMERA_CONTROL_MIN
¶
-
CAMERA_CONTROL_MAX
¶
-
CAMERA_CONTROL_STEP
¶
-
CAMERA_CONTROL_DEFAULT_MODE
¶
-
CAMERA_CONTROL_VALUE
¶
-
CAMERA_CONTROL_MODE
¶
-
RESET_AllCAMERA_QUALITY
¶
-
TRACKING_POSE
= 500¶
-
OUTPUT_4K_READY
¶
-
D3D11_SHARED_HANDLE_UNDISTORTED_LEFT
¶
-
D3D11_SHARED_HANDLE_UNDISTORTED_RIGHT
¶
-
TRACKING_POSE_VALID_LEFT
¶
-
TRACKING_POSE_VALID_RIGHT
¶
-
TRACKING_POSE_POS_LEFT_X
¶
-
TRACKING_POSE_POS_LEFT_Y
¶
-
TRACKING_POSE_POS_LEFT_Z
¶
-
TRACKING_POSE_POS_RIGHT_X
¶
-
TRACKING_POSE_POS_RIGHT_Y
¶
-
TRACKING_POSE_POS_RIGHT_Z
¶
-
TRACKING_POSE_ROT_LEFT_X
¶
-
TRACKING_POSE_ROT_LEFT_Y
¶
-
TRACKING_POSE_ROT_LEFT_Z
¶
-
TRACKING_POSE_ROT_LEFT_W
¶
-
TRACKING_POSE_ROT_RIGHT_X
¶
-
TRACKING_POSE_ROT_RIGHT_Y
¶
-
TRACKING_POSE_ROT_RIGHT_Z
¶
-
TRACKING_POSE_ROT_RIGHT_W
¶
-
SKIP_VGA_PROCESS
¶
-
DISTORT_GPU_TO_CPU_ENABLE
¶
-
DEPTH_UNDISTORT_GPU_TO_CPU_ENABLE
¶
-