mirror of
https://github.com/overte-org/overte.git
synced 2025-07-23 01:00:50 +02:00
SHAPE_TYPE_MESH --> SHAPE_TYPE_STATIC_MESH
This commit is contained in:
parent
f22a5613bd
commit
937bd0c1be
5 changed files with 9 additions and 9 deletions
|
@ -593,7 +593,7 @@ bool RenderableModelEntityItem::isReadyToComputeShape() {
|
||||||
|
|
||||||
// the model is still being downloaded.
|
// the model is still being downloaded.
|
||||||
return false;
|
return false;
|
||||||
} else if (type == SHAPE_TYPE_MESH) {
|
} else if (type == SHAPE_TYPE_STATIC_MESH) {
|
||||||
return (_model && _model->isLoaded());
|
return (_model && _model->isLoaded());
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -706,7 +706,7 @@ void RenderableModelEntityItem::computeShapeInfo(ShapeInfo& info) {
|
||||||
}
|
}
|
||||||
|
|
||||||
info.setParams(type, dimensions, _compoundShapeURL);
|
info.setParams(type, dimensions, _compoundShapeURL);
|
||||||
} else if (type == SHAPE_TYPE_MESH) {
|
} else if (type == SHAPE_TYPE_STATIC_MESH) {
|
||||||
// compute meshPart local transforms
|
// compute meshPart local transforms
|
||||||
QVector<glm::mat4> localTransforms;
|
QVector<glm::mat4> localTransforms;
|
||||||
const FBXGeometry& geometry = _model->getFBXGeometry();
|
const FBXGeometry& geometry = _model->getFBXGeometry();
|
||||||
|
@ -820,7 +820,7 @@ void RenderableModelEntityItem::computeShapeInfo(ShapeInfo& info) {
|
||||||
}
|
}
|
||||||
|
|
||||||
pointCollection.push_back(points);
|
pointCollection.push_back(points);
|
||||||
info.setParams(SHAPE_TYPE_MESH, 0.5f * dimensions, _modelURL);
|
info.setParams(SHAPE_TYPE_STATIC_MESH, 0.5f * dimensions, _modelURL);
|
||||||
} else {
|
} else {
|
||||||
ModelEntityItem::computeShapeInfo(info);
|
ModelEntityItem::computeShapeInfo(info);
|
||||||
info.setParams(type, 0.5f * dimensions);
|
info.setParams(type, 0.5f * dimensions);
|
||||||
|
|
|
@ -123,7 +123,7 @@ void buildStringToShapeTypeLookup() {
|
||||||
addShapeType(SHAPE_TYPE_HULL);
|
addShapeType(SHAPE_TYPE_HULL);
|
||||||
addShapeType(SHAPE_TYPE_PLANE);
|
addShapeType(SHAPE_TYPE_PLANE);
|
||||||
addShapeType(SHAPE_TYPE_COMPOUND);
|
addShapeType(SHAPE_TYPE_COMPOUND);
|
||||||
addShapeType(SHAPE_TYPE_MESH);
|
addShapeType(SHAPE_TYPE_STATIC_MESH);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString getCollisionGroupAsString(uint8_t group) {
|
QString getCollisionGroupAsString(uint8_t group) {
|
||||||
|
|
|
@ -161,7 +161,7 @@ btConvexHullShape* createConvexHull(const ShapeInfo::PointList& points) {
|
||||||
|
|
||||||
// util method
|
// util method
|
||||||
btTriangleIndexVertexArray* createStaticMeshArray(const ShapeInfo& info) {
|
btTriangleIndexVertexArray* createStaticMeshArray(const ShapeInfo& info) {
|
||||||
assert(info.getType() == SHAPE_TYPE_MESH); // should only get here for mesh shapes
|
assert(info.getType() == SHAPE_TYPE_STATIC_MESH); // should only get here for mesh shapes
|
||||||
|
|
||||||
const ShapeInfo::PointCollection& pointCollection = info.getPointCollection();
|
const ShapeInfo::PointCollection& pointCollection = info.getPointCollection();
|
||||||
assert(pointCollection.size() == 1); // should only have one mesh
|
assert(pointCollection.size() == 1); // should only have one mesh
|
||||||
|
@ -274,7 +274,7 @@ btCollisionShape* ShapeFactory::createShapeFromInfo(const ShapeInfo& info) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SHAPE_TYPE_MESH: {
|
case SHAPE_TYPE_STATIC_MESH: {
|
||||||
btTriangleIndexVertexArray* dataArray = createStaticMeshArray(info);
|
btTriangleIndexVertexArray* dataArray = createStaticMeshArray(info);
|
||||||
shape = new StaticMeshShape(dataArray);
|
shape = new StaticMeshShape(dataArray);
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ void ShapeInfo::setParams(ShapeType type, const glm::vec3& halfExtents, QString
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SHAPE_TYPE_COMPOUND:
|
case SHAPE_TYPE_COMPOUND:
|
||||||
case SHAPE_TYPE_MESH:
|
case SHAPE_TYPE_STATIC_MESH:
|
||||||
_url = QUrl(url);
|
_url = QUrl(url);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -224,7 +224,7 @@ const DoubleHashKey& ShapeInfo::getHash() const {
|
||||||
}
|
}
|
||||||
_doubleHashKey.setHash2(hash);
|
_doubleHashKey.setHash2(hash);
|
||||||
|
|
||||||
if (_type == SHAPE_TYPE_COMPOUND || _type == SHAPE_TYPE_MESH) {
|
if (_type == SHAPE_TYPE_COMPOUND || _type == SHAPE_TYPE_STATIC_MESH) {
|
||||||
QString url = _url.toString();
|
QString url = _url.toString();
|
||||||
if (!url.isEmpty()) {
|
if (!url.isEmpty()) {
|
||||||
// fold the urlHash into both parts
|
// fold the urlHash into both parts
|
||||||
|
|
|
@ -39,7 +39,7 @@ enum ShapeType {
|
||||||
SHAPE_TYPE_HULL,
|
SHAPE_TYPE_HULL,
|
||||||
SHAPE_TYPE_PLANE,
|
SHAPE_TYPE_PLANE,
|
||||||
SHAPE_TYPE_COMPOUND,
|
SHAPE_TYPE_COMPOUND,
|
||||||
SHAPE_TYPE_MESH
|
SHAPE_TYPE_STATIC_MESH
|
||||||
};
|
};
|
||||||
|
|
||||||
class ShapeInfo {
|
class ShapeInfo {
|
||||||
|
|
Loading…
Reference in a new issue