예제 #1
0
파일: FbxLayer.cs 프로젝트: shoff/FbxSharp
        public void SetMaterials(FbxLayerElementMaterial pMaterials)
        {
            if (materials.Get() != null)
            {
                elements.Remove(materials.Get());
            }

            elements.Add(pMaterials);
        }
예제 #2
0
파일: Visitor.cs 프로젝트: shoff/FbxSharp
        protected void AcceptLayerContainer(FbxLayerContainer layerContainer, ISet <object> visitedObjects)
        {
            AcceptNodeAttribute(layerContainer, visitedObjects);
            Visit(layerContainer);

            int j;

            for (j = 0; j < layerContainer.GetLayerCount(); j++)
            {
                FbxLayer layer = layerContainer.GetLayer(j);

                int i;
                FbxLayerElementMaterial mats = layer.GetMaterials();
                if (mats != null)
                {
                    FbxLayerElementTemplate <FbxSurfaceMaterial> _mats  = mats;
                    LayerElementArrayT <FbxSurfaceMaterial>      marray = _mats.GetDirectArray();
                    //for (i = 0; i < marray.GetCount(); i++)
                    //{
                    //    Accept(marray.GetAt(i));
                    //}
                }

                //Accept(this, layer.GetTextures(LayerElement.EType.eTextureEmissive));
                //Accept(this, layer.GetTextures(LayerElement.EType.eTextureEmissiveFactor));
                //Accept(this, layer.GetTextures(LayerElement.EType.eTextureAmbient));
                //Accept(this, layer.GetTextures(LayerElement.EType.eTextureAmbientFactor));
                //Accept(this, layer.GetTextures(LayerElement.EType.eTextureDiffuseFactor));
                //Accept(this, layer.GetTextures(LayerElement.EType.eTextureSpecular));
                //Accept(this, layer.GetTextures(LayerElement.EType.eTextureNormalMap));
                //Accept(this, layer.GetTextures(LayerElement.EType.eTextureSpecularFactor));
                //Accept(this, layer.GetTextures(LayerElement.EType.eTextureShininess));
                //Accept(this, layer.GetTextures(LayerElement.EType.eTextureBump));
                //Accept(this, layer.GetTextures(LayerElement.EType.eTextureTransparency));
                //Accept(this, layer.GetTextures(LayerElement.EType.eTextureTransparencyFactor));
                //Accept(this, layer.GetTextures(LayerElement.EType.eTextureReflection));
                //Accept(this, layer.GetTextures(LayerElement.EType.eTextureReflectionFactor));
                //Accept(this, layer.GetTextures(LayerElement.EType.eTextureDisplacement));
            }
        }