开发者

Papervision3D Coordinate Axes

开发者 https://www.devze.com 2023-03-08 01:14 出处:网络
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.

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

精彩评论

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