L_VecGetOrigin

#include "lvkrn.h"

L_INT EXT_FUNCTION L_VecGetOrigin(pVector, pOrigin)

const pVECTORHANDLE pVector;

/* pointer to a vector handle */

pVECTORPOINT pOrigin;

/* pointer to a vector point */

Gets the origin point for the specified vector handle.

Parameter

Description

pVector

Pointer to a vector handle.

pOrigin

Pointer to a VECTORPOINT structure to be updated with the origin point.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

The origin of a vector drawing may change whenever new objects are added. To insure that the drawing is centered around its origin, call L_VecSetOrigin(pVector, NULL) after adding objects.

The origin point may be set using L_VecSetOrigin.

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_VecSetOrigin.

Topics:

Working with Vector Handles

Example

void TestVecGetOrigin ( pVECTORHANDLE pVector )

{

   /* This example will show the origin of a vector image in a dialog box */

 

   VECTORPOINT Origin;

   L_TCHAR szBuffer[ 80 ];

 

   L_VecGetOrigin( pVector, &Origin );

   wsprintf( szBuffer, TEXT("%f, %f, %f"), Origin.x, Origin.y, Origin.z );

   MessageBox( NULL, szBuffer, TEXT("Origin At"), MB_OK );

}