LVectorBase::GetCamera

#include "ltwrappr.h"

virtual L_INT LVectorBase::GetCamera(pVectorCamera)

pVECTORCAMERA pVectorCamera;

/* pointer to a structure */

Gets the current camera values.

Parameter

Description

pVectorCamera

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

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 LVectorBase::Paint.

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:

LVectorBase::SetCamera, LVectorBase::Paint

Topics:

Manipulating the Camera

 

Vector Images: Viewing a Vector Image

Example

/* LVectorBase::GetCamera() */
/* LVectorBase::SetCamera() */
//
/* Example14*/
L_VOID Example14(HWND hWnd)

 VECTORCAMERA camera;
 L_TCHAR   szTemp[300];
 LVectorBase  Vector;

 

Vector.Load(TEXT("test.dxf"));

 

Vector.GetCamera(&camera);
 
 wsprintf(  szTemp, 
      TEXT("New Camera\nTheta[%f]\nPhi[%f]\nLookAt[%f,%f,%f]\nDistance[%lf]\nPerspective[%s]"), 
      camera.Theta,
      camera.Phi,
      camera.LookAt.x,
      camera.LookAt.y,
      camera.LookAt.z,
      camera.Distance,
      camera.bPerspective? TEXT("TRUE"): TEXT("FALSE")
      );


  MessageBox(hWnd, szTemp, TEXT(""), MB_OK);
 
  camera.Theta +=20;
  Vector.SetCamera(&camera);
 
  wsprintf(  szTemp, 
      TEXT("New Camera\nTheta[%f]\nPhi[%f]\nLookAt[%f,%f,%f]\nDistance[%lf]\nPerspective[%s]"), 
      camera.Theta,
      camera.Phi,
      camera.LookAt.x,
      camera.LookAt.y,
      camera.LookAt.z,
      camera.Distance,
      camera.bPerspective? TEXT("TRUE"): TEXT("FALSE")
      );
  MessageBox(hWnd, szTemp, TEXT(""), MB_OK);
}