mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 02:53:43 +02:00
Added sitting points metadata for fst
This commit is contained in:
parent
da45e8a5f8
commit
9a6f144da9
2 changed files with 24 additions and 1 deletions
|
@ -1897,7 +1897,20 @@ FBXGeometry extractFBXGeometry(const FBXNode& node, const QVariantHash& mapping)
|
|||
}
|
||||
geometry.attachments.append(attachment);
|
||||
}
|
||||
|
||||
|
||||
// Add sitting points
|
||||
QVariantHash sittingPoints = mapping.value("sit").toHash();
|
||||
for (QVariantHash::const_iterator it = sittingPoints.constBegin(); it != sittingPoints.constEnd(); it++) {
|
||||
SittingPoint sittingPoint;
|
||||
sittingPoint.name = it.key();
|
||||
|
||||
QVariantList properties = it->toList();
|
||||
sittingPoint.position = parseVec3(properties.at(0).toString());
|
||||
sittingPoint.rotation = glm::quat(glm::radians(parseVec3(properties.at(1).toString())));
|
||||
|
||||
geometry.sittingPoints.append(sittingPoint);
|
||||
}
|
||||
|
||||
return geometry;
|
||||
}
|
||||
|
||||
|
|
|
@ -182,6 +182,14 @@ public:
|
|||
glm::vec3 scale;
|
||||
};
|
||||
|
||||
/// A point where an avatar can sit
|
||||
class SittingPoint {
|
||||
public:
|
||||
QString name;
|
||||
glm::vec3 position; // relative postion
|
||||
glm::quat rotation; // relative orientation
|
||||
};
|
||||
|
||||
/// A set of meshes extracted from an FBX document.
|
||||
class FBXGeometry {
|
||||
public:
|
||||
|
@ -209,6 +217,8 @@ public:
|
|||
|
||||
glm::vec3 palmDirection;
|
||||
|
||||
QVector<SittingPoint> sittingPoints;
|
||||
|
||||
glm::vec3 neckPivot;
|
||||
|
||||
Extents bindExtents;
|
||||
|
|
Loading…
Reference in a new issue