VrmRuntime public API. 更多...
#include <VrmRuntime.h>
类 | |
| struct | Part |
| Part public API. 更多... | |
Public 成员函数 | |
| VrmRuntime () | |
| Constructs a VrmRuntime. | |
| ~VrmRuntime () | |
| Releases VrmRuntime resources. | |
| void | animate (AvatarInstance &avatar, animation::AnimPose &pose, float dt) |
| Animate. | |
| void | sync (AvatarInstance &avatar, const glm::mat4 &world, bool visible) |
| Synchronizes . | |
| void | morphs (AvatarInstance &avatar) |
| Morphs. | |
| void | gaze (AvatarInstance &avatar, animation::AnimPose &pose, const glm::mat4 &world, bool enabled, glm::vec3 target, float weight) |
| Gaze. | |
静态 Public 成员函数 | |
| static eve::Result< std::unique_ptr< VrmRuntime > > | prepare (std::string_view path) |
| Prepare. | |
Public 属性 | |
| std::weak_ptr< const void > | providerLifetime |
| VrmDocument | document |
| std::unique_ptr< model3d::ModelData > | model |
| std::unique_ptr< animation::AnimSkeleton > | skeleton |
| std::unique_ptr< animation::AnimPlayer > | player |
| std::vector< int > | nodeBones |
| std::map< int, std::array< float, 3 > > | rotations |
| std::vector< Part > | parts |
| std::vector< std::unique_ptr< VrmSurface > > | surfaces |
| std::vector< graphics::Texture * > | textures |
| glm::mat4 | world {1} |
| float | time = 0 |
详细描述
VrmRuntime public API.
在文件 VrmRuntime.h 第 30 行定义.
构造及析构函数说明
◆ VrmRuntime()
|
default |
Constructs a VrmRuntime.
◆ ~VrmRuntime()
| eve::avatar::VrmRuntime::~VrmRuntime | ( | ) |
Releases VrmRuntime resources.
在文件 VrmRuntime.cpp 第 23 行定义.
引用了 parts, providerLifetime, surfaces , 以及 textures.
成员函数说明
◆ animate()
| void eve::avatar::VrmRuntime::animate | ( | AvatarInstance & | avatar, |
| animation::AnimPose & | pose, | ||
| float | dt | ||
| ) |
◆ gaze()
| void eve::avatar::VrmRuntime::gaze | ( | AvatarInstance & | avatar, |
| animation::AnimPose & | pose, | ||
| const glm::mat4 & | world, | ||
| bool | enabled, | ||
| glm::vec3 | target, | ||
| float | weight | ||
| ) |
Gaze.
在文件 VrmMotion.cpp 第 32 行定义.
引用了 bone, eve::animation::AnimPose::computeWorld(), current, document, enabled, eve::avatar::VrmLookAt::expression, eve::avatar::VrmDocument::expressions, eve::avatar::AvatarInstance::getParameter(), h, eve::avatar::VrmDocument::humanoid, local, eve::avatar::VrmDocument::look, nodeBones, eve::avatar::VrmLookAt::offset, origin, pitch, pose, eve::avatar::VrmLookAt::present, rotations, semantic, skeleton, target, value, weight, eve::animation::AnimPose::world() , 以及 yaw.
◆ morphs()
| void eve::avatar::VrmRuntime::morphs | ( | AvatarInstance & | avatar | ) |
Morphs.
在文件 VrmRuntime.cpp 第 154 行定义.
引用了 b, c, document, eve::avatar::VrmDocument::expressions, eve::avatar::AvatarInstance::getParameter(), eve::avatar::AvatarInstance::hasParameter(), name, parts, providerLifetime, s, surfaces, time, w, weight , 以及 weights.
◆ prepare()
|
static |
Prepare.
在文件 VrmRuntime.cpp 第 36 行定义.
引用了 eve::avatar::buildVrmAtlas(), eve::avatar::buildVrmSurface(), c, d, eve::Diagnostic::error(), eve::Failed, file, eve::animation::AnimSkin::fromModel(), eve::animation::AnimImporter::loadSkeletonFromModel(), m, eve::avatar::VrmRuntime::Part::material, material, n, eve::avatar::VrmRuntime::Part::node, node, owned, p, eve::avatar::parseVrm(), path, s, scene, semantic, slots, eve::avatar::VrmRuntime::Part::sourceMesh , 以及 eve::Unsupported.
◆ sync()
| void eve::avatar::VrmRuntime::sync | ( | AvatarInstance & | avatar, |
| const glm::mat4 & | world, | ||
| bool | visible | ||
| ) |
类成员变量说明
◆ document
| VrmDocument eve::avatar::VrmRuntime::document |
在文件 VrmRuntime.h 第 48 行定义.
◆ model
| std::unique_ptr<model3d::ModelData> eve::avatar::VrmRuntime::model |
在文件 VrmRuntime.h 第 49 行定义.
◆ nodeBones
| std::vector<int> eve::avatar::VrmRuntime::nodeBones |
在文件 VrmRuntime.h 第 52 行定义.
◆ parts
| std::vector<Part> eve::avatar::VrmRuntime::parts |
在文件 VrmRuntime.h 第 62 行定义.
被这些函数引用 animate(), morphs(), sync() , 以及 ~VrmRuntime().
◆ player
| std::unique_ptr<animation::AnimPlayer> eve::avatar::VrmRuntime::player |
在文件 VrmRuntime.h 第 51 行定义.
被这些函数引用 sync().
◆ providerLifetime
| std::weak_ptr<const void> eve::avatar::VrmRuntime::providerLifetime |
在文件 VrmRuntime.h 第 47 行定义.
被这些函数引用 animate(), morphs(), sync() , 以及 ~VrmRuntime().
◆ rotations
| std::map<int, std::array<float, 3> > eve::avatar::VrmRuntime::rotations |
在文件 VrmRuntime.h 第 53 行定义.
被这些函数引用 gaze().
◆ skeleton
| std::unique_ptr<animation::AnimSkeleton> eve::avatar::VrmRuntime::skeleton |
在文件 VrmRuntime.h 第 50 行定义.
被这些函数引用 gaze().
◆ surfaces
| std::vector<std::unique_ptr<VrmSurface> > eve::avatar::VrmRuntime::surfaces |
在文件 VrmRuntime.h 第 63 行定义.
被这些函数引用 morphs() , 以及 ~VrmRuntime().
◆ textures
| std::vector<graphics::Texture*> eve::avatar::VrmRuntime::textures |
在文件 VrmRuntime.h 第 64 行定义.
被这些函数引用 ~VrmRuntime().
◆ time
| float eve::avatar::VrmRuntime::time = 0 |
在文件 VrmRuntime.h 第 66 行定义.
◆ world
| glm::mat4 eve::avatar::VrmRuntime::world {1} |
在文件 VrmRuntime.h 第 65 行定义.
被这些函数引用 sync().
该类的文档由以下文件生成:
- src/modules/avatar/VrmRuntime.h
- src/modules/avatar/VrmMotion.cpp
- src/modules/avatar/VrmRuntime.cpp