![]() |
PeriDyno 1.2.1
|
#include <HierarchicalModel.h>
Public Member Functions | |
HierarchicalScene () | |
~HierarchicalScene () | |
void | clear () |
int | minMeshIndex () |
int | findMeshIndexByName (std::string name) |
int | findObjectIndexByName (std::string name) |
void | pushBackBone (std::shared_ptr< Bone > bone) |
void | pushBackMesh (std::shared_ptr< MeshInfo > mesh) |
std::shared_ptr< ModelObject > | getObjectByName (std::string name) |
int | getObjIndexByName (std::string name) |
int | getBoneIndexByName (std::string name) |
void | updateBoneWorldMatrix () |
void | updateMeshWorldMatrix () |
void | updateInverseBindMatrix () |
void | updateWorldTransformByKeyFrame (Real time) |
Real | getVectorDataByTime (std::vector< Real > data, std::vector< Real > timeCode, Real time) |
int | findMaxSmallerIndex (const std::vector< float > &arr, float v) |
std::vector< std::shared_ptr< Bone > > & | getBones () |
void | skinAnimation (DArray< Vec3f > &intialPosition, DArray< Vec3f > &worldPosition, DArray< Mat4f > &joint_inverseBindMatrix, DArray< Mat4f > &WorldMatrix, DArray< Vec4f > &bind_joints_0, DArray< Vec4f > &bind_joints_1, DArray< Vec4f > &bind_joints_2, DArray< Vec4f > &weights_0, DArray< Vec4f > &weights_1, DArray< Vec4f > &weights_2, Mat4f transform, bool isNormal, Vec2u range) |
void | skinVerticesAnimation (DArray< Vec3f > &intialVertices, DArray< Vec3f > &Vertices, DArray< Mat4f > &joint_inverseBindMatrix, DArray< Mat4f > &WorldMatrix, DArrayList< int > &point2Vertice, DArray< Vec4f > &bind_joints_0, DArray< Vec4f > &bind_joints_1, DArray< Vec4f > &bind_joints_2, DArray< Vec4f > &weights_0, DArray< Vec4f > &weights_1, DArray< Vec4f > &weights_2, Mat4f transform, bool isNormal, Vec2u range) |
void | c_skinVerticesAnimation (DArray< Vec3f > &intialVertices, DArray< Vec3f > &Vertices, DArray< Mat4f > &joint_inverseBindMatrix, DArray< Mat4f > &WorldMatrix, DArrayList< int > &point2Vertice, DArray< Vec4f > &bind_joints_0, DArray< Vec4f > &bind_joints_1, DArray< Vec4f > &bind_joints_2, DArray< Vec4f > &weights_0, DArray< Vec4f > &weights_1, DArray< Vec4f > &weights_2, Mat4f transform, bool isNormal, Vec2u range) |
void | getVerticesNormalInBindPose (DArray< Vec3f > &initialNormal, DArray< Mat4f > &joint_inverseBindMatrix, DArray< Mat4f > &WorldMatrix, DArrayList< int > &point2Vertice, DArray< Vec4f > &bind_joints_0, DArray< Vec4f > &bind_joints_1, DArray< Vec4f > &bind_joints_2, DArray< Vec4f > &weights_0, DArray< Vec4f > &weights_1, DArray< Vec4f > &weights_2, Vec2u range) |
void | updatePoint2Vertice (DArrayList< int > &d_p2v, DArray< int > &d_v2p) |
void | UpdateJointData () |
void | coutBoneHierarchial () |
void | updateSkinData (std::shared_ptr< TextureMesh > texMesh) |
Mat4f | createLocalTransform (std::shared_ptr< ModelObject > object) |
void | coutMatrix (int id, Mat4f c) |
void | showJointInfo () |
template<typename Vec3f, typename Mat4f> | |
void | textureMeshTransform (DArray< Vec3f > &intialPosition, DArray< Vec3f > &worldPosition, DArray< Vec3f > &intialNormal, DArray< Vec3f > &Normal, Mat4f &WorldMatrix) |
template<typename Vec3f, typename Mat4f> | |
void | shapeTransform (DArray< Vec3f > &intialPosition, DArray< Vec3f > &worldPosition, DArray< Vec3f > &intialNormal, DArray< Vec3f > &Normal, DArray< Mat4f > &WorldMatrix, DArray< uint > &vertexId_shape, DArray< int > &shapeId_MeshId) |
template<typename Vec3f, typename uint> | |
void | shapeToCenter (DArray< Vec3f > &iniPos, DArray< Vec3f > &finalPos, DArray< uint > &shapeId, DArray< Vec3f > &t) |
std::vector< std::shared_ptr< MeshInfo > > & | getMeshes () |
std::vector< Mat4f > | getObjectWorldMatrix () |
void | computeTexMeshVerticesNormal (std::vector< std::shared_ptr< Shape > > &shapes, DArray< Vec3f > &Position, DArray< Vec3f > &Normal, DArray< int > *vertices2Point=nullptr) |
void | flipNormal (DArray< Vec3f > &Normal) |
std::shared_ptr< JointAnimationInfo > & | getJointAnimation () |
![]() | |
Object () | |
virtual | ~Object () |
ObjectId | objectId () |
Public Attributes | |
std::vector< std::shared_ptr< ModelObject > > | mModelObjects |
std::vector< std::shared_ptr< MeshInfo > > | mMeshes |
std::vector< std::shared_ptr< Bone > > | mBones |
std::vector< Vec3f > | mBoneRotations |
std::vector< Vec3f > | mBoneTranslations |
std::vector< Vec3f > | mBoneScales |
std::vector< Mat4f > | mBoneWorldMatrix |
std::vector< Mat4f > | mBoneInverseBindMatrix |
std::vector< Mat4f > | mBoneLocalMatrix |
std::shared_ptr< JointInfo > | mJointData |
std::shared_ptr< SkinInfo > | mSkinData |
std::shared_ptr< JointAnimationInfo > | mJointAnimationData |
float | mTimeStart = -1 |
float | mTimeEnd = -1 |
Private Member Functions | |
void | buildTree (std::string &str, const std::vector< std::shared_ptr< ModelObject > > &child, uint level) |
Real | lerp (Real v0, Real v1, float weight) |
Private Attributes | |
Real | currentTime = ERRORTIME |
Additional Inherited Members | |
![]() | |
static bool | registerClass (ClassInfo *ci) |
static Object * | createObject (std::string name) |
static std::map< std::string, ClassInfo * > * | getClassMap () |
static ObjectId | baseId () |
Base Id. | |
Definition at line 99 of file HierarchicalModel.h.
dyno::HierarchicalScene::HierarchicalScene | ( | ) |
dyno::HierarchicalScene::~HierarchicalScene | ( | ) |
|
inlineprivate |
Definition at line 280 of file HierarchicalModel.h.
void dyno::HierarchicalScene::c_skinVerticesAnimation | ( | DArray< Vec3f > & | intialVertices, |
DArray< Vec3f > & | Vertices, | ||
DArray< Mat4f > & | joint_inverseBindMatrix, | ||
DArray< Mat4f > & | WorldMatrix, | ||
DArrayList< int > & | point2Vertice, | ||
DArray< Vec4f > & | bind_joints_0, | ||
DArray< Vec4f > & | bind_joints_1, | ||
DArray< Vec4f > & | bind_joints_2, | ||
DArray< Vec4f > & | weights_0, | ||
DArray< Vec4f > & | weights_1, | ||
DArray< Vec4f > & | weights_2, | ||
Mat4f | transform, | ||
bool | isNormal, | ||
Vec2u | range ) |
void dyno::HierarchicalScene::clear | ( | ) |
void dyno::HierarchicalScene::computeTexMeshVerticesNormal | ( | std::vector< std::shared_ptr< Shape > > & | shapes, |
DArray< Vec3f > & | Position, | ||
DArray< Vec3f > & | Normal, | ||
DArray< int > * | vertices2Point = nullptr ) |
void dyno::HierarchicalScene::coutBoneHierarchial | ( | ) |
|
inline |
Definition at line 205 of file HierarchicalModel.h.
Mat4f dyno::HierarchicalScene::createLocalTransform | ( | std::shared_ptr< ModelObject > | object | ) |
int dyno::HierarchicalScene::findMaxSmallerIndex | ( | const std::vector< float > & | arr, |
float | v ) |
int dyno::HierarchicalScene::findMeshIndexByName | ( | std::string | name | ) |
int dyno::HierarchicalScene::findObjectIndexByName | ( | std::string | name | ) |
int dyno::HierarchicalScene::getBoneIndexByName | ( | std::string | name | ) |
|
inline |
Definition at line 122 of file HierarchicalModel.h.
|
inline |
Definition at line 275 of file HierarchicalModel.h.
|
inline |
Definition at line 246 of file HierarchicalModel.h.
std::shared_ptr< ModelObject > dyno::HierarchicalScene::getObjectByName | ( | std::string | name | ) |
|
inline |
int dyno::HierarchicalScene::getObjIndexByName | ( | std::string | name | ) |
Real dyno::HierarchicalScene::getVectorDataByTime | ( | std::vector< Real > | data, |
std::vector< Real > | timeCode, | ||
Real | time ) |
void dyno::HierarchicalScene::getVerticesNormalInBindPose | ( | DArray< Vec3f > & | initialNormal, |
DArray< Mat4f > & | joint_inverseBindMatrix, | ||
DArray< Mat4f > & | WorldMatrix, | ||
DArrayList< int > & | point2Vertice, | ||
DArray< Vec4f > & | bind_joints_0, | ||
DArray< Vec4f > & | bind_joints_1, | ||
DArray< Vec4f > & | bind_joints_2, | ||
DArray< Vec4f > & | weights_0, | ||
DArray< Vec4f > & | weights_1, | ||
DArray< Vec4f > & | weights_2, | ||
Vec2u | range ) |
int dyno::HierarchicalScene::minMeshIndex | ( | ) |
void dyno::HierarchicalScene::pushBackBone | ( | std::shared_ptr< Bone > | bone | ) |
void dyno::HierarchicalScene::pushBackMesh | ( | std::shared_ptr< MeshInfo > | mesh | ) |
void dyno::HierarchicalScene::shapeToCenter | ( | DArray< Vec3f > & | iniPos, |
DArray< Vec3f > & | finalPos, | ||
DArray< uint > & | shapeId, | ||
DArray< Vec3f > & | t ) |
void dyno::HierarchicalScene::shapeTransform | ( | DArray< Vec3f > & | intialPosition, |
DArray< Vec3f > & | worldPosition, | ||
DArray< Vec3f > & | intialNormal, | ||
DArray< Vec3f > & | Normal, | ||
DArray< Mat4f > & | WorldMatrix, | ||
DArray< uint > & | vertexId_shape, | ||
DArray< int > & | shapeId_MeshId ) |
void dyno::HierarchicalScene::showJointInfo | ( | ) |
void dyno::HierarchicalScene::skinAnimation | ( | DArray< Vec3f > & | intialPosition, |
DArray< Vec3f > & | worldPosition, | ||
DArray< Mat4f > & | joint_inverseBindMatrix, | ||
DArray< Mat4f > & | WorldMatrix, | ||
DArray< Vec4f > & | bind_joints_0, | ||
DArray< Vec4f > & | bind_joints_1, | ||
DArray< Vec4f > & | bind_joints_2, | ||
DArray< Vec4f > & | weights_0, | ||
DArray< Vec4f > & | weights_1, | ||
DArray< Vec4f > & | weights_2, | ||
Mat4f | transform, | ||
bool | isNormal, | ||
Vec2u | range ) |
void dyno::HierarchicalScene::skinVerticesAnimation | ( | DArray< Vec3f > & | intialVertices, |
DArray< Vec3f > & | Vertices, | ||
DArray< Mat4f > & | joint_inverseBindMatrix, | ||
DArray< Mat4f > & | WorldMatrix, | ||
DArrayList< int > & | point2Vertice, | ||
DArray< Vec4f > & | bind_joints_0, | ||
DArray< Vec4f > & | bind_joints_1, | ||
DArray< Vec4f > & | bind_joints_2, | ||
DArray< Vec4f > & | weights_0, | ||
DArray< Vec4f > & | weights_1, | ||
DArray< Vec4f > & | weights_2, | ||
Mat4f | transform, | ||
bool | isNormal, | ||
Vec2u | range ) |
void dyno::HierarchicalScene::textureMeshTransform | ( | DArray< Vec3f > & | intialPosition, |
DArray< Vec3f > & | worldPosition, | ||
DArray< Vec3f > & | intialNormal, | ||
DArray< Vec3f > & | Normal, | ||
Mat4f & | WorldMatrix ) |
void dyno::HierarchicalScene::updateBoneWorldMatrix | ( | ) |
void dyno::HierarchicalScene::updateInverseBindMatrix | ( | ) |
void dyno::HierarchicalScene::UpdateJointData | ( | ) |
void dyno::HierarchicalScene::updateMeshWorldMatrix | ( | ) |
void dyno::HierarchicalScene::updatePoint2Vertice | ( | DArrayList< int > & | d_p2v, |
DArray< int > & | d_v2p ) |
void dyno::HierarchicalScene::updateSkinData | ( | std::shared_ptr< TextureMesh > | texMesh | ) |
void dyno::HierarchicalScene::updateWorldTransformByKeyFrame | ( | Real | time | ) |
Definition at line 320 of file HierarchicalModel.h.
std::vector<Mat4f> dyno::HierarchicalScene::mBoneInverseBindMatrix |
Definition at line 307 of file HierarchicalModel.h.
std::vector<Mat4f> dyno::HierarchicalScene::mBoneLocalMatrix |
Definition at line 308 of file HierarchicalModel.h.
std::vector<Vec3f> dyno::HierarchicalScene::mBoneRotations |
Definition at line 303 of file HierarchicalModel.h.
std::vector<std::shared_ptr<Bone> > dyno::HierarchicalScene::mBones |
Definition at line 302 of file HierarchicalModel.h.
std::vector<Vec3f> dyno::HierarchicalScene::mBoneScales |
Definition at line 305 of file HierarchicalModel.h.
std::vector<Vec3f> dyno::HierarchicalScene::mBoneTranslations |
Definition at line 304 of file HierarchicalModel.h.
std::vector<Mat4f> dyno::HierarchicalScene::mBoneWorldMatrix |
Definition at line 306 of file HierarchicalModel.h.
std::shared_ptr<JointAnimationInfo> dyno::HierarchicalScene::mJointAnimationData |
Definition at line 312 of file HierarchicalModel.h.
std::shared_ptr<JointInfo> dyno::HierarchicalScene::mJointData |
Definition at line 310 of file HierarchicalModel.h.
std::vector<std::shared_ptr<MeshInfo> > dyno::HierarchicalScene::mMeshes |
Definition at line 301 of file HierarchicalModel.h.
std::vector<std::shared_ptr<ModelObject> > dyno::HierarchicalScene::mModelObjects |
Definition at line 300 of file HierarchicalModel.h.
std::shared_ptr<SkinInfo> dyno::HierarchicalScene::mSkinData |
Definition at line 311 of file HierarchicalModel.h.
float dyno::HierarchicalScene::mTimeEnd = -1 |
Definition at line 315 of file HierarchicalModel.h.
float dyno::HierarchicalScene::mTimeStart = -1 |
Definition at line 314 of file HierarchicalModel.h.