src/linetypes/modelobject.cpp

changeset 1161
e6a5ff67c057
parent 1158
35ceb74fe53e
child 1187
46dc716238fd
child 1236
861bf8ebb8ec
equal deleted inserted replaced
1160:2cf16ba952bf 1161:e6a5ff67c057
42 // 42 //
43 LDObject::LDObject (Model* model) : 43 LDObject::LDObject (Model* model) :
44 m_isHidden {false}, 44 m_isHidden {false},
45 m_isSelected {false}, 45 m_isSelected {false},
46 _model {model}, 46 _model {model},
47 m_coords {Origin} 47 m_coords {{0, 0, 0}}
48 { 48 {
49 assert(_model != nullptr); 49 assert(_model != nullptr);
50 50
51 // Let's hope that nobody goes to create 17 million objects anytime soon... 51 // Let's hope that nobody goes to create 17 million objects anytime soon...
52 static qint32 nextId = 1; // 0 shalt be null 52 static qint32 nextId = 1; // 0 shalt be null
491 changeProperty(&m_coords[i], vert); 491 changeProperty(&m_coords[i], vert);
492 } 492 }
493 493
494 LDMatrixObject::LDMatrixObject (Model* model) : 494 LDMatrixObject::LDMatrixObject (Model* model) :
495 LDObject (model), 495 LDObject (model),
496 m_position (Origin) {} 496 m_position {0, 0, 0} {}
497 497
498 LDMatrixObject::LDMatrixObject (const Matrix& transform, const Vertex& pos, Model* model) : 498 LDMatrixObject::LDMatrixObject (const Matrix& transform, const Vertex& pos, Model* model) :
499 LDObject (model), 499 LDObject (model),
500 m_position (pos), 500 m_position (pos),
501 m_transformationMatrix (transform) {} 501 m_transformationMatrix (transform) {}

mercurial