49 namespace HDK_Sample {
51 namespace GU_CurveFrame {
53 static constexpr
int theCurveUVComponent = 0;
54 static constexpr
int theCrossSectionUVComponent = 1;
202 template<
typename T,
typename OUTPUT_T,
typename FUNCTOR>
209 FUNCTOR &&extract_functor)
225 [geo,&transform_attrib,&interrupt,&output_attrib,&extract_functor](
const GA_SplittableRange &
r) {
240 for (
GA_Offset primoff = start; primoff <
end; ++primoff) {
246 const GA_Size npoints = nedges + !closed;
256 for (
GA_Size i = 0; i < npoints; ++i) {
258 output_attrib.
set(vtxoff, extract_functor(transform_attrib.get(vtxoff)));
261 GA_Offset dest_vtxoff = vertices(npoints);
263 output_attrib.
set(dest_vtxoff, extract_functor(transform_attrib.get(src_vtxoff)));
271 template<
int AXIS,
typename T,
typename OUTPUT_T>
Apply angle increment to each edge on top of previous edge's rotation.
Iteration over a range of elements.
GA_ROHandleT< UT_Vector3T< T > > myTargetUpVectorAttrib
bool blockAdvance(GA_Offset &start, GA_Offset &end)
UT_Vector3T< T > myEndTargetUpVector
void extractAttribFromTransform(GEO_Detail *geo, const GA_PrimitiveGroup *curve_group, const GA_ROHandleT< UT_Matrix4T< T >> &transform_attrib, const GA_RWHandleT< OUTPUT_T > &output_attrib, FUNCTOR &&extract_functor)
void UTparallelForLightItems(const Range &range, const Body &body, const bool force_use_task_scope=true)
void extractAxisAttrib(GEO_Detail *geo, const GA_PrimitiveGroup *curve_group, const GA_ROHandleT< UT_Matrix4T< T >> &transform_attrib, const GA_RWHandleT< UT_Vector3T< OUTPUT_T >> &axis_attrib)
This works for AXIS == 0 (x), 1 (y), 2 (z), and 3 (translation).
bool myTargetUpVectorAtStart
GA_ROHandleT< T > myRotAttribs[3]
exint GA_Size
Defines the bit width for index and offset types in GA.
int myRotAttribComponent
Component of myRotAttribs being read. (default 0)
GA_ROHandleT< UT_Vector3T< T > > myEndTargetUpVectorAttrib
UT_Vector3T< T > myAngles
bool myExtrapolateEndTangents
bool myContinuousClosedCurves
SYS_FORCE_INLINE GA_OffsetListRef getPrimitiveVertexList(GA_Offset primoff) const
bool myUseEndTargetUpVector
UT_XformOrder::xyzOrder myRotationOrder
GA_API const UT_StringHolder transform
bool myStretchAroundTurns
void computeCurveTransforms(const GEO_Detail *const geo, const GA_PrimitiveGroup *curve_group, const GA_RWHandleT< UT_Matrix4T< T >> &transform_attrib, const CurveFrameParms< T > &parms)
bool myTransformByInstanceAttribs
Use incoming N, up, rot, orient, pscale, scale, pivot, trans, transform.
void hardenAllPages(GA_Offset start_offset=GA_Offset(0), GA_Offset end_offset=GA_INVALID_OFFSET) override
Harden data pages.
SYS_FORCE_INLINE void set(GA_Offset off, const T &val) const
Utility class for containing a color ramp.
bool getPolyProperties(const GEO_Detail *geometry, const GA_OffsetListRef &vertices, exint &nedges, bool &closed, bool &unrolled)
UT_Vector3T< T > myIncAngles
UT_Vector3T< T > myTargetUpVector
GA_Range getPrimitiveRange(const GA_PrimitiveGroup *group=0) const
Get a range of all primitives in the detail.
bool myUseCurveNormalAsTargetUp
TangentType myTangentType
RotationPer myIncAnglePer[3]
NOTE: myIncAnglePer[2] will also be used for ensuring closed curve continuity.