Blender V5.3
blender::xpbd::RodStretchAndShearConstraintSet Class Reference

#include <GEO_xpbd_constraint_rod_stretch_shear.hh>

Inherits blender::xpbd::TemplatedConstraintSet< RodStretchAndShearConstraintSet >.

Public Member Functions

 RodStretchAndShearConstraintSet (const int geo_i, const IndexRange curves_range, const OffsetIndices< int > points_by_curve, const Span< float > rest_lengths, const Span< float > compliances, const float error_scale, MutableSpan< float3 > lambdas_pos, MutableSpan< float3 > lambdas_rot)
void reset_force (const int constraint_i) const
template<typename UpdaterT>
void solve_single (const ConstraintSetParams &params, UpdaterT &updater, const int constraint_i) const
ConstraintColoring color_constraints (LinearAllocator<> &) const override
Public Member Functions inherited from blender::xpbd::TemplatedConstraintSet< RodStretchAndShearConstraintSet >
 TemplatedConstraintSet (const int constraints_num, Vector< int > affected_geo_indices)
void reset_forces () override
void solve_sequential (const ConstraintSetParams &params, GaussSeidelUpdater &updater, const IndexMask &mask) override
StringRefNull debug_name () const final
Public Member Functions inherited from blender::xpbd::ConstraintSet
 ConstraintSet (int constraints_num, Vector< int > affected_geo_indices)
virtual ~ConstraintSet ()=default
void solve_sequential_all (const ConstraintSetParams &params, GaussSeidelUpdater &updater)
Span< int > get_affected_geo_indices () const

Static Public Attributes

static constexpr StringRefNull debug_name = "Rod Stretch and Shear"

Additional Inherited Members

Protected Attributes inherited from blender::xpbd::ConstraintSet
int constraints_num_
Vector< int > affected_geo_indices_

Detailed Description

Considers a single rod at a time. Tries to enforce that the rotation of the rod is aligned with the actual tangent of the rod. If it is misaligned, it moves the start position, end position and rotation of the frame. At the same time, it enforces a certain length.

Definition at line 87 of file GEO_xpbd_constraint_rod_stretch_shear.hh.

Constructor & Destructor Documentation

◆ RodStretchAndShearConstraintSet()

blender::xpbd::RodStretchAndShearConstraintSet::RodStretchAndShearConstraintSet ( const int geo_i,
const IndexRange curves_range,
const OffsetIndices< int > points_by_curve,
const Span< float > rest_lengths,
const Span< float > compliances,
const float error_scale,
MutableSpan< float3 > lambdas_pos,
MutableSpan< float3 > lambdas_rot )
inline

Member Function Documentation

◆ color_constraints()

ConstraintColoring blender::xpbd::RodStretchAndShearConstraintSet::color_constraints ( LinearAllocator<> & ) const
inlineoverridevirtual

◆ reset_force()

void blender::xpbd::RodStretchAndShearConstraintSet::reset_force ( const int constraint_i) const
inline

◆ solve_single()

Member Data Documentation

◆ debug_name

StringRefNull blender::xpbd::RodStretchAndShearConstraintSet::debug_name = "Rod Stretch and Shear"
staticconstexpr

Definition at line 106 of file GEO_xpbd_constraint_rod_stretch_shear.hh.


The documentation for this class was generated from the following file: