Merge revision 5277:5302 from trunk to ogl-es

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5303 dfc29bdd-3216-0410-991c-e03cc46cb475
master
cutealien 2016-05-27 19:47:59 +00:00
parent d71de62995
commit 2a7094889a
24 changed files with 1575 additions and 1562 deletions

View File

@ -8,6 +8,8 @@ Changes in ogl-es (not yet released - will be merged with trunk at some point)
--------------------------
Changes in 1.9 (not yet released)
- Fix: Collada writer now uses wrap_p for third texture wrap value instead of invalid wrap_w (thx @Yoran for bugreport)
- Several getter functions in IAttributes made const (thx @Erik Schultheis for the patch)
- Fix: CTriangleSelector no longer ignores meshbuffer transformations from skinned meshes (thx @AlexAzazel for report and test-model).
- Randomizer now returns range 0..randMax as documented and no longer 1..randMax as it did before. randMax got reduced by 1.
Note: You will generally get different numbers than before! If you need the exact old calculations, please check the corresponding sources in Irrlicht 1.8 in os.cpp/.h
@ -141,6 +143,9 @@ Changes in 1.9 (not yet released)
--------------------------
Changes in 1.8.4
- Update lights and renderTargetTexture tests to work with Windows 10 (can't have so tiny Windows anymore).
- Deprecate CMatrix4::transformBox as the result is no longer a boundingbox. Use CMatrix4::transformBoxEx instead (which has been available for a long time).
- Fix CSceneCollisionManager::getPickedNodeBB which could sometimes miss collisions.
- Add -U__STRICT_ANSI__ option to c::b project files to allow compiling with -std=c++11 and add an error when trying to compile with Irrlicht with __STRICT_ANSI__
- Update libpng to 1.6.21
- Update zlib to 1.2.8

View File

@ -47,31 +47,31 @@ public:
//! Returns attribute name by index.
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual const c8* getAttributeName(s32 index) = 0;
virtual const c8* getAttributeName(s32 index) const = 0;
//! Returns the type of an attribute
//! \param attributeName: Name for the attribute
virtual E_ATTRIBUTE_TYPE getAttributeType(const c8* attributeName) = 0;
virtual E_ATTRIBUTE_TYPE getAttributeType(const c8* attributeName) const = 0;
//! Returns attribute type by index.
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual E_ATTRIBUTE_TYPE getAttributeType(s32 index) = 0;
virtual E_ATTRIBUTE_TYPE getAttributeType(s32 index) const = 0;
//! Returns the type string of the attribute
//! \param attributeName: String for the attribute type
//! \param defaultNotFound Value returned when attributeName was not found
virtual const wchar_t* getAttributeTypeString(const c8* attributeName, const wchar_t* defaultNotFound = L"unknown") = 0;
virtual const wchar_t* getAttributeTypeString(const c8* attributeName, const wchar_t* defaultNotFound = L"unknown") const = 0;
//! Returns the type string of the attribute by index.
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
//! \param defaultNotFound Value returned for an invalid index
virtual const wchar_t* getAttributeTypeString(s32 index, const wchar_t* defaultNotFound = L"unknown") = 0;
virtual const wchar_t* getAttributeTypeString(s32 index, const wchar_t* defaultNotFound = L"unknown") const = 0;
//! Returns if an attribute with a name exists
virtual bool existsAttribute(const c8* attributeName) = 0;
virtual bool existsAttribute(const c8* attributeName) const = 0;
//! Returns attribute index from name, -1 if not found
virtual s32 findAttribute(const c8* attributeName) const =0;
virtual s32 findAttribute(const c8* attributeName) const = 0;
//! Removes all attributes
virtual void clear() = 0;
@ -107,11 +107,11 @@ public:
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
virtual s32 getAttributeAsInt(const c8* attributeName, irr::s32 defaultNotFound=0) const =0;
virtual s32 getAttributeAsInt(const c8* attributeName, irr::s32 defaultNotFound=0) const = 0;
//! Gets an attribute as integer value
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual s32 getAttributeAsInt(s32 index) const =0;
virtual s32 getAttributeAsInt(s32 index) const = 0;
//! Sets an attribute as integer value
virtual void setAttribute(s32 index, s32 value) = 0;
@ -132,11 +132,11 @@ public:
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
virtual f32 getAttributeAsFloat(const c8* attributeName, irr::f32 defaultNotFound=0.f) = 0;
virtual f32 getAttributeAsFloat(const c8* attributeName, irr::f32 defaultNotFound=0.f) const = 0;
//! Gets an attribute as float value
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual f32 getAttributeAsFloat(s32 index) = 0;
virtual f32 getAttributeAsFloat(s32 index) const = 0;
//! Sets an attribute as float value
virtual void setAttribute(s32 index, f32 value) = 0;
@ -160,16 +160,16 @@ public:
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
//! or defaultNotFound if attribute is not set.
virtual core::stringc getAttributeAsString(const c8* attributeName, const core::stringc& defaultNotFound=core::stringc()) = 0;
virtual core::stringc getAttributeAsString(const c8* attributeName, const core::stringc& defaultNotFound=core::stringc()) const = 0;
//! Gets an attribute as string.
//! \param attributeName Name of the attribute to get.
//! \param target Buffer where the string is copied to.
virtual void getAttributeAsString(const c8* attributeName, c8* target) = 0;
virtual void getAttributeAsString(const c8* attributeName, c8* target) const = 0;
//! Returns attribute value as string by index.
//! \param index Index value, must be between 0 and getAttributeCount()-1.
virtual core::stringc getAttributeAsString(s32 index) = 0;
virtual core::stringc getAttributeAsString(s32 index) const = 0;
//! Sets an attribute value as string.
//! \param index Index value, must be between 0 and getAttributeCount()-1.
@ -191,16 +191,16 @@ public:
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
//! or defaultNotFound if attribute is not set.
virtual core::stringw getAttributeAsStringW(const c8* attributeName, const core::stringw& defaultNotFound = core::stringw()) = 0;
virtual core::stringw getAttributeAsStringW(const c8* attributeName, const core::stringw& defaultNotFound = core::stringw()) const = 0;
//! Gets an attribute as string.
//! \param attributeName: Name of the attribute to get.
//! \param target: Buffer where the string is copied to.
virtual void getAttributeAsStringW(const c8* attributeName, wchar_t* target) = 0;
virtual void getAttributeAsStringW(const c8* attributeName, wchar_t* target) const = 0;
//! Returns attribute value as string by index.
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual core::stringw getAttributeAsStringW(s32 index) = 0;
virtual core::stringw getAttributeAsStringW(s32 index) const = 0;
//! Sets an attribute value as string.
//! \param index Index value, must be between 0 and getAttributeCount()-1.
@ -224,14 +224,14 @@ public:
\param outData Pointer to buffer where data shall be stored.
\param maxSizeInBytes Maximum number of bytes to write into outData.
*/
virtual void getAttributeAsBinaryData(const c8* attributeName, void* outData, s32 maxSizeInBytes) = 0;
virtual void getAttributeAsBinaryData(const c8* attributeName, void* outData, s32 maxSizeInBytes) const = 0;
//! Gets an attribute as binary data
/** \param index: Index value, must be between 0 and getAttributeCount()-1.
\param outData Pointer to buffer where data shall be stored.
\param maxSizeInBytes Maximum number of bytes to write into outData.
*/
virtual void getAttributeAsBinaryData(s32 index, void* outData, s32 maxSizeInBytes) = 0;
virtual void getAttributeAsBinaryData(s32 index, void* outData, s32 maxSizeInBytes) const = 0;
//! Sets an attribute as binary data
virtual void setAttribute(s32 index, void* data, s32 dataSizeInBytes ) = 0;
@ -254,11 +254,11 @@ public:
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
//! or defaultNotFound if attribute is not set.
virtual core::array<core::stringw> getAttributeAsArray(const c8* attributeName, const core::array<core::stringw>& defaultNotFound = core::array<core::stringw>()) = 0;
virtual core::array<core::stringw> getAttributeAsArray(const c8* attributeName, const core::array<core::stringw>& defaultNotFound = core::array<core::stringw>()) const = 0;
//! Returns attribute value as an array of wide strings by index.
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual core::array<core::stringw> getAttributeAsArray(s32 index) = 0;
virtual core::array<core::stringw> getAttributeAsArray(s32 index) const = 0;
//! Sets an attribute as an array of wide strings
virtual void setAttribute(s32 index, const core::array<core::stringw>& value) = 0;
@ -280,11 +280,11 @@ public:
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
virtual bool getAttributeAsBool(const c8* attributeName, bool defaultNotFound=false) = 0;
virtual bool getAttributeAsBool(const c8* attributeName, bool defaultNotFound=false) const = 0;
//! Gets an attribute as boolean value
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual bool getAttributeAsBool(s32 index) = 0;
virtual bool getAttributeAsBool(s32 index) const = 0;
//! Sets an attribute as boolean value
virtual void setAttribute(s32 index, bool value) = 0;
@ -308,7 +308,7 @@ public:
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
virtual const c8* getAttributeAsEnumeration(const c8* attributeName, const c8* defaultNotFound = 0) = 0;
virtual const c8* getAttributeAsEnumeration(const c8* attributeName, const c8* defaultNotFound = 0) const = 0;
//! Gets an attribute as enumeration
/** \param attributeName: Name of the attribute to get.
@ -318,7 +318,7 @@ public:
enumeration string, but no information about its index.
\return Returns value of the attribute previously set by setAttribute()
*/
virtual s32 getAttributeAsEnumeration(const c8* attributeName, const c8* const* enumerationLiteralsToUse) = 0;
virtual s32 getAttributeAsEnumeration(const c8* attributeName, const c8* const* enumerationLiteralsToUse) const = 0;
//! Gets an attribute as enumeration
/** \param index: Index value, must be between 0 and getAttributeCount()-1.
@ -328,21 +328,21 @@ public:
enumeration string, but no information about its index.
\return Returns value of the attribute previously set by setAttribute()
*/
virtual s32 getAttributeAsEnumeration(s32 index, const c8* const* enumerationLiteralsToUse) = 0;
virtual s32 getAttributeAsEnumeration(s32 index, const c8* const* enumerationLiteralsToUse) const = 0;
//! Gets an attribute as enumeration
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual const c8* getAttributeAsEnumeration(s32 index) = 0;
virtual const c8* getAttributeAsEnumeration(s32 index) const = 0;
//! Gets the list of enumeration literals of an enumeration attribute
//! \param attributeName Name of the attribute to get.
//! \param outLiterals Set of strings to choose the enum name from.
virtual void getAttributeEnumerationLiteralsOfEnumeration(const c8* attributeName, core::array<core::stringc>& outLiterals) = 0;
virtual void getAttributeEnumerationLiteralsOfEnumeration(const c8* attributeName, core::array<core::stringc>& outLiterals) const = 0;
//! Gets the list of enumeration literals of an enumeration attribute
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
//! \param outLiterals Set of strings to choose the enum name from.
virtual void getAttributeEnumerationLiteralsOfEnumeration(s32 index, core::array<core::stringc>& outLiterals) = 0;
virtual void getAttributeEnumerationLiteralsOfEnumeration(s32 index, core::array<core::stringc>& outLiterals) const = 0;
//! Sets an attribute as enumeration
virtual void setAttribute(s32 index, const c8* enumValue, const c8* const* enumerationLiterals) = 0;
@ -365,11 +365,11 @@ public:
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
virtual video::SColor getAttributeAsColor(const c8* attributeName, const video::SColor& defaultNotFound = video::SColor(0)) = 0;
virtual video::SColor getAttributeAsColor(const c8* attributeName, const video::SColor& defaultNotFound = video::SColor(0)) const = 0;
//! Gets an attribute as color
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual video::SColor getAttributeAsColor(s32 index) = 0;
virtual video::SColor getAttributeAsColor(s32 index) const = 0;
//! Sets an attribute as color
virtual void setAttribute(s32 index, video::SColor color) = 0;
@ -390,11 +390,11 @@ public:
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
virtual video::SColorf getAttributeAsColorf(const c8* attributeName, const video::SColorf& defaultNotFound = video::SColorf(0)) = 0;
virtual video::SColorf getAttributeAsColorf(const c8* attributeName, const video::SColorf& defaultNotFound = video::SColorf(0)) const = 0;
//! Gets an attribute as floating point color
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual video::SColorf getAttributeAsColorf(s32 index) = 0;
virtual video::SColorf getAttributeAsColorf(s32 index) const = 0;
//! Sets an attribute as floating point color
virtual void setAttribute(s32 index, video::SColorf color) = 0;
@ -416,11 +416,11 @@ public:
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
virtual core::vector3df getAttributeAsVector3d(const c8* attributeName, const core::vector3df& defaultNotFound=core::vector3df(0,0,0)) = 0;
virtual core::vector3df getAttributeAsVector3d(const c8* attributeName, const core::vector3df& defaultNotFound=core::vector3df(0,0,0)) const = 0;
//! Gets an attribute as 3d vector
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual core::vector3df getAttributeAsVector3d(s32 index) = 0;
virtual core::vector3df getAttributeAsVector3d(s32 index) const = 0;
//! Sets an attribute as vector
virtual void setAttribute(s32 index, const core::vector3df& v) = 0;
@ -441,11 +441,11 @@ public:
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
virtual core::vector2df getAttributeAsVector2d(const c8* attributeName, const core::vector2df& defaultNotFound=core::vector2df(0,0)) = 0;
virtual core::vector2df getAttributeAsVector2d(const c8* attributeName, const core::vector2df& defaultNotFound=core::vector2df(0,0)) const = 0;
//! Gets an attribute as position
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual core::vector2df getAttributeAsVector2d(s32 index) = 0;
virtual core::vector2df getAttributeAsVector2d(s32 index) const = 0;
//! Sets an attribute as 2d vector
virtual void setAttribute(s32 index, const core::vector2df& v) = 0;
@ -466,11 +466,11 @@ public:
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
virtual core::position2di getAttributeAsPosition2d(const c8* attributeName, const core::position2di& defaultNotFound=core::position2di(0,0)) = 0;
virtual core::position2di getAttributeAsPosition2d(const c8* attributeName, const core::position2di& defaultNotFound=core::position2di(0,0)) const = 0;
//! Gets an attribute as position
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual core::position2di getAttributeAsPosition2d(s32 index) = 0;
virtual core::position2di getAttributeAsPosition2d(s32 index) const = 0;
//! Sets an attribute as 2d position
virtual void setAttribute(s32 index, const core::position2di& v) = 0;
@ -491,11 +491,11 @@ public:
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
virtual core::rect<s32> getAttributeAsRect(const c8* attributeName, const core::rect<s32>& defaultNotFound = core::rect<s32>()) = 0;
virtual core::rect<s32> getAttributeAsRect(const c8* attributeName, const core::rect<s32>& defaultNotFound = core::rect<s32>()) const = 0;
//! Gets an attribute as rectangle
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual core::rect<s32> getAttributeAsRect(s32 index) = 0;
virtual core::rect<s32> getAttributeAsRect(s32 index) const = 0;
//! Sets an attribute as rectangle
virtual void setAttribute(s32 index, const core::rect<s32>& v) = 0;
@ -517,11 +517,11 @@ public:
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
virtual core::dimension2d<u32> getAttributeAsDimension2d(const c8* attributeName, const core::dimension2d<u32>& defaultNotFound = core::dimension2d<u32>()) = 0;
virtual core::dimension2d<u32> getAttributeAsDimension2d(const c8* attributeName, const core::dimension2d<u32>& defaultNotFound = core::dimension2d<u32>()) const = 0;
//! Gets an attribute as dimension2d
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual core::dimension2d<u32> getAttributeAsDimension2d(s32 index) = 0;
virtual core::dimension2d<u32> getAttributeAsDimension2d(s32 index) const = 0;
//! Sets an attribute as dimension2d
virtual void setAttribute(s32 index, const core::dimension2d<u32>& v) = 0;
@ -541,11 +541,11 @@ public:
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
virtual core::matrix4 getAttributeAsMatrix(const c8* attributeName, const core::matrix4& defaultNotFound=core::matrix4()) = 0;
virtual core::matrix4 getAttributeAsMatrix(const c8* attributeName, const core::matrix4& defaultNotFound=core::matrix4()) const = 0;
//! Gets an attribute as matrix
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual core::matrix4 getAttributeAsMatrix(s32 index) = 0;
virtual core::matrix4 getAttributeAsMatrix(s32 index) const = 0;
//! Sets an attribute as matrix
virtual void setAttribute(s32 index, const core::matrix4& v) = 0;
@ -565,11 +565,11 @@ public:
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
virtual core::quaternion getAttributeAsQuaternion(const c8* attributeName, const core::quaternion& defaultNotFound=core::quaternion(0,1,0, 0)) = 0;
virtual core::quaternion getAttributeAsQuaternion(const c8* attributeName, const core::quaternion& defaultNotFound=core::quaternion(0,1,0, 0)) const = 0;
//! Gets an attribute as quaternion
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual core::quaternion getAttributeAsQuaternion(s32 index) = 0;
virtual core::quaternion getAttributeAsQuaternion(s32 index) const = 0;
//! Sets an attribute as quaternion
virtual void setAttribute(s32 index, const core::quaternion& v) = 0;
@ -590,11 +590,11 @@ public:
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
virtual core::aabbox3df getAttributeAsBox3d(const c8* attributeName, const core::aabbox3df& defaultNotFound=core::aabbox3df(0,0,0, 0,0,0)) = 0;
virtual core::aabbox3df getAttributeAsBox3d(const c8* attributeName, const core::aabbox3df& defaultNotFound=core::aabbox3df(0,0,0, 0,0,0)) const = 0;
//! Gets an attribute as axis aligned bounding box
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual core::aabbox3df getAttributeAsBox3d(s32 index) = 0;
virtual core::aabbox3df getAttributeAsBox3d(s32 index) const = 0;
//! Sets an attribute as axis aligned bounding box
virtual void setAttribute(s32 index, const core::aabbox3df& v) = 0;
@ -615,11 +615,11 @@ public:
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
virtual core::plane3df getAttributeAsPlane3d(const c8* attributeName, const core::plane3df& defaultNotFound=core::plane3df(0,0,0, 0,1,0)) = 0;
virtual core::plane3df getAttributeAsPlane3d(const c8* attributeName, const core::plane3df& defaultNotFound=core::plane3df(0,0,0, 0,1,0)) const = 0;
//! Gets an attribute as 3d plane
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual core::plane3df getAttributeAsPlane3d(s32 index) = 0;
virtual core::plane3df getAttributeAsPlane3d(s32 index) const = 0;
//! Sets an attribute as 3d plane
virtual void setAttribute(s32 index, const core::plane3df& v) = 0;
@ -641,11 +641,11 @@ public:
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
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))) = 0;
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;
//! Gets an attribute as 3d triangle
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual core::triangle3df getAttributeAsTriangle3d(s32 index) = 0;
virtual core::triangle3df getAttributeAsTriangle3d(s32 index) const = 0;
//! Sets an attribute as 3d triangle
virtual void setAttribute(s32 index, const core::triangle3df& v) = 0;
@ -667,11 +667,11 @@ public:
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
virtual core::line2df getAttributeAsLine2d(const c8* attributeName, const core::line2df& defaultNotFound = core::line2df(0,0, 0,0)) = 0;
virtual core::line2df getAttributeAsLine2d(const c8* attributeName, const core::line2df& defaultNotFound = core::line2df(0,0, 0,0)) const = 0;
//! Gets an attribute as a 2d line
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual core::line2df getAttributeAsLine2d(s32 index) = 0;
virtual core::line2df getAttributeAsLine2d(s32 index) const = 0;
//! Sets an attribute as a 2d line
virtual void setAttribute(s32 index, const core::line2df& v) = 0;
@ -693,11 +693,11 @@ public:
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
virtual core::line3df getAttributeAsLine3d(const c8* attributeName, const core::line3df& defaultNotFound=core::line3df(0,0,0, 0,0,0)) = 0;
virtual core::line3df getAttributeAsLine3d(const c8* attributeName, const core::line3df& defaultNotFound=core::line3df(0,0,0, 0,0,0)) const = 0;
//! Gets an attribute as a 3d line
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual core::line3df getAttributeAsLine3d(s32 index) = 0;
virtual core::line3df getAttributeAsLine3d(s32 index) const = 0;
//! Sets an attribute as a 3d line
virtual void setAttribute(s32 index, const core::line3df& v) = 0;
@ -718,11 +718,11 @@ public:
//! Gets an attribute as texture reference
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
virtual video::ITexture* getAttributeAsTexture(const c8* attributeName, video::ITexture* defaultNotFound=0) = 0;
virtual video::ITexture* getAttributeAsTexture(const c8* attributeName, video::ITexture* defaultNotFound=0) const = 0;
//! Gets an attribute as texture reference
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual video::ITexture* getAttributeAsTexture(s32 index) = 0;
virtual video::ITexture* getAttributeAsTexture(s32 index) const = 0;
//! Sets an attribute as texture reference
virtual void setAttribute(s32 index, video::ITexture* texture, const io::path& filename = "") = 0;
@ -743,11 +743,11 @@ public:
//! Gets an attribute as user pointer
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
virtual void* getAttributeAsUserPointer(const c8* attributeName, void* defaultNotFound = 0) = 0;
virtual void* getAttributeAsUserPointer(const c8* attributeName, void* defaultNotFound = 0) const = 0;
//! Gets an attribute as user pointer
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual void* getAttributeAsUserPointer(s32 index) = 0;
virtual void* getAttributeAsUserPointer(s32 index) const = 0;
//! Sets an attribute as user pointer
virtual void setAttribute(s32 index, void* userPointer) = 0;

