HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GT_PrimTetra.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  * Produced by:
7  * Side Effects Software Inc
8  * 123 Front Street West, Suite 1401
9  * Toronto, Ontario
10  * Canada M5J 2M2
11  * 416-504-9876
12  *
13  * NAME: GT_PrimTetra.h ( GT Library, C++)
14  *
15  * COMMENTS:
16  */
17 
18 #ifndef __GT_PrimTetra__
19 #define __GT_PrimTetra__
20 
21 #include <GT/GT_GEOPrimCollect.h>
22 
23 namespace HDK_Sample {
24 
25 /// Hook to handle tesselation of tetra primitives
26 ///
27 /// When rendering tet primitives, collect all the tet primitives together,
28 /// then a single polygonal mesh is generated as a result.
30 {
31 public:
32  /// Register the GT collector
33  static void registerPrimitive(const GA_PrimitiveTypeId &id);
34 
35  /// Constructor. The @c id is used to bind the collector to the proper
36  /// primitive type.
38 
39  /// Destructor
40  virtual ~GT_PrimTetraCollect();
41 
42  /// Return a structure to capture all the tet primitives
43  virtual GT_GEOPrimCollectData *
45  const GT_RefineParms *parms) const;
46 
47  /// When refining a single tet primitive, we add it to the container
48  virtual GT_PrimitiveHandle
49  collect(const GT_GEODetailListHandle &geometry,
50  const GEO_Primitive *const* prim_list,
51  int nsegments,
53  /// At the end of collecting, the single outside skin is generated
54  virtual GT_PrimitiveHandle
55  endCollecting(const GT_GEODetailListHandle &geometry,
56  GT_GEOPrimCollectData *data) const;
57 private:
58  GA_PrimitiveTypeId myId;
59 };
60 
61 } // End HDK_Sample namespace
62 
63 #endif
virtual GT_PrimitiveHandle collect(const GT_GEODetailListHandle &geometry, const GEO_Primitive *const *prim_list, int nsegments, GT_GEOPrimCollectData *data) const
When refining a single tet primitive, we add it to the container.
Definition: GT_PrimTetra.C:58
Collection data container.
GT_PrimTetraCollect(const GA_PrimitiveTypeId &id)
Definition: GT_PrimTetra.C:36
GLboolean * data
Definition: glcorearb.h:130
static void registerPrimitive(const GA_PrimitiveTypeId &id)
Register the GT collector.
Definition: GT_PrimTetra.C:30
virtual GT_GEOPrimCollectData * beginCollecting(const GT_GEODetailListHandle &geometry, const GT_RefineParms *parms) const
Return a structure to capture all the tet primitives.
Definition: GT_PrimTetra.C:50
virtual GT_PrimitiveHandle endCollecting(const GT_GEODetailListHandle &geometry, GT_GEOPrimCollectData *data) const
At the end of collecting, the single outside skin is generated.
Definition: GT_PrimTetra.C:70
virtual ~GT_PrimTetraCollect()
Destructor.
Definition: GT_PrimTetra.C:45