setFromMatrix method

void setFromMatrix (Matrix4 matrix)

Set this from matrix.

Implementation

void setFromMatrix(Matrix4 matrix) {
  final Float64List me = matrix.storage;
  final double me0 = me[0], me1 = me[1], me2 = me[2], me3 = me[3];
  final double me4 = me[4], me5 = me[5], me6 = me[6], me7 = me[7];
  final double me8 = me[8], me9 = me[9], me10 = me[10], me11 = me[11];
  final double me12 = me[12], me13 = me[13], me14 = me[14], me15 = me[15];

  _plane0
    ..setFromComponents(me3 - me0, me7 - me4, me11 - me8, me15 - me12)
    ..normalize();
  _plane1
    ..setFromComponents(me3 + me0, me7 + me4, me11 + me8, me15 + me12)
    ..normalize();
  _plane2
    ..setFromComponents(me3 + me1, me7 + me5, me11 + me9, me15 + me13)
    ..normalize();
  _plane3
    ..setFromComponents(me3 - me1, me7 - me5, me11 - me9, me15 - me13)
    ..normalize();
  _plane4
    ..setFromComponents(me3 - me2, me7 - me6, me11 - me10, me15 - me14)
    ..normalize();
  _plane5
    ..setFromComponents(me3 + me2, me7 + me6, me11 + me10, me15 + me14)
    ..normalize();
}