public void setParent ( Model parent ) { if ( parent == this ) { throw new IllegalArgumentException ( "The model can't be its own parent" ) ; } if ( parent == null ) { this . parent . children . remove ( this ) ; } else { parent . children . add ( this ) ; } this . parent = parent ; }
Sets the parent model . This model s position rotation and scale will be relative to that model if not null .