using System;
using System.Xml;
using CDAColladaNET.Import.Attributes;
// Copyright (c) 2005 Accelerated Pictures, LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
namespace ColladaNET.Import{
public class Image : NamedNode
{
#region Constants
private static readonly string kFilename = "@source";
private static readonly string kFormat = "@format";
private static readonly string kHeight = "@height";
private static readonly string kWidth = "@width";
private static readonly string kDepth = "@depth";
#endregion
#region Accessors
#region Filename
private bool mbFilename = false;
private string mFilename;
public string Filename
{
get
{
if ( mbFilename == false )
{
mFilename = XmlSource.SelectSingleNode( kFilename , Collada.NS ).Value ;
mbFilename = true;
}
return mFilename;
}
}
#endregion
#region Format
private bool mbFormat = false;
private string mFormat;
public string Format
{
get
{
if ( mbFormat == false )
{
mFormat = XmlSource.SelectSingleNode( kFormat , Collada.NS ).Value ;
mbFormat = true;
}
return mFormat;
}
}
#endregion
#region Height
private bool mbHeight = false;
private int mHeight;
public int Height
{
get
{
if ( mbHeight == false )
{
mHeight = int.Parse( XmlSource.SelectSingleNode( kHeight , Collada.NS ).Value );
mbHeight = true;
}
return mHeight;
}
}
#endregion
#region Width
private bool mbWidth = false;
private int mWidth;
public int Width
{
get
{
if ( mbWidth == false )
{
mWidth = int.Parse( XmlSource.SelectSingleNode( kWidth , Collada.NS ).Value );
mbWidth = true;
}
return mWidth;
}
}
#endregion
#region Depth
private bool mbDepth = false;
private int mDepth;
public int Depth
{
get
{
if ( mbDepth == false )
{
mDepth = int.Parse( XmlSource.SelectSingleNode( kDepth , Collada.NS ).Value );
mbDepth = true;
}
return mDepth;
}
}
#endregion
#endregion
#region Constructors
public Image( XmlNode source ) : base( source )
{
}
#endregion
}
}
|