mirror of
https://github.com/overte-org/overte.git
synced 2025-07-29 18:52:11 +02:00
43 lines
1.3 KiB
C++
43 lines
1.3 KiB
C++
//
|
|
// Volume3DOverlay.h
|
|
// interface/src/ui/overlays
|
|
//
|
|
// Copyright 2014 High Fidelity, Inc.
|
|
//
|
|
// Distributed under the Apache License, Version 2.0.
|
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
//
|
|
|
|
#ifndef hifi_Volume3DOverlay_h
|
|
#define hifi_Volume3DOverlay_h
|
|
|
|
// include this before QGLWidget, which includes an earlier version of OpenGL
|
|
#include "InterfaceConfig.h"
|
|
|
|
#include "Base3DOverlay.h"
|
|
|
|
class Volume3DOverlay : public Base3DOverlay {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
Volume3DOverlay() {}
|
|
Volume3DOverlay(const Volume3DOverlay* volume3DOverlay);
|
|
|
|
virtual AABox getBounds() const;
|
|
|
|
const glm::vec3& getDimensions() const { return _localBoundingBox.getDimensions(); }
|
|
void setDimensions(float value) { _localBoundingBox.setBox(glm::vec3(-value / 2.0f), value); }
|
|
void setDimensions(const glm::vec3& value) { _localBoundingBox.setBox(-value / 2.0f, value); }
|
|
|
|
virtual void setProperties(const QScriptValue& properties);
|
|
virtual QScriptValue getProperty(const QString& property);
|
|
|
|
virtual bool findRayIntersection(const glm::vec3& origin, const glm::vec3& direction, float& distance, BoxFace& face);
|
|
|
|
protected:
|
|
// Centered local bounding box
|
|
AABox _localBoundingBox;
|
|
};
|
|
|
|
|
|
#endif // hifi_Volume3DOverlay_h
|