10 Tempest::Matrix4x4 pos;
13 for(
auto& i:proto.
attach) {
16 physic = owner.
movableObj(i.shape.get(),pos);
else
17 physic = owner.
staticObj (i.shape.get(),pos);
18 sub.emplace_back(std::move(physic));
27 implSetObjMatrix(obj,skeleton==
nullptr ?
nullptr : skeleton->
tr.data());
32 if(ani!=
nullptr && skeleton!=
nullptr)
37 implSetObjMatrix(Tempest::Matrix4x4::mkIdentity(),p.
transform());
40void PhysicMesh::implSetObjMatrix(
const Tempest::Matrix4x4 &mt,
const Tempest::Matrix4x4* tr) {
41 const size_t binds = (binder==
nullptr ? 0 : binder->
bind.size());
42 for(
size_t i=0; i<binds; ++i) {
45 auto id = binder->
bind[i];
47 if(id<skeleton->tr.size())
49 sub[ani->
submeshId[i].id].setObjMatrix(mat);
51 for(
size_t i=binds; i<sub.size(); ++i)
std::vector< size_t > bind
Item movableObj(const PhysicMeshShape *src, const Tempest::Matrix4x4 &m)
Item staticObj(const PhysicMeshShape *src, const Tempest::Matrix4x4 &m)
void setInteractive(Interactive *it)
void setPose(const Pose &p)
void setObjMatrix(const Tempest::Matrix4x4 &m)
void setSkeleton(const Skeleton *sk)
const Tempest::Matrix4x4 * transform() const
std::vector< Attach > attach
std::vector< SubMeshId > submeshId
static const AttachBinder * bindMesh(const ProtoMesh &anim, const Skeleton &s)
std::vector< Tempest::Matrix4x4 > tr