Blender V4.3
IK_Solver.cpp File Reference
#include "../extern/IK_solver.h"
#include "IK_QJacobianSolver.h"
#include "IK_QSegment.h"
#include "IK_QTask.h"
#include <list>

Go to the source code of this file.

Classes

class  IK_QSolver
 

Functions

static IK_QSegmentCreateSegment (int flag, bool translate)
 
IK_SegmentIK_CreateSegment (int flag)
 
void IK_FreeSegment (IK_Segment *seg)
 
void IK_SetParent (IK_Segment *seg, IK_Segment *parent)
 
void IK_SetTransform (IK_Segment *seg, float start[3], float rest[][3], float basis[][3], float length)
 
void IK_SetLimit (IK_Segment *seg, IK_SegmentAxis axis, float lmin, float lmax)
 
void IK_SetStiffness (IK_Segment *seg, IK_SegmentAxis axis, float stiffness)
 
void IK_GetBasisChange (IK_Segment *seg, float basis_change[][3])
 
void IK_GetTranslationChange (IK_Segment *seg, float *translation_change)
 
IK_SolverIK_CreateSolver (IK_Segment *root)
 
void IK_FreeSolver (IK_Solver *solver)
 
void IK_SolverAddGoal (IK_Solver *solver, IK_Segment *tip, float goal[3], float weight)
 
void IK_SolverAddGoalOrientation (IK_Solver *solver, IK_Segment *tip, float goal[][3], float weight)
 
void IK_SolverSetPoleVectorConstraint (IK_Solver *solver, IK_Segment *tip, float goal[3], float polegoal[3], float poleangle, int getangle)
 
float IK_SolverGetPoleAngle (IK_Solver *solver)
 
int IK_Solve (IK_Solver *solver, float tolerance, int max_iterations)
 

Function Documentation

◆ CreateSegment()

static IK_QSegment * CreateSegment ( int flag,
bool translate )
static

Definition at line 29 of file IK_Solver.cpp.

References flag, IK_XDOF, IK_YDOF, IK_ZDOF, and NULL.

Referenced by IK_CreateSegment().

◆ IK_CreateSegment()

IK_Segment * IK_CreateSegment ( int flag)

Definition at line 97 of file IK_Solver.cpp.

References CreateSegment(), flag, NULL, rot, IK_QSegment::SetComposite(), and IK_QSegment::SetParent().

Referenced by execute_posetree().

◆ IK_CreateSolver()

IK_Solver * IK_CreateSolver ( IK_Segment * root)

Definition at line 289 of file IK_Solver.cpp.

References NULL, and IK_QSolver::root.

Referenced by execute_posetree().

◆ IK_FreeSegment()

void IK_FreeSegment ( IK_Segment * seg)

Definition at line 124 of file IK_Solver.cpp.

References IK_QSegment::Composite().

Referenced by execute_posetree().

◆ IK_FreeSolver()

void IK_FreeSolver ( IK_Solver * solver)

Definition at line 301 of file IK_Solver.cpp.

References NULL, and IK_QSolver::tasks.

Referenced by execute_posetree().

◆ IK_GetBasisChange()

void IK_GetBasisChange ( IK_Segment * seg,
float basis_change[][3] )

◆ IK_GetTranslationChange()

void IK_GetTranslationChange ( IK_Segment * seg,
float * translation_change )

◆ IK_SetLimit()

void IK_SetLimit ( IK_Segment * seg,
IK_SegmentAxis axis,
float lmin,
float lmax )

◆ IK_SetParent()

void IK_SetParent ( IK_Segment * seg,
IK_Segment * parent )

Definition at line 134 of file IK_Solver.cpp.

References IK_QSegment::Composite(), and IK_QSegment::SetParent().

Referenced by execute_posetree().

◆ IK_SetStiffness()

void IK_SetStiffness ( IK_Segment * seg,
IK_SegmentAxis axis,
float stiffness )

◆ IK_SetTransform()

void IK_SetTransform ( IK_Segment * seg,
float start[3],
float rest[][3],
float basis[][3],
float length )

Definition at line 147 of file IK_Solver.cpp.

References IK_QSegment::Composite(), CreateMatrix(), and IK_QSegment::SetTransform().

Referenced by execute_posetree().

◆ IK_Solve()

int IK_Solve ( IK_Solver * solver,
float tolerance,
int max_iterations )

◆ IK_SolverAddGoal()

void IK_SolverAddGoal ( IK_Solver * solver,
IK_Segment * tip,
float goal[3],
float weight )

Definition at line 318 of file IK_Solver.cpp.

References IK_QSegment::Composite(), NULL, pos, IK_QTask::SetWeight(), and IK_QSolver::tasks.

Referenced by execute_posetree().

◆ IK_SolverAddGoalOrientation()

void IK_SolverAddGoalOrientation ( IK_Solver * solver,
IK_Segment * tip,
float goal[][3],
float weight )

◆ IK_SolverGetPoleAngle()

float IK_SolverGetPoleAngle ( IK_Solver * solver)

Definition at line 394 of file IK_Solver.cpp.

References IK_QJacobianSolver::GetPoleAngle(), NULL, and IK_QSolver::solver.

Referenced by execute_posetree().

◆ IK_SolverSetPoleVectorConstraint()

void IK_SolverSetPoleVectorConstraint ( IK_Solver * solver,
IK_Segment * tip,
float goal[3],
float polegoal[3],
float poleangle,
int getangle )