HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GT_PointSplat.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: GT_PointSplat.h (GT Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __GT_POINTSPLAT_H_INCLUDED__
12 #define __GT_POINTSPLAT_H_INCLUDED__
13 
14 #include "GT_API.h"
15 #include "GT_VolumeUtil.h"
16 #include <UT/UT_TaskGroup.h>
18 #include <UT/UT_UniquePtr.h>
19 #include <SYS/SYS_Types.h>
20 
21 
22 namespace GT_PointSplat
23 {
24 
25 struct Chunk
26 {
28  : myPoints(/*capacity*/num_items)
29  , myNormals(/*capacity*/num_items)
30  {
31  }
32 
33  template <typename ChunkArrayT>
34  void
35  spawnCopyTask(UT_TaskGroup &tasks, ChunkArrayT &dst, exint dst_start) const
36  {
37  GTspawnCopyTask(tasks,
38  dst.myPoints, dst_start,
40  GTspawnCopyTask(tasks,
41  dst.myNormals, dst_start,
43  }
44 
45  template <typename ChunkArrayT>
46  void
47  runCopyTask(ChunkArrayT &dst, exint dst_start) const
48  {
49  GTrunCopyTask(dst.myPoints, dst_start, myPoints, myPoints.entries());
50  GTrunCopyTask(dst.myNormals, dst_start, myNormals, myNormals.entries());
51  }
52 
53  exint size() const { return myPoints.entries(); }
54 
57 };
58 
59 struct ChunkProxy
60 {
62  : myPoints(pnts), myNormals(nmls)
63  {
64  }
65 
67  {
68  myPoints.entries(num_items);
69  myNormals.entries(num_items);
70  }
71 
74 };
75 
77 
78 } // namespace GT_PointSplat
79 
80 #endif // __GT_POINTSPLAT_H_INCLUDED__
Chunk(exint num_items)
Definition: GT_PointSplat.h:27
UT_ThreadSpecificValue< UT_UniquePtr< Chunk > > ThreadChunks
Definition: GT_PointSplat.h:76
void spawnCopyTask(UT_TaskGroup &tasks, ChunkArrayT &dst, exint dst_start) const
Definition: GT_PointSplat.h:35
int64 exint
Definition: SYS_Types.h:125
void entries(exint num_items)
Definition: GT_PointSplat.h:66
UT_Vector3FArray myNormals
Definition: GT_PointSplat.h:56
UT_Vector3FArray myPoints
Definition: GT_PointSplat.h:55
num_items
Definition: UT_RTreeImpl.h:672
GT_Vec3ArrayProxy myPoints
Definition: GT_PointSplat.h:72
exint entries() const
Alias of size(). size() is preferred.
Definition: UT_Array.h:611
void entries(exint num_items)
Definition: GT_VolumeUtil.h:67
An array of numeric values (int32, int64, fpreal16, fpreal32, fpreal64)
Definition: GT_DANumeric.h:23
GLenum GLenum dst
Definition: glcorearb.h:1793
exint size() const
Definition: GT_PointSplat.h:53
void runCopyTask(ChunkArrayT &dst, exint dst_start) const
Definition: GT_PointSplat.h:47
GT_Vec3ArrayProxy myNormals
Definition: GT_PointSplat.h:73
ChunkProxy(GT_Real32Array &pnts, GT_Real32Array &nmls)
Definition: GT_PointSplat.h:61