HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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  ~TS_MetaSuperQuadric() override;
26 
27  float density(const UT_Vector3 &p) const override;
28  UT_Interval density(const UT_BoundingBox &p) const override;
29  float grad(const UT_Vector3 &point,
30  UT_Vector3 &grad) const override;
31  int setRay(const TS_Ray &ray) override;
32  float rayDensity(float t) const override;
33  UT_Interval rayDensity(const UT_Interval &t) const override;
34  void transform(const UT_Matrix4 &) override;
35  TS_MetaExpression *duplicate() const override;
36  void setXYexp(float arg);
37  float getXYexp() const;
38  void setZexp(float arg);
39  float getZexp() const;
40  void init() override;
41  void reset() override;
42  /// Compute memory usage (includes all shared memory)
43  /// NOTE: Must add in TS_MetaExpression::getMemoryUsage(false).
44  int64 getMemoryUsage(bool inclusive) const override;
45 
46 private:
47  void setLUTs();
48  float xyexp;
49  float zexp, xyzexp;
50  float izexp1, xyzexp1;
51  UT_LUT *xylut, *zlut, *izlut;
52  UT_LUT *xy1lut, *z1lut;
53  UT_Matrix4 m;
54  UT_Matrix4 im;
55  UT_Vector3 dir, anchor;
56  int hitFlag;
57 };
58 
59 #endif
virtual int setRay(const TS_Ray &ray)=0
virtual float density(const UT_Vector3 &p) const =0
auto arg(const Char *name, const T &arg) -> detail::named_arg< Char, T >
Definition: core.h:1736
Definition: TS_Ray.h:21
long long int64
Definition: SYS_Types.h:116
virtual float rayDensity(float t) const =0
virtual TS_MetaExpression * duplicate() const =0
GLdouble t
Definition: glad.h:2397
#define TS_API
Definition: api.h:41
virtual float grad(const UT_Vector3 &point, UT_Vector3 &grad) const =0
virtual void transform(const UT_Matrix4 &)=0
int64 getMemoryUsage(bool inclusive) const override=0
virtual void reset()
Definition: UT_LUT.h:29
virtual void init()=0