blob: d8796e6814af56ed2ee8ccd9e881ae39cba0fb74 [file] [log] [blame]
Jason Sams1aa5a4e2009-06-22 17:15:15 -07001/*
2 * Copyright (C) 2009 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef ANDROID_LIGHT_H
18#define ANDROID_LIGHT_H
19
20
21#include "rsObjectBase.h"
22
23// ---------------------------------------------------------------------------
24namespace android {
25namespace renderscript {
26
27
28// An element is a group of Components that occupies one cell in a structure.
29class Light : public ObjectBase
30{
31public:
Jason Samse514b452009-09-25 14:51:22 -070032 Light(Context *, bool isLocal, bool isMono);
Jason Sams1aa5a4e2009-06-22 17:15:15 -070033 virtual ~Light();
34
35 // Values, mutable after creation.
36 void setPosition(float x, float y, float z);
37 void setColor(float r, float g, float b);
38
Jason Samsb5909ce2009-07-21 12:20:54 -070039 void setupGL(uint32_t num) const;
40
Jason Sams1aa5a4e2009-06-22 17:15:15 -070041protected:
Jason Samsb5909ce2009-07-21 12:20:54 -070042 float mColor[4];
43 float mPosition[4];
Jason Sams1aa5a4e2009-06-22 17:15:15 -070044 bool mIsLocal;
45 bool mIsMono;
46};
47
48
49class LightState {
50public:
51 LightState();
52 ~LightState();
53
54 void clear();
55
56 bool mIsMono;
57 bool mIsLocal;
58};
59
60
61}
62}
63#endif //ANDROID_LIGHT_H
64