#include "lvkrn.h"
L_LVKRN_API L_INT L_VecSetCamera(pVector, pCamera)
pVECTORHANDLE pVector; |
pointer to a vector handle |
const pVECTORCAMERA pCamera; |
pointer to a structure |
Sets the new camera settings.
Parameter |
Description |
pVector |
Pointer to a vector handle. |
pCamera |
Pointer to a VECTORCAMERA structure that contains the new camera settings. If this is NULL, the default camera settings will be used. |
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 .
Required DLLs and Libraries
LVKRN For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
Functions: |
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;}