HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GU_AgentShapeDeformer.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_AgentShapeDeformer.h (GU Library, C++)
7  *
8  */
9 
10 #ifndef __GU_AgentShapeDeformer__
11 #define __GU_AgentShapeDeformer__
12 
13 #include "GU_API.h"
14 #include "GU_AgentShapeLib.h"
15 
16 #include <UT/UT_IntrusivePtr.h>
17 #include <UT/UT_StringHolder.h>
18 
19 class GA_Range;
20 class GU_Agent;
21 class GU_Detail;
22 
27 
28 /// Defines a deformer for an agent shape.
30  : public UT_IntrusiveRefCounter<GU_AgentShapeDeformer>
31 {
32 public:
34 
35  virtual ~GU_AgentShapeDeformer() = default;
36 
37  /// Unique identifier for the deformer. This is used when serializing
38  /// layers to JSON.
39  const UT_StringHolder &name() const { return myName; }
40 
41  /// Deform @p pt_range in @p gdp, which was unpacked from the given shape.
42  virtual void deform(GU_Detail &gdp, const GA_Range &pt_range,
43  const GU_AgentShapeLib::Shape &src_shape,
44  const GU_Agent &src_agent) const = 0;
45 
46 private:
47  UT_StringHolder myName;
48 };
49 
50 #endif
const UT_StringHolder & name() const
A reference counter base class for use with UT_IntrusivePtr.
A range of elements in an index-map.
Definition: GA_Range.h:42
Shape(GA_Offset offset)
Wrapper around hboost::intrusive_ptr.
#define GU_API
Definition: GU_API.h:11
GLuint const GLchar * name
Definition: glcorearb.h:785
Defines a deformer for an agent shape.