import Matrix from './math/Matrix' ; import Vertice from './math/Vertice' ; import Vector from './math/Vector' ; export default class Object3D { protected matrix : Matrix ; constructor ( ) { this . matrix = new Matrix ( ) ; } setMatrix ( matrix ) { this . matrix = matrix ; } getMatrix ( ) { return this . matrix ; } cloneMatrix ( ) { return this . matrix . clone ( ) ; } setVectorX ( vector ) { this . matrix . setVectorX ( vector ) ; } getVectorX ( ) { return this . matrix . getVectorX ( ) ; } setVectorY ( vector ) { this . matrix . setVectorY ( vector ) ; } getVectorY ( ) { return this . matrix . getVectorY ( ) ; } setVectorZ ( vector ) { this . matrix . setVectorZ ( vector ) ; } getVectorZ ( ) { return this . matrix . getVectorZ ( ) ; } setPosition ( vertice ) { this . matrix . setPosition ( vertice ) ; } getPosition ( ) { return this . matrix . getPosition ( ) ; } worldTranslate ( x , y , z ) { this . matrix . worldTranslate ( x , y , z ) ; } localTranslate ( x , y , z ) { this . matrix . localTranslate ( x , y , z ) ; } worldScale ( scaleX , scaleY , scaleZ ) { this . matrix . worldScale ( scaleX , scaleY , scaleZ ) ; } localScale ( scaleX , scaleY , scaleZ ) { this . matrix . localScale ( scaleX , scaleY , scaleZ ) ; } worldRotateX ( radian ) { this . matrix . worldRotateX ( radian ) ; } worldRotateY ( radian ) { this . matrix . worldRotateY ( radian ) ; } worldRotateZ ( radian ) { this . matrix . worldRotateZ ( radian ) ; } worldRotateByVector ( radian , vector ) { this . matrix . worldRotateByVector ( radian , vector ) ; } localRotateX ( radian ) { this . matrix . localRotateX ( radian ) ; } localRotateY ( radian ) { this . matrix . localRotateY ( radian ) ; } localRotateZ ( radian ) { this . matrix . localRotateZ ( radian ) ; } localRotateByVector ( radian , localVector ) { this . matrix . localRotateByVector ( radian , localVector ) ; } getXAxisDirection ( ) { var directionX = this . matrix . getVectorX ( ) ; directionX . normalize ( ) ; return directionX ; } getYAxisDirection ( ) { var directionY = this . matrix . getVectorY ( ) ; directionY . normalize ( ) ; return directionY ; } getZAxisDirection ( ) { var directionZ = this . matrix . getVectorZ ( ) ; directionZ . normalize ( ) ; return directionZ ; } } ;