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