58 lines
1.2 KiB
C++
58 lines
1.2 KiB
C++
/*
|
||
* © Copyright 2014 – Urheberrechtshinweis
|
||
* Alle Rechte vorbehalten / All Rights Reserved
|
||
*
|
||
* Programmcode ist urheberrechtlich geschuetzt.
|
||
* Das Urheberrecht liegt, soweit nicht ausdruecklich anders gekennzeichnet, bei Frank Ebner.
|
||
* Keine Verwendung ohne explizite Genehmigung.
|
||
* (vgl. § 106 ff UrhG / § 97 UrhG)
|
||
*/
|
||
|
||
#ifndef MV3DELEMENTELEVATOR_H
|
||
#define MV3DELEMENTELEVATOR_H
|
||
|
||
|
||
#include <Indoor/floorplan/v2/Floorplan.h>
|
||
#include <Indoor/math/Math.h>
|
||
|
||
#include "misc/Cube.h"
|
||
#include "MV3DElement.h"
|
||
//#include "misc/Plane.h"
|
||
|
||
|
||
|
||
class MV3DElementElevator : public MV3DElement {
|
||
|
||
Floorplan::Floor* f;
|
||
Floorplan::Elevator* e;
|
||
|
||
public:
|
||
|
||
/** ctor */
|
||
MV3DElementElevator(Floorplan::Floor* f, Floorplan::Elevator* e) : f(f), e(e) {
|
||
;
|
||
}
|
||
|
||
/** repaint me */
|
||
void render(const RenderSettings& rs) override {
|
||
|
||
const Point3 pos(e->center.x, e->center.y, f->getStartingZ() + e->height_m/2);
|
||
const Point3 size(e->width/2, e->depth/2, e->height_m/2.0001); // z-fighting
|
||
const Point3 rot(0,0,e->rotation * 180 / M_PI);
|
||
|
||
// build
|
||
Cube cube(pos, size, rot);
|
||
cube.setColor(0.2, 0.2, 0.2);
|
||
cube.render(rs);
|
||
|
||
}
|
||
|
||
bool isTransparent() const override {
|
||
return false;
|
||
}
|
||
|
||
|
||
};
|
||
|
||
#endif // MV3DELEMENTELEVATOR_H
|