Newer
Older
SproutServerMicro / src / main / java / framework / animation / DefaultPose3D.java
s-bekki on 30 Nov 2017 671 bytes initial commit
package framework.animation;

import framework.model3D.Object3D;

import javax.media.j3d.Transform3D;

/**
 * 初期状態の姿勢
 * @author 新田直也
 *
 */
public class DefaultPose3D extends Pose3D {
	public void applyTo(Object3D obj) {
		obj.scale.setTransform(new Transform3D());
		for (int n = 0; n < obj.children.length; n++) {
			subApplyTo((Object3D)obj.children[n]);
		}			
	}
	
	private void subApplyTo(Object3D obj) {
		obj.pos.setTransform(new Transform3D());
		obj.rot.setTransform(new Transform3D());
		obj.scale.setTransform(new Transform3D());
		for (int n = 0; n < obj.children.length; n++) {
			subApplyTo((Object3D)obj.children[n]);
		}					
	}
}