Rebel Fork Framework
Urho3D::IKSpineChain Class Reference

Uniformly bending IK chain. More...

#include <Urho3D/Math/InverseKinematics.h>

Inheritance diagram for Urho3D::IKSpineChain:
Urho3D::IKChain

Public Types

using WeightFunction = ea::function< float(float)>
 

Public Member Functions

void Solve (const Vector3 &target, const Vector3 &baseDirection, float maxRotation, const IKSettings &settings, const WeightFunction &weightFun=DefaultWeightFunction)
 
void Twist (float angle, const IKSettings &settings)
 
- Public Member Functions inherited from Urho3D::IKChain
void Clear ()
 
void AddNode (IKNode *node)
 
void UpdateLengths ()
 
const IKNodeSegmentFindSegment (const IKNode *node) const
 
ea::vector< IKNodeSegment > & GetSegments ()
 
const ea::vector< IKNodeSegment > & GetSegments () const
 
ea::vector< IKNode * > & GetNodes ()
 
const ea::vector< IKNode * > & GetNodes () const
 

Static Public Member Functions

static float DefaultWeightFunction (float x)
 

Private Member Functions

void UpdateSegmentWeights (const WeightFunction &weightFun)
 
template<class T >
void EnumerateProjectedPositions (float totalRotation, const T &callback) const
 
ea::pair< float, Vector3GetProjectionAndOffset (const Vector3 &target, const Vector3 &basePosition, const Vector3 &baseDirection) const
 
Vector2 ProjectTarget (const Vector3 &target, const Vector3 &basePosition, const Vector3 &baseDirection) const
 
Vector2 EvaluateProjectedEnd (float totalRotation) const
 
float EvaluateError (float totalRotation, const Vector2 &target) const
 
float FindBestAngle (const Vector2 &projectedTarget, float maxRotation, float angularTolerance) const
 
void EvaluateSegmentPositions (float totalRotation, const Vector3 &baseDirection, const Vector3 &bendDirection)
 

Private Attributes

ea::vector< float > weights_
 

Additional Inherited Members

- Protected Member Functions inherited from Urho3D::IKChain
void StorePreviousTransforms ()
 
void RestorePreviousTransforms ()
 
void UpdateSegmentRotations (const IKSettings &settings)
 
- Protected Attributes inherited from Urho3D::IKChain
bool isFirstSegmentIncomplete_ {}
 
ea::vector< IKNode * > nodes_
 
ea::vector< IKNodeSegmentsegments_
 
float totalLength_ {}
 

Detailed Description

Uniformly bending IK chain.


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