scg3  0.6
ColorCore.h
Go to the documentation of this file.
1 
10 /*
11  * Copyright 2014 Volker Ahlers
12  *
13  * Licensed under the Apache License, Version 2.0 (the "License");
14  * you may not use this file except in compliance with the License.
15  * You may obtain a copy of the License at
16  *
17  * http://www.apache.org/licenses/LICENSE-2.0
18  *
19  * Unless required by applicable law or agreed to in writing, software
20  * distributed under the License is distributed on an "AS IS" BASIS,
21  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22  * See the License for the specific language governing permissions and
23  * limitations under the License.
24  */
25 
26 #ifndef COLORCORE_H_
27 #define COLORCORE_H_
28 
29 #include "Core.h"
30 #include "scg_glm.h"
31 #include "scg_internals.h"
32 
33 namespace scg {
34 
35 
40 class ColorCore: public Core {
41 
42 public:
43 
47  ColorCore();
48 
52  virtual ~ColorCore();
53 
57  static ColorCoreSP create();
58 
64  ColorCore* setColor(glm::vec4 color);
65 
70  ColorCore* setMatrix(glm::mat4 matrix);
71 
76  virtual void render(RenderState* renderState);
77 
81  virtual void renderPost(RenderState* renderState);
82 
83 protected:
84 
86  glm::vec4 color_;
87  glm::mat4 matrix_;
89 
90 };
91 
92 
93 } /* namespace scg */
94 
95 #endif /* COLORCORE_H_ */
static ColorCoreSP create()
ColorCore * setColor(glm::vec4 color)
virtual ~ColorCore()
Local header file for GLM OpenGL Mathematics library.
virtual void renderPost(RenderState *renderState)
glm::mat4 matrix_
Definition: ColorCore.h:87
ColorCore * setMatrix(glm::mat4 matrix)
Base class for all cores (abstract).
Definition: Core.h:36
A core to set a vertex color or a color transformation to be applied to subsequent geometry.
Definition: ColorCore.h:40
glm::vec4 color_
Definition: ColorCore.h:86
ColorCore * colorCoreOld_
Definition: ColorCore.h:88
bool isColorSet_
Definition: ColorCore.h:85
The central render state that collects information about the current shader, transformations,...
Definition: RenderState.h:107
virtual void render(RenderState *renderState)
Definition: Animation.h:28
Internal definitions required by most classes.
Base class for all cores (abstract).