HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_Prim.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: GU_Prim.h (GU Library, C++)
7  *
8  * COMMENTS: This contains functions that are common to all primitive types.
9  */
10 
11 #ifndef __GU_Prim_h__
12 #define __GU_Prim_h__
13 
14 #include "GU_API.h"
15 #include <UT/UT_Vector3.h>
16 #include <GA/GA_Types.h>
17 
18 class GEO_Primitive;
19 
20 /// Find the minimum distance between a primitive and a point
22  const GEO_Primitive &prim,
23  const UT_Vector3 &point,
24  float distmax = 1E17F, float *distance = 0,
25  float *u = 0, float *v = 0,
26  bool accurate = true);
27 
28 /// Find the minimum distance between two primitives.
29 /// (u1,v1) is place on prim1, (u2,v2) is place on prim2.
30 /// NOTE: This treats polygon primitives as just their edges,
31 /// not filled polygons.
33  const GEO_Primitive &prim1,
34  const GEO_Primitive &prim2,
35  float distmax = 1E17F, float *distance = 0,
36  float *u1 = 0, float *v1 = 0,
37  float *u2 = 0, float *v2 = 0,
38  bool accurate = true);
39 
40 // Finds the closest point on a primitive to a point.
41 // start_u, start_v, start_w is the uvw location of the point.
43  const GEO_Primitive &prim,
44  float start_u, float start_v, float start_w,
45  const UT_Vector3 &point);
46 
47 #endif
GU_API bool GUminimumDistPrimPoint(const GEO_Primitive &prim, const UT_Vector3 &point, float distmax=1E17F, float *distance=0, float *u=0, float *v=0, bool accurate=true)
Find the minimum distance between a primitive and a point.
const GLdouble * v
Definition: glcorearb.h:837
GU_API GA_Offset GUclosestPrimPoint(const GEO_Primitive &prim, float start_u, float start_v, float start_w, const UT_Vector3 &point)
GLfloat GLfloat GLfloat v2
Definition: glcorearb.h:818
GU_API bool GUminimumDistPrimPrim(const GEO_Primitive &prim1, const GEO_Primitive &prim2, float distmax=1E17F, float *distance=0, float *u1=0, float *v1=0, float *u2=0, float *v2=0, bool accurate=true)
GLdouble u1
Definition: glad.h:2676
GA_Size GA_Offset
Definition: GA_Types.h:641
#define GU_API
Definition: GU_API.h:14
GLdouble GLdouble u2
Definition: glad.h:2676
GLfloat GLfloat v1
Definition: glcorearb.h:817
SIM_API const UT_StringHolder distance