Unravel Engine C++ Reference
Loading...
Searching...
No Matches
model_system.h
Go to the documentation of this file.
1#pragma once
2
3#include <base/basetypes.hpp>
4#include <context/context.hpp>
5#include <engine/ecs/scene.h>
6#include <math/math.h>
7#include <hpp/span.hpp>
8
9namespace unravel
10{
11
12auto ik_set_position_ccd(entt::handle end_effector,
13 const math::vec3& target,
14 size_t num_bones_in_chain,
15 float threshold = 0.001f,
16 int max_iterations = 10) -> bool;
17
18auto ik_set_position_fabrik(entt::handle end_effector,
19 const math::vec3& target,
20 size_t num_bones_in_chain,
21 float threshold = 0.001f,
22 int max_iterations = 10) -> bool;
23
24auto ik_set_position_two_bone(entt::handle end_effector,
25 const math::vec3& target,
26 const math::vec3& forward,
27 float weight = 1.0f,
28 float soften = 1.0f,
29 int max_iterations = 10) -> bool;
30
31auto ik_look_at_position(entt::handle end_effector,
32 const math::vec3& target,
33 float weight = 1.0f) -> bool;
34
36{
37public:
38 auto init(rtti::context& ctx) -> bool;
39 auto deinit(rtti::context& ctx) -> bool;
41 void on_play_begin(hpp::span<const entt::handle> entities, delta_t dt);
42 void on_frame_update(scene& scn, delta_t dt);
44
45private:
46 std::shared_ptr<int> sentinel_ = std::make_shared<int>(0);
47};
48} // namespace unravel
auto deinit(rtti::context &ctx) -> bool
void on_frame_before_render(scene &scn, delta_t dt)
void on_play_begin(rtti::context &ctx)
void on_frame_update(scene &scn, delta_t dt)
auto init(rtti::context &ctx) -> bool
std::chrono::duration< float > delta_t
auto ik_set_position_ccd(entt::handle end_effector, const math::vec3 &target, size_t num_bones_in_chain, float threshold, int max_iterations) -> bool
auto ik_set_position_two_bone(entt::handle end_effector, const math::vec3 &target, const math::vec3 &forward, float weight, float soften, int max_iterations) -> bool
auto ik_set_position_fabrik(entt::handle end_effector, const math::vec3 &target, size_t num_bones_in_chain, float threshold, int max_iterations) -> bool
auto ik_look_at_position(entt::handle end_effector, const math::vec3 &target, float weight) -> bool
Represents a scene in the ACE framework, managing entities and their relationships.
Definition scene.h:21