HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TS_SuperQuad.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: TS_SuperQuad (C++)
7  *
8  * COMMENTS:
9  *
10  */
11 
12 #ifndef _TS_SuperQuad_h_
13 #define _TS_SuperQuad_h_
14 
15 #include "TS_API.h"
16 #include "TS_Primitive.h"
17 
18 class UT_LUT;
19 
21 {
22 public:
25  virtual ~TS_MetaSuperQuadric();
26  virtual float density(const UT_Vector3 &p) const;
27  virtual UT_Interval density(const UT_BoundingBox &p) const;
28  virtual float grad(const UT_Vector3 &point, UT_Vector3 &grad) const;
29  virtual int setRay(const TS_Ray &ray);
30  virtual float rayDensity(float t) const;
31  virtual UT_Interval rayDensity(const UT_Interval &t) const;
32  virtual void transform(const UT_Matrix4 &);
33  virtual TS_MetaExpression *duplicate() const;
34  void setXYexp(float arg);
35  float getXYexp() const;
36  void setZexp(float arg);
37  float getZexp() const;
38  virtual void init();
39  virtual void reset();
40  /// Compute memory usage (includes all shared memory)
41  /// NOTE: Must add in TS_MetaExpression::getMemoryUsage(false).
42  virtual int64 getMemoryUsage(bool inclusive) const;
43 
44 private:
45  void setLUTs();
46  float xyexp;
47  float zexp, xyzexp;
48  float izexp1, xyzexp1;
49  UT_LUT *xylut, *zlut, *izlut;
50  UT_LUT *xy1lut, *z1lut;
51  UT_Matrix4 m;
52  UT_Matrix4 im;
53  UT_Vector3 dir, anchor;
54  int hitFlag;
55 };
56 
57 #endif
#define TS_API
Definition: TS_API.h:10
virtual int setRay(const TS_Ray &ray)=0
virtual float density(const UT_Vector3 &p) const =0
long long int64
Definition: SYS_Types.h:100
Definition: TS_Ray.h:21
virtual float rayDensity(float t) const =0
virtual TS_MetaExpression * duplicate() const =0
virtual float grad(const UT_Vector3 &point, UT_Vector3 &grad) const =0
virtual void transform(const UT_Matrix4 &)=0
virtual void reset()
Definition: UT_LUT.h:28
virtual int64 getMemoryUsage(bool inclusive) const =0
virtual void init()=0