Methods Summary |
---|
public void | addComponent(com.android.scenegraph.CompoundTransform$Component c)
if (c.mParent != null) {
throw new IllegalArgumentException("Transform components may not be shared");
}
c.mParent = this;
c.mParentIndex = mTransformComponents.size();
mTransformComponents.add(c);
updateRSComponentAllocation();
|
public com.android.scenegraph.CompoundTransform$RotateComponent | addRotate(java.lang.String name, android.renderscript.Float3 axis, float angle)
RotateComponent c = new RotateComponent(name, axis, angle);
addComponent(c);
return c;
|
public com.android.scenegraph.CompoundTransform$ScaleComponent | addScale(java.lang.String name, android.renderscript.Float3 scale)
ScaleComponent c = new ScaleComponent(name, scale);
addComponent(c);
return c;
|
public com.android.scenegraph.CompoundTransform$TranslateComponent | addTranslate(java.lang.String name, android.renderscript.Float3 translate)
TranslateComponent c = new TranslateComponent(name, translate);
addComponent(c);
return c;
|
void | initLocalData()
RenderScriptGL rs = SceneManager.getRS();
int numComponenets = mTransformComponents.size();
if (numComponenets > 0) {
mComponentField = new ScriptField_TransformComponent_s(rs, numComponenets);
for (int i = 0; i < numComponenets; i ++) {
Component ith = mTransformComponents.get(i);
mComponentField.set(ith.getRSData(), i, false);
}
mComponentField.copyAll();
mTransformData.components = mComponentField.getAllocation();
}
|
public void | setComponent(int index, com.android.scenegraph.CompoundTransform$Component c)
if (c.mParent != null) {
throw new IllegalArgumentException("Transform components may not be shared");
}
if (index >= mTransformComponents.size()) {
throw new IllegalArgumentException("Invalid component index");
}
c.mParent = this;
c.mParentIndex = index;
mTransformComponents.set(index, c);
updateRSComponent(c);
|
void | updateRSComponent(com.android.scenegraph.CompoundTransform$Component c)
if (mField == null || mComponentField == null) {
return;
}
mComponentField.set(c.getRSData(), c.mParentIndex, true);
mField.set_isDirty(0, 1, true);
|
void | updateRSComponentAllocation()
if (mField == null) {
return;
}
initLocalData();
mField.set_components(0, mTransformData.components, false);
mField.set_isDirty(0, 1, true);
|