HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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_SharedPtr.h>
17 #include <UT/UT_Task.h>
19 #include <SYS/SYS_Types.h>
20 
21 
22 namespace GT_PointSplat
23 {
24 
25 struct Chunk
26 {
27  Chunk(exint num_items)
28  : myPoints(/*capacity*/num_items)
29  , myNormals(/*capacity*/num_items)
30  {
31  }
32 
33  template <typename ChunkArrayT>
34  exint
35  appendCopyTask(UT_TaskList &tasks, ChunkArrayT &dst, exint dst_start) const
36  {
37  GTappendCopyTask(tasks,
38  dst.myPoints, dst_start,
40  GTappendCopyTask(tasks,
41  dst.myNormals, dst_start,
43  return myPoints.entries();
44  }
45 
48 };
49 
50 struct ChunkProxy
51 {
53  : myPoints(pnts), myNormals(nmls)
54  {
55  }
56 
57  void entries(exint num_items)
58  {
59  myPoints.entries(num_items);
60  myNormals.entries(num_items);
61  }
62 
65 };
66 
68 
69 } // namespace GT_PointSplat
70 
71 #endif // __GT_POINTSPLAT_H_INCLUDED__
Chunk(exint num_items)
Definition: GT_PointSplat.h:27
exint appendCopyTask(UT_TaskList &tasks, ChunkArrayT &dst, exint dst_start) const
Definition: GT_PointSplat.h:35
int64 exint
Definition: SYS_Types.h:109
void entries(exint num_items)
Definition: GT_PointSplat.h:57
UT_Vector3FArray myNormals
Definition: GT_PointSplat.h:47
void GTappendCopyTask(UT_TaskList &tasks, DstArrayT &dst, exint dst_start, SrcArrayT &src, exint num_elems)
Used to create an UT_TaskList of array copy tasks.
UT_Vector3FArray myPoints
Definition: GT_PointSplat.h:46
GT_Vec3ArrayProxy myPoints
Definition: GT_PointSplat.h:63
UT_ThreadSpecificValue< UT_SharedPtr< Chunk > > ThreadChunks
Definition: GT_PointSplat.h:67
exint entries() const
Alias of size(). size() is preferred.
Definition: UT_Array.h:446
GLenum GLenum dst
Definition: glcorearb.h:1792
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
GT_Vec3ArrayProxy myNormals
Definition: GT_PointSplat.h:64
ChunkProxy(GT_Real32Array &pnts, GT_Real32Array &nmls)
Definition: GT_PointSplat.h:52