L_VecPhysicalToLogical

#include "lvkrn.h"

L_INT EXT_FUNCTION L_VecPhysicalToLogical(pVector, pDst, pSrc)

const pVECTORHANDLE pVector;

/* pointer to a vector handle */

pVECTORPOINT pDst;

/* pointer to a VECTORPOINT structure */

const POINT L_FAR * pSrc;

/* pointer to a POINT structure */

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

Parameter

Description

pVector

Pointer to a vector handle.

pDst

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

pSrc

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

Returns

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.

Not supported in OpenGL or DirectX engines.

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_VecLogicalToPhysical, L_VecGetObjectParallelogram, L_VecGetObjectRect

Topics:

Viewing a Vector Image

Example

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

void ShowLogicalPoint( pVECTORHANDLE pVector, POINT *ppt )
{
   VECTORPOINT Point;
   L_TCHAR      szBuffer[ 80 ];

   Point.z = 0.0;
   L_VecPhysicalToLogical( pVector, &Point, ppt );

   wsprintf( szBuffer, TEXT("%f, %f, %f"), Point.x, Point.y, Point.z );
   MessageBox( NULL, szBuffer, TEXT("Point"), MB_OK );
}