HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_Attractor.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  */
7 
8 #ifndef __GU_Attractor_h__
9 #define __GU_Attractor_h__
10 
11 #include "GU_API.h"
12 #include <UT/UT_Vector3.h>
13 #include <GA/GA_AttributeRef.h>
14 #include <GA/GA_Handle.h>
15 
16 class GU_Detail;
17 class GU_AttractorOffsets;
18 class GU_PtAttractorOffsets;
19 
21 {
22 public:
23 
24  GU_Attractor();
25  ~GU_Attractor();
26 
27  void setAttractor (GU_Detail *gdp);
28  GU_Detail *getAttractor() const { return attractor; }
29 
30  // Get the force on a point/particle
31  GA_Offset getAttractorForce
32  (const UT_Vector3 &pos,
34  int singleAttractor = 0,
35  unsigned num = 0);
36 
37  void initPointAttractorForce();
38  void cleanPointAttractorForce();
39 
40 private:
41  GA_Offset getPointAttractorForce( const UT_Vector3 &pos,
43  int singleAttractor,
44  unsigned num);
45 
46  GU_Detail* attractor;
47  GU_AttractorOffsets* attOffsets;
48  GU_PtAttractorOffsets* ptAttOffsets;
49  GA_ROAttributeRef myNmlOffset;
50  GA_ROHandleV3 myNmlHandle;
51  int myComputedNormal;
52 };
53 
54 #endif
GU_Detail * getAttractor() const
Definition: GU_Attractor.h:28
GA_Size GA_Offset
Definition: GA_Types.h:641
This class provides a way to manage a reference to an attribute permitting Read-Only access...
#define GU_API
Definition: GU_API.h:14
SIM_API const UT_StringHolder force