Пример #1
0
        internal static void CreaseGroupRecursively(CSGGroup group, ref int shapesCreasedCount)
        {
            CSGShapeArray childShapeList = group.GetShapes();

            for (int shapeIndex = 0; shapeIndex < childShapeList.GetSize(); shapeIndex++)
            {
                CreaseShape(childShapeList.GetElement(shapeIndex), ref shapesCreasedCount);
            }

            CSGGroupArray childGroupList = group.GetChildren();

            for (int groupIndex = 0; groupIndex < childGroupList.GetSize(); groupIndex++)
            {
                CreaseGroupRecursively(childGroupList.GetElement(groupIndex), ref shapesCreasedCount);
            }
        }
Пример #2
0
        private void ExportGroupRecursively(CSGGroup group, FBXScene fbxScene, FBXNode parentNode, FBXAnimLayer animationLayer, float keyFramesPerSecond)
        {
            string groupName = this.GetUniqueName(group.Name, "group");

            var node = FBXNode.Create(parentNode, groupName);

            parentNode.AddChild(node);

            this.SetTransform(group, node);

            this.ExportGroupAnimation(group, animationLayer, keyFramesPerSecond, node);

            this.ExportGroupShapes(group, fbxScene, parentNode, groupName, node);

            CSGGroupArray childGroupList = group.GetChildren();

            for (int groupIndex = 0; groupIndex < childGroupList.GetSize(); groupIndex++)
            {
                this.ExportGroupRecursively(childGroupList.GetElement(groupIndex), fbxScene, node, animationLayer, keyFramesPerSecond);
            }
        }