HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TS_Quadric.h
Go to the documentation of this file.
1 /* quadric.h
2  *
3  * Copyright 1993,1994,1995 Algorithmic Arts, Inc.
4  * All Rights Reserved.
5  *
6  * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Algorithmic Arts, Inc.;
7  * the contents of this file may not be disclosed to third parties, copied or
8  * duplicated in any form, in whole or in part, without the prior written
9  * permission of Algorithmic Arts, Inc.
10  *
11  * AUTHOR:
12  * Dave Gordon
13  *
14  *
15  * $XDate: 1995/10/19 19:14:32 $
16  * $XRevision: 1.3 $
17  *
18  * Basic quadric surface data types.
19  *
20  */
21 
22 #ifndef _TS_QUADRIC_H_
23 #define _TS_QUADRIC_H_
24 
25 #include "TS_API.h"
26 #include <UT/UT_Vector3.h>
27 #include <UT/UT_Matrix4.h>
28 #include <UT/UT_DMatrix4.h>
29 #include <UT/UT_BoundingBox.h>
30 
31 class Conic;
32 
34 {
35  public:
36  TS_Quadric();
37  TS_Quadric(const UT_Matrix4 &);
38  operator UT_Matrix4() const;
39  TS_Quadric &operator*=(float rhs);
40  TS_Quadric &operator+=(float rhs);
41  TS_Quadric &operator/=(float rhs);
42  TS_Quadric &operator-=(float rhs);
43  void toMatrix4(UT_Matrix4 &m) const;
44  void fromMatrix4(const UT_Matrix4 &m);
45  void toMatrix4(UT_DMatrix4 &m) const;
46  void fromMatrix4(const UT_DMatrix4 &m);
47  void cylinder(const UT_Vector3 &p0, const UT_Vector3 &axis, float radius = 1.0F);
48  void sphere(const UT_Vector3 &center, float radius = 1.0F);
49  void planes(const UT_Vector3 &p0, const UT_Vector3 &n, float r);
50  void transform(const UT_Matrix4 &m);
51  void zeroTransform();
52  int computeBound(UT_Vector3 &min, UT_Vector3 &max) const;
53  int computeBound(UT_BoundingBox &bound) const;
54  fpreal64 eval(const UT_Vector3 &) const;
55  fpreal64 eval2(const UT_Vector3 &) const;
56  fpreal64 evalMix(const UT_Vector3 &p0, const UT_Vector3 &p1) const;
57  void evalGrad(const UT_Vector3 &p, UT_Vector3 &n) const;
58 
59 
60  fpreal64 xx, yy, zz, xy, xz, yz, xw, yw, zw, ww;
61 };
62 
63 
64 #endif // _TS_QUADRIC_H_
#define TS_API
Definition: TS_API.h:10
OIIO_FORCEINLINE const vint4 & operator/=(vint4 &a, const vint4 &b)
Definition: simd.h:4438
ImageBuf OIIO_API min(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
fpreal64 zz
Definition: TS_Quadric.h:60
UT_Matrix4T< float > UT_Matrix4
double fpreal64
Definition: SYS_Types.h:201
GLdouble n
Definition: glcorearb.h:2008
OIIO_FORCEINLINE const vint4 & operator+=(vint4 &a, const vint4 &b)
Definition: simd.h:4369
HUSD_API bool eval(VtValue &val, T &ret_val)
GA_API const UT_StringHolder transform
IMATH_HOSTDEVICE const Vec2< S > & operator*=(Vec2< S > &v, const Matrix22< T > &m) IMATH_NOEXCEPT
Vector-matrix multiplication: v *= m.
Definition: ImathMatrix.h:4660
ImageBuf OIIO_API max(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
OIIO_FORCEINLINE const vint4 & operator-=(vint4 &a, const vint4 &b)
Definition: simd.h:4392
GLboolean r
Definition: glcorearb.h:1222