SilverScreen Solid Modeler

point_vs_polygon

point_vs_polygon

Previous topic Next topic  

point_vs_polygon

Previous topic Next topic JavaScript is required for the print function  

SilverScreenAPI

 

int point_vs_polygon ( char *path, int id, SS_XYZ *p )

 

char   *path;        // path to polygon's object

int     id;          // primitive ID of polygon

SS_XYZ *p;           // address of 3D point

 

 




Synopsis

#include "silver.h"

 

The point_vs_polygon function tests the relationship between the point at p and the polygon. The polygon is specified by path , which is the path to the object containing the polygon, and id , which is the polygon ID number.

 

 

Parameters

path is a null-terminated string that contains the full path name of the object that contains the polygon. id is the primitive ID of the polygon. p is the address of a 3D point.

 

 

Return Value

point_vs_polygon returns one of:

 

Name

Value

Meaning

NOT_FOUND

-3

The specified polygon was not found

FAILURE

-7

The specified polygon is improperly formed

PT_OFF_PLANE

5

The point is not on the plane of the polygon

ON_VERTEX

1

The point is a vertex of the polygon

ON_EDGE

2

The point lies on an edge of the polygon

PT_INSIDE

4

The point lies inside the polygon

PT_OUTSIDE

0

The point lies outside the polygon