\r
--------------------------\r
Changes in 1.9 (not yet released)\r
+- IBillboardSceneNode got functions to access meshbuffers. So uv-coordinates can now be modified directly (previously only possible via texture matrix).\r
- vector3d scalar operator/ and operator/= no longer multiply by the inverse but use the expected division. \r
Costs some speed, but fixes floating point troubles caused by this optimization (like x/x no longer being 1.0).\r
- Add equals and set_data functions to core::array for easier working with blocks of data.\r
namespace scene\r
{\r
class ICameraSceneNode;\r
+ class IMeshBuffer;\r
\r
//! A billboard scene node.\r
/** A billboard is like a 3d sprite: A 2d element,\r
That is why the usual getBoundingBox will return a "safe" boundingbox which is guaranteed\r
to contain the billboard. While this function can return the real one. */\r
virtual const core::aabbox3d<f32>& getTransformedBillboardBoundingBox(const irr::scene::ICameraSceneNode* camera) = 0;\r
+\r
+ //! Get the amount of mesh buffers.\r
+ /** \return Amount of mesh buffers (IMeshBuffer) in this mesh. */\r
+ virtual u32 getMeshBufferCount() const = 0;\r
+\r
+ //! Get pointer to a mesh buffer.\r
+ /** NOTE: Positions and normals of this meshbuffers are re-calculated before rendering.\r
+ So this is mainly useful to access/modify the uv-coordinates.\r
+ \param nr: Zero based index of the mesh buffer.\r
+ \return Pointer to the mesh buffer or 0 if there is no such mesh buffer. */\r
+ virtual IMeshBuffer* getMeshBuffer(u32 nr) const = 0;\r
};\r
\r
} // end namespace scene\r
//! Get the real boundingbox used by the billboard (which depends on the active camera)\r
virtual const core::aabbox3d<f32>& getTransformedBillboardBoundingBox(const irr::scene::ICameraSceneNode* camera) _IRR_OVERRIDE_;\r
\r
+ //! Get the amount of mesh buffers.\r
+ virtual u32 getMeshBufferCount() const\r
+ {\r
+ return Buffer ? 1 : 0;\r
+ }\r
+\r
+ //! Get pointer to the mesh buffer.\r
+ virtual IMeshBuffer* getMeshBuffer(u32 nr) const\r
+ {\r
+ if ( nr == 0 )\r
+ return Buffer;\r
+ return 0;\r
+ }\r
+\r
//! Returns type of the scene node\r
virtual ESCENE_NODE_TYPE getType() const _IRR_OVERRIDE_ { return ESNT_BILLBOARD; }\r
\r