Unravel Engine C++ Reference
Loading...
Searching...
No Matches
ik_solvers.cpp File Reference
#include "ik_solvers.h"
#include <engine/ecs/components/transform_component.h>
#include <engine/rendering/ecs/components/model_component.h>
#include <hpp/small_vector.hpp>
#include <algorithm>
#include <cmath>
#include <glm/gtc/epsilon.hpp>

Go to the source code of this file.

Namespaces

namespace  unravel
 

Typedefs

template<typename T >
using unravel::ik_vector = hpp::small_vector<T>
 

Functions

auto unravel::find_facing_adjustment_rotation (entt::handle entity) -> math::quat
 
auto unravel::bones_collect (entt::handle end_effector, size_t num_bones_in_chain) -> ik_vector< transform_component * >
 
auto unravel::get_end_position (transform_component *comp) -> math::vec3
 
void unravel::apply_pole_constraint (ik_vector< math::vec3 > &positions, const math::vec3 &pole)
 
void unravel::update_rotations_from_positions (ik_vector< transform_component * > &chain, const ik_vector< math::vec3 > &positions, const math::quat &facing_correction)
 
auto unravel::ccdik_advanced (ik_vector< transform_component * > &chain, math::vec3 target, const math::vec3 &pole, const math::quat &facing_correction, float threshold=0.001f, int maxIterations=10, float damping_error_threshold=0.5f, float weight_exponent=1.0f) -> bool
 
auto unravel::fabrik (ik_vector< transform_component * > &chain, const math::vec3 &target, const math::vec3 &pole, const math::quat &facing_correction, float threshold=0.001f, int max_iterations=10) -> bool
 
auto unravel::solve_two_bone_ik (transform_component *start_joint, transform_component *mid_joint, transform_component *end_joint, const math::vec3 &target, const math::vec3 &pole, const math::quat &facing_correction, float weight, float soften) -> bool
 
auto unravel::ik_set_position_ccd (entt::handle end_effector, const math::vec3 &target, const math::vec3 &pole, size_t num_bones_in_chain, int max_iterations, float threshold) -> bool
 
auto unravel::ik_set_position_fabrik (entt::handle end_effector, const math::vec3 &target, const math::vec3 &pole, size_t num_bones_in_chain, int max_iterations, float threshold) -> bool
 
auto unravel::ik_set_position_two_bone (entt::handle end_effector, const math::vec3 &target, const math::vec3 &pole, float weight, float soften) -> bool
 
auto unravel::ik_look_at_position (entt::handle end_effector, const math::vec3 &target, float weight) -> bool
 
auto unravel::ik_get_facing_adjustment_rotation (entt::handle end_effector) -> math::quat
 Returns the armature root local rotation for the model owning this bone.