123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- define([
- '../Core/defaultValue',
- '../Core/defineProperties',
- '../Core/Matrix4'
- ], function(
- defaultValue,
- defineProperties,
- Matrix4) {
- "use strict";
-
- var ModelNode = function(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);
- };
- 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;
- }
- }
- });
-
- ModelNode.prototype.setMatrix = function(matrix) {
-
-
- Matrix4.clone(matrix, this._matrix);
- };
- return ModelNode;
- });
|