HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GEO_Breakpoint.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: GEO_Breakpoint (C++)
7  *
8  * COMMENTS:
9  * Utility methods for GA_Breakpoints.
10  *
11  */
12 
13 #ifndef __GEO_Breakpoint_h__
14 #define __GEO_Breakpoint_h__
15 
16 #include "GEO_API.h"
17 #include <GA/GA_Types.h>
18 #include <GA/GA_Breakpoint.h>
19 #include <UT/UT_VectorTypes.h>
20 
21 class GA_Basis;
22 class GEO_Detail;
23 
25 {
26 public:
27  typedef int (*iteratePointFuncPtr)(void *data, GEO_Detail &gdp,
28  GA_Offset ptoff);
29  typedef int (*iterateVertexFuncPtr)(void *data, GA_Offset vtx,
30  int linear_index);
31 
32  // Compute the location of the breakpoint. Return 0 if OK, else -1.
33  static int evaluate(const GA_Breakpoint &bkpt, UT_Vector4 &pos,
34  int du=0, int dv=0);
35 
36  // This method performs the iterateFunc on all the CVs affecting the
37  // breakpoint and returns the sum of the results.
38  static int iterateOverCVs(const GA_Breakpoint &bkpt,
39  void *data, iteratePointFuncPtr func);
40  static int iterateOverCVs(const GA_Breakpoint &bkpt,
41  void *data, iterateVertexFuncPtr func);
42 
43  // These methods return the knot indices corresponding to the breakpoint,
44  // or the parameter values at these knot indices. Pointers to the bases
45  // are returned in ubasis_ret and vbasis_ret, if these arguments are
46  // not nil.
47  static void getKnotIndices(const GA_Breakpoint &bkpt,
48  int &ukidx, int &vkidx,
49  const GA_Basis **ubasis_ret=0,
50  const GA_Basis **vbasis_ret=0);
51  static void getParameter(const GA_Breakpoint &bkpt,
52  float &u, float &v);
53 };
54 
55 #endif
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
GLboolean * data
Definition: glcorearb.h:131
const GLdouble * v
Definition: glcorearb.h:837
GA_Size GA_Offset
Definition: GA_Types.h:641
#define GEO_API
Definition: GEO_API.h:14
Bezier or NURBS basis classes which maintain knot vectors.
Definition: GA_Basis.h:49
GLenum func
Definition: glcorearb.h:783
Definition: format.h:895