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
fpreal64 zz
Definition: TS_Quadric.h:60
UT_Matrix4T< float > UT_Matrix4
GLdouble n
Definition: glcorearb.h:2007
const std::enable_if<!VecTraits< T >::IsVec, T >::type & max(const T &a, const T &b)
Definition: Composite.h:133
double fpreal64
Definition: SYS_Types.h:192
const Vec2< S > & operator*=(Vec2< S > &v, const Matrix33< T > &m)
Definition: ImathMatrix.h:3322
GA_API const UT_StringHolder transform
GLboolean r
Definition: glcorearb.h:1221
const std::enable_if<!VecTraits< T >::IsVec, T >::type & min(const T &a, const T &b)
Definition: Composite.h:129