View File

@ -982,7 +982,7 @@ namespace video
\param color Color of the pixel to draw. */
virtual void drawPixel(u32 x, u32 y, const SColor& color) =0;
//! Draws a non filled concyclic regular 2d polyon.
//! Draws a non filled concyclic regular 2d polygon.
/** This method can be used to draw circles, but also
triangles, tetragons, pentagons, hexagons, heptagons, octagons,
enneagons, decagons, hendecagons, dodecagon, triskaidecagons,

View File

@ -1228,9 +1228,11 @@ namespace core
transformPlane( out );
}
//! Transforms a axis aligned bounding box
//! Transforms the edge-points of a bounding box
//! Deprecated as it's usually not what people need (regards only 2 corners, but other corners might be outside the box after transformation)
//! Use transformBoxEx instead.
template <class T>
inline void CMatrix4<T>::transformBox(core::aabbox3d<f32>& box) const
_IRR_DEPRECATED_ inline void CMatrix4<T>::transformBox(core::aabbox3d<f32>& box) const
{
#if defined ( USE_MATRIX_TEST )
if (isIdentity())

View File

@ -76,7 +76,7 @@ void CAttributes::setAttribute(const c8* attributeName, const c8* value)
//! \param attributeName: Name of the attribute to get.
//! \return Returns value of the attribute previously set by setStringAttribute()
//! or 0 if attribute is not set.
core::stringc CAttributes::getAttributeAsString(const c8* attributeName, const core::stringc& defaultNotFound)
core::stringc CAttributes::getAttributeAsString(const c8* attributeName, const core::stringc& defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
if (att)
@ -88,7 +88,7 @@ core::stringc CAttributes::getAttributeAsString(const c8* attributeName, const c
//! Gets a string attribute.
//! \param attributeName: Name of the attribute to get.
//! \param target: Buffer where the string is copied to.
void CAttributes::getAttributeAsString(const c8* attributeName, char* target)
void CAttributes::getAttributeAsString(const c8* attributeName, char* target) const
{
IAttribute* att = getAttributeP(attributeName);
if (att)
@ -102,7 +102,7 @@ void CAttributes::getAttributeAsString(const c8* attributeName, char* target)
//! Returns string attribute value by index.
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
core::stringc CAttributes::getAttributeAsString(s32 index)
core::stringc CAttributes::getAttributeAsString(s32 index) const
{
core::stringc str;
@ -144,7 +144,7 @@ void CAttributes::setAttribute(const c8* attributeName, const wchar_t* value)
//! \param attributeName: Name of the attribute to get.
//! \return Returns value of the attribute previously set by setStringAttribute()
//! or 0 if attribute is not set.
core::stringw CAttributes::getAttributeAsStringW(const c8* attributeName, const core::stringw& defaultNotFound)
core::stringw CAttributes::getAttributeAsStringW(const c8* attributeName, const core::stringw& defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
if (att)
@ -156,7 +156,7 @@ core::stringw CAttributes::getAttributeAsStringW(const c8* attributeName, const
//! Gets a string attribute.
//! \param attributeName: Name of the attribute to get.
//! \param target: Buffer where the string is copied to.
void CAttributes::getAttributeAsStringW(const c8* attributeName, wchar_t* target)
void CAttributes::getAttributeAsStringW(const c8* attributeName, wchar_t* target) const
{
IAttribute* att = getAttributeP(attributeName);
if (att)
@ -170,7 +170,7 @@ void CAttributes::getAttributeAsStringW(const c8* attributeName, wchar_t* target
//! Returns string attribute value by index.
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
core::stringw CAttributes::getAttributeAsStringW(s32 index)
core::stringw CAttributes::getAttributeAsStringW(s32 index) const
{
if ((u32)index < Attributes.size())
@ -199,7 +199,7 @@ void CAttributes::setAttribute(const c8* attributeName, const core::array<core::
}
//! Gets an attribute as an array of wide strings.
core::array<core::stringw> CAttributes::getAttributeAsArray(const c8* attributeName, const core::array<core::stringw>& defaultNotFound)
core::array<core::stringw> CAttributes::getAttributeAsArray(const c8* attributeName, const core::array<core::stringw>& defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
if (att)
@ -209,7 +209,7 @@ core::array<core::stringw> CAttributes::getAttributeAsArray(const c8* attributeN
}
//! Returns attribute value as an array of wide strings by index.
core::array<core::stringw> CAttributes::getAttributeAsArray(s32 index)
core::array<core::stringw> CAttributes::getAttributeAsArray(s32 index) const
{
core::array<core::stringw> ret;
@ -266,7 +266,7 @@ void CAttributes::setAttribute(const c8* attributeName, bool value)
//! \param attributeName: Name of the attribute to get.
//! \return Returns value of the attribute previously set by setAttribute() as bool
//! or 0 if attribute is not set.
bool CAttributes::getAttributeAsBool(const c8* attributeName, bool defaultNotFound)
bool CAttributes::getAttributeAsBool(const c8* attributeName, bool defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
if (att)
@ -314,7 +314,7 @@ void CAttributes::setAttribute(const c8* attributeName, f32 value)
//! \param attributeName: Name of the attribute to get.
//! \return Returns value of the attribute previously set by setAttribute() as float value
//! or 0 if attribute is not set.
f32 CAttributes::getAttributeAsFloat(const c8* attributeName, irr::f32 defaultNotFound)
f32 CAttributes::getAttributeAsFloat(const c8* attributeName, irr::f32 defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
if (att)
@ -336,7 +336,7 @@ void CAttributes::setAttribute(const c8* attributeName, video::SColor value)
//! Gets an attribute as color
//! \param attributeName: Name of the attribute to get.
//! \return Returns value of the attribute previously set by setAttribute()
video::SColor CAttributes::getAttributeAsColor(const c8* attributeName, const video::SColor& defaultNotFound)
video::SColor CAttributes::getAttributeAsColor(const c8* attributeName, const video::SColor& defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
if (att)
@ -358,7 +358,7 @@ void CAttributes::setAttribute(const c8* attributeName, video::SColorf value)
//! Gets an attribute as floating point color
//! \param attributeName: Name of the attribute to get.
//! \return Returns value of the attribute previously set by setAttribute()
video::SColorf CAttributes::getAttributeAsColorf(const c8* attributeName, const video::SColorf& defaultNotFound)
video::SColorf CAttributes::getAttributeAsColorf(const c8* attributeName, const video::SColorf& defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
if (att)
@ -380,7 +380,7 @@ void CAttributes::setAttribute(const c8* attributeName, const core::position2di&
//! Gets an attribute as 2d position
//! \param attributeName: Name of the attribute to get.
//! \return Returns value of the attribute previously set by setAttribute()
core::position2di CAttributes::getAttributeAsPosition2d(const c8* attributeName, const core::position2di& defaultNotFound)
core::position2di CAttributes::getAttributeAsPosition2d(const c8* attributeName, const core::position2di& defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
if (att)
@ -402,7 +402,7 @@ void CAttributes::setAttribute(const c8* attributeName, const core::rect<s32>& v
//! Gets an attribute as rectangle
//! \param attributeName: Name of the attribute to get.
//! \return Returns value of the attribute previously set by setAttribute()
core::rect<s32> CAttributes::getAttributeAsRect(const c8* attributeName, const core::rect<s32>& defaultNotFound)
core::rect<s32> CAttributes::getAttributeAsRect(const c8* attributeName, const core::rect<s32>& defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
if (att)
@ -424,7 +424,7 @@ void CAttributes::setAttribute(const c8* attributeName, const core::dimension2d<
//! Gets an attribute as dimension2d
//! \param attributeName: Name of the attribute to get.
//! \return Returns value of the attribute previously set by setAttribute()
core::dimension2d<u32> CAttributes::getAttributeAsDimension2d(const c8* attributeName, const core::dimension2d<u32>& defaultNotFound)
core::dimension2d<u32> CAttributes::getAttributeAsDimension2d(const c8* attributeName, const core::dimension2d<u32>& defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
if (att)
@ -456,7 +456,7 @@ void CAttributes::setAttribute(const c8* attributeName, const core::vector2df& v
//! Gets an attribute as vector
//! \param attributeName: Name of the attribute to get.
//! \return Returns value of the attribute previously set by setAttribute()
core::vector3df CAttributes::getAttributeAsVector3d(const c8* attributeName, const core::vector3df& defaultNotFound)
core::vector3df CAttributes::getAttributeAsVector3d(const c8* attributeName, const core::vector3df& defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
if (att)
@ -466,7 +466,7 @@ core::vector3df CAttributes::getAttributeAsVector3d(const c8* attributeName, con
}
//! Gets an attribute as vector
core::vector2df CAttributes::getAttributeAsVector2d(const c8* attributeName, const core::vector2df& defaultNotFound)
core::vector2df CAttributes::getAttributeAsVector2d(const c8* attributeName, const core::vector2df& defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
if (att)
@ -487,7 +487,7 @@ void CAttributes::setAttribute(const c8* attributeName, void* data, s32 dataSize
//! Gets an attribute as binary data
//! \param attributeName: Name of the attribute to get.
void CAttributes::getAttributeAsBinaryData(const c8* attributeName, void* outData, s32 maxSizeInBytes)
void CAttributes::getAttributeAsBinaryData(const c8* attributeName, void* outData, s32 maxSizeInBytes) const
{
IAttribute* att = getAttributeP(attributeName);
if (att)
@ -507,7 +507,7 @@ void CAttributes::setAttribute(const c8* attributeName, const char* enumValue, c
//! Gets an attribute as enumeration
//! \param attributeName: Name of the attribute to get.
//! \return Returns value of the attribute previously set by setAttribute()
const char* CAttributes::getAttributeAsEnumeration(const c8* attributeName, const c8* defaultNotFound)
const char* CAttributes::getAttributeAsEnumeration(const c8* attributeName, const c8* defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
if (att)
@ -517,7 +517,7 @@ const char* CAttributes::getAttributeAsEnumeration(const c8* attributeName, cons
}
//! Gets an attribute as enumeration
s32 CAttributes::getAttributeAsEnumeration(const c8* attributeName, const char* const* enumerationLiteralsToUse)
s32 CAttributes::getAttributeAsEnumeration(const c8* attributeName, const char* const* enumerationLiteralsToUse) const
{
IAttribute* att = getAttributeP(attributeName);
@ -537,7 +537,7 @@ s32 CAttributes::getAttributeAsEnumeration(const c8* attributeName, const char*
//! Gets the list of enumeration literals of an enumeration attribute
//! \param attributeName: Name of the attribute to get.
void CAttributes::getAttributeEnumerationLiteralsOfEnumeration(const c8* attributeName, core::array<core::stringc>& outLiterals)
void CAttributes::getAttributeEnumerationLiteralsOfEnumeration(const c8* attributeName, core::array<core::stringc>& outLiterals) const
{
IAttribute* att = getAttributeP(attributeName);
@ -558,7 +558,7 @@ void CAttributes::setAttribute(const c8* attributeName, video::ITexture* value,
//! Gets an attribute as texture reference
//! \param attributeName: Name of the attribute to get.
video::ITexture* CAttributes::getAttributeAsTexture(const c8* attributeName, video::ITexture* defaultNotFound)
video::ITexture* CAttributes::getAttributeAsTexture(const c8* attributeName, video::ITexture* defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
if (att)
@ -569,7 +569,7 @@ video::ITexture* CAttributes::getAttributeAsTexture(const c8* attributeName, vid
//! Gets an attribute as texture reference
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
video::ITexture* CAttributes::getAttributeAsTexture(s32 index)
video::ITexture* CAttributes::getAttributeAsTexture(s32 index) const
{
if ((u32)index < Attributes.size())
return Attributes[index]->getTexture();
@ -586,7 +586,7 @@ u32 CAttributes::getAttributeCount() const
//! Returns string attribute name by index.
//! \param index: Index value, must be between 0 and getStringAttributeCount()-1.
const c8* CAttributes::getAttributeName(s32 index)
const c8* CAttributes::getAttributeName(s32 index) const
{
if ((u32)index >= Attributes.size())
return 0;
@ -595,7 +595,7 @@ const c8* CAttributes::getAttributeName(s32 index)
}
//! Returns the type of an attribute
E_ATTRIBUTE_TYPE CAttributes::getAttributeType(const c8* attributeName)
E_ATTRIBUTE_TYPE CAttributes::getAttributeType(const c8* attributeName) const
{
E_ATTRIBUTE_TYPE ret = EAT_UNKNOWN;
@ -608,7 +608,7 @@ E_ATTRIBUTE_TYPE CAttributes::getAttributeType(const c8* attributeName)
//! Returns attribute type by index.
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
E_ATTRIBUTE_TYPE CAttributes::getAttributeType(s32 index)
E_ATTRIBUTE_TYPE CAttributes::getAttributeType(s32 index) const
{
if ((u32)index >= Attributes.size())
return EAT_UNKNOWN;
@ -617,7 +617,7 @@ E_ATTRIBUTE_TYPE CAttributes::getAttributeType(s32 index)
}
//! Returns the type of an attribute
const wchar_t* CAttributes::getAttributeTypeString(const c8* attributeName, const wchar_t* defaultNotFound)
const wchar_t* CAttributes::getAttributeTypeString(const c8* attributeName, const wchar_t* defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
if (att)
@ -628,7 +628,7 @@ const wchar_t* CAttributes::getAttributeTypeString(const c8* attributeName, cons
//! Returns attribute type string by index.
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
const wchar_t* CAttributes::getAttributeTypeString(s32 index, const wchar_t* defaultNotFound)
const wchar_t* CAttributes::getAttributeTypeString(s32 index, const wchar_t* defaultNotFound) const
{
if ((u32)index >= Attributes.size())
return defaultNotFound;
@ -638,7 +638,7 @@ const wchar_t* CAttributes::getAttributeTypeString(s32 index, const wchar_t* def
//! Gets an attribute as boolean value
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
bool CAttributes::getAttributeAsBool(s32 index)
bool CAttributes::getAttributeAsBool(s32 index) const
{
bool ret = false;
@ -660,7 +660,7 @@ s32 CAttributes::getAttributeAsInt(s32 index) const
//! Gets an attribute as float value
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
f32 CAttributes::getAttributeAsFloat(s32 index)
f32 CAttributes::getAttributeAsFloat(s32 index) const
{
if ((u32)index < Attributes.size())
return Attributes[index]->getFloat();
@ -670,7 +670,7 @@ f32 CAttributes::getAttributeAsFloat(s32 index)
//! Gets an attribute as color
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
video::SColor CAttributes::getAttributeAsColor(s32 index)
video::SColor CAttributes::getAttributeAsColor(s32 index) const
{
video::SColor ret(0);
@ -682,7 +682,7 @@ video::SColor CAttributes::getAttributeAsColor(s32 index)
//! Gets an attribute as floating point color
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
video::SColorf CAttributes::getAttributeAsColorf(s32 index)
video::SColorf CAttributes::getAttributeAsColorf(s32 index) const
{
if ((u32)index < Attributes.size())
return Attributes[index]->getColorf();
@ -692,7 +692,7 @@ video::SColorf CAttributes::getAttributeAsColorf(s32 index)
//! Gets an attribute as 3d vector
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
core::vector3df CAttributes::getAttributeAsVector3d(s32 index)
core::vector3df CAttributes::getAttributeAsVector3d(s32 index) const
{
if ((u32)index < Attributes.size())
return Attributes[index]->getVector();
@ -701,7 +701,7 @@ core::vector3df CAttributes::getAttributeAsVector3d(s32 index)
}
//! Gets an attribute as 2d vector
core::vector2df CAttributes::getAttributeAsVector2d(s32 index)
core::vector2df CAttributes::getAttributeAsVector2d(s32 index) const
{
if ((u32)index < Attributes.size())
return Attributes[index]->getVector2d();
@ -711,7 +711,7 @@ core::vector2df CAttributes::getAttributeAsVector2d(s32 index)
//! Gets an attribute as position2d
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
core::position2di CAttributes::getAttributeAsPosition2d(s32 index)
core::position2di CAttributes::getAttributeAsPosition2d(s32 index) const
{
if ((u32)index < Attributes.size())
return Attributes[index]->getPosition();
@ -721,7 +721,7 @@ core::position2di CAttributes::getAttributeAsPosition2d(s32 index)
//! Gets an attribute as rectangle
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
core::rect<s32> CAttributes::getAttributeAsRect(s32 index)
core::rect<s32> CAttributes::getAttributeAsRect(s32 index) const
{
if ((u32)index < Attributes.size())
return Attributes[index]->getRect();
@ -731,7 +731,7 @@ core::rect<s32> CAttributes::getAttributeAsRect(s32 index)
//! Gets an attribute as dimension2d
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
core::dimension2d<u32> CAttributes::getAttributeAsDimension2d(s32 index)
core::dimension2d<u32> CAttributes::getAttributeAsDimension2d(s32 index) const
{
if ((u32)index < Attributes.size())
return Attributes[index]->getDimension2d();
@ -742,7 +742,7 @@ core::dimension2d<u32> CAttributes::getAttributeAsDimension2d(s32 index)
//! Gets an attribute as binary data
///! \param index: Index value, must be between 0 and getAttributeCount()-1.
void CAttributes::getAttributeAsBinaryData(s32 index, void* outData, s32 maxSizeInBytes)
void CAttributes::getAttributeAsBinaryData(s32 index, void* outData, s32 maxSizeInBytes) const
{
if ((u32)index < Attributes.size())
Attributes[index]->getBinary(outData, maxSizeInBytes);
@ -751,7 +751,7 @@ void CAttributes::getAttributeAsBinaryData(s32 index, void* outData, s32 maxSize
//! Gets an attribute as enumeration
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
const char* CAttributes::getAttributeAsEnumeration(s32 index)
const char* CAttributes::getAttributeAsEnumeration(s32 index) const
{
if ((u32)index < Attributes.size())
return Attributes[index]->getEnum();
@ -762,7 +762,7 @@ const char* CAttributes::getAttributeAsEnumeration(s32 index)
//! Gets an attribute as enumeration
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
s32 CAttributes::getAttributeAsEnumeration(s32 index, const char* const* enumerationLiteralsToUse)
s32 CAttributes::getAttributeAsEnumeration(s32 index, const char* const* enumerationLiteralsToUse) const
{
if ((u32)index < Attributes.size())
{
@ -785,7 +785,7 @@ s32 CAttributes::getAttributeAsEnumeration(s32 index, const char* const* enumera
//! Gets the list of enumeration literals of an enumeration attribute
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
void CAttributes::getAttributeEnumerationLiteralsOfEnumeration(s32 index, core::array<core::stringc>& outLiterals)
void CAttributes::getAttributeEnumerationLiteralsOfEnumeration(s32 index, core::array<core::stringc>& outLiterals) const
{
if ((u32)index < Attributes.size() &&
Attributes[index]->getType() == EAT_ENUM)
@ -892,7 +892,7 @@ void CAttributes::addTexture(const c8* attributeName, video::ITexture* texture,
}
//! Returns if an attribute with a name exists
bool CAttributes::existsAttribute(const c8* attributeName)
bool CAttributes::existsAttribute(const c8* attributeName) const
{
return getAttributeP(attributeName) != 0;
}
@ -1025,7 +1025,7 @@ void CAttributes::setAttribute(const c8* attributeName, const core::matrix4& v)
}
//! Gets an attribute as a matrix4
core::matrix4 CAttributes::getAttributeAsMatrix(const c8* attributeName, const core::matrix4& defaultNotFound)
core::matrix4 CAttributes::getAttributeAsMatrix(const c8* attributeName, const core::matrix4& defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
if (att)
@ -1036,7 +1036,7 @@ core::matrix4 CAttributes::getAttributeAsMatrix(const c8* attributeName, const c
}
//! Gets an attribute as matrix
core::matrix4 CAttributes::getAttributeAsMatrix(s32 index)
core::matrix4 CAttributes::getAttributeAsMatrix(s32 index) const
{
if ((u32)index < Attributes.size())
return Attributes[index]->getMatrix();
@ -1072,7 +1072,7 @@ void CAttributes::setAttribute(const c8* attributeName, const core::quaternion&
}
//! Gets an attribute as a quaternion
core::quaternion CAttributes::getAttributeAsQuaternion(const c8* attributeName, const core::quaternion& defaultNotFound)
core::quaternion CAttributes::getAttributeAsQuaternion(const c8* attributeName, const core::quaternion& defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
if (att)
@ -1082,7 +1082,7 @@ core::quaternion CAttributes::getAttributeAsQuaternion(const c8* attributeName,
}
//! Gets an attribute as quaternion
core::quaternion CAttributes::getAttributeAsQuaternion(s32 index)
core::quaternion CAttributes::getAttributeAsQuaternion(s32 index) const
{
core::quaternion ret(0,1,0, 0);
@ -1118,7 +1118,7 @@ void CAttributes::setAttribute(const c8* attributeName, const core::aabbox3df& v
}
//! Gets an attribute as a axis aligned bounding box
core::aabbox3df CAttributes::getAttributeAsBox3d(const c8* attributeName, const core::aabbox3df& defaultNotFound)
core::aabbox3df CAttributes::getAttributeAsBox3d(const c8* attributeName, const core::aabbox3df& defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
if (att)
@ -1128,7 +1128,7 @@ core::aabbox3df CAttributes::getAttributeAsBox3d(const c8* attributeName, const
}
//! Gets an attribute as axis aligned bounding box
core::aabbox3df CAttributes::getAttributeAsBox3d(s32 index)
core::aabbox3df CAttributes::getAttributeAsBox3d(s32 index) const
{
core::aabbox3df ret(0,0,0, 0,0,0);
@ -1164,7 +1164,7 @@ void CAttributes::setAttribute(const c8* attributeName, const core::plane3df& v)
}
//! Gets an attribute as a 3d plane
core::plane3df CAttributes::getAttributeAsPlane3d(const c8* attributeName, const core::plane3df& defaultNotFound)
core::plane3df CAttributes::getAttributeAsPlane3d(const c8* attributeName, const core::plane3df& defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
if (att)
@ -1174,7 +1174,7 @@ core::plane3df CAttributes::getAttributeAsPlane3d(const c8* attributeName, const
}
//! Gets an attribute as 3d plane
core::plane3df CAttributes::getAttributeAsPlane3d(s32 index)
core::plane3df CAttributes::getAttributeAsPlane3d(s32 index) const
{
core::plane3df ret(0,0,0, 0,1,0);
@ -1210,7 +1210,7 @@ void CAttributes::setAttribute(const c8* attributeName, const core::triangle3df&
}
//! Gets an attribute as a 3d triangle
core::triangle3df CAttributes::getAttributeAsTriangle3d(const c8* attributeName, const core::triangle3df& defaultNotFound)
core::triangle3df CAttributes::getAttributeAsTriangle3d(const c8* attributeName, const core::triangle3df& defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
if (att)
@ -1220,7 +1220,7 @@ core::triangle3df CAttributes::getAttributeAsTriangle3d(const c8* attributeName,
}
//! Gets an attribute as 3d triangle
core::triangle3df CAttributes::getAttributeAsTriangle3d(s32 index)
core::triangle3df CAttributes::getAttributeAsTriangle3d(s32 index) const
{
core::triangle3df ret;
ret.pointA = ret.pointB = ret.pointC = core::vector3df(0,0,0);
@ -1257,7 +1257,7 @@ void CAttributes::setAttribute(const c8* attributeName, const core::line2df& v)
}
//! Gets an attribute as a 2d line
core::line2df CAttributes::getAttributeAsLine2d(const c8* attributeName, const core::line2df& defaultNotFound)
core::line2df CAttributes::getAttributeAsLine2d(const c8* attributeName, const core::line2df& defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
if (att)
@ -1267,7 +1267,7 @@ core::line2df CAttributes::getAttributeAsLine2d(const c8* attributeName, const c
}
//! Gets an attribute as a 2d line
core::line2df CAttributes::getAttributeAsLine2d(s32 index)
core::line2df CAttributes::getAttributeAsLine2d(s32 index) const
{
core::line2df ret(0,0, 0,0);
@ -1303,7 +1303,7 @@ void CAttributes::setAttribute(const c8* attributeName, const core::line3df& v)
}
//! Gets an attribute as a 3d line
core::line3df CAttributes::getAttributeAsLine3d(const c8* attributeName, const core::line3df& defaultNotFound)
core::line3df CAttributes::getAttributeAsLine3d(const c8* attributeName, const core::line3df& defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
if (att)
@ -1313,7 +1313,7 @@ core::line3df CAttributes::getAttributeAsLine3d(const c8* attributeName, const c
}
//! Gets an attribute as a 3d line
core::line3df CAttributes::getAttributeAsLine3d(s32 index)
core::line3df CAttributes::getAttributeAsLine3d(s32 index) const
{
core::line3df ret(0,0,0, 0,0,0);
@ -1352,7 +1352,7 @@ void CAttributes::setAttribute(const c8* attributeName, void* userPointer)
//! Gets an attribute as user pointer
//! \param attributeName: Name of the attribute to get.
void* CAttributes::getAttributeAsUserPointer(const c8* attributeName, void* defaultNotFound)
void* CAttributes::getAttributeAsUserPointer(const c8* attributeName, void* defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
if (att)
@ -1363,7 +1363,7 @@ void* CAttributes::getAttributeAsUserPointer(const c8* attributeName, void* defa
//! Gets an attribute as user pointer
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
void* CAttributes::getAttributeAsUserPointer(s32 index)
void* CAttributes::getAttributeAsUserPointer(s32 index) const
{
void* value = 0;

View File

@ -34,27 +34,27 @@ public:
//! Returns attribute name by index.
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual const c8* getAttributeName(s32 index) _IRR_OVERRIDE_;
virtual const c8* getAttributeName(s32 index) const _IRR_OVERRIDE_;
//! Returns the type of an attribute
//! \param attributeName: Name for the attribute
virtual E_ATTRIBUTE_TYPE getAttributeType(const c8* attributeName) _IRR_OVERRIDE_;
virtual E_ATTRIBUTE_TYPE getAttributeType(const c8* attributeName) const _IRR_OVERRIDE_;
//! Returns attribute type by index.
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual E_ATTRIBUTE_TYPE getAttributeType(s32 index) _IRR_OVERRIDE_;
virtual E_ATTRIBUTE_TYPE getAttributeType(s32 index) const _IRR_OVERRIDE_;
//! Returns the type string of the attribute
//! \param attributeName: String for the attribute type
//! \param defaultNotFound Value returned when attributeName was not found
virtual const wchar_t* getAttributeTypeString(const c8* attributeName, const wchar_t* defaultNotFound = L"unknown") _IRR_OVERRIDE_;
virtual const wchar_t* getAttributeTypeString(const c8* attributeName, const wchar_t* defaultNotFound = L"unknown") const _IRR_OVERRIDE_;
//! Returns the type string of the attribute by index.
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual const wchar_t* getAttributeTypeString(s32 index, const wchar_t* defaultNotFound = L"unknown") _IRR_OVERRIDE_;
virtual const wchar_t* getAttributeTypeString(s32 index, const wchar_t* defaultNotFound = L"unknown") const _IRR_OVERRIDE_;
//! Returns if an attribute with a name exists
virtual bool existsAttribute(const c8* attributeName) _IRR_OVERRIDE_;
virtual bool existsAttribute(const c8* attributeName) const _IRR_OVERRIDE_;
//! Returns attribute index from name, -1 if not found
virtual s32 findAttribute(const c8* attributeName) const _IRR_OVERRIDE_;
@ -113,11 +113,11 @@ public:
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
virtual f32 getAttributeAsFloat(const c8* attributeName, irr::f32 defaultNotFound=0.f) _IRR_OVERRIDE_;
virtual f32 getAttributeAsFloat(const c8* attributeName, irr::f32 defaultNotFound=0.f) const _IRR_OVERRIDE_;
//! Gets an attribute as float value
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual f32 getAttributeAsFloat(s32 index) _IRR_OVERRIDE_;
virtual f32 getAttributeAsFloat(s32 index) const _IRR_OVERRIDE_;
//! Sets an attribute as float value
virtual void setAttribute(s32 index, f32 value) _IRR_OVERRIDE_;
@ -141,16 +141,16 @@ public:
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
//! or defaultNotFound if attribute is not set.
virtual core::stringc getAttributeAsString(const c8* attributeName, const core::stringc& defaultNotFound=core::stringc()) _IRR_OVERRIDE_;
virtual core::stringc getAttributeAsString(const c8* attributeName, const core::stringc& defaultNotFound=core::stringc()) const _IRR_OVERRIDE_;
//! Gets an attribute as string.
//! \param attributeName: Name of the attribute to get.
//! \param target: Buffer where the string is copied to.
virtual void getAttributeAsString(const c8* attributeName, c8* target) _IRR_OVERRIDE_;
virtual void getAttributeAsString(const c8* attributeName, c8* target) const _IRR_OVERRIDE_;
//! Returns attribute value as string by index.
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual core::stringc getAttributeAsString(s32 index) _IRR_OVERRIDE_;
virtual core::stringc getAttributeAsString(s32 index) const _IRR_OVERRIDE_;
//! Sets an attribute value as string.
//! \param attributeName: Name for the attribute
@ -171,16 +171,16 @@ public:
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
//! or defaultNotFound if attribute is not set.
virtual core::stringw getAttributeAsStringW(const c8* attributeName, const core::stringw& defaultNotFound = core::stringw()) _IRR_OVERRIDE_;
virtual core::stringw getAttributeAsStringW(const c8* attributeName, const core::stringw& defaultNotFound = core::stringw()) const _IRR_OVERRIDE_;
//! Gets an attribute as string.
//! \param attributeName: Name of the attribute to get.
//! \param target: Buffer where the string is copied to.
virtual void getAttributeAsStringW(const c8* attributeName, wchar_t* target) _IRR_OVERRIDE_;
virtual void getAttributeAsStringW(const c8* attributeName, wchar_t* target) const _IRR_OVERRIDE_;
//! Returns attribute value as string by index.
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual core::stringw getAttributeAsStringW(s32 index) _IRR_OVERRIDE_;
virtual core::stringw getAttributeAsStringW(s32 index) const _IRR_OVERRIDE_;
//! Sets an attribute value as string.
//! \param attributeName: Name for the attribute
@ -200,11 +200,11 @@ public:
//! Gets an attribute as binary data
//! \param attributeName: Name of the attribute to get.
virtual void getAttributeAsBinaryData(const c8* attributeName, void* outData, s32 maxSizeInBytes) _IRR_OVERRIDE_;
virtual void getAttributeAsBinaryData(const c8* attributeName, void* outData, s32 maxSizeInBytes) const _IRR_OVERRIDE_;
//! Gets an attribute as binary data
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual void getAttributeAsBinaryData(s32 index, void* outData, s32 maxSizeInBytes) _IRR_OVERRIDE_;
virtual void getAttributeAsBinaryData(s32 index, void* outData, s32 maxSizeInBytes) const _IRR_OVERRIDE_;
//! Sets an attribute as binary data
virtual void setAttribute(s32 index, void* data, s32 dataSizeInBytes) _IRR_OVERRIDE_;
@ -229,11 +229,11 @@ public:
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
//! or defaultNotFound if attribute is not set.
virtual core::array<core::stringw> getAttributeAsArray(const c8* attributeName, const core::array<core::stringw>& defaultNotFound = core::array<core::stringw>()) _IRR_OVERRIDE_;
virtual core::array<core::stringw> getAttributeAsArray(const c8* attributeName, const core::array<core::stringw>& defaultNotFound = core::array<core::stringw>()) const _IRR_OVERRIDE_;
//! Returns attribute value as an array of wide strings by index.
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual core::array<core::stringw> getAttributeAsArray(s32 index) _IRR_OVERRIDE_;
virtual core::array<core::stringw> getAttributeAsArray(s32 index) const _IRR_OVERRIDE_;
//! Sets an attribute as an array of wide strings
virtual void setAttribute(s32 index, const core::array<core::stringw>& value) _IRR_OVERRIDE_;
@ -254,11 +254,11 @@ public:
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
virtual bool getAttributeAsBool(const c8* attributeName, bool defaultNotFound=false) _IRR_OVERRIDE_;
virtual bool getAttributeAsBool(const c8* attributeName, bool defaultNotFound=false) const _IRR_OVERRIDE_;
//! Gets an attribute as boolean value
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual bool getAttributeAsBool(s32 index) _IRR_OVERRIDE_;
virtual bool getAttributeAsBool(s32 index) const _IRR_OVERRIDE_;
//! Sets an attribute as boolean value
virtual void setAttribute(s32 index, bool value) _IRR_OVERRIDE_;
@ -282,7 +282,7 @@ public:
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
virtual const c8* getAttributeAsEnumeration(const c8* attributeName, const c8* defaultNotFound = 0) _IRR_OVERRIDE_;
virtual const c8* getAttributeAsEnumeration(const c8* attributeName, const c8* defaultNotFound = 0) const _IRR_OVERRIDE_;
//! Gets an attribute as enumeration
//! \param attributeName: Name of the attribute to get.
@ -290,23 +290,23 @@ public:
//! This is useful when the attribute list maybe was read from an xml file, and only contains the enumeration string, but
//! no information about its index.
//! \return Returns value of the attribute previously set by setAttribute()
virtual s32 getAttributeAsEnumeration(const c8* attributeName, const c8* const* enumerationLiteralsToUse) _IRR_OVERRIDE_;
virtual s32 getAttributeAsEnumeration(const c8* attributeName, const c8* const* enumerationLiteralsToUse) const _IRR_OVERRIDE_;
//! Gets an attribute as enumeration
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual s32 getAttributeAsEnumeration(s32 index, const c8* const* enumerationLiteralsToUse) _IRR_OVERRIDE_;
virtual s32 getAttributeAsEnumeration(s32 index, const c8* const* enumerationLiteralsToUse) const _IRR_OVERRIDE_;
//! Gets an attribute as enumeration
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual const c8* getAttributeAsEnumeration(s32 index) _IRR_OVERRIDE_;
virtual const c8* getAttributeAsEnumeration(s32 index) const _IRR_OVERRIDE_;
//! Gets the list of enumeration literals of an enumeration attribute
//! \param attributeName: Name of the attribute to get.
virtual void getAttributeEnumerationLiteralsOfEnumeration(const c8* attributeName, core::array<core::stringc>& outLiterals) _IRR_OVERRIDE_;
virtual void getAttributeEnumerationLiteralsOfEnumeration(const c8* attributeName, core::array<core::stringc>& outLiterals) const _IRR_OVERRIDE_;
//! Gets the list of enumeration literals of an enumeration attribute
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual void getAttributeEnumerationLiteralsOfEnumeration(s32 index, core::array<core::stringc>& outLiterals) _IRR_OVERRIDE_;
virtual void getAttributeEnumerationLiteralsOfEnumeration(s32 index, core::array<core::stringc>& outLiterals) const _IRR_OVERRIDE_;
//! Sets an attribute as enumeration
virtual void setAttribute(s32 index, const c8* enumValue, const c8* const* enumerationLiterals) _IRR_OVERRIDE_;
@ -328,11 +328,11 @@ public:
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
virtual video::SColor getAttributeAsColor(const c8* attributeName, const video::SColor& defaultNotFound = video::SColor(0)) _IRR_OVERRIDE_;
virtual video::SColor getAttributeAsColor(const c8* attributeName, const video::SColor& defaultNotFound = video::SColor(0)) const _IRR_OVERRIDE_;
//! Gets an attribute as color
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual video::SColor getAttributeAsColor(s32 index) _IRR_OVERRIDE_;
virtual video::SColor getAttributeAsColor(s32 index) const _IRR_OVERRIDE_;
//! Sets an attribute as color
virtual void setAttribute(s32 index, video::SColor color) _IRR_OVERRIDE_;
@ -353,11 +353,11 @@ public:
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
virtual video::SColorf getAttributeAsColorf(const c8* attributeName, const video::SColorf& defaultNotFound = video::SColorf(0)) _IRR_OVERRIDE_;
virtual video::SColorf getAttributeAsColorf(const c8* attributeName, const video::SColorf& defaultNotFound = video::SColorf(0)) const _IRR_OVERRIDE_;
//! Gets an attribute as floating point color
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual video::SColorf getAttributeAsColorf(s32 index) _IRR_OVERRIDE_;
virtual video::SColorf getAttributeAsColorf(s32 index) const _IRR_OVERRIDE_;
//! Sets an attribute as floating point color
virtual void setAttribute(s32 index, video::SColorf color) _IRR_OVERRIDE_;
@ -379,11 +379,11 @@ public:
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
virtual core::vector3df getAttributeAsVector3d(const c8* attributeName, const core::vector3df& defaultNotFound=core::vector3df(0,0,0)) _IRR_OVERRIDE_;
virtual core::vector3df getAttributeAsVector3d(const c8* attributeName, const core::vector3df& defaultNotFound=core::vector3df(0,0,0)) const _IRR_OVERRIDE_;
//! Gets an attribute as 3d vector
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual core::vector3df getAttributeAsVector3d(s32 index) _IRR_OVERRIDE_;
virtual core::vector3df getAttributeAsVector3d(s32 index) const _IRR_OVERRIDE_;
//! Sets an attribute as vector
virtual void setAttribute(s32 index, const core::vector3df& v) _IRR_OVERRIDE_;
@ -405,11 +405,11 @@ public:
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
virtual core::vector2df getAttributeAsVector2d(const c8* attributeName, const core::vector2df& defaultNotFound=core::vector2df(0,0)) _IRR_OVERRIDE_;
virtual core::vector2df getAttributeAsVector2d(const c8* attributeName, const core::vector2df& defaultNotFound=core::vector2df(0,0)) const _IRR_OVERRIDE_;
//! Gets an attribute as 3d vector
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual core::vector2df getAttributeAsVector2d(s32 index) _IRR_OVERRIDE_;
virtual core::vector2df getAttributeAsVector2d(s32 index) const _IRR_OVERRIDE_;
//! Sets an attribute as vector
virtual void setAttribute(s32 index, const core::vector2df& v) _IRR_OVERRIDE_;
@ -431,11 +431,11 @@ public:
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
virtual core::position2di getAttributeAsPosition2d(const c8* attributeName, const core::position2di& defaultNotFound=core::position2di(0,0)) _IRR_OVERRIDE_;
virtual core::position2di getAttributeAsPosition2d(const c8* attributeName, const core::position2di& defaultNotFound=core::position2di(0,0)) const _IRR_OVERRIDE_;
//! Gets an attribute as position
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual core::position2di getAttributeAsPosition2d(s32 index) _IRR_OVERRIDE_;
virtual core::position2di getAttributeAsPosition2d(s32 index) const _IRR_OVERRIDE_;
//! Sets an attribute as 2d position
virtual void setAttribute(s32 index, const core::position2di& v) _IRR_OVERRIDE_;
@ -456,11 +456,11 @@ public:
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
virtual core::rect<s32> getAttributeAsRect(const c8* attributeName, const core::rect<s32>& defaultNotFound = core::rect<s32>()) _IRR_OVERRIDE_;
virtual core::rect<s32> getAttributeAsRect(const c8* attributeName, const core::rect<s32>& defaultNotFound = core::rect<s32>()) const _IRR_OVERRIDE_;
//! Gets an attribute as rectangle
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual core::rect<s32> getAttributeAsRect(s32 index) _IRR_OVERRIDE_;
virtual core::rect<s32> getAttributeAsRect(s32 index) const _IRR_OVERRIDE_;
//! Sets an attribute as rectangle
virtual void setAttribute(s32 index, const core::rect<s32>& v) _IRR_OVERRIDE_;
@ -482,11 +482,11 @@ public:
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
virtual core::dimension2d<u32> getAttributeAsDimension2d(const c8* attributeName, const core::dimension2d<u32>& defaultNotFound = core::dimension2d<u32>()) _IRR_OVERRIDE_;
virtual core::dimension2d<u32> getAttributeAsDimension2d(const c8* attributeName, const core::dimension2d<u32>& defaultNotFound = core::dimension2d<u32>()) const _IRR_OVERRIDE_;
//! Gets an attribute as dimension2d
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual core::dimension2d<u32> getAttributeAsDimension2d(s32 index) _IRR_OVERRIDE_;
virtual core::dimension2d<u32> getAttributeAsDimension2d(s32 index) const _IRR_OVERRIDE_;
//! Sets an attribute as dimension2d
virtual void setAttribute(s32 index, const core::dimension2d<u32>& v) _IRR_OVERRIDE_;
@ -508,11 +508,11 @@ public:
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
virtual core::matrix4 getAttributeAsMatrix(const c8* attributeName, const core::matrix4& defaultNotFound=core::matrix4()) _IRR_OVERRIDE_;
virtual core::matrix4 getAttributeAsMatrix(const c8* attributeName, const core::matrix4& defaultNotFound=core::matrix4()) const _IRR_OVERRIDE_;
//! Gets an attribute as matrix
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual core::matrix4 getAttributeAsMatrix(s32 index) _IRR_OVERRIDE_;
virtual core::matrix4 getAttributeAsMatrix(s32 index) const _IRR_OVERRIDE_;
//! Sets an attribute as matrix
virtual void setAttribute(s32 index, const core::matrix4& v) _IRR_OVERRIDE_;
@ -532,11 +532,11 @@ public:
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
virtual core::quaternion getAttributeAsQuaternion(const c8* attributeName, const core::quaternion& defaultNotFound=core::quaternion(0,1,0, 0)) _IRR_OVERRIDE_;
virtual core::quaternion getAttributeAsQuaternion(const c8* attributeName, const core::quaternion& defaultNotFound=core::quaternion(0,1,0, 0)) const _IRR_OVERRIDE_;
//! Gets an attribute as quaternion
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual core::quaternion getAttributeAsQuaternion(s32 index) _IRR_OVERRIDE_;
virtual core::quaternion getAttributeAsQuaternion(s32 index) const _IRR_OVERRIDE_;
//! Sets an attribute as quaternion
virtual void setAttribute(s32 index, const core::quaternion& v) _IRR_OVERRIDE_;
@ -557,11 +557,11 @@ public:
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
virtual core::aabbox3df getAttributeAsBox3d(const c8* attributeName, const core::aabbox3df& defaultNotFound=core::aabbox3df(0,0,0, 0,0,0)) _IRR_OVERRIDE_;
virtual core::aabbox3df getAttributeAsBox3d(const c8* attributeName, const core::aabbox3df& defaultNotFound=core::aabbox3df(0,0,0, 0,0,0)) const _IRR_OVERRIDE_;
//! Gets an attribute as axis aligned bounding box
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual core::aabbox3df getAttributeAsBox3d(s32 index) _IRR_OVERRIDE_;
virtual core::aabbox3df getAttributeAsBox3d(s32 index) const _IRR_OVERRIDE_;
//! Sets an attribute as axis aligned bounding box
virtual void setAttribute(s32 index, const core::aabbox3df& v) _IRR_OVERRIDE_;
@ -582,11 +582,11 @@ public:
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
virtual core::plane3df getAttributeAsPlane3d(const c8* attributeName, const core::plane3df& defaultNotFound=core::plane3df(0,0,0, 0,1,0)) _IRR_OVERRIDE_;
virtual core::plane3df getAttributeAsPlane3d(const c8* attributeName, const core::plane3df& defaultNotFound=core::plane3df(0,0,0, 0,1,0)) const _IRR_OVERRIDE_;
//! Gets an attribute as 3d plane
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual core::plane3df getAttributeAsPlane3d(s32 index) _IRR_OVERRIDE_;
virtual core::plane3df getAttributeAsPlane3d(s32 index) const _IRR_OVERRIDE_;
//! Sets an attribute as 3d plane
virtual void setAttribute(s32 index, const core::plane3df& v) _IRR_OVERRIDE_;
@ -608,11 +608,11 @@ public:
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
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))) _IRR_OVERRIDE_;
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 _IRR_OVERRIDE_;
//! Gets an attribute as 3d triangle
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual core::triangle3df getAttributeAsTriangle3d(s32 index) _IRR_OVERRIDE_;
virtual core::triangle3df getAttributeAsTriangle3d(s32 index) const _IRR_OVERRIDE_;
//! Sets an attribute as 3d triangle
virtual void setAttribute(s32 index, const core::triangle3df& v) _IRR_OVERRIDE_;
@ -634,11 +634,11 @@ public:
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
virtual core::line2df getAttributeAsLine2d(const c8* attributeName, const core::line2df& defaultNotFound = core::line2df(0,0, 0,0)) _IRR_OVERRIDE_;
virtual core::line2df getAttributeAsLine2d(const c8* attributeName, const core::line2df& defaultNotFound = core::line2df(0,0, 0,0)) const _IRR_OVERRIDE_;
//! Gets an attribute as a 2d line
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual core::line2df getAttributeAsLine2d(s32 index) _IRR_OVERRIDE_;
virtual core::line2df getAttributeAsLine2d(s32 index) const _IRR_OVERRIDE_;
//! Sets an attribute as a 2d line
virtual void setAttribute(s32 index, const core::line2df& v) _IRR_OVERRIDE_;
@ -660,11 +660,11 @@ public:
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
//! \return Returns value of the attribute previously set by setAttribute()
virtual core::line3df getAttributeAsLine3d(const c8* attributeName, const core::line3df& defaultNotFound=core::line3df(0,0,0, 0,0,0)) _IRR_OVERRIDE_;
virtual core::line3df getAttributeAsLine3d(const c8* attributeName, const core::line3df& defaultNotFound=core::line3df(0,0,0, 0,0,0)) const _IRR_OVERRIDE_;
//! Gets an attribute as a 3d line
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual core::line3df getAttributeAsLine3d(s32 index) _IRR_OVERRIDE_;
virtual core::line3df getAttributeAsLine3d(s32 index) const _IRR_OVERRIDE_;
//! Sets an attribute as a 3d line
virtual void setAttribute(s32 index, const core::line3df& v) _IRR_OVERRIDE_;
@ -685,11 +685,11 @@ public:
//! Gets an attribute as texture reference
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
virtual video::ITexture* getAttributeAsTexture(const c8* attributeName, video::ITexture* defaultNotFound=0) _IRR_OVERRIDE_;
virtual video::ITexture* getAttributeAsTexture(const c8* attributeName, video::ITexture* defaultNotFound=0) const _IRR_OVERRIDE_;
//! Gets an attribute as texture reference
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual video::ITexture* getAttributeAsTexture(s32 index) _IRR_OVERRIDE_;
virtual video::ITexture* getAttributeAsTexture(s32 index) const _IRR_OVERRIDE_;
//! Sets an attribute as texture reference
virtual void setAttribute(s32 index, video::ITexture* texture, const io::path& filename = "") _IRR_OVERRIDE_;
@ -711,11 +711,11 @@ public:
//! Gets an attribute as user pointer
//! \param attributeName: Name of the attribute to get.
//! \param defaultNotFound Value returned when attributeName was not found
virtual void* getAttributeAsUserPointer(const c8* attributeName, void* defaultNotFound = 0) _IRR_OVERRIDE_;
virtual void* getAttributeAsUserPointer(const c8* attributeName, void* defaultNotFound = 0) const _IRR_OVERRIDE_;
//! Gets an attribute as user pointer
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual void* getAttributeAsUserPointer(s32 index) _IRR_OVERRIDE_;
virtual void* getAttributeAsUserPointer(s32 index) const _IRR_OVERRIDE_;
//! Sets an attribute as user pointer
virtual void setAttribute(s32 index, void* userPointer) _IRR_OVERRIDE_;

View File

@ -108,7 +108,8 @@ namespace
const core::stringc dataName = "data";
const core::stringc wrapsName = "wrap_s";
const core::stringc wraptName = "wrap_t";
const core::stringc wraprName = "wrap_r";
const core::stringc wraprName = "wrap_r"; // for downward compatibility to bug in old Irrlicht collada writer. Not standard but we wrote that accidentally up to Irrlicht 1.8, so we should still be able to load those files
const core::stringc wrappName = "wrap_p";
const core::stringc minfilterName = "minfilter";
const core::stringc magfilterName = "magfilter";
const core::stringc mipfilterName = "mipfilter";
@ -1571,9 +1572,16 @@ void CColladaFileLoader::readEffect(io::IXMLReaderUTF8* reader, SColladaEffect *
if ( idx >= 0 )
twv = (video::E_TEXTURE_CLAMP)(effect->Parameters->getAttributeAsInt(idx));
video::E_TEXTURE_CLAMP twr = video::ETC_REPEAT;
idx = effect->Parameters->findAttribute(wraprName.c_str());
idx = effect->Parameters->findAttribute(wrappName.c_str());
if ( idx >= 0 )
twr = (video::E_TEXTURE_CLAMP)(effect->Parameters->getAttributeAsInt(idx));
else
{
// for downward compatibility with older Irrlicht collada writer
idx = effect->Parameters->findAttribute(wraprName.c_str());
if ( idx >= 0 )
twr = (video::E_TEXTURE_CLAMP)(effect->Parameters->getAttributeAsInt(idx));
}
for (u32 i=0; i<video::MATERIAL_MAX_TEXTURES; ++i)
{

View File

@ -1381,10 +1381,10 @@ void CColladaMeshWriter::writeMaterialEffect(const irr::core::stringw& materialf
Writer->writeClosingTag(L"wrap_t");
Writer->writeLineBreak();
// <wrap_r>WRAP</wrap_r>
Writer->writeElement(L"wrap_r", false);
// <wrap_p>WRAP</wrap_p>
Writer->writeElement(L"wrap_p", false);
Writer->writeText(toString((video::E_TEXTURE_CLAMP)layer.TextureWrapW).c_str());
Writer->writeClosingTag(L"wrap_r");
Writer->writeClosingTag(L"wrap_p");
Writer->writeLineBreak();
// <minfilter>LINEAR_MIPMAP_LINEAR</minfilter>

View File

@ -35,7 +35,7 @@ CD3D9Driver::CD3D9Driver(const SIrrlichtCreationParameters& params, io::IFileSys
D3DLibrary(0), pID3D(0), pID3DDevice(0), BackBufferSurface(0),
DepthStencilSurface(0), WindowId(0), SceneSourceRect(0),
LastVertexType((video::E_VERTEX_TYPE)-1), VendorID(0),
MaxTextureUnits(0), MaxUserClipPlanes(0),
MaxTextureUnits(0), MaxFixedPipelineTextureUnits(0), MaxUserClipPlanes(0),
MaxLightDistance(0.f), LastSetLight(-1),
ColorFormat(ECF_A8R8G8B8), DeviceLost(false),
DriverWasReset(true), OcclusionQuerySupport(false),
@ -426,7 +426,14 @@ bool CD3D9Driver::initDriver(HWND hwnd, bool pureSoftware)
// create materials
createMaterialRenderers();
MaxTextureUnits = core::min_((u32)Caps.MaxSimultaneousTextures, MATERIAL_MAX_TEXTURES);
MaxFixedPipelineTextureUnits = (u32)Caps.MaxSimultaneousTextures;
u32 maxTextureSamplers = (Caps.PixelShaderVersion >= D3DPS_VERSION(2, 0)) ? 16 : (Caps.PixelShaderVersion >= D3DPS_VERSION(1, 4)) ?
6 : (Caps.PixelShaderVersion >= D3DPS_VERSION(1, 0)) ? 4 : 0;
MaxTextureUnits = core::max_(MaxFixedPipelineTextureUnits, maxTextureSamplers);
MaxTextureUnits = core::min_(MaxTextureUnits, MATERIAL_MAX_TEXTURES);
MaxUserClipPlanes = (u32)Caps.MaxUserClipPlanes;
OcclusionQuerySupport=(pID3DDevice->CreateQuery(D3DQUERYTYPE_OCCLUSION, NULL) == S_OK);
@ -443,7 +450,7 @@ bool CD3D9Driver::initDriver(HWND hwnd, bool pureSoftware)
#endif
DriverAttributes->setAttribute("MaxTextures", (s32)MaxTextureUnits);
DriverAttributes->setAttribute("MaxSupportedTextures", (s32)Caps.MaxSimultaneousTextures);
DriverAttributes->setAttribute("MaxSupportedTextures", (s32)MaxTextureUnits);
DriverAttributes->setAttribute("MaxLights", (s32)Caps.MaxActiveLights);
DriverAttributes->setAttribute("MaxAnisotropy", (s32)Caps.MaxAnisotropy);
DriverAttributes->setAttribute("MaxUserClipPlanes", (s32)Caps.MaxUserClipPlanes);
@ -659,8 +666,7 @@ bool CD3D9Driver::queryFeature(E_VIDEO_DRIVER_FEATURE feature) const
//! sets transformation
void CD3D9Driver::setTransform(E_TRANSFORMATION_STATE state,
const core::matrix4& mat)
void CD3D9Driver::setTransform(E_TRANSFORMATION_STATE state, const core::matrix4& mat)
{
Transformation3DChanged = true;
@ -678,15 +684,18 @@ void CD3D9Driver::setTransform(E_TRANSFORMATION_STATE state,
case ETS_COUNT:
return;
default:
if (state-ETS_TEXTURE_0 < MATERIAL_MAX_TEXTURES)
{
if (mat.isIdentity())
pID3DDevice->SetTextureStageState( state - ETS_TEXTURE_0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_DISABLE );
else
const s32 stage = state - ETS_TEXTURE_0;
if (stage < MATERIAL_MAX_TEXTURES && stage < static_cast<s32>(MaxFixedPipelineTextureUnits))
{
pID3DDevice->SetTextureStageState( state - ETS_TEXTURE_0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT2 );
pID3DDevice->SetTransform((D3DTRANSFORMSTATETYPE)(D3DTS_TEXTURE0+ ( state - ETS_TEXTURE_0 )),
(D3DMATRIX*)((void*)mat.pointer()));
if (mat.isIdentity())
pID3DDevice->SetTextureStageState(stage, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_DISABLE);
else
{
pID3DDevice->SetTextureStageState(stage, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT2);
pID3DDevice->SetTransform((D3DTRANSFORMSTATETYPE)(D3DTS_TEXTURE0 + stage), (D3DMATRIX*)((void*)mat.pointer()));
}
}
}
break;

View File

@ -427,6 +427,7 @@ namespace video
u16 VendorID;
u32 MaxTextureUnits;
u32 MaxFixedPipelineTextureUnits;
u32 MaxUserClipPlanes;
f32 MaxLightDistance;
s32 LastSetLight;

View File

@ -938,7 +938,7 @@ void CNullDriver::drawPixel(u32 x, u32 y, const SColor & color)
}
//! Draws a non filled concyclic regular 2d polyon.
//! Draws a non filled concyclic regular 2d polygon.
void CNullDriver::draw2DPolygon(core::position2d<s32> center,
f32 radius, video::SColor color, s32 count)
{

View File

@ -219,7 +219,7 @@ namespace video
//! Draws a pixel
virtual void drawPixel(u32 x, u32 y, const SColor & color) _IRR_OVERRIDE_;
//! Draws a non filled concyclic reqular 2d polyon.
//! Draws a non filled concyclic reqular 2d polygon.
virtual void draw2DPolygon(core::position2d<s32> center,
f32 radius, video::SColor Color, s32 vertexCount) _IRR_OVERRIDE_;
@ -705,13 +705,13 @@ namespace video
//! normal map lookup 32 bit version
inline f32 nml32(int x, int y, int pitch, int height, s32 *p) const
{
if (x < 0)
x = pitch-1;
if (x >= pitch)
if (x < 0)
x = pitch-1;
if (x >= pitch)
x = 0;
if (y < 0)
y = height-1;
if (y >= height)
if (y < 0)
y = height-1;
if (y >= height)
y = 0;
return (f32)(((p[(y * pitch) + x])>>16) & 0xff);
}
@ -719,13 +719,13 @@ namespace video
//! normal map lookup 16 bit version
inline f32 nml16(int x, int y, int pitch, int height, s16 *p) const
{
if (x < 0)
x = pitch-1;
if (x >= pitch)
if (x < 0)
x = pitch-1;
if (x >= pitch)
x = 0;
if (y < 0)
y = height-1;
if (y >= height)
if (y < 0)
y = height-1;
if (y >= height)
y = 0;
return (f32) getAverage ( p[(y * pitch) + x] );

View File

@ -134,7 +134,7 @@ void CSceneCollisionManager::getPickedNodeBB(ISceneNode* root,
// Now transform into world space, since we need to use world space
// scales and distances.
core::aabbox3df worldBox(objectBox);
current->getAbsoluteTransformation().transformBox(worldBox);
current->getAbsoluteTransformation().transformBoxEx(worldBox);
core::vector3df edges[8];
worldBox.getEdges(edges);

File diff suppressed because it is too large Load Diff

View File

@ -313,7 +313,8 @@ namespace os
timeinfo = localtime(&rawtime);
// init with all 0 to indicate error
ITimer::RealTimeDate date={0};
ITimer::RealTimeDate date;
memset(&date, 0, sizeof(date));
// at least Windows returns NULL on some illegal dates
if (timeinfo)
{

View File

@ -7,7 +7,7 @@ using namespace irr;
static bool testLightTypes(video::E_DRIVER_TYPE driverType)
{
IrrlichtDevice *device = createDevice (driverType, core::dimension2d<u32>(128,128));
IrrlichtDevice *device = createDevice (driverType, core::dimension2d<u32>(256,128));
if (!device)
return true; // No error if device does not exist

Binary file not shown.

Before

Width:  |  Height:  |  Size: 921 B

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -9,7 +9,7 @@ using namespace irr;
/** This test is very special in its setup, problematic situation was found by stefbuet. */
static bool testWith2DImage(video::E_DRIVER_TYPE driverType)
{
IrrlichtDevice *device = createDevice(driverType, core::dimension2d<u32> (128, 128));
IrrlichtDevice *device = createDevice(driverType, core::dimension2d<u32> (256, 128));
if (!device)
return true; // No error if device does not exist
@ -29,7 +29,7 @@ static bool testWith2DImage(video::E_DRIVER_TYPE driverType)
logTestString("Testing driver %ls\n", driver->getName());
video::ITexture *image = driver->getTexture ("../media/irrlichtlogo2.png");
video::ITexture *RTT_texture = driver->addRenderTargetTexture (core::dimension2d < u32 > (128, 128));
video::ITexture *RTT_texture = driver->addRenderTargetTexture (core::dimension2d < u32 > (256, 128));
smgr->addCameraSceneNode (0, core::vector3df (100, 100, 100),
core::vector3df (0, 0, 0));