HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TS_Ellipsoid.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_Ellipsoid (C++)
7  *
8  * COMMENTS:
9  *
10  */
11 
12 #ifndef _TS_Ellipsoid_h_
13 #define _TS_Ellipsoid_h_
14 
15 #include "TS_API.h"
16 #include <UT/UT_Interval.h>
17 #include "TS_Primitive.h"
18 
20 {
21 public:
24  virtual ~TS_MetaEllipsoid();
25 
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 
34  // Get the matrix of this ellipsoid's quadric.
35  void getQuadricMatrix4(UT_Matrix4 &m) const;
36 
37  virtual TS_MetaExpression *duplicate() 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  TS_Quadric q;
46  fpreal64 myT2, myT1, myT0; // computed data for ray tracing
47 };
48 
49 #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
double fpreal64
Definition: SYS_Types.h:185
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()
virtual int64 getMemoryUsage(bool inclusive) const =0
virtual void init()=0