public virtual void Reparent(PNode newParent) {
PMatrix originalTransform = LocalToGlobalMatrix;
PMatrix newTransform = newParent.GlobalToLocalMatrix;
newTransform.Multiply(originalTransform);
RemoveFromParent();
Matrix = newTransform;
newParent.AddChild(this);
fullBoundsCache = ComputeFullBounds();
}