Methods Summary |
---|
public java.lang.String | getFileName()
return mFileName;
|
ScriptField_Texture_s | getRsData(boolean loadNow)
if (mField != null) {
return mField;
}
RenderScriptGL rs = SceneManager.getRS();
Resources res = SceneManager.getRes();
if (rs == null || res == null) {
return null;
}
mField = new ScriptField_Texture_s(rs, 1);
if (loadNow) {
load();
} else {
mData.texture = SceneManager.getDefaultTex2D();
new SingleImageLoaderTask().execute(this);
}
mField.set(mData, 0, true);
return mField;
|
void | load()
RenderScriptGL rs = SceneManager.getRS();
Resources res = SceneManager.getRes();
if (mFileName != null && mFileName.length() > 0) {
String shortName = mFileName.substring(mFileName.lastIndexOf('/") + 1);
setTexture(SceneManager.loadTexture2D(mFileDir + shortName, rs, res));
} else if (mResourceID != 0) {
setTexture(SceneManager.loadTexture2D(mResourceID, rs, res));
}
|
public void | setFileDir(java.lang.String dir)
mFileDir = dir;
|
public void | setFileName(java.lang.String file)
mFileName = file;
|
public void | setTexture(Allocation tex)
mData.texture = tex != null ? tex : SceneManager.getDefaultTex2D();
if (mField != null) {
mField.set_texture(0, mData.texture, true);
}
|