开发者

Papervision3D Coordinate Axes

I have a flash application and I use papervision3d library. I put my objects to the scene, no problem but I also want to show the 开发者_StackOverflow社区coordinate axes (x,y and z) to user. Is there any way to show these axes?


That would be the UCS object:

scene.addChild(new UCS());

Here's a very basic example:

package {
    import flash.display.Sprite;
    import flash.events.Event;
    import org.papervision3d.view.*;
    import org.papervision3d.objects.*;
    import org.papervision3d.objects.primitives.*;
    import org.papervision3d.objects.special.*;

    public class HelloPV3D extends Sprite {

        private var view:BasicView;

        public function HelloPV3D()  {
            view = addChild(new BasicView()) as BasicView;
            view.scene.addChild(new UCS());
            view.scene.addChild(new Sphere());
            this.addEventListener(Event.ENTER_FRAME,update);
        }
        private function update(e:Event):void{
            view.camera.orbit(mouseY/stage.stageHeight,mouseX/stage.stageWidth,false);
            view.singleRender();
        }
    }
}

Papervision3D Coordinate Axes


Of course there is. I wrote a class called Trident3D that represents the coordinate axes. Click here to see article about it or download the demo that contains the source code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