rename getCollisionGeometryResource to fetchCollisionGeometryResource

This commit is contained in:
Andrew Meadows 2018-11-19 17:27:18 -08:00
parent 0072684d98
commit 1fabaf0db4
2 changed files with 6 additions and 7 deletions

View file

@ -279,7 +279,7 @@ bool RenderableModelEntityItem::findDetailedParabolaIntersection(const glm::vec3
face, surfaceNormal, extraInfo, precisionPicking, false); face, surfaceNormal, extraInfo, precisionPicking, false);
} }
void RenderableModelEntityItem::getCollisionGeometryResource() { void RenderableModelEntityItem::fetchCollisionGeometryResource() {
QUrl hullURL(getCollisionShapeURL()); QUrl hullURL(getCollisionShapeURL());
QUrlQuery queryArgs(hullURL); QUrlQuery queryArgs(hullURL);
queryArgs.addQueryItem("collision-hull", ""); queryArgs.addQueryItem("collision-hull", "");
@ -289,7 +289,7 @@ void RenderableModelEntityItem::getCollisionGeometryResource() {
bool RenderableModelEntityItem::computeShapeFailedToLoad() { bool RenderableModelEntityItem::computeShapeFailedToLoad() {
if (!_compoundShapeResource) { if (!_compoundShapeResource) {
getCollisionGeometryResource(); fetchCollisionGeometryResource();
} }
return (_compoundShapeResource && _compoundShapeResource->isFailed()); return (_compoundShapeResource && _compoundShapeResource->isFailed());
@ -300,7 +300,7 @@ void RenderableModelEntityItem::setShapeType(ShapeType type) {
auto shapeType = getShapeType(); auto shapeType = getShapeType();
if (shapeType == SHAPE_TYPE_COMPOUND || shapeType == SHAPE_TYPE_SIMPLE_COMPOUND) { if (shapeType == SHAPE_TYPE_COMPOUND || shapeType == SHAPE_TYPE_SIMPLE_COMPOUND) {
if (!_compoundShapeResource && !getCollisionShapeURL().isEmpty()) { if (!_compoundShapeResource && !getCollisionShapeURL().isEmpty()) {
getCollisionGeometryResource(); fetchCollisionGeometryResource();
} }
} else if (_compoundShapeResource && !getCompoundShapeURL().isEmpty()) { } else if (_compoundShapeResource && !getCompoundShapeURL().isEmpty()) {
// the compoundURL has been set but the shapeType does not agree // the compoundURL has been set but the shapeType does not agree
@ -317,7 +317,7 @@ void RenderableModelEntityItem::setCompoundShapeURL(const QString& url) {
ModelEntityItem::setCompoundShapeURL(url); ModelEntityItem::setCompoundShapeURL(url);
if (getCompoundShapeURL() != currentCompoundShapeURL || !getModel()) { if (getCompoundShapeURL() != currentCompoundShapeURL || !getModel()) {
if (getShapeType() == SHAPE_TYPE_COMPOUND) { if (getShapeType() == SHAPE_TYPE_COMPOUND) {
getCollisionGeometryResource(); fetchCollisionGeometryResource();
} }
} }
} }
@ -340,7 +340,7 @@ bool RenderableModelEntityItem::isReadyToComputeShape() const {
if (model->isLoaded()) { if (model->isLoaded()) {
if (!shapeURL.isEmpty() && !_compoundShapeResource) { if (!shapeURL.isEmpty() && !_compoundShapeResource) {
const_cast<RenderableModelEntityItem*>(this)->getCollisionGeometryResource(); const_cast<RenderableModelEntityItem*>(this)->fetchCollisionGeometryResource();
} }
if (_compoundShapeResource && _compoundShapeResource->isLoaded()) { if (_compoundShapeResource && _compoundShapeResource->isLoaded()) {

View file

@ -122,7 +122,7 @@ private:
void autoResizeJointArrays(); void autoResizeJointArrays();
void copyAnimationJointDataToModel(); void copyAnimationJointDataToModel();
bool readyToAnimate() const; bool readyToAnimate() const;
void getCollisionGeometryResource(); void fetchCollisionGeometryResource();
GeometryResource::Pointer _compoundShapeResource; GeometryResource::Pointer _compoundShapeResource;
std::vector<int> _jointMap; std::vector<int> _jointMap;
@ -179,7 +179,6 @@ private:
bool _hasModel { false }; bool _hasModel { false };
ModelPointer _model; ModelPointer _model;
GeometryResource::Pointer _compoundShapeResource;
QString _lastTextures; QString _lastTextures;
bool _texturesLoaded { false }; bool _texturesLoaded { false };
int _lastKnownCurrentFrame { -1 }; int _lastKnownCurrentFrame { -1 };