From af460d7f5fbbe9a2a6aaea3dba504045a809707a Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Wed, 25 Sep 2019 15:22:29 -0700 Subject: [PATCH] Add hfm::Shape::transformedExtents. Mark select hfm fields as deprecated. --- libraries/hfm/src/hfm/HFM.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/libraries/hfm/src/hfm/HFM.h b/libraries/hfm/src/hfm/HFM.h index 51c5f929d8..d4d6dd33d0 100644 --- a/libraries/hfm/src/hfm/HFM.h +++ b/libraries/hfm/src/hfm/HFM.h @@ -158,7 +158,7 @@ public: QVector quadTrianglesIndices; // original indices from the FBX mesh of the quad converted as triangles QVector triangleIndices; // original indices from the FBX mesh - QString materialID; + QString materialID; // DEPRECATED }; class Material { @@ -238,14 +238,14 @@ public: QVector colors; QVector texCoords; QVector texCoords1; - QVector clusterIndices; - QVector clusterWeights; + QVector clusterIndices; // DEPRECATED (see hfm::Shape::dynamicTransform, hfm::DynamicTransform::deformers, hfm::Deformer) + QVector clusterWeights; // DEPRECATED (see hfm::Shape::dynamicTransform, hfm::DynamicTransform::deformers, hfm::Deformer) QVector originalIndices; - QVector clusters; + QVector clusters; // DEPRECATED (see hfm::Shape::dynamicTransform, hfm::DynamicTransform::clusters) - Extents meshExtents; - glm::mat4 modelTransform; + Extents meshExtents; // DEPRECATED (see hfm::Shape::transformedExtents) + glm::mat4 modelTransform; // DEPRECATED (see hfm::Shape::transform, hfm::TransformNode, hfm::Model::transforms) QVector blendshapes; @@ -317,6 +317,8 @@ public: uint32_t meshPart { UNDEFINED_KEY }; uint32_t material { UNDEFINED_KEY }; uint32_t transform { UNDEFINED_KEY }; // The static transform node when not taking into account rigging/skinning + // TODO: Have all serializers calculate hfm::Shape::transformedExtents in world space where they previously calculated hfm::Mesh::meshExtents. Change all code that uses hfm::Mesh::meshExtents to use this instead. + Extents transformedExtents; // The precise extents of the meshPart vertices in world space, after the transform node and parent transform nodes are applied, while not taking into account rigging/skinning uint32_t dynamicTransform { UNDEFINED_KEY }; };