UCS
UCS is a coordinate system displaying the x, y, and z axes.
Example
Instructions
- Import
import org.papervision3d.objects.special.UCS;
- Declare
private var object :UCS;
- Initialize
object = new UCS(scale, name);
Parameter Default Description scale 500 scale name null name - Add
scene.addChild(object);
Code
package { import flash.display.Sprite; import flash.events.Event; import org.papervision3d.cameras.Camera3D; import org.papervision3d.objects.special.UCS; import org.papervision3d.render.BasicRenderEngine; import org.papervision3d.scenes.Scene3D; import org.papervision3d.view.Viewport3D; public class Papervision3DUCS extends Sprite { private var scene :Scene3D; private var camera :Camera3D; private var viewport :Viewport3D; private var renderer :BasicRenderEngine; private var object :UCS; private var angle :int = 0; public function Papervision3DUCS() { scene = new Scene3D(); camera = new Camera3D(); viewport = new Viewport3D(); viewport.autoScaleToStage = true; addChild(viewport); renderer = new BasicRenderEngine(); object = new UCS(); scene.addChild(object); addEventListener(Event.ENTER_FRAME, handleEnterFrame); } private function handleEnterFrame(e:Event):void { camera.orbit(90, angle++); renderer.renderScene(scene, camera, viewport); } } }