LEFT | RIGHT |
1 /* | 1 /* |
2 * ***** BEGIN GPL LICENSE BLOCK ***** | 2 * ***** BEGIN GPL LICENSE BLOCK ***** |
3 * | 3 * |
4 * This program is free software; you can redistribute it and/or | 4 * This program is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU General Public License | 5 * modify it under the terms of the GNU General Public License |
6 * as published by the Free Software Foundation; either version 2 | 6 * as published by the Free Software Foundation; either version 2 |
7 * of the License, or (at your option) any later version. | 7 * of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 KX_PYATTRIBUTE_RW_FUNCTION("a", KX_VertexProxy, pyattr_get_a, pyattr_set
_a), | 87 KX_PYATTRIBUTE_RW_FUNCTION("a", KX_VertexProxy, pyattr_get_a, pyattr_set
_a), |
88 | 88 |
89 KX_PYATTRIBUTE_RW_FUNCTION("u", KX_VertexProxy, pyattr_get_u, pyattr_set
_u), | 89 KX_PYATTRIBUTE_RW_FUNCTION("u", KX_VertexProxy, pyattr_get_u, pyattr_set
_u), |
90 KX_PYATTRIBUTE_RW_FUNCTION("v", KX_VertexProxy, pyattr_get_v, pyattr_set
_v), | 90 KX_PYATTRIBUTE_RW_FUNCTION("v", KX_VertexProxy, pyattr_get_v, pyattr_set
_v), |
91 | 91 |
92 KX_PYATTRIBUTE_RW_FUNCTION("u2", KX_VertexProxy, pyattr_get_u2, pyattr_s
et_u2), | 92 KX_PYATTRIBUTE_RW_FUNCTION("u2", KX_VertexProxy, pyattr_get_u2, pyattr_s
et_u2), |
93 KX_PYATTRIBUTE_RW_FUNCTION("v2", KX_VertexProxy, pyattr_get_v2, pyattr_s
et_v2), | 93 KX_PYATTRIBUTE_RW_FUNCTION("v2", KX_VertexProxy, pyattr_get_v2, pyattr_s
et_v2), |
94 | 94 |
95 KX_PYATTRIBUTE_RW_FUNCTION("XYZ", KX_VertexProxy, pyattr_get_XYZ, pyattr
_set_XYZ), | 95 KX_PYATTRIBUTE_RW_FUNCTION("XYZ", KX_VertexProxy, pyattr_get_XYZ, pyattr
_set_XYZ), |
96 KX_PYATTRIBUTE_RW_FUNCTION("UV", KX_VertexProxy, pyattr_get_UV, pyattr_s
et_UV), | 96 KX_PYATTRIBUTE_RW_FUNCTION("UV", KX_VertexProxy, pyattr_get_UV, pyattr_s
et_UV), |
97 KX_PYATTRIBUTE_RW_FUNCTION("uvs", KX_VertexProxy, pyattr_get_uvs, pyattr
_set_uvs), | |
98 | 97 |
99 KX_PYATTRIBUTE_RW_FUNCTION("color", KX_VertexProxy, pyattr_get_color, py
attr_set_color), | 98 KX_PYATTRIBUTE_RW_FUNCTION("color", KX_VertexProxy, pyattr_get_color, py
attr_set_color), |
100 KX_PYATTRIBUTE_RW_FUNCTION("normal", KX_VertexProxy, pyattr_get_normal,
pyattr_set_normal), | 99 KX_PYATTRIBUTE_RW_FUNCTION("normal", KX_VertexProxy, pyattr_get_normal,
pyattr_set_normal), |
101 | |
102 { NULL } //Sentinel | |
103 }; | |
104 | |
105 PyObject *KX_VertexProxy::pyattr_get_x(void *self_v, const KX_PYATTRIBUTE_DEF *a
ttrdef) | |
106 { | |
107 KX_VertexProxy* self = static_cast<KX_VertexProxy*>(self_v); | |
108 return PyFloat_FromDouble(self->m_vertex->getXYZ()[0]); | |
109 } | |
110 | |
111 PyObject *KX_VertexProxy::pyattr_get_y(void *self_v, const KX_PYATTRIBUTE_DEF *a
ttrdef) | |
112 { | |
113 KX_VertexProxy* self = static_cast<KX_VertexProxy*>(self_v); | |
114 return PyFloat_FromDouble(self->m_vertex->getXYZ()[1]); | |
115 } | |
116 | |
117 PyObject *KX_VertexProxy::pyattr_get_z(void *self_v, const KX_PYATTRIBUTE_DEF *a
ttrdef) | |
118 { | |
119 KX_VertexProxy* self = static_cast<KX_VertexProxy*>(self_v); | |
120 return PyFloat_FromDouble(self->m_vertex->getXYZ()[2]); | |
121 } | |
122 | |
123 PyObject *KX_VertexProxy::pyattr_get_r(void *self_v, const KX_PYATTRIBUTE_DEF *a
ttrdef) | |
124 { | |
125 KX_VertexProxy* self = static_cast<KX_VertexProxy*>(self_v); | |
126 return PyFloat_FromDouble(self->m_vertex->getRGBA()[0]/255.0); | |
127 } | |
128 | |
129 PyObject *KX_VertexProxy::pyattr_get_g(void *self_v, const KX_PYATTRIBUTE_DEF *a
ttrdef) | |
130 { | |
131 KX_VertexProxy* self = static_cast<KX_VertexProxy*>(self_v); | |
132 return PyFloat_FromDouble(self->m_vertex->getRGBA()[1]/255.0); | |
133 } | |
134 | |
135 PyObject *KX_VertexProxy::pyattr_get_b(void *self_v, const KX_PYATTRIBUTE_DEF *a
ttrdef) | |
136 { | |
137 KX_VertexProxy* self = static_cast<KX_VertexProxy*>(self_v); | |
138 return PyFloat_FromDouble(self->m_vertex->getRGBA()[2]/255.0); | |
139 } | |
140 | |
141 PyObject *KX_VertexProxy::pyattr_get_a(void *self_v, const KX_PYATTRIBUTE_DEF *a
ttrdef) | |
142 { | |
143 KX_VertexProxy* self = static_cast<KX_VertexProxy*>(self_v); | |
144 return PyFloat_FromDouble(self->m_vertex->getRGBA()[3]/255.0); | |
145 } | |
146 PyObject* KX_VertexProxy::pyattr_get_u(void *self_v, const KX_PYATTRIBUTE_DEF *a
ttrdef) | |
147 { | |
148 KX_VertexProxy* self= static_cast<KX_VertexProxy*>(self_v); | |
149 return PyFloat_FromDouble(self->m_vertex->getUV1()[0]); | |
150 } | |
151 | |
152 PyObject* KX_VertexProxy::pyattr_get_v(void *self_v, const KX_PYATTRIBUTE_DEF *a
ttrdef) | |
153 { | |
154 KX_VertexProxy* self= static_cast<KX_VertexProxy*>(self_v); | |
155 return PyFloat_FromDouble(self->m_vertex->getUV1()[1]); | |
156 } | |
157 | |
158 PyObject* KX_VertexProxy::pyattr_get_u2(void *self_v, const KX_PYATTRIBUTE_DEF *
attrdef) | |
159 { | |
160 KX_VertexProxy* self= static_cast<KX_VertexProxy*>(self_v); | |
161 return PyFloat_FromDouble(self->m_vertex->getUV2()[0]); | |
162 } | |
163 | |
164 PyObject* KX_VertexProxy::pyattr_get_v2(void *self_v, const KX_PYATTRIBUTE_DEF *
attrdef) | |
165 { | |
166 KX_VertexProxy* self= static_cast<KX_VertexProxy*>(self_v); | |
167 return PyFloat_FromDouble(self->m_vertex->getUV2()[1]); | |
168 } | |
169 | |
170 PyObject* KX_VertexProxy::pyattr_get_XYZ(void *self_v, const KX_PYATTRIBUTE_DEF
*attrdef) | |
LEFT | RIGHT |