public void initScene() {
ALight light = new DirectionalLight(-1, 0, -1);
light.setPower(2);
getCurrentCamera().setPosition(0, 0, 7);
getCurrentCamera().setLookAt(0, 0, 0);
try {
Cube cube = new Cube(1);
DiffuseMaterial material = new DiffuseMaterial();
material.addTexture(new Texture(R.drawable.rajawali_tex));
cube.setMaterial(material);
cube.addLight(light);
addChild(cube);
Vector3 axis = new Vector3(3, 1, 6);
axis.normalize();
RotateAnimation3D anim = new RotateAnimation3D(axis, 360);
anim.setDuration(8000);
anim.setRepeatMode(RepeatMode.INFINITE);
anim.setInterpolator(new AccelerateDecelerateInterpolator());
anim.setTransformable3D(cube);
registerAnimation(anim);
anim.play();
}
catch (TextureException e) {
e.printStackTrace();
}
}
큐브에서 텍스처와 빛을 제거하면 실제로 Rajawali가 아래로 떨어집니다. 이 경우 텍스쳐 객체가 아닌 와이어 프레임으로 큐브를 렌더링하는 방법이 궁금합니다. 와이어 프레임을 렌더링하는 방법을 아는 사람 있습니까? 사전에Rajawali에서 와이어 프레임 객체 렌더링하기
감사합니다 ...
정말 고마워요. 나는 이것을 환경에서 시험해야한다. – Giuseppe