fsCameraSet
The fsCameraSet function is used to set specific parts of the camera struct. This function can only be used when the add-on camera has been acquired.
Syntax
bool fsCameraSet(
FsCameraData* cameraData,
int dataMask
);
Members
| Parameters | Description |
|---|---|
cameraData |
This is pointer to an FsCameraData struct containing the member parameters you wish to set. The parameters should correspond to the dataMask used. |
dataMask |
This is a bitmask that can be created using the FsCameraDataMask enum members, and defines which parts of the CameraData struct should be used for the camera. |
Return Values
The function returns false if it was not possible to send the request, or true otherwise. If the request was sent but failed, the specified callback will be invoked with an appropriate error code.
Example
Set camera data:
cameraData.pos = { 0, 0, -10 };
cameraData.pbh = { 0, 0, 0 };
cameraData.fov = 0.8;
cameraData.referential = FS_POSITION_REFERENTIAL_AIRCRAFT;
if (!fsCameraSet(&cameraData, FS_CAMERA_DATA_MASK_ALL_ROTATION))
{
printf("Error setting the camera, verify its acquired beforehand");
return true;
}
Remarks
N/A
Related Topics
0/255