diff options
Diffstat (limited to 'libraries/irrlicht-1.8/source/Irrlicht/CAttributes.h')
-rw-r--r-- | libraries/irrlicht-1.8/source/Irrlicht/CAttributes.h | 712 |
1 files changed, 0 insertions, 712 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/CAttributes.h b/libraries/irrlicht-1.8/source/Irrlicht/CAttributes.h deleted file mode 100644 index 45fc22c..0000000 --- a/libraries/irrlicht-1.8/source/Irrlicht/CAttributes.h +++ /dev/null | |||
@@ -1,712 +0,0 @@ | |||
1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt | ||
2 | // This file is part of the "Irrlicht Engine". | ||
3 | // For conditions of distribution and use, see copyright notice in irrlicht.h | ||
4 | |||
5 | #ifndef __C_ATTRIBUTES_H_INCLUDED__ | ||
6 | #define __C_ATTRIBUTES_H_INCLUDED__ | ||
7 | |||
8 | #include "IAttributes.h" | ||
9 | #include "IAttribute.h" | ||
10 | |||
11 | namespace irr | ||
12 | { | ||
13 | namespace video | ||
14 | { | ||
15 | class ITexture; | ||
16 | class IVideoDriver; | ||
17 | } | ||
18 | namespace io | ||
19 | { | ||
20 | |||
21 | |||
22 | //! Implementation of the IAttributes interface | ||
23 | class CAttributes : public IAttributes | ||
24 | { | ||
25 | public: | ||
26 | |||
27 | CAttributes(video::IVideoDriver* driver=0); | ||
28 | ~CAttributes(); | ||
29 | |||
30 | //! Returns amount of attributes in this collection of attributes. | ||
31 | virtual u32 getAttributeCount() const; | ||
32 | |||
33 | //! Returns attribute name by index. | ||
34 | //! \param index: Index value, must be between 0 and getAttributeCount()-1. | ||
35 | virtual const c8* getAttributeName(s32 index); | ||
36 | |||
37 | //! Returns the type of an attribute | ||
38 | //! \param attributeName: Name for the attribute | ||
39 | virtual E_ATTRIBUTE_TYPE getAttributeType(const c8* attributeName); | ||
40 | |||
41 | //! Returns attribute type by index. | ||
42 | //! \param index: Index value, must be between 0 and getAttributeCount()-1. | ||
43 | virtual E_ATTRIBUTE_TYPE getAttributeType(s32 index); | ||
44 | |||
45 | //! Returns the type string of the attribute | ||
46 | //! \param attributeName: String for the attribute type | ||
47 | virtual const wchar_t* getAttributeTypeString(const c8* attributeName); | ||
48 | |||
49 | //! Returns the type string of the attribute by index. | ||
50 | //! \param index: Index value, must be between 0 and getAttributeCount()-1. | ||
51 | virtual const wchar_t* getAttributeTypeString(s32 index); | ||
52 | |||
53 | //! Returns if an attribute with a name exists | ||
54 | virtual bool existsAttribute(const c8* attributeName); | ||
55 | |||
56 | //! Returns attribute index from name, -1 if not found | ||
57 | virtual s32 findAttribute(const c8* attributeName) const; | ||
58 | |||
59 | //! Removes all attributes | ||
60 | virtual void clear(); | ||
61 | |||
62 | //! Reads attributes from a xml file. | ||
63 | //! \param readCurrentElementOnly: If set to true, reading only works if current element has the name 'attributes'. | ||
64 | //! IF set to false, the first appearing list attributes are read. | ||
65 | virtual bool read(io::IXMLReader* reader, bool readCurrentElementOnly=false, | ||
66 | const wchar_t* nonDefaultElementName = 0); | ||
67 | |||
68 | //! Write these attributes into a xml file | ||
69 | virtual bool write(io::IXMLWriter* writer, bool writeXMLHeader=false, const wchar_t* nonDefaultElementName=0); | ||
70 | |||
71 | |||
72 | /* | ||
73 | |||
74 | Integer Attribute | ||
75 | |||
76 | */ | ||
77 | |||
78 | //! Adds an attribute as integer | ||
79 | virtual void addInt(const c8* attributeName, s32 value); | ||
80 | |||
81 | //! Sets an attribute as integer value | ||
82 | virtual void setAttribute(const c8* attributeName, s32 value); | ||
83 | |||
84 | //! Gets an attribute as integer value | ||
85 | //! \param attributeName: Name of the attribute to get. | ||
86 | //! \return Returns value of the attribute previously set by setAttribute() | ||
87 | virtual s32 getAttributeAsInt(const c8* attributeName) const; | ||
88 | |||
89 | //! Gets an attribute as integer value | ||
90 | //! \param index: Index value, must be between 0 and getAttributeCount()-1. | ||
91 | virtual s32 getAttributeAsInt(s32 index) const; | ||
92 | |||
93 | //! Sets an attribute as integer value | ||
94 | virtual void setAttribute(s32 index, s32 value); | ||
95 | |||
96 | /* | ||
97 | |||
98 | Float Attribute | ||
99 | |||
100 | */ | ||
101 | |||
102 | //! Adds an attribute as float | ||
103 | virtual void addFloat(const c8* attributeName, f32 value); | ||
104 | |||
105 | //! Sets a attribute as float value | ||
106 | virtual void setAttribute(const c8* attributeName, f32 value); | ||
107 | |||
108 | //! Gets an attribute as float value | ||
109 | //! \param attributeName: Name of the attribute to get. | ||
110 | //! \return Returns value of the attribute previously set by setAttribute() | ||
111 | virtual f32 getAttributeAsFloat(const c8* attributeName); | ||
112 | |||
113 | //! Gets an attribute as float value | ||
114 | //! \param index: Index value, must be between 0 and getAttributeCount()-1. | ||
115 | virtual f32 getAttributeAsFloat(s32 index); | ||
116 | |||
117 | //! Sets an attribute as float value | ||
118 | virtual void setAttribute(s32 index, f32 value); | ||
119 | |||
120 | /* | ||
121 | |||
122 | String Attribute | ||
123 | |||
124 | */ | ||
125 | |||
126 | //! Adds an attribute as string | ||
127 | virtual void addString(const c8* attributeName, const c8* value); | ||
128 | |||
129 | //! Sets an attribute value as string. | ||
130 | //! \param attributeName: Name for the attribute | ||
131 | //! \param value: Value for the attribute. Set this to 0 to delete the attribute | ||
132 | virtual void setAttribute(const c8* attributeName, const c8* value); | ||
133 | |||
134 | //! Gets an attribute as string. | ||
135 | //! \param attributeName: Name of the attribute to get. | ||
136 | //! \return Returns value of the attribute previously set by setAttribute() | ||
137 | //! or 0 if attribute is not set. | ||
138 | virtual core::stringc getAttributeAsString(const c8* attributeName); | ||
139 | |||
140 | //! Gets an attribute as string. | ||
141 | //! \param attributeName: Name of the attribute to get. | ||
142 | //! \param target: Buffer where the string is copied to. | ||
143 | virtual void getAttributeAsString(const c8* attributeName, c8* target); | ||
144 | |||
145 | //! Returns attribute value as string by index. | ||
146 | //! \param index: Index value, must be between 0 and getAttributeCount()-1. | ||
147 | virtual core::stringc getAttributeAsString(s32 index); | ||
148 | |||
149 | //! Sets an attribute value as string. | ||
150 | //! \param attributeName: Name for the attribute | ||
151 | virtual void setAttribute(s32 index, const c8* value); | ||
152 | |||
153 | // wide strings | ||
154 | |||
155 | //! Adds an attribute as string | ||
156 | virtual void addString(const c8* attributeName, const wchar_t* value); | ||
157 | |||
158 | //! Sets an attribute value as string. | ||
159 | //! \param attributeName: Name for the attribute | ||
160 | //! \param value: Value for the attribute. Set this to 0 to delete the attribute | ||
161 | virtual void setAttribute(const c8* attributeName, const wchar_t* value); | ||
162 | |||
163 | //! Gets an attribute as string. | ||
164 | //! \param attributeName: Name of the attribute to get. | ||
165 | //! \return Returns value of the attribute previously set by setAttribute() | ||
166 | //! or 0 if attribute is not set. | ||
167 | virtual core::stringw getAttributeAsStringW(const c8* attributeName); | ||
168 | |||
169 | //! Gets an attribute as string. | ||
170 | //! \param attributeName: Name of the attribute to get. | ||
171 | //! \param target: Buffer where the string is copied to. | ||
172 | virtual void getAttributeAsStringW(const c8* attributeName, wchar_t* target); | ||
173 | |||
174 | //! Returns attribute value as string by index. | ||
175 | //! \param index: Index value, must be between 0 and getAttributeCount()-1. | ||
176 | virtual core::stringw getAttributeAsStringW(s32 index); | ||
177 | |||
178 | //! Sets an attribute value as string. | ||
179 | //! \param attributeName: Name for the attribute | ||
180 | virtual void setAttribute(s32 index, const wchar_t* value); | ||
181 | |||
182 | /* | ||
183 | |||
184 | Binary Data Attribute | ||
185 | |||
186 | */ | ||
187 | |||
188 | //! Adds an attribute as binary data | ||
189 | virtual void addBinary(const c8* attributeName, void* data, s32 dataSizeInBytes); | ||
190 | |||
191 | //! Sets an attribute as binary data | ||
192 | virtual void setAttribute(const c8* attributeName, void* data, s32 dataSizeInBytes); | ||
193 | |||
194 | //! Gets an attribute as binary data | ||
195 | //! \param attributeName: Name of the attribute to get. | ||
196 | virtual void getAttributeAsBinaryData(const c8* attributeName, void* outData, s32 maxSizeInBytes); | ||
197 | |||
198 | //! Gets an attribute as binary data | ||
199 | //! \param index: Index value, must be between 0 and getAttributeCount()-1. | ||
200 | virtual void getAttributeAsBinaryData(s32 index, void* outData, s32 maxSizeInBytes); | ||
201 | |||
202 | //! Sets an attribute as binary data | ||
203 | virtual void setAttribute(s32 index, void* data, s32 dataSizeInBytes); | ||
204 | |||
205 | |||
206 | /* | ||
207 | |||
208 | Array Attribute | ||
209 | |||
210 | */ | ||
211 | |||
212 | //! Adds an attribute as wide string array | ||
213 | virtual void addArray(const c8* attributeName, const core::array<core::stringw>& value); | ||
214 | |||
215 | //! Sets an attribute value as a wide string array. | ||
216 | //! \param attributeName: Name for the attribute | ||
217 | //! \param value: Value for the attribute. Set this to 0 to delete the attribute | ||
218 | virtual void setAttribute(const c8* attributeName, const core::array<core::stringw>& value); | ||
219 | |||
220 | //! Gets an attribute as an array of wide strings. | ||
221 | //! \param attributeName: Name of the attribute to get. | ||
222 | //! \return Returns value of the attribute previously set by setAttribute() | ||
223 | //! or 0 if attribute is not set. | ||
224 | virtual core::array<core::stringw> getAttributeAsArray(const c8* attributeName); | ||
225 | |||
226 | //! Returns attribute value as an array of wide strings by index. | ||
227 | //! \param index: Index value, must be between 0 and getAttributeCount()-1. | ||
228 | virtual core::array<core::stringw> getAttributeAsArray(s32 index); | ||
229 | |||
230 | //! Sets an attribute as an array of wide strings | ||
231 | virtual void setAttribute(s32 index, const core::array<core::stringw>& value); | ||
232 | |||
233 | /* | ||
234 | |||
235 | Bool Attribute | ||
236 | |||
237 | */ | ||
238 | |||
239 | //! Adds an attribute as bool | ||
240 | virtual void addBool(const c8* attributeName, bool value); | ||
241 | |||
242 | //! Sets an attribute as boolean value | ||
243 | virtual void setAttribute(const c8* attributeName, bool value); | ||
244 | |||
245 | //! Gets an attribute as boolean value | ||
246 | //! \param attributeName: Name of the attribute to get. | ||
247 | //! \return Returns value of the attribute previously set by setAttribute() | ||
248 | virtual bool getAttributeAsBool(const c8* attributeName); | ||
249 | |||
250 | //! Gets an attribute as boolean value | ||
251 | //! \param index: Index value, must be between 0 and getAttributeCount()-1. | ||
252 | virtual bool getAttributeAsBool(s32 index); | ||
253 | |||
254 | //! Sets an attribute as boolean value | ||
255 | virtual void setAttribute(s32 index, bool value); | ||
256 | |||
257 | /* | ||
258 | |||
259 | Enumeration Attribute | ||
260 | |||
261 | */ | ||
262 | |||
263 | //! Adds an attribute as enum | ||
264 | virtual void addEnum(const c8* attributeName, const c8* enumValue, const c8* const* enumerationLiterals); | ||
265 | |||
266 | //! Adds an attribute as enum | ||
267 | virtual void addEnum(const c8* attributeName, s32 enumValue, const c8* const* enumerationLiterals); | ||
268 | |||
269 | //! Sets an attribute as enumeration | ||
270 | virtual void setAttribute(const c8* attributeName, const c8* enumValue, const c8* const* enumerationLiterals); | ||
271 | |||
272 | //! Gets an attribute as enumeration | ||
273 | //! \param attributeName: Name of the attribute to get. | ||
274 | //! \return Returns value of the attribute previously set by setAttribute() | ||
275 | virtual const c8* getAttributeAsEnumeration(const c8* attributeName); | ||
276 | |||
277 | //! Gets an attribute as enumeration | ||
278 | //! \param attributeName: Name of the attribute to get. | ||
279 | //! \param enumerationLiteralsToUse: Use these enumeration literals to get the index value instead of the set ones. | ||
280 | //! This is useful when the attribute list maybe was read from an xml file, and only contains the enumeration string, but | ||
281 | //! no information about its index. | ||
282 | //! \return Returns value of the attribute previously set by setAttribute() | ||
283 | virtual s32 getAttributeAsEnumeration(const c8* attributeName, const c8* const* enumerationLiteralsToUse); | ||
284 | |||
285 | //! Gets an attribute as enumeration | ||
286 | //! \param index: Index value, must be between 0 and getAttributeCount()-1. | ||
287 | virtual s32 getAttributeAsEnumeration(s32 index, const c8* const* enumerationLiteralsToUse); | ||
288 | |||
289 | //! Gets an attribute as enumeration | ||
290 | //! \param index: Index value, must be between 0 and getAttributeCount()-1. | ||
291 | virtual const c8* getAttributeAsEnumeration(s32 index); | ||
292 | |||
293 | //! Gets the list of enumeration literals of an enumeration attribute | ||
294 | //! \param attributeName: Name of the attribute to get. | ||
295 | virtual void getAttributeEnumerationLiteralsOfEnumeration(const c8* attributeName, core::array<core::stringc>& outLiterals); | ||
296 | |||
297 | //! Gets the list of enumeration literals of an enumeration attribute | ||
298 | //! \param index: Index value, must be between 0 and getAttributeCount()-1. | ||
299 | virtual void getAttributeEnumerationLiteralsOfEnumeration(s32 index, core::array<core::stringc>& outLiterals); | ||
300 | |||
301 | //! Sets an attribute as enumeration | ||
302 | virtual void setAttribute(s32 index, const c8* enumValue, const c8* const* enumerationLiterals); | ||
303 | |||
304 | |||
305 | /* | ||
306 | |||
307 | SColor Attribute | ||
308 | |||
309 | */ | ||
310 | |||
311 | //! Adds an attribute as color | ||
312 | virtual void addColor(const c8* attributeName, video::SColor value); | ||
313 | |||
314 | //! Sets a attribute as color | ||
315 | virtual void setAttribute(const c8* attributeName, video::SColor color); | ||
316 | |||
317 | //! Gets an attribute as color | ||
318 | //! \param attributeName: Name of the attribute to get. | ||
319 | //! \return Returns value of the attribute previously set by setAttribute() | ||
320 | virtual video::SColor getAttributeAsColor(const c8* attributeName); | ||
321 | |||
322 | //! Gets an attribute as color | ||
323 | //! \param index: Index value, must be between 0 and getAttributeCount()-1. | ||
324 | virtual video::SColor getAttributeAsColor(s32 index); | ||
325 | |||
326 | //! Sets an attribute as color | ||
327 | virtual void setAttribute(s32 index, video::SColor color); | ||
328 | |||
329 | /* | ||
330 | |||
331 | SColorf Attribute | ||
332 | |||
333 | */ | ||
334 | |||
335 | //! Adds an attribute as floating point color | ||
336 | virtual void addColorf(const c8* attributeName, video::SColorf value); | ||
337 | |||
338 | //! Sets a attribute as floating point color | ||
339 | virtual void setAttribute(const c8* attributeName, video::SColorf color); | ||
340 | |||
341 | //! Gets an attribute as floating point color | ||
342 | //! \param attributeName: Name of the attribute to get. | ||
343 | //! \return Returns value of the attribute previously set by setAttribute() | ||
344 | virtual video::SColorf getAttributeAsColorf(const c8* attributeName); | ||
345 | |||
346 | //! Gets an attribute as floating point color | ||
347 | //! \param index: Index value, must be between 0 and getAttributeCount()-1. | ||
348 | virtual video::SColorf getAttributeAsColorf(s32 index); | ||
349 | |||
350 | //! Sets an attribute as floating point color | ||
351 | virtual void setAttribute(s32 index, video::SColorf color); | ||
352 | |||
353 | |||
354 | /* | ||
355 | |||
356 | Vector3d Attribute | ||
357 | |||
358 | */ | ||
359 | |||
360 | //! Adds an attribute as 3d vector | ||
361 | virtual void addVector3d(const c8* attributeName, core::vector3df value); | ||
362 | |||
363 | //! Sets a attribute as 3d vector | ||
364 | virtual void setAttribute(const c8* attributeName, core::vector3df v); | ||
365 | |||
366 | //! Gets an attribute as 3d vector | ||
367 | //! \param attributeName: Name of the attribute to get. | ||
368 | //! \return Returns value of the attribute previously set by setAttribute() | ||
369 | virtual core::vector3df getAttributeAsVector3d(const c8* attributeName); | ||
370 | |||
371 | //! Gets an attribute as 3d vector | ||
372 | //! \param index: Index value, must be between 0 and getAttributeCount()-1. | ||
373 | virtual core::vector3df getAttributeAsVector3d(s32 index); | ||
374 | |||
375 | //! Sets an attribute as vector | ||
376 | virtual void setAttribute(s32 index, core::vector3df v); | ||
377 | |||
378 | |||
379 | /* | ||
380 | |||
381 | Vector2d Attribute | ||
382 | |||
383 | */ | ||
384 | |||
385 | //! Adds an attribute as 2d vector | ||
386 | virtual void addVector2d(const c8* attributeName, core::vector2df value); | ||
387 | |||
388 | //! Sets a attribute as 2d vector | ||
389 | virtual void setAttribute(const c8* attributeName, core::vector2df v); | ||
390 | |||
391 | //! Gets an attribute as 2d vector | ||
392 | //! \param attributeName: Name of the attribute to get. | ||
393 | //! \return Returns value of the attribute previously set by setAttribute() | ||
394 | virtual core::vector2df getAttributeAsVector2d(const c8* attributeName); | ||
395 | |||
396 | //! Gets an attribute as 3d vector | ||
397 | //! \param index: Index value, must be between 0 and getAttributeCount()-1. | ||
398 | virtual core::vector2df getAttributeAsVector2d(s32 index); | ||
399 | |||
400 | //! Sets an attribute as vector | ||
401 | virtual void setAttribute(s32 index, core::vector2df v); | ||
402 | |||
403 | |||
404 | /* | ||
405 | |||
406 | Position2d Attribute | ||
407 | |||
408 | */ | ||
409 | |||
410 | //! Adds an attribute as 2d position | ||
411 | virtual void addPosition2d(const c8* attributeName, core::position2di value); | ||
412 | |||
413 | //! Sets a attribute as 2d position | ||
414 | virtual void setAttribute(const c8* attributeName, core::position2di v); | ||
415 | |||
416 | //! Gets an attribute as position | ||
417 | //! \param attributeName: Name of the attribute to get. | ||
418 | //! \return Returns value of the attribute previously set by setAttribute() | ||
419 | virtual core::position2di getAttributeAsPosition2d(const c8* attributeName); | ||
420 | |||
421 | //! Gets an attribute as position | ||
422 | //! \param index: Index value, must be between 0 and getAttributeCount()-1. | ||
423 | virtual core::position2di getAttributeAsPosition2d(s32 index); | ||
424 | |||
425 | //! Sets an attribute as 2d position | ||
426 | virtual void setAttribute(s32 index, core::position2di v); | ||
427 | |||
428 | /* | ||
429 | |||
430 | Rectangle Attribute | ||
431 | |||
432 | */ | ||
433 | |||
434 | //! Adds an attribute as rectangle | ||
435 | virtual void addRect(const c8* attributeName, core::rect<s32> value); | ||
436 | |||
437 | //! Sets an attribute as rectangle | ||
438 | virtual void setAttribute(const c8* attributeName, core::rect<s32> v); | ||
439 | |||
440 | //! Gets an attribute as rectangle | ||
441 | //! \param attributeName: Name of the attribute to get. | ||
442 | //! \return Returns value of the attribute previously set by setAttribute() | ||
443 | virtual core::rect<s32> getAttributeAsRect(const c8* attributeName); | ||
444 | |||
445 | //! Gets an attribute as rectangle | ||
446 | //! \param index: Index value, must be between 0 and getAttributeCount()-1. | ||
447 | virtual core::rect<s32> getAttributeAsRect(s32 index); | ||
448 | |||
449 | //! Sets an attribute as rectangle | ||
450 | virtual void setAttribute(s32 index, core::rect<s32> v); | ||
451 | |||
452 | |||
453 | /* | ||
454 | |||
455 | Dimension2d Attribute | ||
456 | |||
457 | */ | ||
458 | |||
459 | //! Adds an attribute as dimension2d | ||
460 | virtual void addDimension2d(const c8* attributeName, core::dimension2d<u32> value); | ||
461 | |||
462 | //! Sets an attribute as dimension2d | ||
463 | virtual void setAttribute(const c8* attributeName, core::dimension2d<u32> v); | ||
464 | |||
465 | //! Gets an attribute as dimension2d | ||
466 | //! \param attributeName: Name of the attribute to get. | ||
467 | //! \return Returns value of the attribute previously set by setAttribute() | ||
468 | virtual core::dimension2d<u32> getAttributeAsDimension2d(const c8* attributeName); | ||
469 | |||
470 | //! Gets an attribute as dimension2d | ||
471 | //! \param index: Index value, must be between 0 and getAttributeCount()-1. | ||
472 | virtual core::dimension2d<u32> getAttributeAsDimension2d(s32 index); | ||
473 | |||
474 | //! Sets an attribute as dimension2d | ||
475 | virtual void setAttribute(s32 index, core::dimension2d<u32> v); | ||
476 | |||
477 | |||
478 | /* | ||
479 | |||
480 | matrix attribute | ||
481 | |||
482 | */ | ||
483 | |||
484 | //! Adds an attribute as matrix | ||
485 | virtual void addMatrix(const c8* attributeName, const core::matrix4& v); | ||
486 | |||
487 | //! Sets an attribute as matrix | ||
488 | virtual void setAttribute(const c8* attributeName, const core::matrix4& v); | ||
489 | |||
490 | //! Gets an attribute as a matrix4 | ||
491 | //! \param attributeName: Name of the attribute to get. | ||
492 | //! \return Returns value of the attribute previously set by setAttribute() | ||
493 | virtual core::matrix4 getAttributeAsMatrix(const c8* attributeName); | ||
494 | |||
495 | //! Gets an attribute as matrix | ||
496 | //! \param index: Index value, must be between 0 and getAttributeCount()-1. | ||
497 | virtual core::matrix4 getAttributeAsMatrix(s32 index); | ||
498 | |||
499 | //! Sets an attribute as matrix | ||
500 | virtual void setAttribute(s32 index, const core::matrix4& v); | ||
501 | |||
502 | /* | ||
503 | quaternion attribute | ||
504 | |||
505 | */ | ||
506 | |||
507 | //! Adds an attribute as quaternion | ||
508 | virtual void addQuaternion(const c8* attributeName, core::quaternion v); | ||
509 | |||
510 | //! Sets an attribute as quaternion | ||
511 | virtual void setAttribute(const c8* attributeName, core::quaternion v); | ||
512 | |||
513 | //! Gets an attribute as a quaternion | ||
514 | //! \param attributeName: Name of the attribute to get. | ||
515 | //! \return Returns value of the attribute previously set by setAttribute() | ||
516 | virtual core::quaternion getAttributeAsQuaternion(const c8* attributeName); | ||
517 | |||
518 | //! Gets an attribute as quaternion | ||
519 | //! \param index: Index value, must be between 0 and getAttributeCount()-1. | ||
520 | virtual core::quaternion getAttributeAsQuaternion(s32 index); | ||
521 | |||
522 | //! Sets an attribute as quaternion | ||
523 | virtual void setAttribute(s32 index, core::quaternion v); | ||
524 | |||
525 | /* | ||
526 | |||
527 | 3d bounding box | ||
528 | |||
529 | */ | ||
530 | |||
531 | //! Adds an attribute as axis aligned bounding box | ||
532 | virtual void addBox3d(const c8* attributeName, core::aabbox3df v); | ||
533 | |||
534 | //! Sets an attribute as axis aligned bounding box | ||
535 | virtual void setAttribute(const c8* attributeName, core::aabbox3df v); | ||
536 | |||
537 | //! Gets an attribute as a axis aligned bounding box | ||
538 | //! \param attributeName: Name of the attribute to get. | ||
539 | //! \return Returns value of the attribute previously set by setAttribute() | ||
540 | virtual core::aabbox3df getAttributeAsBox3d(const c8* attributeName); | ||
541 | |||
542 | //! Gets an attribute as axis aligned bounding box | ||
543 | //! \param index: Index value, must be between 0 and getAttributeCount()-1. | ||
544 | virtual core::aabbox3df getAttributeAsBox3d(s32 index); | ||
545 | |||
546 | //! Sets an attribute as axis aligned bounding box | ||
547 | virtual void setAttribute(s32 index, core::aabbox3df v); | ||
548 | |||
549 | /* | ||
550 | |||
551 | plane | ||
552 | |||
553 | */ | ||
554 | |||
555 | //! Adds an attribute as 3d plane | ||
556 | virtual void addPlane3d(const c8* attributeName, core::plane3df v); | ||
557 | |||
558 | //! Sets an attribute as 3d plane | ||
559 | virtual void setAttribute(const c8* attributeName, core::plane3df v); | ||
560 | |||
561 | //! Gets an attribute as a 3d plane | ||
562 | //! \param attributeName: Name of the attribute to get. | ||
563 | //! \return Returns value of the attribute previously set by setAttribute() | ||
564 | virtual core::plane3df getAttributeAsPlane3d(const c8* attributeName); | ||
565 | |||
566 | //! Gets an attribute as 3d plane | ||
567 | //! \param index: Index value, must be between 0 and getAttributeCount()-1. | ||
568 | virtual core::plane3df getAttributeAsPlane3d(s32 index); | ||
569 | |||
570 | //! Sets an attribute as 3d plane | ||
571 | virtual void setAttribute(s32 index, core::plane3df v); | ||
572 | |||
573 | |||
574 | /* | ||
575 | |||
576 | 3d triangle | ||
577 | |||
578 | */ | ||
579 | |||
580 | //! Adds an attribute as 3d triangle | ||
581 | virtual void addTriangle3d(const c8* attributeName, core::triangle3df v); | ||
582 | |||
583 | //! Sets an attribute as 3d trianle | ||
584 | virtual void setAttribute(const c8* attributeName, core::triangle3df v); | ||
585 | |||
586 | //! Gets an attribute as a 3d triangle | ||
587 | //! \param attributeName: Name of the attribute to get. | ||
588 | //! \return Returns value of the attribute previously set by setAttribute() | ||
589 | virtual core::triangle3df getAttributeAsTriangle3d(const c8* attributeName); | ||
590 | |||
591 | //! Gets an attribute as 3d triangle | ||
592 | //! \param index: Index value, must be between 0 and getAttributeCount()-1. | ||
593 | virtual core::triangle3df getAttributeAsTriangle3d(s32 index); | ||
594 | |||
595 | //! Sets an attribute as 3d triangle | ||
596 | virtual void setAttribute(s32 index, core::triangle3df v); | ||
597 | |||
598 | |||
599 | /* | ||
600 | |||
601 | line 2d | ||
602 | |||
603 | */ | ||
604 | |||
605 | //! Adds an attribute as a 2d line | ||
606 | virtual void addLine2d(const c8* attributeName, core::line2df v); | ||
607 | |||
608 | //! Sets an attribute as a 2d line | ||
609 | virtual void setAttribute(const c8* attributeName, core::line2df v); | ||
610 | |||
611 | //! Gets an attribute as a 2d line | ||
612 | //! \param attributeName: Name of the attribute to get. | ||
613 | //! \return Returns value of the attribute previously set by setAttribute() | ||
614 | virtual core::line2df getAttributeAsLine2d(const c8* attributeName); | ||
615 | |||
616 | //! Gets an attribute as a 2d line | ||
617 | //! \param index: Index value, must be between 0 and getAttributeCount()-1. | ||
618 | virtual core::line2df getAttributeAsLine2d(s32 index); | ||
619 | |||
620 | //! Sets an attribute as a 2d line | ||
621 | virtual void setAttribute(s32 index, core::line2df v); | ||
622 | |||
623 | |||
624 | /* | ||
625 | |||
626 | line 3d | ||
627 | |||
628 | */ | ||
629 | |||
630 | //! Adds an attribute as a 3d line | ||
631 | virtual void addLine3d(const c8* attributeName, core::line3df v); | ||
632 | |||
633 | //! Sets an attribute as a 3d line | ||
634 | virtual void setAttribute(const c8* attributeName, core::line3df v); | ||
635 | |||
636 | //! Gets an attribute as a 3d line | ||
637 | //! \param attributeName: Name of the attribute to get. | ||
638 | //! \return Returns value of the attribute previously set by setAttribute() | ||
639 | virtual core::line3df getAttributeAsLine3d(const c8* attributeName); | ||
640 | |||
641 | //! Gets an attribute as a 3d line | ||
642 | //! \param index: Index value, must be between 0 and getAttributeCount()-1. | ||
643 | virtual core::line3df getAttributeAsLine3d(s32 index); | ||
644 | |||
645 | //! Sets an attribute as a 3d line | ||
646 | virtual void setAttribute(s32 index, core::line3df v); | ||
647 | |||
648 | |||
649 | /* | ||
650 | |||
651 | Texture Attribute | ||
652 | |||
653 | */ | ||
654 | |||
655 | //! Adds an attribute as texture reference | ||
656 | virtual void addTexture(const c8* attributeName, video::ITexture* texture, const io::path& filename = ""); | ||
657 | |||
658 | //! Sets an attribute as texture reference | ||
659 | virtual void setAttribute(const c8* attributeName, video::ITexture* texture, const io::path& filename = ""); | ||
660 | |||
661 | //! Gets an attribute as texture reference | ||
662 | //! \param attributeName: Name of the attribute to get. | ||
663 | virtual video::ITexture* getAttributeAsTexture(const c8* attributeName); | ||
664 | |||
665 | //! Gets an attribute as texture reference | ||
666 | //! \param index: Index value, must be between 0 and getAttributeCount()-1. | ||
667 | virtual video::ITexture* getAttributeAsTexture(s32 index); | ||
668 | |||
669 | //! Sets an attribute as texture reference | ||
670 | virtual void setAttribute(s32 index, video::ITexture* texture, const io::path& filename = ""); | ||
671 | |||
672 | |||
673 | |||
674 | /* | ||
675 | |||
676 | User Pointer Attribute | ||
677 | |||
678 | */ | ||
679 | |||
680 | //! Adds an attribute as user pointner | ||
681 | virtual void addUserPointer(const c8* attributeName, void* userPointer); | ||
682 | |||
683 | //! Sets an attribute as user pointer | ||
684 | virtual void setAttribute(const c8* attributeName, void* userPointer); | ||
685 | |||
686 | //! Gets an attribute as user pointer | ||
687 | //! \param attributeName: Name of the attribute to get. | ||
688 | virtual void* getAttributeAsUserPointer(const c8* attributeName); | ||
689 | |||
690 | //! Gets an attribute as user pointer | ||
691 | //! \param index: Index value, must be between 0 and getAttributeCount()-1. | ||
692 | virtual void* getAttributeAsUserPointer(s32 index); | ||
693 | |||
694 | //! Sets an attribute as user pointer | ||
695 | virtual void setAttribute(s32 index, void* userPointer); | ||
696 | |||
697 | protected: | ||
698 | |||
699 | void readAttributeFromXML(io::IXMLReader* reader); | ||
700 | |||
701 | core::array<IAttribute*> Attributes; | ||
702 | |||
703 | IAttribute* getAttributeP(const c8* attributeName) const; | ||
704 | |||
705 | video::IVideoDriver* Driver; | ||
706 | }; | ||
707 | |||
708 | } // end namespace io | ||
709 | } // end namespace irr | ||
710 | |||
711 | #endif | ||
712 | |||