L_VecPhysicalToLogical

#include "lvkrn.h"

L_LVKRN_API L_INT L_VecPhysicalToLogical(pVector, pDst, pSrc)

Converts a Windows 2D POINT into a 3D VECTORPOINT.

Parameters

const pVECTORHANDLE pVector

Pointer to a vector handle.

pVECTORPOINT pDst

Pointer to a VECTORPOINT structure to be updated with the logical 3 dimensional point converted from the 2 dimensional point in pSrc.

const L_POINT * pSrc

Pointer to a POINT structure that contains a 2 dimensional point to be converted into a 3 dimensional point.

Returns

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

Comments

Converts a given 2D physical point into a logical (with X, Y, Z coordinates), 3D point.

The Z value of the destination 3D point will not be changed.

Conversion will be based on the current view port and camera values set in the VECTORHANDLE.

Required DLLs and Libraries

See Also

Functions

Topics

Example

This example will show the 3D point of a given 2D point on the vector drawing.

L_INT VecPhysicalToLogicalExample( 
   pVECTORHANDLE pVector, 
   POINT* ppt) 
{ 
   L_INT nRet; 
   VECTORPOINT Point; 
   L_TCHAR szBuffer[ 80 ]; 
 
   Point.z = 0.0; 
   nRet = L_VecPhysicalToLogical( pVector, &Point, ppt ); 
   if (nRet != SUCCESS) 
      return nRet; 
 
   _stprintf_s( szBuffer,80,TEXT("%f, %f, %f"), Point.x, Point.y, Point.z ); 
   MessageBox( NULL, szBuffer, TEXT("Point"), MB_OK ); 
 
   return SUCCESS; 
} 

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

LEADTOOLS Vector C API Help