IBillboardSceneNode got functions to access meshbuffers.

So uv-coordinates can now be modified directly (previously only possible via texture matrix).


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6299 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
cutealien
2022-02-08 21:00:12 +00:00
parent 57f518737d
commit 19b003a840
4 changed files with 39 additions and 0 deletions

View File

@ -72,6 +72,20 @@ public:
//! Get the real boundingbox used by the billboard (which depends on the active camera)
virtual const core::aabbox3d<f32>& getTransformedBillboardBoundingBox(const irr::scene::ICameraSceneNode* camera) IRR_OVERRIDE;
//! Get the amount of mesh buffers.
virtual u32 getMeshBufferCount() const
{
return Buffer ? 1 : 0;
}
//! Get pointer to the mesh buffer.
virtual IMeshBuffer* getMeshBuffer(u32 nr) const
{
if ( nr == 0 )
return Buffer;
return 0;
}
//! Writes attributes of the scene node.
virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const IRR_OVERRIDE;

View File

@ -145,6 +145,18 @@ namespace scene
virtual const core::aabbox3d<f32>& getTransformedBillboardBoundingBox(const irr::scene::ICameraSceneNode* camera) IRR_OVERRIDE;
//! Get the amount of mesh buffers.
virtual u32 getMeshBufferCount() const
{
return Mesh ? Mesh->getMeshBufferCount() : 0;
}
//! Get pointer to the mesh buffer.
virtual IMeshBuffer* getMeshBuffer(u32 nr) const
{
return Mesh ? Mesh->getMeshBuffer(nr) : 0;
}
protected:
void updateMesh(const irr::scene::ICameraSceneNode* camera);