HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SIM_SopGeometry.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 __SIM_SopGeometry_h__
9 #define __SIM_SopGeometry_h__
10 
11 #include "SIMZ_API.h"
12 #include <SIM/SIM_Geometry.h>
13 #include "SIMZ_Utils.h"
14 #include <UT/UT_WorkBuffer.h>
15 
16 #define SIM_SOPGEOMETRY_USESOPPATH "usesoppath"
17 // This SIM_Geometry implementation gets geometry from a SOP.
19 {
20 public:
21  // Access functions for our specific data.
27  GETSET_DATA_FUNCS_F("transformtime", TransformTime);
29 
30  GETSET_DATA_FUNCS_I("numstamps", NumberOfStamps);
31 
32  fpreal64 getStampValue(int stampno) const
33  { UT_WorkBuffer buf; buf.sprintf("stampvalue%d", stampno); return getOptions().getOptionF(buf.buffer()); }
34 
35  void getStampParam(UT_String &value, int stampno) const
36  { UT_WorkBuffer buf; buf.sprintf("stampname%d", stampno); return getOptions().getOptionS(buf.buffer(), value); }
37 
38 
39 protected:
40  explicit SIM_SopGeometry(const SIM_DataFactory *factory);
41  ~SIM_SopGeometry() override;
42 
43  // Method for accessing the geometry.
44  void handleModificationSubclass(int code) override;
45  void interpolateSubclass(const SIM_Data *source1,
46  const SIM_Data *source2,
47  fpreal interp) override;
48 
49 private:
50  void updateGeometryFromOptions();
51 
52  static const SIM_DopDescription *getSopGeometryDopDescription();
53 
57  "SOP Geometry",
58  getSopGeometryDopDescription());
59 };
60 
61 #endif
62 
#define SIM_SOPGEOMETRY_USESOPPATH
#define SIMZ_API
Definition: SIMZ_API.h:10
#define DECLARE_STANDARD_GETCASTTOTYPE()
Definition: SIM_DataUtils.h:50
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glcorearb.h:2540
#define GETSET_DATA_FUNCS_B(DataName, FuncName)
#define SIM_NAME_PRIMGROUP
Definition: SIMZ_Utils.h:28
GLsizei const GLfloat * value
Definition: glcorearb.h:824
SYS_FORCE_INLINE const char * buffer() const
#define GETSET_DATA_FUNCS_F(DataName, FuncName)
#define DECLARE_DATAFACTORY(DataClass, SuperClass, Description, DopParms)
Definition: SIM_DataUtils.h:63
double fpreal64
Definition: SYS_Types.h:201
void getStampParam(UT_String &value, int stampno) const
#define GETSET_DATA_FUNCS_I(DataName, FuncName)
virtual void handleModificationSubclass(int code)
int sprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
const SIM_Options & getOptions() const
#define SIM_NAME_USETRANSFORM
Definition: SIMZ_Utils.h:34
fpreal64 fpreal
Definition: SYS_Types.h:277
#define SIM_NAME_TIME
Definition: SIMZ_Utils.h:32
GETSET_DATA_FUNCS_S(SIM_NAME_POSITIONPATH, PositionPath)
#define SIM_NAME_LETSOPSINTERPOLATE
Definition: SIMZ_Utils.h:35
Definition: core.h:1131
fpreal64 getStampValue(int stampno) const
void interpolateSubclass(const SIM_Data *source1, const SIM_Data *source2, fpreal interp) override
fpreal64 getOptionF(const UT_StringRef &name) const
#define SIM_NAME_SOPPATH
Definition: SIMZ_Utils.h:31
const UT_StringHolder & getOptionS(const UT_StringRef &name) const