mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-23 10:04:00 +02:00
add comment about character capsule being hard-coded
This commit is contained in:
parent
99300a5bc8
commit
ab8784f1b4
2 changed files with 21 additions and 6 deletions
|
@ -121,18 +121,28 @@ bool parseOBJGroup(OBJTokenizer &tokenizer, const QVariantHash& mapping, FBXGeom
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
sawG = true;
|
sawG = true;
|
||||||
if (tokenizer.nextToken() != OBJTokenizer::DATUM_TOKEN) { break; }
|
if (tokenizer.nextToken() != OBJTokenizer::DATUM_TOKEN) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
QByteArray groupName = tokenizer.getDatum();
|
QByteArray groupName = tokenizer.getDatum();
|
||||||
meshPart.materialID = groupName;
|
meshPart.materialID = groupName;
|
||||||
} else if (token == "v") {
|
} else if (token == "v") {
|
||||||
if (tokenizer.nextToken() != OBJTokenizer::DATUM_TOKEN) { break; }
|
if (tokenizer.nextToken() != OBJTokenizer::DATUM_TOKEN) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
float x = std::stof(tokenizer.getDatum().data());
|
float x = std::stof(tokenizer.getDatum().data());
|
||||||
// notice the order of z and y -- in OBJ files, up is the 3rd value
|
// notice the order of z and y -- in OBJ files, up is the 3rd value
|
||||||
if (tokenizer.nextToken() != OBJTokenizer::DATUM_TOKEN) { break; }
|
if (tokenizer.nextToken() != OBJTokenizer::DATUM_TOKEN) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
float z = std::stof(tokenizer.getDatum().data());
|
float z = std::stof(tokenizer.getDatum().data());
|
||||||
if (tokenizer.nextToken() != OBJTokenizer::DATUM_TOKEN) { break; }
|
if (tokenizer.nextToken() != OBJTokenizer::DATUM_TOKEN) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
float y = std::stof(tokenizer.getDatum().data());
|
float y = std::stof(tokenizer.getDatum().data());
|
||||||
if (tokenizer.nextToken() != OBJTokenizer::DATUM_TOKEN) { break; }
|
if (tokenizer.nextToken() != OBJTokenizer::DATUM_TOKEN) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
// the spec gets vague here. might be w, might be a color... chop it off.
|
// the spec gets vague here. might be w, might be a color... chop it off.
|
||||||
tokenizer.skipLine();
|
tokenizer.skipLine();
|
||||||
mesh.vertices.append(glm::vec3(x, y, z));
|
mesh.vertices.append(glm::vec3(x, y, z));
|
||||||
|
@ -199,10 +209,14 @@ FBXGeometry readOBJ(QIODevice* device, const QVariantHash& mapping) {
|
||||||
geometry.meshExtents.reset();
|
geometry.meshExtents.reset();
|
||||||
geometry.meshes.append(FBXMesh());
|
geometry.meshes.append(FBXMesh());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// call parseOBJGroup as long as it's returning true. Each successful call will
|
// call parseOBJGroup as long as it's returning true. Each successful call will
|
||||||
// add a new meshPart to the geometry's single mesh.
|
// add a new meshPart to the geometry's single mesh.
|
||||||
while (parseOBJGroup(tokenizer, mapping, geometry)) {
|
bool success = true;
|
||||||
|
while (success) {
|
||||||
|
success = parseOBJGroup(tokenizer, mapping, geometry);
|
||||||
}
|
}
|
||||||
|
|
||||||
FBXMesh &mesh = geometry.meshes[0];
|
FBXMesh &mesh = geometry.meshes[0];
|
||||||
|
|
|
@ -608,6 +608,7 @@ void PhysicsEngine::setAvatarData(AvatarData *avatarData) {
|
||||||
_avatarGhostObject->setWorldTransform(btTransform(glmToBullet(_avatarData->getOrientation()),
|
_avatarGhostObject->setWorldTransform(btTransform(glmToBullet(_avatarData->getOrientation()),
|
||||||
glmToBullet(_avatarData->getPosition())));
|
glmToBullet(_avatarData->getPosition())));
|
||||||
|
|
||||||
|
// XXX these values should be computed from the character model.
|
||||||
btScalar characterHeight = 1.75;
|
btScalar characterHeight = 1.75;
|
||||||
btScalar characterWidth = 1.75;
|
btScalar characterWidth = 1.75;
|
||||||
btScalar stepHeight = btScalar(0.35);
|
btScalar stepHeight = btScalar(0.35);
|
||||||
|
|
Loading…
Reference in a new issue