HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GT_PrimPolygonMesh.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_PrimPolygonMesh.h ( GT Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __GT_PrimPolygonMesh__
12 #define __GT_PrimPolygonMesh__
13 
14 #include "GT_API.h"
15 #include "GT_Primitive.h"
16 #include "GT_CountArray.h"
17 #include "GT_FaceSetMap.h"
18 #include "GT_AttributeMerge.h"
19 #include <GA/GA_Names.h>
20 
21 class GT_DataArray;
22 class GT_PrimPolygon;
23 class GT_AttributeList;
24 class UT_StringRef;
25 
26 /// Note this is all just copied from GEO_Normal
27 #define GT_DEFAULT_CUSP_ANGLE 60.0
28 
29 /// Magic tolerance factor of 1.001 on GT_DEFAULT_CUSP_ANGLE so that
30 /// hexagonal tubes will be smooth by default, even with a bit of roundoff
31 /// or slight deformation.
32 #define GT_DEFAULT_ADJUSTED_CUSP_ANGLE 60.06
33 
34 /// @brief A mesh of polygons
36 {
37 public:
38  /// Default constructor
40  : myVMerge()
41  , myUMerge()
42  , myConvexFlag(false)
43  {
44  }
45  /// Useful constructor
47  const GT_DataArrayHandle &vtx_indices,
50  const GT_AttributeListHandle &uniform,
51  const GT_AttributeListHandle &detail,
53  GT_Size min_vertex_count=0,
54  GT_Size max_vertex_count=0)
55  : myVMerge()
56  , myUMerge()
57  , myConvexFlag(false)
58  {
59  init(vtx_counts, vtx_indices, shared, vertex, uniform, detail,
60  indexing, min_vertex_count, max_vertex_count);
61  }
62 
63  GT_PrimPolygonMesh(const GT_CountArray &vtx_counts,
64  const GT_DataArrayHandle &vtx_indices,
67  const GT_AttributeListHandle &uniform,
68  const GT_AttributeListHandle &detail)
69  : myVMerge()
70  , myUMerge()
71  , myConvexFlag(false)
72  {
73  init(vtx_counts, vtx_indices, shared, vertex, uniform, detail);
74  }
75 
76  /// Copy the topology information from the source pmesh, but use different
77  /// attribute lists.
81  const GT_AttributeListHandle &uniform,
82  const GT_AttributeListHandle &detail);
83 
84  /// Create a new polygon mesh with re-mapped vertices (used by
85  /// removeUnusedPoints).
86  ///
87  /// Since the polygon faces are remapped you'll have to pass in a new face
88  /// set map.
90  const GT_DataArrayHandle &vtx_indices,
92 
93  /// Copy c-tor
95 
96  /// Construct a polygon mesh from a GT_PrimPolygon
98 
99  const char *className() const override { return "GT_PrimPolygonMesh"; }
100  bool save(UT_JSONWriter &w) const override;
101 
102  /// @{
103  /// Methods defined on GT_Primitive
104  void enlargeBounds(UT_BoundingBox boxes[],
105  int nsegments) const override;
106  int getPrimitiveType() const override;
107  bool refine(GT_Refine &refiner,
108  const GT_RefineParms *parms) const override;
109  int getMotionSegments() const override;
110  int64 getMemoryUsage() const override;
111  /// @}
112 
113  /// @{
114  /// Initialize the mesh
115  /// - @c vtx_counts @n
116  /// An integer array, representing the number of vertices in each face.
117  /// The length of the array determines the number of faces in the mesh.
118  /// - @c vtx_indices @n
119  /// An array of vertex references. There is an entry for every vertex in
120  /// every face. These indices refer to the shared attribute data.
121  /// - @c shared @n
122  /// Shared attribute data. This data is referenced by the vertex arrays.
123  /// - @c vertex @n
124  /// Unique data per vertex. The length of these attribute arrays should
125  /// be the same as the length of the vtx_indices array.
126  /// - @c uniform @n
127  /// Attribute per face. There should be one entry for each entry in the
128  /// @c vtx_counts array.
129  /// - @c detail @n
130  /// Constant attribute for all faces.
131  /// @c vtx_counts array.
132  /// - @c indexing @n
133  /// What type of indexing is required
134  void init(const GT_DataArrayHandle &vtx_counts,
135  const GT_DataArrayHandle &vtx_indices,
138  const GT_AttributeListHandle &uniform,
139  const GT_AttributeListHandle &detail,
141  GT_Size min_vertex_count=0,
142  GT_Size max_vertex_count=0);
143  void init(const GT_CountArray &vtx_counts,
144  const GT_DataArrayHandle &vtx_indices,
147  const GT_AttributeListHandle &uniform,
148  const GT_AttributeListHandle &detail);
149  /// @}
150 
151  /// Return the number of faces in the mesh
152  GT_Size getFaceCount() const;
153  /// Return a pointer to the individual face
154  GT_PrimitiveHandle getFace(GT_Offset i) const;
155 
156  /// Return the number of vertices
158  {
159  return myVertexList ? myVertexList->entries() : 0;
160  }
161  /// Return the number of points
163  {
164  return myShared ? myShared->get(0)->entries() : 0;
165  }
166 
167  /// @{
168  /// Query the minimum/maximum number of vertices per face
169  GT_Size getMinVertexCount() const { return myFaceOffsets.getMinCount();}
170  GT_Size getMaxVertexCount() const { return myFaceOffsets.getMaxCount();}
171  /// @}
172 
173  /// @{
174  /// Accessor
175  const GT_DataArrayHandle &getVertexList() const override
176  { return myVertexList; }
178  { return myFaceOffsets; }
179 #if 0
180  const GT_DataArrayHandle &getFaceOffsets() const
181  { return myFaceOffsets; }
182 #endif
184  { return myShared; }
186  { return myVertex; }
188  { return myUniform; }
190  { return myDetail; }
191  /// @}
192 
193  /// @{
194  /// Access to the point sets
195  const GT_ElementSetMapPtr &pointSetMap() const { return myPointSetMap; }
197  { myPointSetMap = v; }
198  void addPointSet(const UT_StringHolder &name,
199  const GT_ElementSetPtr &set);
200  /// @}
201 
202  /// @{
203  /// Access to the face sets
204  const GT_ElementSetMapPtr &faceSetMap() const { return myFaceSetMap; }
206  { myFaceSetMap = v; }
207  void addFaceSet(const UT_StringHolder &name,
208  const GT_ElementSetPtr &set);
209  /// @}
210 
211  /// Harden all attributes so there are no dangling dependencies
212  GT_PrimitiveHandle doHarden() const override;
214  { return new GT_PrimPolygonMesh(*this); }
215 
216  /// The virtual implementation of attribute merging
218  const GT_Primitive &src,
219  const UT_StringMMPattern *vertex,
220  const UT_StringMMPattern *point,
221  const UT_StringMMPattern *uniform,
222  const UT_StringMMPattern *detail
223  ) const override;
224 
225  /// @{
226  /// Access attributes
228  { return myVertex; }
230  { return myShared; }
232  { return myUniform; }
234  { return myDetail; }
235  /// @}
236 
237  /// Return the point index for a given face and vertex
238  GT_Offset getPoint(GT_Offset face, GT_Offset v) const;
239 
240  /// Return the offset into the vertex list for the given face
242  { return myFaceOffsets.getOffset(face); }
243  /// Return the length of the vertex list for the given face
245  { return myFaceOffsets.getCount(face); }
246  /// For a given face, find the shared point numbers for the given vertex
247  /// and the next vertex (i.e. the edge starting from the given vertex).
248  void getEdgePoints(GT_Offset face, GT_Offset vertex,
249  GT_Offset &p0, GT_Offset &p1) const;
250 
251  /// Returns true if this mesh has been convexed
252  bool isConvexed() const { return myConvexFlag; }
253 
254  /// Set the convex flag on the mesh
255  void setConvexed(bool c) { myConvexFlag = c; }
256 
257  /// Return an array containing the face counts per-face
259  getFaceCounts(GT_IndexingMode indexing=GT_INDEXING_QUICK) const;
260 
261  /// The polygon mesh may have shared points which aren't used. That is,
262  /// there may be elements in the shared element list which aren't
263  /// referenced by any vertex. This method will build a list of indices for
264  /// all the used points.
265  ///
266  /// The list returned will be monotonically ascending.
267  const GT_DataArrayHandle
268  getUsedPointList(GT_IndexingMode idx=GT_INDEXING_QUICK) const;
269 
270  /// Ensure all polygons in the mesh are convex
271  ///
272  /// If the @c holes set is passed in, then the faces in that set will be
273  /// excluded from the convexed result.
274  GT_PrimitiveHandle convex(int max_points_per_poly=3,
275  bool keep_degenerate = false,
276  bool allow_interrupt = true,
277  bool allow_indirect_flattening = false,
278  const UT_Set<int> *holes = nullptr) const;
279 
280  /// Using the indirect arrays and vertex list from a convexed mesh,
281  /// convex this mesh (assumes topology is the same).
282  GT_PrimitiveHandle adoptConvexing(
283  const GT_DataArrayHandle &verts,
284  const GT_DataArrayHandle &uniform_indexing,
285  const GT_DataArrayHandle &vertex_indexing,
286  const GT_DataArrayHandle &vert_info,
287  const GT_DataArrayHandle &prim_info,
288  bool allow_indirect_flattening=false)
289  const;
290 
291  /// Fetches the convexed arrays from the mesh, to be used by adoptConvexing
292  /// on a different mesh with the same topology. `base` is the original mesh
293  /// before convexing, used to avoid returning indexing arrays that weren't
294  /// added by the convex function.
295  void getConvexArrays(
296  GT_DataArrayHandle &verts,
297  GT_DataArrayHandle &uniform_indexing,
298  GT_DataArrayHandle &vertex_indexing,
299  GT_DataArrayHandle &point_indexing,
300  GT_DataArrayHandle &vert_info,
301  GT_DataArrayHandle &prim_info,
302  const GT_PrimPolygonMesh* base = nullptr) const;
303 
304  /// Remove unused points. This will collapse the varying point arrays,
305  /// leaving only the points referenced by the vertices.
306  UT_IntrusivePtr<GT_PrimPolygonMesh> removeUnusedPoints(
307  const int32 *idx=nullptr) const;
308 
309  /// @{
310  /// Compute face normals. This will use the shared attribute named P to
311  /// compute the normals for each face.
312  /// fpreal16 must have the proper vector length
313  bool faceNormals(UT_Vector3 *N,
314  int segment=0,
315  const UT_StringRef &P=GA_Names::P) const;
316  bool faceNormals(UT_Vector3D *N64,
317  int segment=0,
318  const UT_StringRef &P=GA_Names::P) const;
319  bool faceNormals(fpreal16 *N16,
320  int segment=0,
321  const UT_StringRef &P=GA_Names::P) const;
322  GT_DataArrayHandle faceNormals(int segment=0,
323  const UT_StringRef &P=GA_Names::P,
324  GT_Storage store=GT_STORE_REAL32) const;
325  /// @}
326 
327  /// @{
328  /// Compute shared normals. This will use the shared attribute named P to
329  /// compute the normals for each shared point.
330  bool pointNormals(UT_Vector3T<fpreal16> *N,
331  GT_Size npts,
332  int segment=0,
333  const UT_StringRef &P=GA_Names::P,
334  bool normalize=true,
335  const fpreal32 *pntdata = nullptr) const;
336  bool pointNormals(UT_Vector3 *N, GT_Size npts,
337  int segment=0,
338  const UT_StringRef &P=GA_Names::P,
339  bool normalize=true,
340  const fpreal32 *pntdata = nullptr) const;
341  bool pointNormals(UT_Vector3D *N, GT_Size npts,
342  int segment=0,
343  const UT_StringRef &P=GA_Names::P,
344  bool normalize=true,
345  const fpreal32 *pntdata = nullptr) const;
347  const UT_StringRef &P=GA_Names::P,
348  bool normalize=true,
349  const fpreal32 *pntdata = nullptr,
351  ) const override;
352  /// @}
353 
354  /// @{
355  /// Compute vertex normals. This will use the shared attribute named P to
356  /// compute the normals for each vertex.
357  bool vertexNormals(UT_Vector3T<fpreal16> *N,
358  GT_Size npts,
359  int segment=0,
360  const UT_StringRef &P=GA_Names::P,
361  fpreal maxangledegrees=GT_DEFAULT_ADJUSTED_CUSP_ANGLE,
362  bool normalize=true) const;
363  bool vertexNormals(UT_Vector3 *N,
364  GT_Size npts,
365  int segment=0,
366  const UT_StringRef &P=GA_Names::P,
367  fpreal maxangledegrees=GT_DEFAULT_ADJUSTED_CUSP_ANGLE,
368  bool normalize=true) const;
369  bool vertexNormals(UT_Vector3D *N,
370  GT_Size npts,
371  int segment=0,
372  const UT_StringRef &P=GA_Names::P,
373  fpreal maxangledegrees=GT_DEFAULT_ADJUSTED_CUSP_ANGLE,
374  bool normalize=true) const;
375  virtual GT_DataArrayHandle createVertexNormals(int segment=0,
376  const UT_StringRef &P=GA_Names::P,
377  fpreal maxangledegrees=GT_DEFAULT_ADJUSTED_CUSP_ANGLE,
378  bool normalize=true,
379  GT_Storage store =GT_STORE_REAL32) const;
380  /// @}
381 
382 
383  /// @brief Create point normals on a new mesh if no normals are found.
384  /// If no point or vertex normals are found, generate point normals from P
385  /// and return a new mesh. If normals are found, return NULL.
386  ///
387  /// If the segement is less than 0, normals for *all* segments will be
388  /// computed (if required)
389  GT_PrimPolygonMesh *createPointNormalsIfMissing(
390  const UT_StringRef &P=GA_Names::P,
391  bool normalize=true,
392  bool *error = nullptr) const;
393 
394  GT_PrimPolygonMesh *createVertexNormalsIfMissing(
395  const UT_StringRef &P=GA_Names::P,
396  fpreal cuspangledegrees=GT_DEFAULT_ADJUSTED_CUSP_ANGLE,
397  bool normalize=true,
398  bool *error = nullptr) const;
399 
400  /// Compress vertex normals to create an indexed array
401  GT_PrimPolygonMesh *compressVertexNormals(
402  fpreal compression_ratio=1.0) const;
403 
404  /// Compress all attribute arrays
405  GT_PrimPolygonMesh *compressAttributes(const char *pattern="*,^P",
406  fpreal compression_ratio=1.0) const;
407 
408  /// Create point normals and MikkT tangents on a new mesh if not found.
409  /// If either normals or tangents are not found, return a new mesh with
410  /// both generated. If both exist, return NULL.
411  GT_PrimPolygonMesh *createTangentsIfMissing(bool *error = nullptr);
412 
413  /// Create quick tangents (not MikkT) for fast viewer tangent generation.
414  /// Tangents are not created in this mesh.
415  /// NOTE: Not working very well yet.
416  bool createFastTangents(GT_DataArrayHandle *tanu_h,
417  GT_DataArrayHandle *tanv_h) const;
418 
419  /// @brief Divide a mesh into smaller meshes if it exceeds the poly_limit.
420  /// If this mesh has more than polygon_limit polygons, this will split the
421  /// mesh into multiple sub-meshes, attempting to keep them all roughly the
422  /// same number of polygons. If this mesh has fewer than polygon_limit
423  /// polygons, it will return false and not add any meshes to split_meshes.
424  /// If remove_unused_points is true, each submesh will have unused points
425  /// removed.
426  bool splitMesh(GT_Size polygon_limit,
427  UT_Array<GT_PrimitiveHandle> &split_meshes,
428  bool remove_unused_points = true) const;
429 
430  /// Partition a mesh into submeshes by the shop_materialpath attribute,
431  /// each with exact one material in a detail shop_materialpath attribute.
432  /// Returns false if shop_materialpath doesn't exist, isn't a uniform attrib,
433  /// or has only 1 material.
434  bool partitionByMaterial(const GT_DataArrayHandle &mat_id,
435  UT_Array<GT_PrimitiveHandle> &sub_meshes,
436  GT_Size polygon_limit = SYS_INT32_MAX) const;
437 
438  /// @{
439  /// Methods for GEO/GU support.
440  fpreal computePerimeter(int seg) const override;
441  fpreal computeSurfaceArea(int seg) const override;
442  fpreal computeVolume(const UT_Vector3 &ref_P, int seg) const override;
443  /// @}
444 
445  bool updateGeoPrim(const GU_ConstDetailHandle &dtl,
446  const GT_RefineParms &refine) override;
447 
448 protected:
449  void hardenAttributes();
450 
451  // We have "clone" methods so that sub-classes (i.e.
452  // GT_PrimSubdivisionMesh) can create an appropriate clone. These are used
453  // by methods internal when duplicating the mesh (i.e. removeUnusedPoints)
454  virtual GT_PrimPolygonMesh *clone(const GT_DataArrayHandle &vtx_counts,
455  const GT_DataArrayHandle &vtx_indices,
458  const GT_AttributeListHandle &uniform,
459  const GT_AttributeListHandle &detail,
461  GT_Size min_vertex_count=0,
462  GT_Size max_vertex_count=0) const
463  {
464  return new GT_PrimPolygonMesh(vtx_counts, vtx_indices,
465  shared, vertex, uniform, detail, indexing,
466  min_vertex_count, max_vertex_count);
467  }
468  virtual GT_PrimPolygonMesh *clone(const GT_CountArray &vtx_counts,
469  const GT_DataArrayHandle &vtx_indices,
472  const GT_AttributeListHandle &uniform,
473  const GT_AttributeListHandle &detail) const
474  {
475  return new GT_PrimPolygonMesh(vtx_counts, vtx_indices,
476  shared, vertex, uniform, detail);
477  }
480  const GT_AttributeListHandle &uniform,
481  const GT_AttributeListHandle &detail) const
482  {
483  return new GT_PrimPolygonMesh(*this, shared, vertex, uniform, detail);
484  }
485  virtual GT_PrimPolygonMesh *clone(const GT_DataArrayHandle &vtx_indices,
486  const GT_AttributeListHandle &shared) const
487  {
488  return new GT_PrimPolygonMesh(*this, vtx_indices, shared);
489  }
490 
495 
496 private:
497  template <typename VECTOR_T>
498  GT_DataArrayHandle getVertexNormalHandle(
499  const UT_StringRef &P_name,
500  int seg,
501  fpreal maxangledegrees,
502  bool normalize) const;
503  template <typename VECTOR_T>
504  bool computePointNormals(
506  GT_Size Nsize,
507  const UT_StringRef &P,
508  int segment,
509  bool normalize,
510  const fpreal32 *point_data) const;
511  template <typename VECTOR_T>
512  bool computeVertexNormals(
514  GT_Size Nsize,
515  const UT_StringRef &P,
516  int segment,
517  fpreal maxangledegrees,
518  bool normalize) const;
519 
520  bool createFastTangentsUV(const GT_DataArrayHandle &ph,
521  const GT_DataArrayHandle &uvh,
522  GT_Owner uv_owner,
523  GT_DataArrayHandle *tanuh,
524  GT_DataArrayHandle *tanvh) const;
525 
526  void makeMerge();
527 
528  GT_DataArrayHandle myVertexList;
529  GT_CountArray myFaceOffsets;
530  GT_ElementSetMapPtr myPointSetMap;
531  GT_ElementSetMapPtr myFaceSetMap;
532  UT_UniquePtr<GT_AttributeMerge> myVMerge, myUMerge;
533  bool myConvexFlag;
534 };
535 
536 #endif
537 
SIM_API const UT_StringHolder vertex
GT_Size getPointCount() const
Return the number of points.
GT_Storage
Definition: GT_Types.h:19
virtual int getMotionSegments() const =0
GT_PrimPolygonMesh(const GT_CountArray &vtx_counts, const GT_DataArrayHandle &vtx_indices, const GT_AttributeListHandle &shared, const GT_AttributeListHandle &vertex, const GT_AttributeListHandle &uniform, const GT_AttributeListHandle &detail)
const GT_AttributeListHandle & getVertexAttributes() const override
virtual bool updateGeoPrim(const GU_ConstDetailHandle &dtl, const GT_RefineParms &parms)
update any cached data for geometry and its attributes
int int32
Definition: SYS_Types.h:39
virtual bool refine(GT_Refine &refiner, const GT_RefineParms *parms=NULL) const
const GT_AttributeListHandle & getPointAttributes() const override
A mesh of polygons.
virtual int getPrimitiveType() const
#define SYS_INT32_MAX
Definition: SYS_Types.h:171
virtual fpreal computePerimeter(int seg=0) const
virtual fpreal computeVolume(const UT_Vector3 &ref_P, int seg=0) const
#define GT_DEFAULT_ADJUSTED_CUSP_ANGLE
const GLdouble * v
Definition: glcorearb.h:837
GT_Size getMinVertexCount() const
GT_Size getVertexCount(GT_Offset face) const
Return the length of the vertex list for the given face.
const GT_CountArray & getFaceCountArray() const
GT_AttributeListHandle myShared
GT_IndexingMode
Definition: GT_Types.h:106
void setFaceSetMap(const GT_ElementSetMapPtr &v)
#define GT_API
Definition: GT_API.h:13
void setPointSetMap(const GT_ElementSetMapPtr &v)
GT_PrimPolygonMesh(const GT_DataArrayHandle &vtx_counts, const GT_DataArrayHandle &vtx_indices, const GT_AttributeListHandle &shared, const GT_AttributeListHandle &vertex, const GT_AttributeListHandle &uniform, const GT_AttributeListHandle &detail, GT_IndexingMode indexing=GT_INDEXING_QUICK, GT_Size min_vertex_count=0, GT_Size max_vertex_count=0)
Useful constructor.
Class which writes ASCII or binary JSON streams.
Definition: UT_JSONWriter.h:37
GA_API const UT_StringHolder P
GT_Size getVertexCount() const
Return the number of vertices.
float fpreal32
Definition: SYS_Types.h:200
const GT_AttributeListHandle & getShared() const
bool isConvexed() const
Returns true if this mesh has been convexed.
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
Definition: UT_UniquePtr.h:39
< returns > If no error
Definition: snippets.dox:2
const GT_AttributeListHandle & getVertex() const
const GT_AttributeListHandle & getUniform() const
virtual GT_PrimPolygonMesh * clone(const GT_DataArrayHandle &vtx_counts, const GT_DataArrayHandle &vtx_indices, const GT_AttributeListHandle &shared, const GT_AttributeListHandle &vertex, const GT_AttributeListHandle &uniform, const GT_AttributeListHandle &detail, GT_IndexingMode indexing=GT_INDEXING_QUICK, GT_Size min_vertex_count=0, GT_Size max_vertex_count=0) const
GT_PrimPolygonMesh()
Default constructor.
Abstract data class for an array of float, int or string data.
Definition: GT_DataArray.h:40
GT_PrimitiveHandle doSoftCopy() const override
virtual fpreal computeSurfaceArea(int seg=0) const
constexpr auto set(type rhs) -> int
Definition: core.h:610
virtual GT_PrimPolygonMesh * clone(const GT_CountArray &vtx_counts, const GT_DataArrayHandle &vtx_indices, const GT_AttributeListHandle &shared, const GT_AttributeListHandle &vertex, const GT_AttributeListHandle &uniform, const GT_AttributeListHandle &detail) const
void setConvexed(bool c)
Set the convex flag on the mesh.
int64 GT_Offset
Definition: GT_Types.h:129
long long int64
Definition: SYS_Types.h:116
GT_Size getMaxVertexCount() const
GLuint const GLchar * name
Definition: glcorearb.h:786
GLushort pattern
Definition: glad.h:2583
The base class for all GT primitive types.
Definition: GT_Primitive.h:43
virtual GT_PrimitiveHandle doHarden() const
const char * className() const override
virtual int64 getMemoryUsage() const =0
virtual GT_PrimPolygonMesh * clone(const GT_DataArrayHandle &vtx_indices, const GT_AttributeListHandle &shared) const
Processes primitives generated by refinement process.
Definition: GT_Refine.h:20
GT_Owner
Definition: GT_Types.h:90
int64 GT_Size
Definition: GT_Types.h:128
GA_API const UT_StringHolder parms
GT_AttributeListHandle myVertex
GT_AttributeListHandle myUniform
fpreal64 fpreal
Definition: SYS_Types.h:278
const GT_AttributeListHandle & getDetailAttributes() const override
const GT_ElementSetMapPtr & faceSetMap() const
virtual bool save(UT_JSONWriter &w) const
FMT_CONSTEXPR basic_fp< F > normalize(basic_fp< F > value)
Definition: format.h:1701
GA_API const UT_StringHolder N
GT_Offset getVertexOffset(GT_Offset face) const
Return the offset into the vertex list for the given face.
GLubyte GLubyte GLubyte GLubyte w
Definition: glcorearb.h:857
OutGridT XformOp bool bool shared
virtual GT_DataArrayHandle createPointNormals(int segment=0, const UT_StringRef &P=GA_Names::P, bool normalize=true, const fpreal32 *pntdata=NULL, GT_Storage store=GT_STORE_REAL32) const
GT_AttributeListHandle myDetail
virtual GT_PrimPolygonMesh * clone(const GT_AttributeListHandle &shared, const GT_AttributeListHandle &vertex, const GT_AttributeListHandle &uniform, const GT_AttributeListHandle &detail) const
virtual GT_PrimitiveHandle doAttributeMerge(const GT_Primitive &src, const UT_StringMMPattern *vertex, const UT_StringMMPattern *point, const UT_StringMMPattern *uniform, const UT_StringMMPattern *detail) const
The virtual implementation of attribute merging.
virtual void enlargeBounds(UT_BoundingBox boxes[], int nsegments) const =0
Single closed polygon.
const GT_AttributeListHandle & getDetail() const
const GT_AttributeListHandle & getUniformAttributes() const override
const GT_ElementSetMapPtr & pointSetMap() const
const GT_DataArrayHandle & getVertexList() const override
GLenum src
Definition: glcorearb.h:1793