• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /***************************************************************************
2  *
3  * Copyright 2010,2011 BMW Car IT GmbH
4  * Copyright (C) 2018 Advanced Driver Information Technology Joint Venture GmbH
5  *
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *        http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  ****************************************************************************/
20 #ifndef _CAR_H
21 #define _CAR_H
22 
23 #include "IRenderable.h"
24 #include "vec.h"
25 #include "ShaderTexture.h"
26 #include "TextureLoader.h"
27 
28 class ShaderBase;
29 
30 class Car : public IRenderable
31 {
32 public:
33     Car(vec3f position, vec3f size, vec4f color, ShaderBase* shader);
34     Car(vec3f position, vec3f size, vec4f color, ShaderTexture* shader, TextureLoader* texture);
~Car()35     virtual ~Car() {}
36 
37     virtual void render();
38 
39 private:
40     vec3f m_position;
41     vec3f m_size;
42     vec4f m_color;
43 
44     vec4u m_index;
45     vec3f m_vertex[4];
46     vec2f m_texCoords[4];
47 
48     ShaderBase* m_pShader;
49 
50     TextureLoader* texture;
51     bool withTexture = false;
52 };
53 
54 #endif /* _CAR_H */
55