-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOpenGLArrow.hpp
More file actions
41 lines (32 loc) · 982 Bytes
/
OpenGLArrow.hpp
File metadata and controls
41 lines (32 loc) · 982 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//
// OpenGLArrow.hpp
// OpenGLTutorial
//
// Created by Robby Tong on 1/7/19.
// Copyright © 2019 Robby Tong. All rights reserved.
//
#ifndef OpenGLArrow_hpp
#define OpenGLArrow_hpp
#include <stdio.h>
#include <glm/glm.hpp>
#include "OpenGLComposite.hpp"
#include "OpenGLCone.hpp"
#include "OpenGLPrismCylinder.hpp"
class OpenGLArrow: public OpenGLComposite
{
private:
OpenGLCone * mArrowHead;
OpenGLPrismCylinder * mArrowBody;
float mThickness;
glm::mat4 mVectorTranslation;
glm::mat4 mVectorTransformation;
public:
OpenGLArrow(float rgb[3], float arrow_head_to_body_ratio=0.3);
~OpenGLArrow();
virtual void setPosition(float x, float y, float z) override;
virtual void addPosition(float x, float y, float z) override;
virtual glm::mat4 getTransformationMatrix(void) override;
void setThickness(float thickness);
void setVectorDimensions(float x, float y, float z);
};
#endif /* OpenGLArrow_hpp */