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