Beispiel #1
0
    override protected NPVoxModel CreateProduct(NPVoxModel reuse = null)
    {
        if (Input == null)
        {
            return(NPVoxModel.NewInvalidInstance(reuse, "No Input Setup"));;
        }

        NPVoxModel model = ((NPVoxIModelFactory)Input).GetProduct();

        if (Absolute)
        {
            NPVoxModel newModel = NPVoxModel.NewInstance(model, reuse);
            newModel.CopyOver(model);

            NPVoxSocket socket = model.GetSocketByName(SocketName);
            socket.Anchor      = NPVoxCoordUtil.ToCoord(GetTranslation() + GetPivot());
            socket.EulerAngles = GetRotation().eulerAngles;
            newModel.SetSocket(socket);

            return(newModel);
        }
        else
        {
            return(NPVoxModelTransformationUtil.MatrixTransformSocket(model, SocketName, Matrix, PivotOffset, reuse));
        }
    }