L_VecHideObject

#include "lvkrn.h"

L_INT EXT_FUNCTION L_VecHideObject(pVector, pObject, bHide)

const pVECTORHANDLE pVector;

/* pointer to a vector handle */

pVECTOROBJECT pObject;

/* pointer to a vector object */

L_BOOL bHide;

/* flag that indicates whether to hide or show an object */

Hides or shows an object.

Parameter

Description

pVector

Pointer to a vector handle. Objects within this vector handle will be hidden or shown.

pObject

Pointer to a VECTOROBJECT structure that references an object to be hidden or shown.

bHide

Flag that indicates whether to hide or show the specified object. Possible values are:

 

Value

Meaning

 

TRUE

Hide the specified object.

 

FALSE

Show the specified object.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

Hides or shows an object within the specified vector handle.

A hidden object will not be drawn. It will also not be returned when calling the L_VecHitTest function.

This function is not supported in the OpenGL and DirectX engines.

Please note that you will have to update the window to see the results of this function.

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_VecIsObjectHidden, L_VecSelectObject, L_VecIsObjectSelected, L_VecDeleteObject, L_VecHitTest, L_VecGetObject

Example

/* This example will hide the object under a given 2D point */

void HideObjectUnder( pVECTORHANDLE pVector, POINT L_FAR *pPoint )
{
   VECTOROBJECT  Object;    /* Object under point */
   L_INT nRet;

   /* Get object under that point */
   nRet = L_VecHitTest( pVector, pPoint, &Object );

   /* Is there an object under that point? */
   if( nRet == SUCCESS )
   {
      /* Yes, hide it */
      L_VecHideObject( pVector, &Object, TRUE );
   }
}