Add new cube mesh type ECMT_1BUF_24VTX_NP. CubeSceneNodes can now use different cube mesh types.

1 Meshbuffer with 24 vertices, so each side has it's own vertices.
Normals perpendicular to the cube-sides.
CubeSceneNode accepts now a ECUBE_MESH_TYPE
CubeSceneNode::clone now also clones rotation and scale (not sure why it didn't do that before - hope there was no reason, but can't think of any).
ISceneManager::addCubeSceneNode accepts now a ECUBE_MESH_TYPE and passes it through.
Example 22.MaterialViewer using new cube type. Also a few more beauty fixes there.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6313 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
cutealien
2022-03-22 22:08:33 +00:00
parent f61b8614ab
commit 669ad7860a
8 changed files with 120 additions and 19 deletions

View File

@ -609,13 +609,14 @@ IVolumeLightSceneNode* CSceneManager::addVolumeLightSceneNode(
//! the returned pointer must not be dropped.
IMeshSceneNode* CSceneManager::addCubeSceneNode(f32 size, ISceneNode* parent,
s32 id, const core::vector3df& position,
const core::vector3df& rotation, const core::vector3df& scale)
const core::vector3df& rotation, const core::vector3df& scale,
ECUBE_MESH_TYPE type)
{
#ifdef _IRR_COMPILE_WITH_CUBE_SCENENODE_
if (!parent)
parent = this;
IMeshSceneNode* node = new CCubeSceneNode(size, parent, this, id, position, rotation, scale);
IMeshSceneNode* node = new CCubeSceneNode(size, parent, this, id, position, rotation, scale, type);
node->drop();
return node;