OSDN Git Service

Initial checkin for denncoCreator
[dennco/denncoCreator.git] / Source / visualizer / component / dcvcaxon.h
1 //  Copyright (c) 2012 Dennco Project
2 //
3 // This program is free software: you can redistribute it and/or modify
4 // it under the terms of the GNU General Public License as published by
5 // the Free Software Foundation, either version 3 of the License, or
6 // (at your option) any later version.
7 //
8 // This program is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 // GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License
14 // along with this program.  If not, see <http://www.gnu.org/licenses/>.
15
16 //
17 //  Created by tkawata on Sep-30, 2012.
18 //
19 #ifndef DCVCAXON_H
20 #define DCVCAXON_H
21
22 #include "dcvcomponent.h"
23
24 #include <QtOpenGL>
25
26 class DCAxon;
27 class DCCell;
28 class DCCubeRenderer;
29
30 class DCVCAxon : public DCVComponent
31 {
32     DCAxon                  *d_owner;
33     bool                    d_shouldUpdateShape;
34
35 public:
36     DCVCAxon(DCAxon *owner);
37     virtual ~DCVCAxon();
38
39     virtual DCVCPage *  getPageBelonging() const;
40     virtual bool        isResizingArea(float x, float y, float z) const { return false; }
41
42     virtual DCCell *    getOwnerCell() const;
43
44     virtual void    prepareChildrenForDraw(bool isAnimationInterval);
45     virtual void    drawChildren(bool isAnimationInterval);
46     virtual void    drawChildrenForSelection(QList<DCVComponent*> *itemList);
47     virtual void    translate();
48     virtual void    setSelected(bool selected, bool updateChildren = false);
49     virtual void    setVisible(DCVVisibility visibleSelf, DCVVisibility visibleChildren);
50     virtual void    renderOwnShape(bool isAnimationInterval, bool renderAsWireframe);
51
52     virtual bool    startDrag(float x, float y, float z, bool isResizingDrag);
53     virtual bool    dragging(float x, float y, float z, bool isResizingDrag);
54     virtual bool    endDrag(float x, float y, float z, bool isResizingDrag);
55     virtual void    updateShape();
56
57     void    setLength(float length);
58     void    setAngle(float angle);
59 };
60
61 #endif // DCVCAXON_H