L_VecGetCamera

#include "lvkrn.h"

L_INT EXT_FUNCTION 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:

L_VecSetCamera, L_VecPaint

Example

/* This example will show current camera settings in a message box */

void ShowCamera( pVECTORHANDLE pVector )
{
   VECTORCAMERA   camera;           /* Camera */
   L_TCHAR         szBuffer[ 80 ];   /* Buffer */

   /* Get camera */
   L_VecGetCamera( pVector, &camera );

   /* Format values into a buffer */
   wsprintf( szBuffer, 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 );
}