31 #ifndef __HDK_GU_Copy2_h__
32 #define __HDK_GU_Copy2_h__
55 namespace HDK_Sample {
194 "Array above depends on owners other than detail being less than 3");
212 "Array above depends on owners other than detail being less than 3");
240 const bool transform_using_more_than_P,
241 const bool allow_implicit_N,
242 bool &transforms_changed);
244 namespace NeededTransforms {
277 exint *num_source_attribs =
nullptr,
278 bool has_transform_matrices =
false,
279 bool *needed_transforms =
nullptr,
283 exint *num_target_attribs =
nullptr);
288 exint num_target_points,
289 bool transforms_changed,
300 const exint ncopies);
315 const exint source_point_count,
316 const exint source_vertex_count,
317 const exint source_prim_count,
323 const exint ncopies);
328 const exint num_packed_prims);
335 const exint num_target_points,
338 const exint *
const num_source_attribs,
339 const bool no_transforms,
340 const bool had_transform_matrices,
341 const bool has_transform_matrices,
342 const bool topology_changed,
343 const bool transforms_changed,
347 const exint *
const target_to_piecei =
nullptr,
357 const exint source_point_count,
358 const exint source_vertex_count,
359 const exint source_prim_count,
360 const exint *
const num_target_attribs,
365 const bool topology_changed,
366 const exint *
const target_to_piecei =
nullptr,
376 const bool had_transform_matrices,
377 const exint num_packed_prims,
391 const bool topology_changed,
392 const bool had_transform_matrices,
420 bool source_topology_changed,
421 bool had_transform_matrices,
422 bool transforms_changed,
423 const exint num_packed_prims,
435 template <
typename T>
436 struct DefaultClearer;
461 static const bool clearNeedsDestruction =
false;
466 template <
typename T>
467 struct DefaultClearer;
471 struct DefaultClearer<GA_OffsetList>
488 static const bool clearNeedsDestruction =
false;
void GUcopyPackAllSame(GU_Detail *output_geo, const GEO_ViewportLOD lod, const GU_CopyToPointsCache::PackedPivot pivot_type, GU_CopyToPointsCache *cache, const GU_ConstDetailHandle source_handle, const GU_Detail *source, const GA_PointGroup *source_pointgroup, const GA_PrimitiveGroup *source_primgroup, bool source_topology_changed, bool had_transform_matrices, bool transforms_changed, const exint num_packed_prims, const GU_Detail *target, const GA_OffsetListRef *target_point_list, GU_CopyToPointsCache::TargetAttribInfoMap *target_attrib_info, GU_CopyToPointsCache::TargetAttribInfoMap *target_group_info)
SYS_FORCE_INLINE void clear()
clear removes all of the entries
void GUcreatePointOrPrimList(GA_OffsetList &offset_list, const GU_Detail *const detail, const GA_ElementGroup *const group, const GA_AttributeOwner owner)
GA_DataId myPrevSourceGroupDataID
void GUcopyAttributesFromSource(GU_Detail *const output_geo, const GA_SplittableRange *const output_splittable_ranges, const GU_Detail *const source, const exint num_target_points, GU_CopyToPointsCache *const cache, const GA_OffsetList *const source_offset_lists, const exint *const num_source_attribs, const bool no_transforms, const bool had_transform_matrices, const bool has_transform_matrices, const bool topology_changed, const bool transforms_changed, const GU_Detail *const target, const GU_CopyToPointsCache::TargetAttribInfoMap *const target_attrib_info, const GU_CopyToPointsCache::TargetAttribInfoMap *const target_group_info, const exint *const target_to_piecei, const UT_Array< exint > *const owner_piece_offset_starts, const GU_CopyToPointsCache::PieceData *const piece_data)
void GUupdatePackedPrimTransforms(GU_Detail *output_geo, GU_CopyToPointsCache *cache, const bool had_transform_matrices, const exint num_packed_prims, const UT_Vector3 *const constant_pivot)
UT_ArrayStringMap< GA_DataId > mySourceGroupDataIDs[3]
GA_OffsetList myTargetOffsetList
GA_OffsetListType< GA_Size > GA_OffsetList
GA_OffsetList is a map from index to offset.
GA_DataId myTargetIDAttribDataID
void GUcreateVertexListAndGeometryFromSource(GU_Detail *output_geo, const GU_Detail *const source, const exint source_point_count, const exint source_vertex_count, const exint source_prim_count, const GA_OffsetList &source_point_list_cache, GA_OffsetList &source_vertex_list_cache, const GA_OffsetList &source_prim_list_cache, const GA_PointGroup *const source_pointgroup, const GA_PrimitiveGroup *const source_primgroup, const exint ncopies)
SYS_FORCE_INLINE bool getExtraFlag() const
Synonym for isClosed()
void GUcomputeTransformTypeCaches(GU_PointTransformCache *cache, exint num_target_points, bool transforms_changed, const bool needed_transforms[NeededTransforms::num_needed_transforms])
void GUcreateGeometryFromSource(GU_Detail *output_geo, const GU_Detail *const source, const GA_OffsetList &source_point_list_cache, const GA_OffsetList &source_vertex_list_cache, const GA_OffsetList &source_prim_list_cache, const exint ncopies)
NOTE: This does not clear output_geo.
exint myPrevSourceMetaCacheCount
void GUcopyAttributesFromTarget(GU_Detail *const output_geo, const GA_SplittableRange *const output_splittable_ranges, const exint ncopies, GU_CopyToPointsCache *const cache, const exint source_point_count, const exint source_vertex_count, const exint source_prim_count, const exint *const num_target_attribs, const GA_OffsetListRef &target_point_list, const GU_Detail *const target, GU_CopyToPointsCache::TargetAttribInfoMap &target_attrib_info, GU_CopyToPointsCache::TargetAttribInfoMap &target_group_info, const bool topology_changed, const exint *const target_to_piecei, const UT_Array< exint > *const owner_piece_offset_starts, const GU_CopyToPointsCache::PieceData *const piece_data)
#define GA_INVALID_DATAID
static SYS_FORCE_INLINE void clear(GA_OffsetList &v)
exint GA_Size
Defines the bit width for index and offset types in GA.
GA_DataId myPrevSourceTopologyDataID
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
GA_DataId myPrevSourcePrimListDataID
GA_DataId mySourceIDAttribOwner
bool myHasContiguousPoints
bool myPrevHadTargetGroup
SYS_FORCE_INLINE bool isTrivial() const
GA_Size myPrevTargetPtCount
static SYS_FORCE_INLINE bool isClear(const HDK_Sample::GU_CopyToPointsCache::TargetAttribInfo &v)
GA_AttributeOwner myCopyTo
GEO_ViewportLOD myPrevViewportLOD
void GUcreateEmptyPackedGeometryPrims(GU_Detail *const output_geo, const exint num_packed_prims)
static constexpr int theNumAttribs
void GUsetupPointTransforms(GU_PointTransformCache *cache, const GA_OffsetListRef &target_point_list, const GU_Detail *target, const bool transform_using_more_than_P, const bool allow_implicit_N, bool &transforms_changed)
GLsizei GLsizei GLchar * source
UT_SmallArray< std::pair< int, exint >, sizeof(std::pair< int, exint >)> myPrimTypeCountPairs
GA_PolyCounts myVertexListSizeList
UT_Array< PieceData > myPieceData
UT_ArrayStringMap< GA_DataId > mySourceAttribDataIDs[3]
GA_OffsetList mySourceOffsetLists[3]
exint myPrevOutputDetailID
GA_OffsetList mySourceOffsetLists[3]
UT_SmallArray< exint, 2 *sizeof(exint)> myClosedSpanLengths
exint mySourceVertexCount
void GUhandleTargetAttribsForPackedPrims(GU_Detail *output_geo, GU_CopyToPointsCache *cache, const bool topology_changed, const bool had_transform_matrices, const GU_Detail *const target, const GA_OffsetListRef &target_point_list, GU_CopyToPointsCache::TargetAttribInfoMap &target_attrib_info, GU_CopyToPointsCache::TargetAttribInfoMap &target_group_info, const UT_Vector3 *const constant_pivot)
GA_DataId mySourceIDAttribDataID
void GUaddAttributesFromSourceOrTarget(GU_Detail *output_geo, const GU_Detail *source, exint *num_source_attribs, bool has_transform_matrices, bool *needed_transforms, const GU_Detail *target, GU_CopyToPointsCache::TargetAttribInfoMap *target_attrib_info, GU_CopyToPointsCache::TargetAttribInfoMap *target_group_info, exint *num_target_attribs)
UT_Array< exint > myPieceOffsetStarts[3]
UT_Array< exint > myTargetToPiece
void GUremoveUnnecessaryAttribs(GU_Detail *output_geo, const GU_Detail *source, const GU_Detail *target, GU_CopyToPointsCache *cache, const GU_CopyToPointsCache::TargetAttribInfoMap *target_attrib_info, const GU_CopyToPointsCache::TargetAttribInfoMap *target_group_info)
SYS_STATIC_ASSERT_MSG(int(GA_ATTRIB_VERTEX)< 3 &&int(GA_ATTRIB_POINT)< 3 &&int(GA_ATTRIB_PRIMITIVE)< 3,"Array above depends on owners other than detail being less than 3")
static SYS_FORCE_INLINE void clearConstruct(HDK_Sample::GU_CopyToPointsCache::TargetAttribInfo *p)
static SYS_FORCE_INLINE bool isClear(const GA_OffsetList &v)
AttribCombineMethod myCombineMethod
UT_ArrayStringMap< GA_DataId > mySourceEdgeGroupDataIDs
SYS_STATIC_ASSERT_MSG(int(GA_ATTRIB_VERTEX)< 3 &&int(GA_ATTRIB_POINT)< 3 &&int(GA_ATTRIB_PRIMITIVE)< 3,"Array above depends on owners other than detail being less than 3")
exint myRefCount
This is the number of target points that reference this piece.
PackedPivot myPrevPivotEnum
SYS_FORCE_INLINE ToType trivialStart() const
Returns the start, assuming this list is trivial.
TargetAttribInfoMap myTargetGroupInfo
bool myPrevHadSourceGroup
GA_ListType< exint, exint > myRelVtxToPt
This maps from the index into mySourceVertex to the index into mySourcePoints.
exint myPrevSourceUniqueID
These are only used when myPrevPack is true.
TargetAttribInfoMap myTargetAttribInfo
GA_DataId myPrevTargetGroupDataID
SYS_FORCE_INLINE FromType size() const
Returns the number of used elements in the list (always <= capacity())
static SYS_FORCE_INLINE void clear(HDK_Sample::GU_CopyToPointsCache::TargetAttribInfo &v)
static SYS_FORCE_INLINE void clearConstruct(GA_OffsetList *p)