![]() |
PeriDyno 1.0.0
|
#include <GltfLoader.h>
Public Types | |
typedef TDataType::Real | Real |
typedef TDataType::Coord | Coord |
typedef TDataType::Matrix | Matrix |
typedef TopologyModule::Triangle | Triangle |
typedef unsigned char | byte |
typedef int | joint |
typedef int | shape |
typedef int | mesh |
typedef int | primitive |
typedef int | scene |
![]() | |
typedef TDataType::Real | Real |
typedef TDataType::Coord | Coord |
![]() | |
template<class T> | |
using | SPtr = std::shared_ptr<T> |
![]() | |
typedef std::vector< FBase * > | FieldVector |
typedef std::map< FieldID, FBase * > | FieldMap |
Public Member Functions | |
GltfLoader () | |
~GltfLoader () | |
std::string | getNodeType () override |
DEF_VAR (FilePath, FileName, "", "") | |
DEF_VAR (bool, ImportAnimation, false, "") | |
DEF_VAR (Real, AnimationSpeed, 1,"AnimationSpeed") | |
DEF_VAR (Real, JointRadius, 0.01, "") | |
DEF_VAR (bool, UseInstanceTransform, true, "") | |
DEF_ARRAY_STATE (Vec2f, TexCoord_0, DeviceType::GPU, "UVSet 0") | |
DEF_ARRAY_STATE (Vec2f, TexCoord_1, DeviceType::GPU, "UVSet 1") | |
DEF_ARRAY_STATE (Mat4f, InitialMatrix, DeviceType::GPU, "") | |
DEF_VAR_STATE (Mat4f, Transform, Mat4f::identityMatrix(), "Transform") | |
DEF_INSTANCE_STATE (SkinInfo, Skin, "SkinInfo") | |
DEF_ARRAY_STATE (Mat4f, JointInverseBindMatrix, DeviceType::GPU, "JointInverseBindMatrix") | |
DEF_ARRAY_STATE (Mat4f, JointLocalMatrix, DeviceType::GPU, "JointLocalMatrix") | |
DEF_ARRAY_STATE (Mat4f, JointWorldMatrix, DeviceType::GPU, "JointWorldMatrix") | |
DEF_INSTANCE_STATE (JointInfo, JointsData,"JointsInfo") | |
DEF_INSTANCE_STATE (TextureMesh, TextureMesh, "") | |
DEF_INSTANCE_STATE (PointSet< TDataType >, ShapeCenter, "") | |
DEF_INSTANCE_STATE (EdgeSet< TDataType >, JointSet, "") | |
DEF_INSTANCE_STATE (JointAnimationInfo, Animation,"") | |
![]() | |
ParametricModel () | |
Quat< Real > | computeQuaternion () |
DEF_VAR (Coord, Location, 0, "Node location") | |
DEF_VAR (Coord, Rotation, 0, "Node rotation") | |
DEF_VAR (Coord, Scale, Coord(1), "Node scale") | |
![]() | |
Node () | |
~Node () override | |
void | setName (std::string name) |
std::string | getName () override |
bool | isAutoSync () |
bool | isAutoHidden () |
void | setAutoSync (bool con) |
Whether the node can be automatically synchronized when its ancestor is updated. | |
void | setAutoHidden (bool con) |
virtual bool | isActive () |
Check the state of dynamics. | |
virtual void | setActive (bool active) |
Set the state of dynamics. | |
virtual bool | isVisible () |
Check the visibility of context. | |
virtual void | setVisible (bool visible) |
Set the visibility of context. | |
virtual Real | getDt () |
Simulation timestep. | |
void | setDt (Real dt) |
void | setSceneGraph (SceneGraph *scn) |
SceneGraph * | getSceneGraph () |
std::vector< NodePort * > & | getImportNodes () |
std::vector< NodePort * > & | getExportNodes () |
bool | addModule (std::shared_ptr< Module > module) |
Add a module to m_module_list and other special module lists. | |
bool | deleteModule (std::shared_ptr< Module > module) |
template<class TModule> | |
bool | addModule (std::shared_ptr< TModule > tModule) |
Add a speical kind of module. | |
template<class TModule> | |
bool | deleteModule (std::shared_ptr< TModule > tModule) |
std::list< std::shared_ptr< Module > > & | getModuleList () |
bool | hasModule (std::string name) |
std::shared_ptr< Module > | getModule (std::string name) |
Get a module by its name. | |
template<class TModule> | |
std::shared_ptr< TModule > | getModule () |
Get the Module by the module class name. | |
template<class TModule> | |
std::shared_ptr< TModule > | getModule (std::string name) |
std::shared_ptr< Pipeline > | resetPipeline () |
std::shared_ptr< AnimationPipeline > | animationPipeline () |
std::shared_ptr< GraphicsPipeline > | graphicsPipeline () |
template<class TModule> | |
std::shared_ptr< TModule > | addModule (std::string name) |
void | update () |
Called every time interval. | |
void | updateGraphicsContext () |
void | reset () |
virtual NBoundingBox | boundingBox () |
bool | connect (NodePort *nPort) |
Depth-first tree traversal. | |
bool | disconnect (NodePort *nPort) |
bool | attachField (FBase *field, std::string name, std::string desc, bool autoDestroy=true) override |
Attach a field to Node. | |
std::vector< NodePort * > & | getAllNodePorts () |
uint | sizeOfNodePorts () |
uint | sizeOfImportNodes () const |
uint | sizeOfExportNodes () const |
void | setForceUpdate (bool b) |
DEF_VAR_STATE (Real, ElapsedTime, 0, "Elapsed Time") | |
DEF_VAR_STATE (Real, TimeStep, Real(0.033), "Time step size") | |
DEF_VAR_STATE (uint, FrameNumber, 0, "Frame number") | |
![]() | |
OBase () | |
~OBase () override | |
virtual std::string | caption () |
Return the caption. | |
virtual bool | captionVisible () |
Whether to hide the caption in the GUI. | |
virtual std::string | description () |
Return a description for the node or module, override this function to support user-defined description. | |
bool | addField (FBase *data) |
Add a field to Base FieldID will be set to the name of Field by default. | |
bool | addField (FieldID name, FBase *data) |
Add a field to Base. | |
bool | addFieldAlias (FieldID name, FBase *data) |
bool | addFieldAlias (FieldID name, FBase *data, FieldMap &fieldAlias) |
bool | findField (FBase *data) |
Find a field by its pointer. | |
bool | findFieldAlias (const FieldID name) |
Find a field by its name. | |
bool | findFieldAlias (const FieldID name, FieldMap &fieldAlias) |
Find a field in fieldAlias by its name This function is typically called by other functions. | |
bool | removeField (FBase *data) |
Remove a field by its pointer. | |
bool | removeFieldAlias (const FieldID name) |
Remove a field by its name. | |
bool | removeFieldAlias (const FieldID name, FieldMap &fieldAlias) |
FBase * | getField (const FieldID name) |
Return a field by its name. | |
std::vector< FBase * > & | getAllFields () |
template<typename T> | |
T * | getField (FieldID name) |
bool | isAllFieldsReady () |
Check the completeness of all required fields. | |
std::vector< FieldID > | getFieldAlias (FBase *data) |
int | getFieldAliasCount (FBase *data) |
void | setBlockCoord (float x, float y) |
float | bx () |
float | by () |
bool | findInputField (FBase *field) |
bool | addInputField (FBase *field) |
bool | removeInputField (FBase *field) |
std::vector< FBase * > & | getInputFields () |
bool | findOutputField (FBase *field) |
bool | addOutputField (FBase *field) |
bool | addToOutput (FBase *field) |
bool | removeOutputField (FBase *field) |
bool | removeFromOutput (FBase *field) |
std::vector< FBase * > & | getOutputFields () |
bool | findParameter (FBase *field) |
bool | addParameter (FBase *field) |
bool | removeParameter (FBase *field) |
std::vector< FBase * > & | getParameters () |
![]() | |
Object () | |
virtual | ~Object () |
ObjectId | objectId () |
Public Attributes | |
std::map< int, std::string > | node_Name |
![]() | |
std::string | m_node_name |
Protected Member Functions | |
void | resetStates () override |
void | updateStates () override |
![]() | |
bool | appendExportNode (NodePort *nodePort) |
bool | removeExportNode (NodePort *nodePort) |
virtual void | preUpdateStates () |
virtual void | postUpdateStates () |
virtual void | updateTopology () |
virtual bool | validateInputs () |
virtual bool | requireUpdate () |
void | tick () |
notify all state and output fields are updated | |
Private Member Functions | |
DECLARE_TCLASS (GltfLoader, TDataType) | |
void | varChanged () |
void | varRenderChanged () |
void | varAnimation () |
void | updateTransform () |
void | updateAnimation (int frameNumber) |
void | InitializationData () |
Vec3f | getVertexLocationWithJointTransform (joint jointId, Vec3f inPoint, std::map< joint, Mat4f > jMatrix) |
void | buildInverseBindMatrices (const std::vector< joint > &all_Joints) |
Vec3f | getmeshPointDeformByJoint (joint jointId, Coord worldPosition, std::map< joint, Mat4f > jMatrix) |
void | updateTransformState () |
Private Attributes | |
DArray< Coord > | initialPosition |
DArray< Coord > | unCenterPosition |
DArray< Coord > | initialNormal |
DArray< int > | d_joints |
DArray< Coord > | d_ShapeCenter |
bool | ToCenter = false |
std::map< joint, Quat< float > > | joint_rotation |
std::map< joint, Vec3f > | joint_scale |
std::map< joint, Vec3f > | joint_translation |
std::map< joint, Mat4f > | joint_matrix |
std::map< joint, std::vector< int > > | jointId_joint_Dir |
std::map< joint, Mat4f > | joint_inverseBindMatrix |
std::map< joint, Mat4f > | joint_AnimaMatrix |
std::vector< std::string > | Scene_Name |
std::map< joint, std::string > | joint_Name |
std::map< joint, Vec3i > | joint_output |
std::map< joint, Vec3f > | joint_input |
std::vector< joint > | all_Joints |
std::map< int, std::vector< int > > | meshId_Dir |
std::map< int, Mat4f > | node_matrix |
std::shared_ptr< GLWireframeVisualModule > | jointLineRender |
std::shared_ptr< GLPointVisualModule > | jointPointRender |
int | maxMeshId = -1 |
int | maxJointId = -1 |
DArray< Mat4f > | d_mesh_Matrix |
DArray< int > | d_shape_meshId |
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. | |
![]() | |
std::vector< FBase * > | fields_input |
std::vector< FBase * > | fields_output |
std::vector< FBase * > | fields_param |
Definition at line 64 of file GltfLoader.h.
typedef unsigned char dyno::GltfLoader< TDataType >::byte |
Definition at line 76 of file GltfLoader.h.
typedef TDataType::Coord dyno::GltfLoader< TDataType >::Coord |
Definition at line 70 of file GltfLoader.h.
typedef int dyno::GltfLoader< TDataType >::joint |
Definition at line 77 of file GltfLoader.h.
typedef TDataType::Matrix dyno::GltfLoader< TDataType >::Matrix |
Definition at line 71 of file GltfLoader.h.
typedef int dyno::GltfLoader< TDataType >::mesh |
Definition at line 79 of file GltfLoader.h.
typedef int dyno::GltfLoader< TDataType >::primitive |
Definition at line 80 of file GltfLoader.h.
typedef TDataType::Real dyno::GltfLoader< TDataType >::Real |
Definition at line 69 of file GltfLoader.h.
typedef int dyno::GltfLoader< TDataType >::scene |
Definition at line 81 of file GltfLoader.h.
typedef int dyno::GltfLoader< TDataType >::shape |
Definition at line 78 of file GltfLoader.h.
typedef TopologyModule::Triangle dyno::GltfLoader< TDataType >::Triangle |
Definition at line 73 of file GltfLoader.h.
dyno::GltfLoader< TDataType >::GltfLoader | ( | ) |
dyno::GltfLoader< TDataType >::~GltfLoader | ( | ) |
|
private |
|
private |
dyno::GltfLoader< TDataType >::DEF_ARRAY_STATE | ( | Mat4f | , |
InitialMatrix | , | ||
DeviceType::GPU | , | ||
"" | ) |
dyno::GltfLoader< TDataType >::DEF_ARRAY_STATE | ( | Mat4f | , |
JointInverseBindMatrix | , | ||
DeviceType::GPU | , | ||
"JointInverseBindMatrix" | ) |
dyno::GltfLoader< TDataType >::DEF_ARRAY_STATE | ( | Mat4f | , |
JointLocalMatrix | , | ||
DeviceType::GPU | , | ||
"JointLocalMatrix" | ) |
dyno::GltfLoader< TDataType >::DEF_ARRAY_STATE | ( | Mat4f | , |
JointWorldMatrix | , | ||
DeviceType::GPU | , | ||
"JointWorldMatrix" | ) |
dyno::GltfLoader< TDataType >::DEF_ARRAY_STATE | ( | Vec2f | , |
TexCoord_0 | , | ||
DeviceType::GPU | , | ||
"UVSet 0" | ) |
dyno::GltfLoader< TDataType >::DEF_ARRAY_STATE | ( | Vec2f | , |
TexCoord_1 | , | ||
DeviceType::GPU | , | ||
"UVSet 1" | ) |
dyno::GltfLoader< TDataType >::DEF_INSTANCE_STATE | ( | EdgeSet< TDataType > | , |
JointSet | , | ||
"" | ) |
dyno::GltfLoader< TDataType >::DEF_INSTANCE_STATE | ( | JointAnimationInfo | , |
Animation | , | ||
"" | ) |
dyno::GltfLoader< TDataType >::DEF_INSTANCE_STATE | ( | JointInfo | , |
JointsData | , | ||
"JointsInfo" | ) |
dyno::GltfLoader< TDataType >::DEF_INSTANCE_STATE | ( | PointSet< TDataType > | , |
ShapeCenter | , | ||
"" | ) |
dyno::GltfLoader< TDataType >::DEF_INSTANCE_STATE | ( | SkinInfo | , |
Skin | , | ||
"SkinInfo" | ) |
dyno::GltfLoader< TDataType >::DEF_INSTANCE_STATE | ( | TextureMesh | , |
TextureMesh | , | ||
"" | ) |
dyno::GltfLoader< TDataType >::DEF_VAR | ( | bool | , |
ImportAnimation | , | ||
false | , | ||
"" | ) |
dyno::GltfLoader< TDataType >::DEF_VAR | ( | bool | , |
UseInstanceTransform | , | ||
true | , | ||
"" | ) |
dyno::GltfLoader< TDataType >::DEF_VAR | ( | FilePath | , |
FileName | , | ||
"" | , | ||
"" | ) |
dyno::GltfLoader< TDataType >::DEF_VAR | ( | Real | , |
AnimationSpeed | , | ||
1 | , | ||
"AnimationSpeed" | ) |
dyno::GltfLoader< TDataType >::DEF_VAR | ( | Real | , |
JointRadius | , | ||
0. | 01, | ||
"" | ) |
dyno::GltfLoader< TDataType >::DEF_VAR_STATE | ( | Mat4f | , |
Transform | , | ||
Mat4f::identityMatrix() | , | ||
"Transform" | ) |
|
private |
|
inlineoverridevirtual |
Reimplemented from dyno::Node.
Definition at line 86 of file GltfLoader.h.
|
private |
|
private |
|
inlineoverrideprotectedvirtual |
Reimplemented from dyno::Node.
Definition at line 121 of file GltfLoader.h.
|
private |
|
overrideprotectedvirtual |
Reimplemented from dyno::Node.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Definition at line 164 of file GltfLoader.h.
|
private |
Definition at line 139 of file GltfLoader.h.
|
private |
Definition at line 182 of file GltfLoader.h.
|
private |
Definition at line 183 of file GltfLoader.h.
|
private |
Definition at line 141 of file GltfLoader.h.
|
private |
Definition at line 138 of file GltfLoader.h.
|
private |
Definition at line 136 of file GltfLoader.h.
|
private |
Definition at line 155 of file GltfLoader.h.
|
private |
Definition at line 161 of file GltfLoader.h.
|
private |
Definition at line 154 of file GltfLoader.h.
|
private |
Definition at line 147 of file GltfLoader.h.
|
private |
Definition at line 158 of file GltfLoader.h.
|
private |
Definition at line 160 of file GltfLoader.h.
|
private |
Definition at line 144 of file GltfLoader.h.
|
private |
Definition at line 145 of file GltfLoader.h.
|
private |
Definition at line 146 of file GltfLoader.h.
|
private |
Definition at line 148 of file GltfLoader.h.
|
private |
Definition at line 174 of file GltfLoader.h.
|
private |
Definition at line 175 of file GltfLoader.h.
|
private |
Definition at line 178 of file GltfLoader.h.
|
private |
Definition at line 177 of file GltfLoader.h.
|
private |
Definition at line 168 of file GltfLoader.h.
|
private |
Definition at line 171 of file GltfLoader.h.
std::map<int, std::string> dyno::GltfLoader< TDataType >::node_Name |
Definition at line 132 of file GltfLoader.h.
|
private |
Definition at line 157 of file GltfLoader.h.
|
private |
Definition at line 142 of file GltfLoader.h.
|
private |
Definition at line 137 of file GltfLoader.h.