remove USE_N_SCALE preprocessor check

This commit is contained in:
Anthony J. Thibault 2017-09-18 13:30:34 -07:00
parent 8144841258
commit a8a5138c18
3 changed files with 0 additions and 6 deletions

View file

@ -47,9 +47,7 @@ void ModelOverlay::update(float deltatime) {
_updateModel = false;
_model->setSnapModelToCenter(true);
Transform transform = getTransform();
#ifndef USE_SN_SCALE
transform.setScale(1.0f); // disable inherited scale
#endif
if (_scaleToFit) {
_model->setScaleToFit(true, transform.getScale() * getDimensions());
} else {

View file

@ -41,9 +41,7 @@ void Sphere3DOverlay::render(RenderArgs* args) {
if (batch) {
// FIXME Start using the _renderTransform instead of calling for Transform and Dimensions from here, do the custom things needed in evalRenderTransform()
Transform transform = getTransform();
#ifndef USE_SN_SCALE
transform.setScale(1.0f); // ignore inherited scale from SpatiallyNestable
#endif
transform.postScale(getDimensions() * SPHERE_OVERLAY_SCALE);
batch->setModelTransform(transform);

View file

@ -57,9 +57,7 @@ bool Volume3DOverlay::findRayIntersection(const glm::vec3& origin, const glm::ve
// extents is the entity relative, scaled, centered extents of the entity
glm::mat4 worldToEntityMatrix;
Transform transform = getTransform();
#ifndef USE_SN_SCALE
transform.setScale(1.0f); // ignore any inherited scale from SpatiallyNestable
#endif
transform.getInverseMatrix(worldToEntityMatrix);
glm::vec3 overlayFrameOrigin = glm::vec3(worldToEntityMatrix * glm::vec4(origin, 1.0f));