Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


  >  Docs Center  >  Libraries  >  Salvaggio  >  POINT_INSIDE_TRIANGULAR_FACET

POINT_INSIDE_TRIANGULAR_FACET

POINT_INSIDE_TRIANGULAR_FACET

Name


    POINT_INSIDE_TRIANGULAR_FACET

Purpose


    This function determines whether a provided point (or set of points) falls
    within the boundaries of a triangular facet. This function uses the
    technique based upon the barycentric coordinate test described at
    http://www.devmaster.net/wiki/Ray-triangle_intersection.

Category


    Graphics.

Calling Sequence


    Result = POINT_INSIDE_TRIANGULAR_FACET( point, facet )

Inputs


    point
      A 3-element vector containing the x,y,z coordinate -OR- an
      array of 3-element vectors (3xN) containing the x,y,z coordinates
      of the point(s) to be evaluated to see if they fall within
      the provided triangular facet
    facet
      A structure containing the vertices of a triangular facet - the tags
      are POINT1, POINT2, and POINT3 and these represent the 3-dimensional
      coordinates, defined as a 3-element vector, for the vertices in
      counter-clockwise order so that the right-hand rule holds for defining
      the surface normal

Keyword Parameters


    None
   

Result


    A boolean status flag (or vector of flags) indicating whether the provided
    point (or set of points) are contained within the triangular boundary
    specified; 1 indicates the point is contained in the boundary, 0 indicates
    it does not.

Side Effects


    None

Requires


    REPLICATE_VECTOR

Modification History


    Written by: Carl Salvaggio
    September, 2009 Original code
 

Disclaimer


    This source code is provided "as is" and without warranties as to performance
    or merchantability. The author and/or distributors of this source code may
    have made statements about this source code. Any such statements do not
    constitute warranties and shall not be relied on by the user in deciding
    whether to use this source code.
    This source code is provided without any express or implied warranties
    whatsoever. Because of the diversity of conditions and hardware under which
    this source code may be used, no warranty of fitness for a particular purpose
    is offered. The user is advised to test the source code thoroughly before
    relying on it. The user must assume the entire risk of using the source code.



© 2018 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us