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

@ -453,13 +453,15 @@ namespace scene
where the scene node will be placed.
\param rotation: Initial rotation of the scene node.
\param scale: Initial scale of the scene node.
\param type: Type of cube-mesh to create. Check ECUBE_MESH_TYPE documentation for more info
\return Pointer to the created test scene node. This
pointer should not be dropped. See IReferenceCounted::drop()
for more information. */
virtual IMeshSceneNode* addCubeSceneNode(f32 size=10.0f, ISceneNode* parent=0, s32 id=-1,
const core::vector3df& position = core::vector3df(0,0,0),
const core::vector3df& rotation = core::vector3df(0,0,0),
const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) = 0;
const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f),
ECUBE_MESH_TYPE type=ECMT_1BUF_12VTX_NA) = 0;
//! Adds a sphere scene node of the given radius and detail
/** \param radius: Radius of the sphere.