Ejemplo n.º 1
0
 /// 有効なライト数の設定
 public void SetLightCount( int count )
 {
     foreach( var entry in modelTable ){
         BasicModel model = entry.Value as BasicModel;
         model.SetLightCount( count );
     }
 }
Ejemplo n.º 2
0
 public void Load(BasicModel model, string fileName, int index)
 {
     byte[] fileImage;
     using (var reader = new BinaryReader(File.OpenRead(fileName))) {
         fileImage = reader.ReadBytes((int)reader.BaseStream.Length);
     }
     Load(model, fileImage, index);
 }
Ejemplo n.º 3
0
 /// Model の登録
 /**
  * @return : 登録に失敗した場合、null が返る
  */
 public BasicModel Regist( string key, BasicModel model )
 {
     if( Find( key ) != null ){
         return null;
     }
     modelTable[ key ] = model;
     return model;
 }
Ejemplo n.º 4
0
 public bool BindTextures( TexContainer texContainer )
 {
     foreach( var entry in modelTable ){
         BasicModel model = entry.Value as BasicModel;
         model.BindTextures( texContainer );
     }
     return true;
 }
Ejemplo n.º 5
0
        /// 使用するデータのセット
        public void Start(DemoModel.BasicModel useModel, DemoModel.TexContainer useTexCnr, DemoModel.ShaderContainer useShaderCnr)
        {
            this.useModel     = useModel;
            this.useTexCnr    = useTexCnr;
            this.useShaderCnr = useShaderCnr;

            this.useModel.BindTextures(this.useTexCnr);
        }
Ejemplo n.º 6
0
 /// コンテナに Model の読み込みを行う
 /**
  * すでに読み込み済みのモデルが存在する場合には、読み込み済みのモデルを返す
  */
 public BasicModel Load( string key, string filename )
 {
     BasicModel ret = this.Find( key );
     if( ret == null ){
         ret = this.Regist( key, new BasicModel( resPath + filename, 0 ) );
     }
     return ret;
 }
Ejemplo n.º 7
0
    /// ライトの設定
    public bool SetLight( int idx, Light light )
    {
        foreach( var entry in modelTable ){
            BasicModel model = entry.Value as BasicModel;
            model.SetLight( idx, light );
        }

        return false;
    }
Ejemplo n.º 8
0
        public void Load(BasicModel model, byte[] fileImage, int index)
        {
            this.model     = model;
            this.fileImage = fileImage;
            ReadHeader();
            LoadFile(ReadChunk(16), index);

            // TexAnimation 用の BoneIndex の解決
            model.BindTexAnimBone();
        }
Ejemplo n.º 9
0
        public void Load( BasicModel model, byte[] fileImage, int index )
        {
            this.model = model ;
            this.fileImage = fileImage ;
            ReadHeader() ;
            LoadFile( ReadChunk( 16 ), index ) ;

            // TexAnimation 用の BoneIndex の解決
            model.BindTexAnimBone();
        }
Ejemplo n.º 10
0
 public void Load( BasicModel model, string fileName, int index )
 {
     byte[] fileImage ;
     using ( var reader = new BinaryReader( File.OpenRead( fileName ) ) ) {
     fileImage = reader.ReadBytes( (int)reader.BaseStream.Length ) ;
     }
     Load( model, fileImage, index ) ;
 }
Ejemplo n.º 11
0
 /// 終了
 public void End()
 {
     useModel     = null;
     useTexCnr    = null;
     useShaderCnr = null;
 }
Ejemplo n.º 12
0
 /// 破棄
 public void Term()
 {
     useModel     = null;
     useTexCnr    = null;
     useShaderCnr = null;
 }
Ejemplo n.º 13
0
 /// コンストラクタ
 public ModelHandle()
 {
     useModel     = null;
     useTexCnr    = null;
     useShaderCnr = null;
 }