L_VecSetCamera

Summary

Sets the new camera settings.

Syntax

#include "ltvkrn.h"

L_LVKRN_API L_INT L_VecSetCamera(pVector, pCamera)

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_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 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 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.