Put some research in using Matrices.
Use a Matrix for each child object and matrix for the parent object. First transform all the objects with the child matrix, then transform all the objects with the parent matrix. This way when you transform the parent matrix all childs will transform with it.
You could take a look at my question: Transform coordinates from 3d to 2d without matrix or built in methodsTransform coordinates from 3d to 2d without matrix or built in methods