123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- import Matrix4 from "../Core/Matrix4.js";
- function ModelNode(model, node, runtimeNode, id, matrix) {
- this._model = model;
- this._runtimeNode = runtimeNode;
- this._name = node.name;
- this._id = id;
-
- this.useMatrix = false;
- this._show = true;
- this._matrix = Matrix4.clone(matrix);
- this._originalMatrix = Matrix4.clone(matrix);
- }
- Object.defineProperties(ModelNode.prototype, {
-
- name: {
- get: function () {
- return this._name;
- },
- },
-
- id: {
- get: function () {
- return this._id;
- },
- },
-
- show: {
- get: function () {
- return this._show;
- },
- set: function (value) {
- if (this._show !== value) {
- this._show = value;
- this._model._perNodeShowDirty = true;
- }
- },
- },
-
- matrix: {
- get: function () {
- return this._matrix;
- },
- set: function (value) {
- this._matrix = Matrix4.clone(value, this._matrix);
- this.useMatrix = true;
- var model = this._model;
- model._cesiumAnimationsDirty = true;
- this._runtimeNode.dirtyNumber = model._maxDirtyNumber;
- },
- },
-
- originalMatrix: {
- get: function () {
- return this._originalMatrix;
- },
- },
- });
- ModelNode.prototype.setMatrix = function (matrix) {
-
-
- Matrix4.clone(matrix, this._matrix);
- };
- export default ModelNode;
|