Sets the new camera settings.
#include "ltvkrn.h"
L_LVKRN_API L_INT L_VecSetCamera(pVector, pCamera)
Pointer to a vector handle.
Pointer to a VECTORCAMERA structure that contains the new camera settings. If this is NULL, the default camera settings will be used.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
This function will set the current viewing camera.
The camera is used with the view port to determine how the drawing will be projected into the destination DC when using L_VecPaint.
If pCamera is NULL, the default camera will be set. The default camera is defined as a top view camera .
This example will set new camera settings.
L_INT VecSetCameraExample(pVECTORHANDLE pVector)
{
L_INT nRet;
VECTORCAMERA camera; /* Camera */
/* Set rotation around the Z-axis to 30 degrees */
camera.Theta = 30.0;
/* Set rotation off the Z-Axis to 60 degrees */
camera.Phi = 20.0;
/* Use perspective projection */
camera.bPerspective = TRUE;
/* Set camera position 200 units from the object */
camera.Distance = 200.0;
/* Set the new camera settings */
nRet = L_VecSetCamera( pVector, &camera );
return nRet;
}