Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 336898 - Matrix inversion code does not always work
Summary: Matrix inversion code does not always work
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Gef3d (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-11 02:35 EST by Kristian Duske CLA
Modified: 2021-03-23 18:16 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kristian Duske CLA 2011-02-11 02:35:07 EST
First, the matrix inversion algorithm in Math3DMatrix4f#invert() does not check whether the matrix is invertible (determinant != 0) beforehand. It also uses a shorthand method that only works in special cases (see wikipedia). For cases in which the special method fails, the general algorithm has to be used (divide matrix of cofactors by own determinant).
Comment 1 Jens Von Pilgrim CLA 2011-02-11 04:00:04 EST
Fixed: Firstly the determinant is calculated. Then, block wise inversion is used, testing whether the block matrices are correctly invertible. If they are not, a general but slower algorithm is used. This may be optimized, e.g., for general algorithm could be replaced by the Gauß-Jordan algorithm.