HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_SoftTransform.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_SoftTransform.h (GU Library, C++)
7  *
8  * COMMENTS:
9  * Applies a transformation based on a supplied distance attribute and a
10  * rolloff.
11  * This is related to the code in GEO_Transform.C, but we don't want to add
12  * yet another function to GEO_Detail, so it has been split off. The code
13  * there is still used for backwards compatibility, but should not be used
14  * in new code.
15  * Note that you are responsible for making empty group parameters become
16  * groups on the whole gdp. An empty group passed to one of these functions
17  * will cause an immediate return (meaning point normals won't be updated
18  * because nothing has been changed).
19  */
20 
21 #ifndef __GU_SoftTransform_h__
22 #define __GU_SoftTransform_h__
23 
24 #include "GU_API.h"
25 
26 #include <GA/GA_Handle.h>
27 
28 #include <GEO/GEO_Detail.h>
29 
30 #include <UT/UT_VectorTypes.h>
31 
33 class GA_PointGroup;
34 
35 class GEO_Delta;
36 class GEO_Rolloff;
37 
39  const GEO_Detail::LocalXformContext* local,
40  const UT_XformOrder& order,
41  float tx, float ty, float tz,
42  float rx, float ry, float rz,
43  float sx, float sy, float sz,
44  float s_xy, float s_xz, float s_yz,
45  float px, float py, float pz,
46  float prx, float pry, float prz,
47  const GEO_Rolloff* rolloff,
48  const GA_ROHandleF& distances,
49  const GA_PointGroup* ptgroup,
50  const bool keep_normal_length = true,
51  GEO_Delta* geodelta = NULL,
52  const GA_RWHandleF* falloff_output = NULL,
53  bool updateaffectednormals = false,
54  bool updateallnormals = false,
55  const char* attribpattern = NULL);
56 
58  const GEO_Detail::LocalXformContext* local,
59  const UT_XformOrder& order,
60  float tx, float ty, float tz,
61  float rx, float ry, float rz,
62  float sx, float sy, float sz,
63  float s_xy, float s_xz, float s_yz,
64  float px, float py, float pz,
65  float prx, float pry, float prz,
66  const GEO_Rolloff* rolloff,
67  const GA_ROHandleF& distances,
68  const GA_EdgeGroup* ptgroup,
69  const bool keep_normal_length = true,
70  GEO_Delta* geodelta = NULL,
71  const GA_RWHandleF* falloff_output = NULL,
72  bool updateaffectednormals = false,
73  bool updateallnormals = false,
74  const char* attribpattern = NULL);
75 
77  const UT_Vector3& delta,
78  const GEO_Rolloff* rolloff,
79  const GA_ROHandleF& distances,
80  const GA_PointGroup* ptgroup,
81  GEO_Delta* geodelta = NULL,
82  const GA_RWHandleF* falloff_output = NULL,
83  bool update_affected_normals = false,
84  bool update_all_normals = false,
85  const char* attrib_pattern = NULL);
86 
88  const UT_Vector3& delta,
89  const GEO_Rolloff* rolloff,
90  const GA_ROHandleF& distances,
91  const GA_EdgeGroup* edge_group,
92  GEO_Delta* geodelta = NULL,
93  const GA_RWHandleF* falloff_output = NULL,
94  bool update_affected_normals = false,
95  bool update_all_normals = false,
96  const char* attrib_pattern = NULL);
97 
98 // closest points is an attribute containing point indices for the lead point to
99 // follow normals from. If it doesn't contain a valid point index, it will be
100 // ignored for that point.
102  GEO_Detail* gdp,
103  const float distance,
104  const GEO_Rolloff* rolloff,
105  const GA_ROHandleF& distances,
106  const GA_PointGroup* ptgroup,
107  GEO_Delta* geodelta = NULL,
108  const GA_RWHandleF* falloff_output = NULL,
109  const GA_ROHandleID* closest_points = NULL,
110  const bool update_affected_normals = false,
111  bool update_all_normals = false);
112 
113 #endif
114 
void GU_API GUsoftTranslateEdges(GEO_Detail *gdp, const UT_Vector3 &delta, const GEO_Rolloff *rolloff, const GA_ROHandleF &distances, const GA_EdgeGroup *edge_group, GEO_Delta *geodelta=NULL, const GA_RWHandleF *falloff_output=NULL, bool update_affected_normals=false, bool update_all_normals=false, const char *attrib_pattern=NULL)
void GU_API GUsoftNormalTranslatePoints(GEO_Detail *gdp, const float distance, const GEO_Rolloff *rolloff, const GA_ROHandleF &distances, const GA_PointGroup *ptgroup, GEO_Delta *geodelta=NULL, const GA_RWHandleF *falloff_output=NULL, const GA_ROHandleID *closest_points=NULL, const bool update_affected_normals=false, bool update_all_normals=false)
void GU_API GUsoftTransformPoints(GEO_Detail *gdp, const GEO_Detail::LocalXformContext *local, const UT_XformOrder &order, float tx, float ty, float tz, float rx, float ry, float rz, float sx, float sy, float sz, float s_xy, float s_xz, float s_yz, float px, float py, float pz, float prx, float pry, float prz, const GEO_Rolloff *rolloff, const GA_ROHandleF &distances, const GA_PointGroup *ptgroup, const bool keep_normal_length=true, GEO_Delta *geodelta=NULL, const GA_RWHandleF *falloff_output=NULL, bool updateaffectednormals=false, bool updateallnormals=false, const char *attribpattern=NULL)
3D Vector class.
T distance(const UT_Vector4T< T > &v1, const UT_Vector4T< T > &v2)
Definition: UT_Vector4.h:698
#define GU_API
Definition: GU_API.h:12
void GU_API GUsoftTransformEdges(GEO_Detail *gdp, const GEO_Detail::LocalXformContext *local, const UT_XformOrder &order, float tx, float ty, float tz, float rx, float ry, float rz, float sx, float sy, float sz, float s_xy, float s_xz, float s_yz, float px, float py, float pz, float prx, float pry, float prz, const GEO_Rolloff *rolloff, const GA_ROHandleF &distances, const GA_EdgeGroup *ptgroup, const bool keep_normal_length=true, GEO_Delta *geodelta=NULL, const GA_RWHandleF *falloff_output=NULL, bool updateaffectednormals=false, bool updateallnormals=false, const char *attribpattern=NULL)
IFDmantra py
Definition: HDK_Image.dox:266
Class to efficiently transform multiple attributes.
void GU_API GUsoftTranslatePoints(GEO_Detail *gdp, const UT_Vector3 &delta, const GEO_Rolloff *rolloff, const GA_ROHandleF &distances, const GA_PointGroup *ptgroup, GEO_Delta *geodelta=NULL, const GA_RWHandleF *falloff_output=NULL, bool update_affected_normals=false, bool update_all_normals=false, const char *attrib_pattern=NULL)