HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_LocalTransform.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_LocalTransform.h ( GU Library, C++)
7 *
8 * COMMENTS:
9 * Declarations of functions and types for performing local transforms
10 * of components.
11 */
12 
13 #ifndef __GU_LocalTransform_h__
14 #define __GU_LocalTransform_h__
15 
16 #include <UT/UT_VectorTypes.h>
17 #include <GA/GA_Types.h>
18 #include <GA/GA_Breakpoint.h>
19 
20 #include <functional>
21 
22 class GA_Range;
23 class GEO_Detail;
24 class GEO_Delta;
25 
26 namespace GU_LocalTransform
27 {
28  template <typename FLOAT_T>
29  using GetXformFunc = std::function<UT_Matrix4T<FLOAT_T>(exint i)>;
30 
31  /// Transform a list of point islands.
32  /// PRE: No point can be in more than one island.
33  template <typename FLOAT_T>
35  GEO_Detail *gdp,
36  const GetXformFunc<FLOAT_T> &get_xform,
37  const GA_OffsetArray &points,
38  const UT_ExintArray &island_start_indices,
39  bool just_P = false,
40  bool keep_vector_lengths = true,
41  bool check_pasting = true,
42  bool neg_determinant_flipvector = true,
43  GEO_Delta *geodelta = 0,
44  bool updateaffectednormals = false,
45  const char *attribpattern = NULL);
46  /// Transform a list of primitive islands.
47  /// PRE: No point can be referenced by primitives in different islands.
48  template <typename FLOAT_T>
50  GEO_Detail *gdp,
51  const GetXformFunc<FLOAT_T> &get_xform,
52  const GA_OffsetArray &primitives,
53  const UT_ExintArray &island_start_indices,
54  bool just_P = false,
55  bool keep_vector_lengths = true,
56  bool check_pasting = true,
57  bool neg_determinant_flipvector = true,
58  GEO_Delta *geodelta = 0,
59  bool updateaffectednormals = false,
60  const char *attribpattern = NULL);
61 
62  /// Transform a list of primitive islands where the island point lists are
63  /// already extracted.
64  /// PRE: No point can be referenced by primitives in different islands.
65  /// PRE: island_start_indices.entries()==island_pts_start_indices.entries()
66  template <typename FLOAT_T>
68  GEO_Detail *gdp,
69  const GetXformFunc<FLOAT_T> &get_xform,
70  const GA_OffsetArray &primitives,
71  const UT_ExintArray &island_start_indices,
72  const GA_OffsetArray &island_pts,
73  const UT_ExintArray &island_pts_start_indices,
74  bool just_P = false,
75  bool keep_vector_lengths = true,
76  bool check_pasting = true,
77  bool neg_determinant_flipvector = true,
78  GEO_Delta *geodelta = 0,
79  bool updateaffectednormals = false,
80  const char *attribpattern = NULL);
81 
82  /// Transform a list of breakpoint islands.
83  /// PRE: No spline can be referenced by breakpoints in different islands.
84  template <typename FLOAT_T>
86  GEO_Detail *gdp,
87  const GetXformFunc<FLOAT_T> &get_xform,
88  const UT_Array<GA_Breakpoint> &bkpts,
89  const UT_ExintArray &island_start_indices,
90  bool just_P = false,
91  bool keep_vector_lengths = true,
92  bool check_pasting = true,
93  bool neg_determinant_flipvector = true,
94  GEO_Delta *geodelta = 0,
95  bool updateaffectednormals = false,
96  const char *attribpattern = NULL);
97 }
98 
99 #endif // __GU_LocalTransform_h__
void transformBreakpointIslands(GEO_Detail *gdp, const GetXformFunc< FLOAT_T > &get_xform, const UT_Array< GA_Breakpoint > &bkpts, const UT_ExintArray &island_start_indices, bool just_P=false, bool keep_vector_lengths=true, bool check_pasting=true, bool neg_determinant_flipvector=true, GEO_Delta *geodelta=0, bool updateaffectednormals=false, const char *attribpattern=NULL)
A range of elements in an index-map.
Definition: GA_Range.h:42
int64 exint
Definition: SYS_Types.h:120
void transformPointIslands(GEO_Detail *gdp, const GetXformFunc< FLOAT_T > &get_xform, const GA_OffsetArray &points, const UT_ExintArray &island_start_indices, bool just_P=false, bool keep_vector_lengths=true, bool check_pasting=true, bool neg_determinant_flipvector=true, GEO_Delta *geodelta=0, bool updateaffectednormals=false, const char *attribpattern=NULL)
GLuint GLdouble GLdouble GLint GLint const GLdouble * points
Definition: glew.h:3446
std::function< UT_Matrix4T< FLOAT_T >(exint i)> GetXformFunc
void transformPrimIslands(GEO_Detail *gdp, const GetXformFunc< FLOAT_T > &get_xform, const GA_OffsetArray &primitives, const UT_ExintArray &island_start_indices, bool just_P=false, bool keep_vector_lengths=true, bool check_pasting=true, bool neg_determinant_flipvector=true, GEO_Delta *geodelta=0, bool updateaffectednormals=false, const char *attribpattern=NULL)