L_VecGetCamera
#include "lvkrn.h"
L_LVKRN_API L_INT L_VecGetCamera(pVector, pCamera)
const pVECTORHANDLE pVector; |
/* pointer to a vector handle */ |
pVECTORCAMERA pCamera; |
/* pointer to a structure */ |
Gets the current camera settings.
Parameter |
Description |
pVector |
Pointer to a vector handle. |
pCamera |
Pointer to a VECTORCAMERA structure to be updated with the current camera settings. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
This function will get 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.
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. |
See Also
Functions: |
Example
This example will show current camera settings in a message box.
L_INT VecGetCameraExample(pVECTORHANDLE pVector) { L_INT nRet; VECTORCAMERA camera; /* Camera */ L_TCHAR szBuffer[ 80 ]; /* Buffer */ /* Get camera */ nRet = L_VecGetCamera( pVector, &camera ); if (nRet != SUCCESS) return nRet; /* Format values into a buffer */ _stprintf_s( szBuffer,80, TEXT("Theta = %f\nPhi = %f\nLookAt = %f, %f, %f\nDistance = %f\nPerspective = %d"), camera.Theta, camera.Phi, camera.LookAt.x, camera.LookAt.y, camera.LookAt.z, camera.Distance, camera.bPerspective ); MessageBox( NULL, szBuffer, TEXT("Camera"), 0 ); return SUCCESS; }