Exemplo n.º 1
0
        MaterialProps SiAVObjectPropertiesToMaterialProperties(SiAVObject obj)
        {
            // Find relevant properties.
            SiTexturingProperty texturingProperty = null;

            foreach (var propRef in obj.Properties)
            {
                var prop = _file.Blocks[propRef.Value];
                if (prop is SiTexturingProperty)
                {
                    texturingProperty = (SiTexturingProperty)prop;
                }
            }

            // Create the material properties.
            var mp = new MaterialProps();

            // Apply textures.
            if (texturingProperty != null)
            {
                mp.Textures = ConfigureTextureProperties(texturingProperty);
            }
            return(mp);
        }
Exemplo n.º 2
0
 void ApplySiAVObject(SiAVObject siAVObject, GameObject obj)
 {
     obj.transform.position   = SifUtils.SifPointToUnityPoint(siAVObject.Translation);
     obj.transform.rotation   = SifUtils.SifRotationMatrixToUnityQuaternion(siAVObject.Rotation);
     obj.transform.localScale = siAVObject.Scale * Vector3.one;
 }