HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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  ~TS_MetaEllipsoid() override;
25 
26  float density(const UT_Vector3 &p) const override;
27  UT_Interval density(const UT_BoundingBox &p) const override;
28  float grad(const UT_Vector3 &point,
29  UT_Vector3 &grad) const override;
30  int setRay(const TS_Ray &ray) override;
31  float rayDensity(float t) const override;
32  UT_Interval rayDensity(const UT_Interval &t) const override;
33  void transform(const UT_Matrix4 &) override;
34 
35  // Get the matrix of this ellipsoid's quadric.
36  void getQuadricMatrix4(UT_Matrix4 &m) const;
37 
38  TS_MetaExpression *duplicate() const override;
39  void init() override;
40  void reset() override;
41  /// Compute memory usage (includes all shared memory)
42  /// NOTE: Must add in TS_MetaExpression::getMemoryUsage(false).
43  int64 getMemoryUsage(bool inclusive) const override;
44 
45 private:
46  TS_Quadric myQ;
47  fpreal64 myT2, myT1, myT0; // computed data for ray tracing
48 };
49 
50 #endif
virtual int setRay(const TS_Ray &ray)=0
virtual float density(const UT_Vector3 &p) const =0
double fpreal64
Definition: SYS_Types.h:201
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()
virtual void init()=0