L_VecSetCamera

#include "ltvkrn.h"

L_LTVKRN_API L_INT L_VecSetCamera(pVector, pCamera)

Sets the new camera settings.

Parameters

pVECTORHANDLE pVector

Pointer to a vector handle.

const pVECTORCAMERA pCamera

Pointer to a VECTORCAMERA structure that contains the new camera settings. If this is NULL, the default camera settings will be used.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

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

See Also

Functions

Example

This example will set new camera settings.

L_LTVKRNTEX_API 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; 
} 

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

LEADTOOLS Vector C API Help