13 #ifndef __GU_Copy2_h__
14 #define __GU_Copy2_h__
43 myTargetUsingImplicitN(false),
46 myTransformCacheSize(0)
56 myTransformMatrices3F.reset();
57 myTransformMatrices3D.reset();
58 myTransformTranslates3F.reset();
59 myTransformTranslates3D.reset();
60 myTransformInverse3F.reset();
61 myTransformInverse3D.reset();
62 myTransformQuaternionsF.reset();
63 myTransformQuaternionsD.reset();
64 myTransformCacheSize = 0;
91 myPrevOutputDetailID(-1),
92 myPrevTargetPtCount(-1),
93 myPrevHadSourceGroup(false),
94 myPrevHadTargetGroup(false),
98 myPrevSourceUniqueID(-1),
99 myPrevSourceMetaCacheCount(-1),
100 mySourceVertexCount(-1),
176 "Array above depends on owners other than detail being less than 3");
194 "Array above depends on owners other than detail being less than 3");
202 template <
typename T>
203 struct DefaultClearer;
228 static const bool clearNeedsDestruction =
false;
233 template <
typename T>
234 struct DefaultClearer;
255 static const bool clearNeedsDestruction =
false;
280 const bool transform_using_more_than_P,
281 const bool allow_implicit_N,
282 bool &transforms_changed);
284 namespace NeededTransforms {
317 exint *num_source_attribs =
nullptr,
318 bool has_transform_matrices =
false,
319 bool *needed_transforms =
nullptr,
323 exint *num_target_attribs =
nullptr);
328 exint num_target_points,
329 bool transforms_changed,
340 const exint ncopies);
355 const exint source_point_count,
356 const exint source_vertex_count,
357 const exint source_prim_count,
363 const exint ncopies);
368 const exint num_packed_prims);
375 const exint num_target_points,
378 const exint *
const num_source_attribs,
379 const bool no_transforms,
380 const bool had_transform_matrices,
381 const bool has_transform_matrices,
382 const bool topology_changed,
383 const bool transforms_changed,
387 const exint *
const target_to_piecei =
nullptr,
398 const exint source_point_count,
399 const exint source_vertex_count,
400 const exint source_prim_count,
401 const exint *
const num_target_attribs,
406 const bool topology_changed,
407 const exint *
const target_to_piecei =
nullptr,
418 const bool had_transform_matrices,
419 const exint num_packed_prims,
434 const bool topology_changed,
435 const bool had_transform_matrices,
463 bool source_topology_changed,
464 bool had_transform_matrices,
465 bool transforms_changed,
466 const exint num_packed_prims,
SYS_FORCE_INLINE void clear()
clear removes all of the entries
bool myPrevHadTargetGroup
GEO_ViewportLOD myPrevViewportLOD
GA_DataId myTargetIDAttribDataID
GU_API void GUcreatePointOrPrimList(GA_OffsetList &offset_list, const GU_Detail *const detail, const GA_ElementGroup *const group, const GA_AttributeOwner owner)
UT_ArrayStringMap< GA_DataId > mySourceEdgeGroupDataIDs
exint mySourceVertexCount
#define SYS_STATIC_ASSERT_MSG(expr, msg)
GA_OffsetListType< GA_Size > GA_OffsetList
GA_OffsetList is a map from index to offset.
SYS_FORCE_INLINE bool getExtraFlag() const
Synonym for isClosed()
GA_DataId mySourceIDAttribOwner
GA_ListType< exint, exint > myRelVtxToPt
This maps from the index into mySourceVertex to the index into mySourcePoints.
static SYS_FORCE_INLINE void clear(GU_CopyToPointsCache::TargetAttribInfo &v)
UT_Array< PieceData > myPieceData
UT_SmallArray< exint, 2 *sizeof(exint)> myClosedSpanLengths
GA_DataId myPrevSourcePrimListDataID
exint myPrevSourceMetaCacheCount
exint myPrevSourceUniqueID
These are only used when myPrevPack is true.
static SYS_FORCE_INLINE void clearConstruct(GU_CopyToPointsCache::TargetAttribInfo *p)
GU_API 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)
#define GA_INVALID_DATAID
static SYS_FORCE_INLINE void clear(GA_OffsetList &v)
GU_API 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)
exint GA_Size
Defines the bit width for index and offset types in GA.
AttribCombineMethod myCombineMethod
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
GA_DataId mySourceIDAttribDataID
GU_API void GUcreateEmptyPackedGeometryPrims(GU_Detail *const output_geo, const exint num_packed_prims)
SYS_FORCE_INLINE bool isTrivial() const
UT_Array< exint > myTargetToPiece
GU_API 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.
GA_PolyCounts myVertexListSizeList
GA_Size myPrevTargetPtCount
exint myRefCount
This is the number of target points that reference this piece.
static constexpr int theNumAttribs
bool myPrevHadSourceGroup
GLsizei GLsizei GLchar * source
GU_API void GUaddAttributesFromSourceOrTarget(GU_Detail *output_geo, const GU_Detail *source, exint *num_source_attribs=nullptr, bool has_transform_matrices=false, bool *needed_transforms=nullptr, const GU_Detail *target=nullptr, GU_CopyToPointsCache::TargetAttribInfoMap *target_attrib_info=nullptr, GU_CopyToPointsCache::TargetAttribInfoMap *target_group_info=nullptr, exint *num_target_attribs=nullptr)
GA_AttributeOwner myCopyTo
GA_DataId myPrevTargetGroupDataID
static SYS_FORCE_INLINE bool isClear(const GU_CopyToPointsCache::TargetAttribInfo &v)
GA_DataId myPrevSourceGroupDataID
TargetAttribInfoMap myTargetAttribInfo
bool myHasContiguousPoints
GU_API 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_Interrupt *boss=nullptr)
GU_API void GUcomputeTransformTypeCaches(GU_PointTransformCache *cache, exint num_target_points, bool transforms_changed, const bool needed_transforms[NeededTransforms::num_needed_transforms])
GU_API 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)
PackedPivot myPrevPivotEnum
GA_OffsetList myTargetOffsetList
GU_API 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=nullptr, const GU_CopyToPointsCache::TargetAttribInfoMap *const target_attrib_info=nullptr, const GU_CopyToPointsCache::TargetAttribInfoMap *const target_group_info=nullptr, const exint *const target_to_piecei=nullptr, const UT_Array< exint > *const owner_piece_offset_starts=nullptr, const GU_CopyToPointsCache::PieceData *const piece_data=nullptr, UT_Interrupt *boss=nullptr)
GU_API 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=nullptr, const GA_OffsetListRef *target_point_list=nullptr, GU_CopyToPointsCache::TargetAttribInfoMap *target_attrib_info=nullptr, GU_CopyToPointsCache::TargetAttribInfoMap *target_group_info=nullptr)
static SYS_FORCE_INLINE bool isClear(const GA_OffsetList &v)
exint myPrevOutputDetailID
GU_API 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)
TargetAttribInfoMap myTargetGroupInfo
SYS_FORCE_INLINE ToType trivialStart() const
Returns the start, assuming this list is trivial.
GU_API 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=nullptr, const UT_Array< exint > *const owner_piece_offset_starts=nullptr, const GU_CopyToPointsCache::PieceData *const piece_data=nullptr, UT_Interrupt *boss=nullptr)
GA_DataId myPrevSourceTopologyDataID
SYS_FORCE_INLINE FromType size() const
Returns the number of used elements in the list (always <= capacity())
static SYS_FORCE_INLINE void clearConstruct(GA_OffsetList *p)