HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GEO_Mirror.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 Library.
7  *
8  * COMMENTS: Geometry mirroring
9  *
10  */
11 #ifndef __GEO_Mirror_h__
12 #define __GEO_Mirror_h__
13 
14 #include "GEO_API.h"
15 #include <UT/UT_IntArray.h>
16 #include <UT/UT_Array.h>
17 #include <UT/UT_VectorTypes.h>
18 #include <UT/UT_Vector3.h>
19 
20 class GA_PrimitiveGroup;
22 class GEO_Detail;
23 
24 // Parameters for the mirror method
26 {
27 public:
28 
29  // Reverse option for primitives that have been mirrored
31  {
32  GEO_MIRROR_NO_REVERSE = 0,
33  GEO_MIRROR_REVERSE = 1,
34  GEO_MIRROR_REVERSE_U = 2,
35  GEO_MIRROR_REVERSE_V = 3
36  };
37 
38  // Constructor
39  GEO_MirrorParms(const GEO_Detail *src_gdp,
40  const GA_PrimitiveGroup *prims_to_mirror,
41  UT_Vector3 mirror_normal,
42  const UT_Vector3 &mirror_origin,
43  float dist,
44  bool keep_original,
45  GEO_ReverseOption reverse_direction,
46  bool consolidate_seam,
47  float consolidate_tolerance,
48  bool mirror_fast,
49  GA_GBPointRedirectArray *dest_to_src_ptarray,
50  UT_IntArray &newprims)
51  : mySourceGdp(src_gdp)
52  , myPrimsToMirror(prims_to_mirror)
53  , myMirrorNormal(mirror_normal)
54  , myMirrorOrigin(mirror_origin)
55  , myDist(dist)
56  , myKeepOriginal(keep_original)
57  , myReverseDirection(reverse_direction)
58  , myConsolidateSeam(consolidate_seam)
59  , myConsolidateTolerance(consolidate_tolerance)
60  , myMirrorFast(mirror_fast)
61  , myDestToSrcPointArray(dest_to_src_ptarray)
62  , myNewPrims(newprims)
63  , myPrimBase(0)
64  , myQuadricMatrices(0)
65  {
66  }
67 
68 
69  const GEO_Detail *mySourceGdp; // Source gdp
70  const GA_PrimitiveGroup *myPrimsToMirror; // Group belonging to srcgdp
71 
72  UT_Vector3 myMirrorNormal; // must be normalized
74  float myDist;
79 
80 
81 
82  // myMirrorFast option, when true, tells mirror that the geometry is all
83  // in place, all we have to do is move points. The redirect array must
84  // be not be null, and will be used to figure out how to map the points
85  // to be mirrored. If myMirrorFast is false and mySrcToDestPtArray exists
86  // then it is filled with the information you can use next time around.
89 
90  // This is an output when !myMirrorFast and an input if myMirrorFast is
91  // set. It is used rather than a group because it isn't carried around
92  // with the gdp.
94 
95  // This is the base number from which we offset the index into the
96  // quadric matrix array. The reason we need to keep around a quadric
97  // matrix array is if we're doing a fast mirror, we need to remember
98  // our original transform. And we avoid doing the redirect stuff we
99  // had to do for points.
102 };
103 
104 #endif
GA_API const UT_StringHolder dist
bool myConsolidateSeam
Definition: GEO_Mirror.h:77
UT_Array< UT_Matrix3D * > * myQuadricMatrices
Definition: GEO_Mirror.h:101
GEO_MirrorParms(const GEO_Detail *src_gdp, const GA_PrimitiveGroup *prims_to_mirror, UT_Vector3 mirror_normal, const UT_Vector3 &mirror_origin, float dist, bool keep_original, GEO_ReverseOption reverse_direction, bool consolidate_seam, float consolidate_tolerance, bool mirror_fast, GA_GBPointRedirectArray *dest_to_src_ptarray, UT_IntArray &newprims)
Definition: GEO_Mirror.h:39
const GEO_Detail * mySourceGdp
Definition: GEO_Mirror.h:69
const UT_Vector3 & myMirrorOrigin
Definition: GEO_Mirror.h:73
Class used to create a map of source points during merging.
bool myKeepOriginal
Definition: GEO_Mirror.h:75
float myConsolidateTolerance
Definition: GEO_Mirror.h:78
GEO_ReverseOption myReverseDirection
Definition: GEO_Mirror.h:76
GA_GBPointRedirectArray * myDestToSrcPointArray
Definition: GEO_Mirror.h:88
int64 exint
Definition: SYS_Types.h:116
const GA_PrimitiveGroup * myPrimsToMirror
Definition: GEO_Mirror.h:70
UT_IntArray & myNewPrims
Definition: GEO_Mirror.h:93
#define GEO_API
Definition: GEO_API.h:10
UT_Vector3 myMirrorNormal
Definition: GEO_Mirror.h:72