L_VecGetCamera

Summary

Gets the current camera settings.

Syntax

#include "ltvkrn.h"

L_LVKRN_API L_INT L_VecGetCamera(pVector, pCamera)

Parameters

const pVECTORHANDLE pVector

Pointer to a vector handle.

pVECTORCAMERA pCamera

Pointer to a VECTORCAMERA structure to be updated with the current camera settings.

Returns

Value Meaning
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

See Also

Functions

Example

This example will show current camera settings in a message box.

L_LTVKRNTEX_API L_INT VecGetCameraExample(pVECTORHANDLE pVector) 
{ 
   L_INT nRet; 
   VECTORCAMERA camera;      /* Camera */ 
   L_TCHAR szBuffer[ 200 ];   /* Buffer */ 
 
   /* Get camera */ 
   nRet = L_VecGetCamera( pVector, &camera ); 
   if (nRet != SUCCESS) 
      return nRet; 
 
   /* Format values into a buffer */ 
   _stprintf_s( szBuffer,200, 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; 
} 

Help Version 22.0.2022.12.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Vector C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.