ReadTexel() 공개 메소드

public ReadTexel ( ) : Texel
리턴 Texel
예제 #1
0
        public PrtColorStage(PrtBinaryReader reader)
        {
            this.UsePalette = reader.ReadBoolean();
            reader.ReadBytes(3);

            this.Color = reader.ReadTexel();
            this.Hold  = reader.ReadSingle();
            this.Fade  = reader.ReadSingle();
        }
예제 #2
0
        public PrtColorStage(PrtBinaryReader reader)
        {
            this.UsePalette = reader.ReadBoolean();
            reader.ReadBytes(3);

            this.Color = reader.ReadTexel();
            this.Hold = reader.ReadSingle();
            this.Fade = reader.ReadSingle();
        }
예제 #3
0
        public PrtAppearance(PrtBinaryReader reader)
        {
            this.OrientByMotion = reader.ReadBoolean();
            reader.ReadBytes(3);

            this.NumFiles         = reader.ReadInt32();
            this.NumFrames        = reader.ReadInt32();
            this.FrameWidth       = reader.ReadInt32();
            this.FrameHeight      = reader.ReadInt32();
            this.MaterialType     = (PrtMaterialType)reader.ReadInt32();
            this.Emissive         = reader.ReadTexel();
            this.Specular         = reader.ReadTexel();
            this.SpecularExponent = reader.ReadSingle();
            this.FramesPerSecond  = reader.ReadSingle();
            this.AnimationRate    = reader.ReadSingle();
            this.AnimationRateVar = reader.ReadSingle();

            this.AppearanceWeights = new List <float>(this.NumFiles);
            this.AppearanceFiles   = new List <string>(this.NumFiles);
        }
예제 #4
0
        public PrtAppearance(PrtBinaryReader reader)
        {
            this.OrientByMotion = reader.ReadBoolean();
            reader.ReadBytes(3);

            this.NumFiles = reader.ReadInt32();
            this.NumFrames = reader.ReadInt32();
            this.FrameWidth = reader.ReadInt32();
            this.FrameHeight = reader.ReadInt32();
            this.MaterialType = (PrtMaterialType)reader.ReadInt32();
            this.Emissive = reader.ReadTexel();
            this.Specular = reader.ReadTexel();
            this.SpecularExponent = reader.ReadSingle();
            this.FramesPerSecond = reader.ReadSingle();
            this.AnimationRate = reader.ReadSingle();
            this.AnimationRateVar = reader.ReadSingle();

            this.AppearanceWeights = new List<float>(this.NumFiles);
            this.AppearanceFiles = new List<string>(this.NumFiles);
        }
예제 #5
0
        public PrtFile(Stream stream)
        {
            using (PrtBinaryReader reader = new PrtBinaryReader(new LittleEndianBitConverter(), stream))
            {
                this.Version = reader.ReadInt32();

                this.Emitter = new PrtEmitter(reader);
                this.Shape = new PrtShape(reader);
                this.Appearance = new PrtAppearance(reader);
                this.Opacity = new PrtOpacity(reader);
                this.Scale = new PrtScale(reader);
                this.Color = new PrtColor(reader);
                this.Forces = new PrtForces(reader);
                this.Collision = new PrtCollision(reader);

                this.BrgFileName = reader.ReadString();

                for (int i = 0; i < this.Color.NumPaletteColors; i++)
                {
                    this.Color.PaletteColors.Add(reader.ReadTexel());
                }

                for (int i = 0; i < this.Appearance.NumFiles; i++)
                {
                    this.Appearance.AppearanceWeights.Add(reader.ReadSingle());
                }
                for (int i = 0; i < this.Appearance.NumFiles; i++)
                {
                    this.Appearance.AppearanceFiles.Add(reader.ReadString());
                }

                for (int i = 0; i < this.Opacity.NumStages; i++)
                {
                    this.Opacity.OpacityStages.Add(new PrtOpacityStage(reader));
                }

                for (int i = 0; i < this.Scale.NumStages; i++)
                {
                    this.Scale.ScaleStages.Add(new PrtScaleStage(reader));
                }

                for (int i = 0; i < this.Color.NumStages; i++)
                {
                    this.Color.ColorStages.Add(new PrtColorStage(reader));
                }

                for (int i = 0; i < this.Collision.NumTypes; i++)
                {
                    this.Collision.CollisionTypes.Add(new PrtCollisionType(reader));
                }
            }
        }
예제 #6
0
        public PrtFile(Stream stream)
        {
            using (PrtBinaryReader reader = new PrtBinaryReader(new LittleEndianBitConverter(), stream))
            {
                this.Version = reader.ReadInt32();

                this.Emitter    = new PrtEmitter(reader);
                this.Shape      = new PrtShape(reader);
                this.Appearance = new PrtAppearance(reader);
                this.Opacity    = new PrtOpacity(reader);
                this.Scale      = new PrtScale(reader);
                this.Color      = new PrtColor(reader);
                this.Forces     = new PrtForces(reader);
                this.Collision  = new PrtCollision(reader);

                this.BrgFileName = reader.ReadString();

                for (int i = 0; i < this.Color.NumPaletteColors; i++)
                {
                    this.Color.PaletteColors.Add(reader.ReadTexel());
                }

                for (int i = 0; i < this.Appearance.NumFiles; i++)
                {
                    this.Appearance.AppearanceWeights.Add(reader.ReadSingle());
                }
                for (int i = 0; i < this.Appearance.NumFiles; i++)
                {
                    this.Appearance.AppearanceFiles.Add(reader.ReadString());
                }

                for (int i = 0; i < this.Opacity.NumStages; i++)
                {
                    this.Opacity.OpacityStages.Add(new PrtOpacityStage(reader));
                }

                for (int i = 0; i < this.Scale.NumStages; i++)
                {
                    this.Scale.ScaleStages.Add(new PrtScaleStage(reader));
                }

                for (int i = 0; i < this.Color.NumStages; i++)
                {
                    this.Color.ColorStages.Add(new PrtColorStage(reader));
                }

                for (int i = 0; i < this.Collision.NumTypes; i++)
                {
                    this.Collision.CollisionTypes.Add(new PrtCollisionType(reader));
                }
            }
        }
예제 #7
0
        public PrtColor(PrtBinaryReader reader)
        {
            this.UsePalette = reader.ReadBoolean();
            this.LoopingCycle = reader.ReadBoolean();
            reader.ReadBytes(2);

            this.NumPaletteColors = reader.ReadInt32();
            this.NumStages = reader.ReadInt32();
            this.CycleTime = reader.ReadSingle();
            this.CycleTimeVar = reader.ReadSingle();
            this.WorldLightingInfluence = reader.ReadSingle();
            this.Color = reader.ReadTexel();

            this.PaletteColors = new List<Texel>(this.NumPaletteColors);
            this.ColorStages = new List<PrtColorStage>(this.NumStages);
        }
예제 #8
0
        public PrtColor(PrtBinaryReader reader)
        {
            this.UsePalette   = reader.ReadBoolean();
            this.LoopingCycle = reader.ReadBoolean();
            reader.ReadBytes(2);

            this.NumPaletteColors       = reader.ReadInt32();
            this.NumStages              = reader.ReadInt32();
            this.CycleTime              = reader.ReadSingle();
            this.CycleTimeVar           = reader.ReadSingle();
            this.WorldLightingInfluence = reader.ReadSingle();
            this.Color = reader.ReadTexel();

            this.PaletteColors = new List <Texel>(this.NumPaletteColors);
            this.ColorStages   = new List <PrtColorStage>(this.NumStages);
        }