Commit Graph

11 Commits

Author SHA1 Message Date
cutealien
bff1a50c34 Minor code cleanup
Mostly const fixes in headers to make it easier for users to have more warnings enabled in static code analysis
Also updating our own rules a bit (kicking some out we won't need yet).

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6583 dfc29bdd-3216-0410-991c-e03cc46cb475
2024-01-01 15:29:28 +00:00
cutealien
6b2a0fab78 Fix tessellation numbers in createCylinderMesh, createConeMesh, createArrowMesh
Double tessellation numbers for these 3 functions in your code to get same results as in Irrlicht 1.8

I noticed in last commit those all tessellated semi-circles instead of circles. I just documented it there, but it's annoying as that bug doesn't allow odd numbered tessellation. So for example one couldn't create a triangle pyramid. 
I considered adding another parameter to describe what this number means, but... just too ugly. And it was always documented otherwise, so this could be considered a bug. Sorry if this changes the look of existing apps.

Also cleaned up code in CGeometryCreator::createCylinderMesh. No idea what the idea behind old code was. Aside from creating twice the tessellation numbers.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6581 dfc29bdd-3216-0410-991c-e03cc46cb475
2023-12-31 18:04:15 +00:00
cutealien
245dd395cb Add default UV's for CGeometryCreator::createConeMesh
Thanks @randomMesh for reporting that they were missing: https://irrlicht.sourceforge.io/forum/viewtopic.php?p=307308
Also simplified that code a bit (same could probably also be done for createCylinderMesh, but too lazy right now)
Changed also UV's for top/bottom center vertex in CGeometryCreator::createCylinderMesh to use center for X (slight improvement, but would have to copy vertices to make it better)



git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6580 dfc29bdd-3216-0410-991c-e03cc46cb475
2023-12-31 16:48:36 +00:00
cutealien
ce1cdd2543 Clean-up include dependencies (scene namespace)
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6527 dfc29bdd-3216-0410-991c-e03cc46cb475
2023-08-14 22:01:22 +00:00
cutealien
3a9875cc77 Spelling fixes
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6456 dfc29bdd-3216-0410-991c-e03cc46cb475
2023-03-31 13:12:47 +00:00
cutealien
669ad7860a 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
2022-03-22 22:08:33 +00:00
cutealien
38e2aa1338 createTorusMesh can now create a partial torus
Capping the torus also supported.
Bit arguably if caps belong in this function, but default for caps is off and they can be useful.
(one could also code partial minor circles ... but I'm stopping there)


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6225 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-06-28 14:33:08 +00:00
cutealien
28fd5f8a4f Reduce warnings in CGeometryCreator::createTorusMesh
Also simplify it a bit.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6224 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-06-28 12:22:04 +00:00
cutealien
9ba392e902 Add createTorusMesh function to IGeometryCreator
Mmmm .... Donuts!


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6222 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-06-25 16:19:11 +00:00
cutealien
2928a632a4 Material.ZWriteEnable is now of type E_ZWRITE instead of bool and ZWriteFineControl get removed (or merged into ZWriteEnable).
This breaks compiling. To have old values replace false with EZW_OFF and true with EWZ_AUTO.

There's a bit history to this change. ZWriteFineControl got introduced after 1.8 so it was never in a released version.
Basically it was needed after some changes had been made to allow shaders to have zwrite enabled independent
of the material-type (which worked badly for shaders). This had caused other problems as it was then enabled too often instead. 
So to quickly fix those bugs and avoid breaking compatibility I had introduced a new enum ZWriteFineControl in SMaterial.
This worked and didn't break compiling - but I noticed by now that introducing a second flag for this made maintainance for an already 
very hard to understand problem (figuring out the implementation of transparency and zwriting) even more complicated. 
So to keep maintance somewhat sane I decided to break compiling now and merge those two flags. 
The behavior should not be affected by this commit - except for users which set this flag already in their code and have to switch to the enum now.

Serialization is switched on loading old files (so SMaterial has enum already and writes that out).


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6026 dfc29bdd-3216-0410-991c-e03cc46cb475
2020-01-02 15:34:52 +00:00
cutealien
8310a3fbad Avoid warning and make local variable lower-case.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6000 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-12-12 16:32:41 +00:00