HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TS_Ray.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_Ray (C++)
7  *
8  * COMMENTS:
9  *
10  */
11 
12 #ifndef _TS_Ray_h_
13 #define _TS_Ray_h_
14 
15 #include "TS_API.h"
16 #include <UT/UT_Vector3.h>
17 #include <UT/UT_Interval.h>
18 #include <UT/UT_BoundingBox.h>
20 
22 {
23  public:
24  inline TS_Ray(const UT_Vector3 &xdir, const UT_Vector3 &xanchor,
25  int thread_num = -1);
26  int rayBoxHit(const UT_BoundingBox &box, UT_Interval &t) const;
27 
28  // Sets up multiple ray counts for use by seperate threads
29  static void setupThreads(int num_threads);
30  public:
33  int index;
35 };
36 
37 inline TS_Ray::TS_Ray(const UT_Vector3 &pdir, const UT_Vector3 &panchor,
38  int thread_num)
39 {
40  this->dir = pdir; this->anchor = panchor;
41 
42  index = ourRaySerial.get()+1;
44 }
45 
46 #endif
TS_Ray(const UT_Vector3 &xdir, const UT_Vector3 &xanchor, int thread_num=-1)
Definition: TS_Ray.h:37
UT_Vector3 dir
Definition: TS_Ray.h:31
static UT_ThreadSpecificValue< int > ourRaySerial
Definition: TS_Ray.h:34
Definition: TS_Ray.h:21
int index
Definition: TS_Ray.h:33
UT_Vector3 anchor
Definition: TS_Ray.h:32
GLdouble t
Definition: glad.h:2397
#define TS_API
Definition: api.h:41
GLuint index
Definition: glcorearb.h:786