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
vint4 max(const vint4 &a, const vint4 &b)
Definition: simd.h:4703
OIIO_FORCEINLINE const vint4 & operator/=(vint4 &a, const vint4 &b)
Definition: simd.h:4315
GLuint GLenum GLenum transform
Definition: glew.h:14742
fpreal64 zz
Definition: TS_Quadric.h:60
const GLdouble * m
Definition: glew.h:9124
UT_Matrix4T< float > UT_Matrix4
double fpreal64
Definition: SYS_Types.h:201
OIIO_FORCEINLINE const vint4 & operator+=(vint4 &a, const vint4 &b)
Definition: simd.h:4246
GLsizei n
Definition: glew.h:4040
HUSD_API bool eval(VtValue &val, T &ret_val)
const Vec2< S > & operator*=(Vec2< S > &v, const Matrix33< T > &m)
Definition: ImathMatrix.h:3322
GLfloat GLfloat p
Definition: glew.h:16321
GLdouble GLdouble GLdouble r
Definition: glew.h:1406
OIIO_FORCEINLINE const vint4 & operator-=(vint4 &a, const vint4 &b)
Definition: simd.h:4269
vint4 min(const vint4 &a, const vint4 &b)
Definition: simd.h:4694