Commit Graph

5 Commits

Author SHA1 Message Date
cutealien
70b2e3a255 Can often copy instead of multiply matrix in CTriangleSelector
If we already know we start with an identity matrix (which is usually the case) then copy will do.
Also unifying code to create matrix of different CTriangleSelector::getTriangles functions


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6578 dfc29bdd-3216-0410-991c-e03cc46cb475
2023-12-13 15:05:08 +00:00
cutealien
66d189ce63 Bugfix: CTriangleSelector::getTriangles with bbox no longer ignores transform matrix
So far it only used the inverse of the node transformation to calculate the box used to check
Which gave wrong results as soon as one tried to pass an additional matrix transformation
Wasn't ever used internally or by examples in Irrlicht, so I guess no one ever noticed (also in some cases this still worked accidentally).


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6577 dfc29bdd-3216-0410-991c-e03cc46cb475
2023-12-13 14:14:12 +00:00
cutealien
66dcb86e5f Make SCollisionHit::TriangleSelector and SCollisionTriangleRange::Selector both const.
Avoids lots of const casts and there shouldn't be a good reason to have those non-const.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6396 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-05-14 14:29:56 +00:00
cutealien
13a232aa9b updateTriangles in CTriangleSelector can handle some broken meshes without crash now.
Before it crashed when index-count wasn't a multiple of 3, now it just doesn't create the last triangle then.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6110 dfc29bdd-3216-0410-991c-e03cc46cb475
2020-05-26 13:01:02 +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