|
From: <tre...@us...> - 2008-07-15 03:38:01
|
Revision: 798
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=798&view=rev
Author: trevorolio
Date: 2008-07-14 20:38:05 -0700 (Mon, 14 Jul 2008)
Log Message:
-----------
Framed out the new Flash based 3D viewer. Does not actually do anything yet.
Added Paths:
-----------
maven/trunk/ogoglio-viewer/
maven/trunk/ogoglio-viewer/.actionScriptProperties
maven/trunk/ogoglio-viewer/.flexProperties
maven/trunk/ogoglio-viewer/.project
maven/trunk/ogoglio-viewer/.settings/
maven/trunk/ogoglio-viewer/.settings/org.eclipse.core.resources.prefs
maven/trunk/ogoglio-viewer/OgoglioView3D.as
maven/trunk/ogoglio-viewer/away3d/
maven/trunk/ogoglio-viewer/away3d/animation/
maven/trunk/ogoglio-viewer/away3d/animation/Animator.as
maven/trunk/ogoglio-viewer/away3d/away3d-license.txt
maven/trunk/ogoglio-viewer/away3d/cameras/
maven/trunk/ogoglio-viewer/away3d/cameras/Camera3D.as
maven/trunk/ogoglio-viewer/away3d/cameras/HoverCamera3D.as
maven/trunk/ogoglio-viewer/away3d/cameras/TargetCamera3D.as
maven/trunk/ogoglio-viewer/away3d/containers/
maven/trunk/ogoglio-viewer/away3d/containers/DebugObjectContainer3D.as
maven/trunk/ogoglio-viewer/away3d/containers/ILODObject.as
maven/trunk/ogoglio-viewer/away3d/containers/IPhysicsScene.as
maven/trunk/ogoglio-viewer/away3d/containers/LODObject.as
maven/trunk/ogoglio-viewer/away3d/containers/ObjectContainer3D.as
maven/trunk/ogoglio-viewer/away3d/containers/Scene3D.as
maven/trunk/ogoglio-viewer/away3d/containers/View3D.as
maven/trunk/ogoglio-viewer/away3d/core/
maven/trunk/ogoglio-viewer/away3d/core/arcane.as
maven/trunk/ogoglio-viewer/away3d/core/base/
maven/trunk/ogoglio-viewer/away3d/core/base/Animation.as
maven/trunk/ogoglio-viewer/away3d/core/base/AnimationFrame.as
maven/trunk/ogoglio-viewer/away3d/core/base/BaseMesh.as
maven/trunk/ogoglio-viewer/away3d/core/base/BaseMeshElement.as
maven/trunk/ogoglio-viewer/away3d/core/base/Face.as
maven/trunk/ogoglio-viewer/away3d/core/base/Frame.as
maven/trunk/ogoglio-viewer/away3d/core/base/IAnimation.as
maven/trunk/ogoglio-viewer/away3d/core/base/IFrame.as
maven/trunk/ogoglio-viewer/away3d/core/base/IMeshElement.as
maven/trunk/ogoglio-viewer/away3d/core/base/Mesh.as
maven/trunk/ogoglio-viewer/away3d/core/base/Morpher.as
maven/trunk/ogoglio-viewer/away3d/core/base/Object3D.as
maven/trunk/ogoglio-viewer/away3d/core/base/Segment.as
maven/trunk/ogoglio-viewer/away3d/core/base/UV.as
maven/trunk/ogoglio-viewer/away3d/core/base/Vertex.as
maven/trunk/ogoglio-viewer/away3d/core/base/VertexPosition.as
maven/trunk/ogoglio-viewer/away3d/core/base/WireMesh.as
maven/trunk/ogoglio-viewer/away3d/core/block/
maven/trunk/ogoglio-viewer/away3d/core/block/Blocker.as
maven/trunk/ogoglio-viewer/away3d/core/block/BlockerArray.as
maven/trunk/ogoglio-viewer/away3d/core/block/ConvexBlock.as
maven/trunk/ogoglio-viewer/away3d/core/block/ConvexBlocker.as
maven/trunk/ogoglio-viewer/away3d/core/block/IBlockerConsumer.as
maven/trunk/ogoglio-viewer/away3d/core/block/IBlockerProvider.as
maven/trunk/ogoglio-viewer/away3d/core/draw/
maven/trunk/ogoglio-viewer/away3d/core/draw/DrawBitmap.as
maven/trunk/ogoglio-viewer/away3d/core/draw/DrawDisplayObject.as
maven/trunk/ogoglio-viewer/away3d/core/draw/DrawFog.as
maven/trunk/ogoglio-viewer/away3d/core/draw/DrawGroup.as
maven/trunk/ogoglio-viewer/away3d/core/draw/DrawPrimitive.as
maven/trunk/ogoglio-viewer/away3d/core/draw/DrawScaledBitmap.as
maven/trunk/ogoglio-viewer/away3d/core/draw/DrawSegment.as
maven/trunk/ogoglio-viewer/away3d/core/draw/DrawTriangle.as
maven/trunk/ogoglio-viewer/away3d/core/draw/IPrimitiveConsumer.as
maven/trunk/ogoglio-viewer/away3d/core/draw/IPrimitiveProvider.as
maven/trunk/ogoglio-viewer/away3d/core/draw/Line2D.as
maven/trunk/ogoglio-viewer/away3d/core/draw/Plane3D.as
maven/trunk/ogoglio-viewer/away3d/core/draw/PrimitiveArray.as
maven/trunk/ogoglio-viewer/away3d/core/draw/PrimitiveQuadrantTree.as
maven/trunk/ogoglio-viewer/away3d/core/draw/PrimitiveQuadrantTreeNode.as
maven/trunk/ogoglio-viewer/away3d/core/draw/PrimitiveVolumeBlock.as
maven/trunk/ogoglio-viewer/away3d/core/draw/PrimitiveVolumeBlockList.as
maven/trunk/ogoglio-viewer/away3d/core/draw/ScreenVertex.as
maven/trunk/ogoglio-viewer/away3d/core/filter/
maven/trunk/ogoglio-viewer/away3d/core/filter/AnotherRivalFilter.as
maven/trunk/ogoglio-viewer/away3d/core/filter/FogFilter.as
maven/trunk/ogoglio-viewer/away3d/core/filter/IPrimitiveFilter.as
maven/trunk/ogoglio-viewer/away3d/core/filter/IPrimitiveQuadrantFilter.as
maven/trunk/ogoglio-viewer/away3d/core/filter/IPrimitiveVolumeBlockFilter.as
maven/trunk/ogoglio-viewer/away3d/core/filter/QuadrantRiddleFilter.as
maven/trunk/ogoglio-viewer/away3d/core/filter/ZDepthFilter.as
maven/trunk/ogoglio-viewer/away3d/core/filter/ZSortFilter.as
maven/trunk/ogoglio-viewer/away3d/core/light/
maven/trunk/ogoglio-viewer/away3d/core/light/AbstractLightSource.as
maven/trunk/ogoglio-viewer/away3d/core/light/AmbientLightSource.as
maven/trunk/ogoglio-viewer/away3d/core/light/DirectionalLightSource.as
maven/trunk/ogoglio-viewer/away3d/core/light/ILightConsumer.as
maven/trunk/ogoglio-viewer/away3d/core/light/ILightProvider.as
maven/trunk/ogoglio-viewer/away3d/core/light/LightArray.as
maven/trunk/ogoglio-viewer/away3d/core/light/PointLightSource.as
maven/trunk/ogoglio-viewer/away3d/core/math/
maven/trunk/ogoglio-viewer/away3d/core/math/Matrix3D.as
maven/trunk/ogoglio-viewer/away3d/core/math/Number2D.as
maven/trunk/ogoglio-viewer/away3d/core/math/Number3D.as
maven/trunk/ogoglio-viewer/away3d/core/math/Quaternion.as
maven/trunk/ogoglio-viewer/away3d/core/render/
maven/trunk/ogoglio-viewer/away3d/core/render/AbstractRenderSession.as
maven/trunk/ogoglio-viewer/away3d/core/render/BasicRenderer.as
maven/trunk/ogoglio-viewer/away3d/core/render/BitmapRenderSession.as
maven/trunk/ogoglio-viewer/away3d/core/render/Clipping.as
maven/trunk/ogoglio-viewer/away3d/core/render/FindHit.as
maven/trunk/ogoglio-viewer/away3d/core/render/IRenderer.as
maven/trunk/ogoglio-viewer/away3d/core/render/Projection.as
maven/trunk/ogoglio-viewer/away3d/core/render/QuadrantRenderer.as
maven/trunk/ogoglio-viewer/away3d/core/render/RectangleClipping.as
maven/trunk/ogoglio-viewer/away3d/core/render/Renderer.as
maven/trunk/ogoglio-viewer/away3d/core/render/SpriteRenderSession.as
maven/trunk/ogoglio-viewer/away3d/core/stats/
maven/trunk/ogoglio-viewer/away3d/core/stats/Stats.as
maven/trunk/ogoglio-viewer/away3d/core/traverse/
maven/trunk/ogoglio-viewer/away3d/core/traverse/BlockerTraverser.as
maven/trunk/ogoglio-viewer/away3d/core/traverse/PrimitiveTraverser.as
maven/trunk/ogoglio-viewer/away3d/core/traverse/ProjectionTraverser.as
maven/trunk/ogoglio-viewer/away3d/core/traverse/TickTraverser.as
maven/trunk/ogoglio-viewer/away3d/core/traverse/Traverser.as
maven/trunk/ogoglio-viewer/away3d/core/utils/
maven/trunk/ogoglio-viewer/away3d/core/utils/Cast.as
maven/trunk/ogoglio-viewer/away3d/core/utils/CastError.as
maven/trunk/ogoglio-viewer/away3d/core/utils/Color.as
maven/trunk/ogoglio-viewer/away3d/core/utils/Debug.as
maven/trunk/ogoglio-viewer/away3d/core/utils/FaceDictionaryVO.as
maven/trunk/ogoglio-viewer/away3d/core/utils/FaceVO.as
maven/trunk/ogoglio-viewer/away3d/core/utils/IClonable.as
maven/trunk/ogoglio-viewer/away3d/core/utils/Init.as
maven/trunk/ogoglio-viewer/away3d/core/utils/LazyEventDispatcher.as
maven/trunk/ogoglio-viewer/away3d/core/utils/ValueObject.as
maven/trunk/ogoglio-viewer/away3d/events/
maven/trunk/ogoglio-viewer/away3d/events/FaceEvent.as
maven/trunk/ogoglio-viewer/away3d/events/MeshElementEvent.as
maven/trunk/ogoglio-viewer/away3d/events/MouseEvent3D.as
maven/trunk/ogoglio-viewer/away3d/events/Object3DEvent.as
maven/trunk/ogoglio-viewer/away3d/events/SegmentEvent.as
maven/trunk/ogoglio-viewer/away3d/extrusions/
maven/trunk/ogoglio-viewer/away3d/extrusions/CollisionMap.as
maven/trunk/ogoglio-viewer/away3d/extrusions/Elevation.as
maven/trunk/ogoglio-viewer/away3d/extrusions/ElevationReader.as
maven/trunk/ogoglio-viewer/away3d/extrusions/Lathe.as
maven/trunk/ogoglio-viewer/away3d/extrusions/PathExtrude.as
maven/trunk/ogoglio-viewer/away3d/extrusions/SegmentsExtrude.as
maven/trunk/ogoglio-viewer/away3d/extrusions/SkinExtrude.as
maven/trunk/ogoglio-viewer/away3d/lights/
maven/trunk/ogoglio-viewer/away3d/lights/AmbientLight3D.as
maven/trunk/ogoglio-viewer/away3d/lights/DirectionalLight3D.as
maven/trunk/ogoglio-viewer/away3d/lights/PointLight3D.as
maven/trunk/ogoglio-viewer/away3d/loaders/
maven/trunk/ogoglio-viewer/away3d/loaders/Ase.as
maven/trunk/ogoglio-viewer/away3d/loaders/Collada.as
maven/trunk/ogoglio-viewer/away3d/loaders/CubeLoader.as
maven/trunk/ogoglio-viewer/away3d/loaders/Kmz.as
maven/trunk/ogoglio-viewer/away3d/loaders/MaterialLibrary.as
maven/trunk/ogoglio-viewer/away3d/loaders/Max3DS.as
maven/trunk/ogoglio-viewer/away3d/loaders/Md2.as
maven/trunk/ogoglio-viewer/away3d/loaders/Md2still.as
maven/trunk/ogoglio-viewer/away3d/loaders/Obj.as
maven/trunk/ogoglio-viewer/away3d/loaders/Object3DLoader.as
maven/trunk/ogoglio-viewer/away3d/loaders/data/
maven/trunk/ogoglio-viewer/away3d/loaders/data/ContainerData.as
maven/trunk/ogoglio-viewer/away3d/loaders/data/FaceData.as
maven/trunk/ogoglio-viewer/away3d/loaders/data/MaterialData.as
maven/trunk/ogoglio-viewer/away3d/loaders/data/MeshData.as
maven/trunk/ogoglio-viewer/away3d/loaders/data/MeshMaterialData.as
maven/trunk/ogoglio-viewer/away3d/loaders/data/ObjectData.as
maven/trunk/ogoglio-viewer/away3d/loaders/utils/
maven/trunk/ogoglio-viewer/away3d/loaders/utils/TextureLoadQueue.as
maven/trunk/ogoglio-viewer/away3d/loaders/utils/TextureLoader.as
maven/trunk/ogoglio-viewer/away3d/materials/
maven/trunk/ogoglio-viewer/away3d/materials/AlphaBitmapMaterial.as
maven/trunk/ogoglio-viewer/away3d/materials/AnimatedBitmapMaterial.as
maven/trunk/ogoglio-viewer/away3d/materials/BitmapFileMaterial.as
maven/trunk/ogoglio-viewer/away3d/materials/BitmapMaterial.as
maven/trunk/ogoglio-viewer/away3d/materials/BitmapMaterialContainer.as
maven/trunk/ogoglio-viewer/away3d/materials/CenterLightingMaterial.as
maven/trunk/ogoglio-viewer/away3d/materials/ColorMaterial.as
maven/trunk/ogoglio-viewer/away3d/materials/CompositeMaterial.as
maven/trunk/ogoglio-viewer/away3d/materials/Dot3BitmapMaterial.as
maven/trunk/ogoglio-viewer/away3d/materials/Dot3BitmapMaterialCache.as
maven/trunk/ogoglio-viewer/away3d/materials/Dot3MovieMaterial.as
maven/trunk/ogoglio-viewer/away3d/materials/EnviroBitmapMaterial.as
maven/trunk/ogoglio-viewer/away3d/materials/EnviroBitmapMaterialCache.as
maven/trunk/ogoglio-viewer/away3d/materials/EnviroColorMaterial.as
maven/trunk/ogoglio-viewer/away3d/materials/IFogMaterial.as
maven/trunk/ogoglio-viewer/away3d/materials/ILayerMaterial.as
maven/trunk/ogoglio-viewer/away3d/materials/IMaterial.as
maven/trunk/ogoglio-viewer/away3d/materials/ISegmentMaterial.as
maven/trunk/ogoglio-viewer/away3d/materials/ITriangleMaterial.as
maven/trunk/ogoglio-viewer/away3d/materials/IUVMaterial.as
maven/trunk/ogoglio-viewer/away3d/materials/IUpdatingMaterial.as
maven/trunk/ogoglio-viewer/away3d/materials/MovieMaterial.as
maven/trunk/ogoglio-viewer/away3d/materials/PhongBitmapMaterial.as
maven/trunk/ogoglio-viewer/away3d/materials/PhongBitmapMaterialCache.as
maven/trunk/ogoglio-viewer/away3d/materials/PhongColorMaterial.as
maven/trunk/ogoglio-viewer/away3d/materials/PhongColorMaterialCache.as
maven/trunk/ogoglio-viewer/away3d/materials/PhongMovieMaterial.as
maven/trunk/ogoglio-viewer/away3d/materials/ShadingColorMaterial.as
maven/trunk/ogoglio-viewer/away3d/materials/TransformBitmapMaterial.as
maven/trunk/ogoglio-viewer/away3d/materials/TransparentMaterial.as
maven/trunk/ogoglio-viewer/away3d/materials/WhiteShadingBitmapMaterial.as
maven/trunk/ogoglio-viewer/away3d/materials/WireColorMaterial.as
maven/trunk/ogoglio-viewer/away3d/materials/WireframeMaterial.as
maven/trunk/ogoglio-viewer/away3d/materials/shaders/
maven/trunk/ogoglio-viewer/away3d/materials/shaders/AbstractShader.as
maven/trunk/ogoglio-viewer/away3d/materials/shaders/AmbientShader.as
maven/trunk/ogoglio-viewer/away3d/materials/shaders/DiffuseDot3Shader.as
maven/trunk/ogoglio-viewer/away3d/materials/shaders/DiffusePhongShader.as
maven/trunk/ogoglio-viewer/away3d/materials/shaders/EnviroShader.as
maven/trunk/ogoglio-viewer/away3d/materials/shaders/SpecularPhongShader.as
maven/trunk/ogoglio-viewer/away3d/primitives/
maven/trunk/ogoglio-viewer/away3d/primitives/Cone.as
maven/trunk/ogoglio-viewer/away3d/primitives/Cube.as
maven/trunk/ogoglio-viewer/away3d/primitives/Cylinder.as
maven/trunk/ogoglio-viewer/away3d/primitives/GeodesicSphere.as
maven/trunk/ogoglio-viewer/away3d/primitives/GridPlane.as
maven/trunk/ogoglio-viewer/away3d/primitives/LineSegment.as
maven/trunk/ogoglio-viewer/away3d/primitives/LogoCube.as
maven/trunk/ogoglio-viewer/away3d/primitives/Plane.as
maven/trunk/ogoglio-viewer/away3d/primitives/RegularPolygon.as
maven/trunk/ogoglio-viewer/away3d/primitives/SeaTurtle.as
maven/trunk/ogoglio-viewer/away3d/primitives/Skybox.as
maven/trunk/ogoglio-viewer/away3d/primitives/Skybox6.as
maven/trunk/ogoglio-viewer/away3d/primitives/Sphere.as
maven/trunk/ogoglio-viewer/away3d/primitives/Torus.as
maven/trunk/ogoglio-viewer/away3d/primitives/Triangle.as
maven/trunk/ogoglio-viewer/away3d/primitives/Trident.as
maven/trunk/ogoglio-viewer/away3d/primitives/WireCircle.as
maven/trunk/ogoglio-viewer/away3d/primitives/WireCone.as
maven/trunk/ogoglio-viewer/away3d/primitives/WireCube.as
maven/trunk/ogoglio-viewer/away3d/primitives/WireCylinder.as
maven/trunk/ogoglio-viewer/away3d/primitives/WirePlane.as
maven/trunk/ogoglio-viewer/away3d/primitives/WireSphere.as
maven/trunk/ogoglio-viewer/away3d/primitives/WireTorus.as
maven/trunk/ogoglio-viewer/away3d/sprites/
maven/trunk/ogoglio-viewer/away3d/sprites/MovieClipSprite.as
maven/trunk/ogoglio-viewer/away3d/sprites/Sprite2D.as
maven/trunk/ogoglio-viewer/away3d/sprites/Sprite2DDir.as
maven/trunk/ogoglio-viewer/away3d/sprites/dof/
maven/trunk/ogoglio-viewer/away3d/sprites/dof/DofCache.as
maven/trunk/ogoglio-viewer/away3d/sprites/dof/DofSprite2D.as
maven/trunk/ogoglio-viewer/away3d/test/
maven/trunk/ogoglio-viewer/away3d/test/BaseDemo.as
maven/trunk/ogoglio-viewer/away3d/test/Button.as
maven/trunk/ogoglio-viewer/away3d/test/Panel.as
maven/trunk/ogoglio-viewer/away3d/test/Slide.as
maven/trunk/ogoglio-viewer/body.jpg
maven/trunk/ogoglio-viewer/com/
maven/trunk/ogoglio-viewer/com/ogoglio/
maven/trunk/ogoglio-viewer/com/ogoglio/viewer/
maven/trunk/ogoglio-viewer/html-template/
maven/trunk/ogoglio-viewer/html-template/AC_OETags.js
maven/trunk/ogoglio-viewer/html-template/history.htm
maven/trunk/ogoglio-viewer/html-template/history.js
maven/trunk/ogoglio-viewer/html-template/history.swf
maven/trunk/ogoglio-viewer/html-template/index.template.html
maven/trunk/ogoglio-viewer/html-template/playerProductInstall.swf
maven/trunk/ogoglio-viewer/jane.jpg
maven/trunk/ogoglio-viewer/jane.obj
maven/trunk/ogoglio-viewer/main.mxml
maven/trunk/ogoglio-viewer/nochump/
maven/trunk/ogoglio-viewer/nochump/lgpl.txt
maven/trunk/ogoglio-viewer/nochump/util/
maven/trunk/ogoglio-viewer/nochump/util/zip/
maven/trunk/ogoglio-viewer/nochump/util/zip/CRC32.as
maven/trunk/ogoglio-viewer/nochump/util/zip/Deflater.as
maven/trunk/ogoglio-viewer/nochump/util/zip/Inflater.as
maven/trunk/ogoglio-viewer/nochump/util/zip/ZipConstants.as
maven/trunk/ogoglio-viewer/nochump/util/zip/ZipEntry.as
maven/trunk/ogoglio-viewer/nochump/util/zip/ZipError.as
maven/trunk/ogoglio-viewer/nochump/util/zip/ZipFile.as
maven/trunk/ogoglio-viewer/nochump/util/zip/ZipOutput.as
maven/trunk/ogoglio-viewer/test.mtl
maven/trunk/ogoglio-viewer/test.obj
Added: maven/trunk/ogoglio-viewer/.actionScriptProperties
===================================================================
--- maven/trunk/ogoglio-viewer/.actionScriptProperties (rev 0)
+++ maven/trunk/ogoglio-viewer/.actionScriptProperties 2008-07-15 03:38:05 UTC (rev 798)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<actionScriptProperties mainApplicationPath="main.mxml" version="1">
+<compiler additionalCompilerArguments="-locale en_US" copyDependentFiles="true" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersion="9.0.0" htmlPlayerVersionCheck="true" outputFolderPath="bin" strict="true" warn="true">
+<compilerSourcePath/>
+<libraryPath>
+<libraryPathEntry kind="3" linkType="2" path="${FRAMEWORKS}/libs/playerglobal.swc"/>
+<libraryPathEntry kind="3" linkType="1" path="${FRAMEWORKS}/libs/utilities.swc"/>
+<libraryPathEntry kind="3" linkType="1" path="${FRAMEWORKS}/libs/flex.swc" sourcepath="${FRAMEWORKS}/source"/>
+<libraryPathEntry kind="3" linkType="1" path="${FRAMEWORKS}/libs/framework.swc" sourcepath="${FRAMEWORKS}/source"/>
+<libraryPathEntry kind="3" linkType="1" path="${FRAMEWORKS}/libs/rpc.swc"/>
+<libraryPathEntry kind="3" linkType="1" path="${FRAMEWORKS}/libs/charts.swc" sourcepath="${FRAMEWORKS}/source"/>
+<libraryPathEntry kind="1" linkType="1" path="${FRAMEWORKS}/locale/{locale}"/>
+</libraryPath>
+<sourceAttachmentPath>
+<sourceAttachmentPathEntry kind="3" linkType="1" path="${FRAMEWORKS}/libs/flex.swc" sourcepath="${FRAMEWORKS}/source"/>
+<sourceAttachmentPathEntry kind="3" linkType="1" path="${FRAMEWORKS}/libs/framework.swc" sourcepath="${FRAMEWORKS}/source"/>
+<sourceAttachmentPathEntry kind="3" linkType="1" path="${FRAMEWORKS}/libs/charts.swc" sourcepath="${FRAMEWORKS}/source"/>
+</sourceAttachmentPath>
+</compiler>
+<applications>
+<application path="main.mxml"/>
+</applications>
+<buildCSSFiles/>
+</actionScriptProperties>
Added: maven/trunk/ogoglio-viewer/.flexProperties
===================================================================
--- maven/trunk/ogoglio-viewer/.flexProperties (rev 0)
+++ maven/trunk/ogoglio-viewer/.flexProperties 2008-07-15 03:38:05 UTC (rev 798)
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<flexProperties flexServerType="0" toolCompile="true" version="1"/>
Added: maven/trunk/ogoglio-viewer/.project
===================================================================
--- maven/trunk/ogoglio-viewer/.project (rev 0)
+++ maven/trunk/ogoglio-viewer/.project 2008-07-15 03:38:05 UTC (rev 798)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>ogoglio-viewer</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>com.adobe.flexbuilder.project.flexbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.adobe.flexbuilder.project.flexnature</nature>
+ <nature>com.adobe.flexbuilder.project.actionscriptnature</nature>
+ </natures>
+</projectDescription>
Added: maven/trunk/ogoglio-viewer/.settings/org.eclipse.core.resources.prefs
===================================================================
--- maven/trunk/ogoglio-viewer/.settings/org.eclipse.core.resources.prefs (rev 0)
+++ maven/trunk/ogoglio-viewer/.settings/org.eclipse.core.resources.prefs 2008-07-15 03:38:05 UTC (rev 798)
@@ -0,0 +1,3 @@
+#Mon Jul 14 19:41:27 PDT 2008
+eclipse.preferences.version=1
+encoding/<project>=utf-8
Added: maven/trunk/ogoglio-viewer/OgoglioView3D.as
===================================================================
--- maven/trunk/ogoglio-viewer/OgoglioView3D.as (rev 0)
+++ maven/trunk/ogoglio-viewer/OgoglioView3D.as 2008-07-15 03:38:05 UTC (rev 798)
@@ -0,0 +1,84 @@
+package
+{
+ import away3d.materials.BitmapFileMaterial;
+ import away3d.core.math.Number3D;
+ import away3d.containers.View3D;
+ import away3d.primitives.Cube;
+
+ import flash.events.Event;
+
+ import mx.core.UIComponent;
+ import away3d.core.base.Object3D;
+ import away3d.loaders.Obj;
+ import away3d.loaders.Object3DLoader;
+ import away3d.containers.ObjectContainer3D;
+ import away3d.loaders.MaterialLibrary;
+
+ public class OgoglioView3D extends UIComponent
+ {
+ private var view:View3D;
+
+ private var objLoader:Object3DLoader;
+
+ private var janeLoader:Object3DLoader;
+
+ public function OgoglioView3D()
+ {
+ super();
+ this.addEventListener(Event.ENTER_FRAME, onFrameEnter);
+ }
+
+ override protected function createChildren():void
+ {
+ super.createChildren();
+
+ if(!this.view)
+ {
+ this.view = new View3D();
+
+ this.view.camera.moveTo(new Number3D(0, 0, -300));
+ this.view.camera.lookAt(new Number3D(0, 0, 0));
+ }
+ this.addChild(this.view);
+
+ if(!this.objLoader){
+ this.objLoader = Obj.load("test.obj", { material:new BitmapFileMaterial("body.jpg"), name:"joe", scaling:10 } );
+ this.objLoader.rotationY = 180;
+ this.objLoader.rotationX = -90;
+ }
+ this.view.scene.addChild(this.objLoader);
+
+ if(!this.janeLoader){
+ this.janeLoader = Obj.load("jane.obj", { material:new BitmapFileMaterial("jane.jpg"), name:"jane", scaling:10 } );
+ this.janeLoader.rotationY = 180;
+ this.janeLoader.rotationX = -90;
+ }
+ this.view.scene.addChild(this.janeLoader);
+
+ }
+
+ override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+ {
+ super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+ if(this.width / 2 != this.view.x)
+ this.view.x = this.width / 2;
+ if(this.height / 2 != this.view.y)
+ this.view.y = this.height / 2;
+ }
+
+ private function onFrameEnter(event:Event):void
+ {
+ if(this.view && this.view.stage)
+ {
+ this.objLoader.result.transform.tx = -100;
+ this.objLoader.result.rotationY += 1;
+
+ this.janeLoader.result.rotationY -= 1;
+ this.janeLoader.result.transform.tx = 100;
+
+ this.view.render();
+ }
+ }
+ }
+}
\ No newline at end of file
Added: maven/trunk/ogoglio-viewer/away3d/animation/Animator.as
===================================================================
--- maven/trunk/ogoglio-viewer/away3d/animation/Animator.as (rev 0)
+++ maven/trunk/ogoglio-viewer/away3d/animation/Animator.as 2008-07-15 03:38:05 UTC (rev 798)
@@ -0,0 +1,145 @@
+package away3d.animation
+{
+ import away3d.core.base.*;
+
+ import flash.utils.Dictionary;
+
+ public class Animator extends Mesh
+ {
+ private var varr:Array = [];
+ private var uvarr:Array = [];
+ private var fnarr:Array = [];
+
+
+ public function Animator(baseObject:Mesh, aFrames:Array, init:Object = null, doloop:Boolean = false)
+ {
+ super(init);
+ generate(baseObject, aFrames, doloop);
+
+ type = "Animator";
+ url = "Mesh";
+
+ }
+
+ //Array aFrames properties: vertices:Array[vertex.x,y and z positions], prefix:String
+ public function generate(baseObject:Mesh, aFrames:Array, doloop:Boolean):void
+ {
+ var i:int ;
+ var j:int ;
+ var k:int ;
+
+ // export requirement
+ indexes = new Array();
+
+ if(doloop){
+ var fr:Object = new Object();
+ fr.vertices = aFrames[0].vertices;
+ fr.prefix = aFrames[0].prefix;
+ var pref:String = "";
+ for(i=0; i<fr.prefix.length;i++){
+ if(isNaN(fr.prefix.substring(i,i+1)) ){
+ pref += fr.prefix.substring(i,i+1);
+ } else{
+ break;
+ }
+ }
+ fr.prefix = pref+(aFrames.length+1);
+ aFrames.push(fr);
+ }
+
+ var face:Face;
+ varr = varr.concat(baseObject.vertices);
+
+ for(i=0;i<baseObject.faces.length;i++){
+ face = baseObject.faces[i];
+ uvarr.push(face.uv0, face.uv1, face.uv2);
+ addFace(face);
+ }
+
+ frames = new Dictionary();
+ framenames = new Dictionary();
+ fnarr = [];
+ var oFrames:Object = new Object();
+ var arr:Array;
+
+ for(i=0;i<aFrames.length;i++){
+ oFrames[aFrames[i].prefix]=new Array();
+ fnarr.push(aFrames[i].prefix);
+ arr = aFrames[i].vertices;
+ for(j=0;j<arr.length;j++){
+ oFrames[aFrames[i].prefix].push(arr[j], arr[j], arr[j]);
+ }
+
+ }
+
+ var frame:Frame;
+ for(i = 0;i<fnarr.length; i++){
+ trace("[ "+fnarr[i]+" ]");
+ frame = new Frame();
+ framenames[fnarr[i]] = i;
+ frames[i] = frame;
+ k=0;
+ for (j = 0; j < oFrames[fnarr[i]].length; j+=3){
+ var vp:VertexPosition = new VertexPosition(varr[k]);
+ k++;
+ vp.x = oFrames[fnarr[i]][j].x;
+ vp.y = oFrames[fnarr[i]][j+1].y;
+ vp.z = oFrames[fnarr[i]][j+2].z;
+ frame.vertexpositions.push(vp);
+ }
+
+ if (i == 0)
+ frame.adjust();
+ }
+
+ }
+
+ public function get framelist():Array{
+ return fnarr;
+ }
+
+
+ // not tested yet, should allow to add a frame or more at runtime too... array
+ // contains same object vertices and prefix as constructor.
+ public function addFrames(aFrames:Array):void
+ {
+ var i:int ;
+ var j:int ;
+ var k:int ;
+ var oFrames:Object = new Object();
+ var arr:Array;
+
+ for(i=0;i<aFrames.length;i++){
+ oFrames[aFrames[i].prefix]=new Array();
+ fnarr.push(aFrames[i].prefix);
+ arr = aFrames[i].vertices;
+ for(j=0;j<arr.length;j++){
+ oFrames[aFrames[i].prefix].push(arr[j], arr[j], arr[j]);
+ }
+ }
+
+ var frame:Frame;
+ for(i = 0;i<fnarr.length; i++){
+ trace("[ "+fnarr[i]+" ]");
+ frame = new Frame();
+ framenames[fnarr[i]] = i;
+ frames[i] = frame;
+ k=0;
+ for (j = 0; j < oFrames[fnarr[i]].length; j+=3){
+ var vp:VertexPosition = new VertexPosition(varr[k]);
+ k++;
+ vp.x = oFrames[fnarr[i]][j].x;
+ vp.y = oFrames[fnarr[i]][j+1].y;
+ vp.z = oFrames[fnarr[i]][j+2].z;
+ frame.vertexpositions.push(vp);
+ }
+
+ if (i == 0)
+ frame.adjust();
+ }
+
+ }
+
+
+ }
+}
Added: maven/trunk/ogoglio-viewer/away3d/away3d-license.txt
===================================================================
--- maven/trunk/ogoglio-viewer/away3d/away3d-license.txt (rev 0)
+++ maven/trunk/ogoglio-viewer/away3d/away3d-license.txt 2008-07-15 03:38:05 UTC (rev 798)
@@ -0,0 +1,13 @@
+Copyright 2007 Alexander Zadorozhny
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
\ No newline at end of file
Added: maven/trunk/ogoglio-viewer/away3d/cameras/Camera3D.as
===================================================================
--- maven/trunk/ogoglio-viewer/away3d/cameras/Camera3D.as (rev 0)
+++ maven/trunk/ogoglio-viewer/away3d/cameras/Camera3D.as 2008-07-15 03:38:05 UTC (rev 798)
@@ -0,0 +1,148 @@
+package away3d.cameras
+{
+ import away3d.core.*;
+ import away3d.core.base.*;
+ import away3d.core.draw.*;
+ import away3d.core.math.*;
+ import away3d.core.render.*;
+ import away3d.core.utils.*;
+ import away3d.sprites.dof.DofCache;
+
+ /** Camera in 3D-space */
+ public class Camera3D extends Object3D
+ {
+ public var zoom:Number;
+
+
+ // Depth of field parameters
+ private var _aperture:Number = 22;
+ private var _focus:Number;
+
+ public function set aperture(value:Number):void
+ {
+ _aperture = value;
+ DofCache.aperture = _aperture;
+ }
+
+ public function get aperture():Number
+ {
+ return _aperture;
+ }
+
+ public function set focus(value:Number):void
+ {
+ _focus = value;
+ DofCache.focus = _focus;
+ }
+
+ public function get focus():Number
+ {
+ return _focus;
+ }
+
+
+ public var maxblur:Number = 150;
+ public var doflevels:Number = 16;
+ public var usedof:Boolean = false;
+
+ private var _view:Matrix3D = new Matrix3D();
+
+ public function Camera3D(init:Object = null)
+ {
+ super(init);
+
+ init = Init.parse(init);
+ zoom = (init as Init).getNumber("zoom", 10);
+ focus = (init as Init).getNumber("focus", 100);
+ usedof = (init as Init).getBoolean("dof", false);
+ if(usedof)
+ {
+ aperture = (init as Init).getNumber("aperture", 22);
+ maxblur = (init as Init).getNumber("maxblur", 150);
+ doflevels = (init as Init).getNumber("doflevels", 16);
+ enableDof();
+ }
+ else
+ {
+ disableDof();
+ }
+
+ var lookat:Number3D = (init as Init).getPosition("lookat");
+
+ _flipY.syy = -1;
+
+ if (lookat != null)
+ lookAt(lookat);
+ }
+
+ public function enableDof():void
+ {
+ DofCache.doflevels = doflevels;
+ DofCache.aperture = aperture;
+ DofCache.maxblur = maxblur;
+ DofCache.focus = focus;
+ DofCache.resetDof(true);
+ }
+
+ public function disableDof():void
+ {
+ DofCache.resetDof(false);
+ }
+
+ public var invView:Matrix3D;
+
+ public function get view():Matrix3D
+ {
+ _view.multiply(sceneTransform, _flipY);
+ invView = _view.clone();
+ _view.inverse(invView);
+ return _view;
+ }
+
+ internal var screenProjection:Projection = new Projection();
+
+ public function screen(object:Object3D, vertex:Vertex = null):ScreenVertex
+ {
+ use namespace arcane;
+
+ if (vertex == null)
+ vertex = new Vertex(0,0,0);
+ object.viewTransform.multiply(view, object.sceneTransform);
+ screenProjection.view = object.viewTransform;
+ screenProjection.focus = focus;
+ screenProjection.zoom = zoom;
+ return vertex.project(screenProjection);
+ }
+
+ private var _flipY:Matrix3D = new Matrix3D();
+
+ /**
+ * Rotate the camera in its vertical plane.
+ * Tilting the camera results in a motion similar to someone nodding their head "yes".
+ * @param angle Angle to tilt the camera.
+ */
+ public function tilt(angle:Number):void
+ {
+ super.pitch(angle);
+ }
+
+ /**
+ * Rotate the camera in its horizontal plane.
+ * Panning the camera results in a motion similar to someone shaking their head "no".
+ * @param angle Angle to pan the camera.
+ */
+ public function pan(angle:Number):void
+ {
+ super.yaw(angle);
+ }
+
+ public override function clone(object:* = null):*
+ {
+ var camera:Camera3D = object || new Camera3D();
+ super.clone(camera);
+ camera.zoom = zoom;
+ camera.focus = focus;
+ return camera;
+ }
+ }
+}
Added: maven/trunk/ogoglio-viewer/away3d/cameras/HoverCamera3D.as
===================================================================
--- maven/trunk/ogoglio-viewer/away3d/cameras/HoverCamera3D.as (rev 0)
+++ maven/trunk/ogoglio-viewer/away3d/cameras/HoverCamera3D.as 2008-07-15 03:38:05 UTC (rev 798)
@@ -0,0 +1,71 @@
+package away3d.cameras
+{
+ import away3d.core.base.*;
+ import away3d.core.utils.*;
+
+ /** Camera that hovers around an object */
+ public class HoverCamera3D extends TargetCamera3D
+ {
+ public var yfactor:Number = 2;
+
+ /** Distance the camera keeps to the target */
+ public var distance:Number = 400;
+ public var panangle:Number = 0;
+ public var tiltangle:Number = 90;
+ public var targetpanangle:Number = 0;
+ public var targettiltangle:Number = 90;
+ public var mintiltangle:Number = 0;
+ public var maxtiltangle:Number = 90;
+ public var steps:Number = 8;
+
+ public function HoverCamera3D(init:Object = null)
+ {
+ super(init);
+
+ init = Init.parse(init);
+
+ distance = (init as Init).getNumber("distance", 800);
+
+ update();
+ }
+
+ /** Hover camera around the object @return <code>true</code> if camera changed position */
+ public function hover():Boolean
+ {
+ if ((targettiltangle == tiltangle) && (targetpanangle == panangle))
+ return update();
+
+ targettiltangle = Math.max(mintiltangle, Math.min(maxtiltangle, targettiltangle));
+ tiltangle += (targettiltangle - tiltangle) / (steps + 1);
+ panangle += (targetpanangle - panangle) / (steps + 1);
+
+ if ((Math.abs(targettiltangle - tiltangle) < 0.01) && (Math.abs(targetpanangle - panangle) < 0.01))
+ {
+ tiltangle = targettiltangle;
+ panangle = targetpanangle;
+ }
+
+ return update();
+ }
+
+ /** Update camera position @return <code>true</code> if camera changed position */
+ public function update():Boolean
+ {
+ var gx:Number = distance * Math.sin(panangle * toRADIANS) * Math.cos(tiltangle * toRADIANS);
+ var gz:Number = distance * Math.cos(panangle * toRADIANS) * Math.cos(tiltangle * toRADIANS);
+ var gy:Number = distance * Math.sin(tiltangle * toRADIANS) * yfactor;
+
+ if ((x == gx) && (y == gy) && (z == gz))
+ return false;
+
+ x = gx;
+ y = gy;
+ z = gz;
+
+ return true;
+ }
+
+ static private var toRADIANS:Number = Math.PI / 180;
+ }
+
+}
Added: maven/trunk/ogoglio-viewer/away3d/cameras/TargetCamera3D.as
===================================================================
--- maven/trunk/ogoglio-viewer/away3d/cameras/TargetCamera3D.as (rev 0)
+++ maven/trunk/ogoglio-viewer/away3d/cameras/TargetCamera3D.as 2008-07-15 03:38:05 UTC (rev 798)
@@ -0,0 +1,39 @@
+package away3d.cameras
+{
+ import away3d.containers.*;
+ import away3d.core.base.*;
+ import away3d.core.math.*;
+ import away3d.core.utils.*;
+
+ /** Camera that targets an object */
+ public class TargetCamera3D extends Camera3D
+ {
+ /** Object the camera always targets */
+ public var target:Object3D;
+
+ public function TargetCamera3D(init:Object = null)
+ {
+ super(init);
+
+ init = Init.parse(init);
+
+ target = (init as Init).getObject3D("target") || new Object3D();
+ }
+
+ public override function get view():Matrix3D
+ {
+ if (target != null)
+ lookAt(target.scene ? target.scenePosition : target.position);
+
+ return super.view;
+ }
+
+ public override function set parent(value:ObjectContainer3D):void
+ {
+ if (value != null)
+ throw new Error("TargetCamera can't be parented");
+ }
+
+ }
+
+}
Added: maven/trunk/ogoglio-viewer/away3d/containers/DebugObjectContainer3D.as
===================================================================
--- maven/trunk/ogoglio-viewer/away3d/containers/DebugObjectContainer3D.as (rev 0)
+++ maven/trunk/ogoglio-viewer/away3d/containers/DebugObjectContainer3D.as 2008-07-15 03:38:05 UTC (rev 798)
@@ -0,0 +1,76 @@
+package away3d.containers
+{
+ import away3d.core.base.*;
+ import away3d.core.draw.*;
+ import away3d.core.render.*;
+ import away3d.primitives.*;
+
+ public class DebugObjectContainer3D extends ObjectContainer3D implements IPrimitiveProvider
+ {
+ public var debugbb:Boolean = false;
+ public var debugbs:Boolean = false;
+
+ public function DebugObjectContainer3D(init:Object = null, ...childarray)
+ {
+ if (init != null)
+ if (init is Object3D)
+ {
+ addChild(init as Object3D);
+ init = null;
+ }
+
+ super(init);
+
+ for each (var child:Object3D in childarray)
+ addChild(child);
+ }
+
+ private var _debugboundingbox:WireCube;
+ private var _debugboundingsphere:WireSphere;
+
+ override public function primitives(consumer:IPrimitiveConsumer, session:AbstractRenderSession):void
+ {
+ if (children.length == 0)
+ return;
+
+ super.primitives(consumer, session);
+
+ if (debugbb)
+ {
+ if (_debugboundingbox == null)
+ _debugboundingbox = new WireCube({material:"#cyan|2"});
+ _debugboundingbox.v000.x = minX;
+ _debugboundingbox.v001.x = minX;
+ _debugboundingbox.v010.x = minX;
+ _debugboundingbox.v011.x = minX;
+ _debugboundingbox.v100.x = maxX;
+ _debugboundingbox.v101.x = maxX;
+ _debugboundingbox.v110.x = maxX;
+ _debugboundingbox.v111.x = maxX;
+ _debugboundingbox.v000.y = minY;
+ _debugboundingbox.v001.y = minY;
+ _debugboundingbox.v010.y = maxY;
+ _debugboundingbox.v011.y = maxY;
+ _debugboundingbox.v100.y = minY;
+ _debugboundingbox.v101.y = minY;
+ _debugboundingbox.v110.y = maxY;
+ _debugboundingbox.v111.y = maxY;
+ _debugboundingbox.v000.z = minZ;
+ _debugboundingbox.v001.z = maxZ;
+ _debugboundingbox.v010.z = minZ;
+ _debugboundingbox.v011.z = maxZ;
+ _debugboundingbox.v100.z = minZ;
+ _debugboundingbox.v101.z = maxZ;
+ _debugboundingbox.v110.z = minZ;
+ _debugboundingbox.v111.z = maxZ;
+ _debugboundingbox.primitives(consumer, session);
+ }
+
+ if (debugbs)
+ {
+ _debugboundingsphere = new WireSphere({material:"#cyan", radius:radius, segmentsW:16, segmentsH:12});
+ _debugboundingsphere.primitives(consumer, session);
+ }
+ }
+ }
+}
Added: maven/trunk/ogoglio-viewer/away3d/containers/ILODObject.as
===================================================================
--- maven/trunk/ogoglio-viewer/away3d/containers/ILODObject.as (rev 0)
+++ maven/trunk/ogoglio-viewer/away3d/containers/ILODObject.as 2008-07-15 03:38:05 UTC (rev 798)
@@ -0,0 +1,9 @@
+package away3d.containers
+{
+
+ /** Interface for object that can toggle their visibily depending on view and distance to camera */
+ public interface ILODObject
+ {
+ function matchLOD(view:View3D):Boolean;
+ }
+}
Added: maven/trunk/ogoglio-viewer/away3d/containers/IPhysicsScene.as
===================================================================
--- maven/trunk/ogoglio-viewer/away3d/containers/IPhysicsScene.as (rev 0)
+++ maven/trunk/ogoglio-viewer/away3d/containers/IPhysicsScene.as 2008-07-15 03:38:05 UTC (rev 798)
@@ -0,0 +1,7 @@
+package away3d.containers
+{
+ public interface IPhysicsScene
+ {
+ function updateTime(time:int):void
+ }
+}
Added: maven/trunk/ogoglio-viewer/away3d/containers/LODObject.as
===================================================================
--- maven/trunk/ogoglio-viewer/away3d/containers/LODObject.as (rev 0)
+++ maven/trunk/ogoglio-viewer/away3d/containers/LODObject.as 2008-07-15 03:38:05 UTC (rev 798)
@@ -0,0 +1,38 @@
+package away3d.containers
+{
+ import away3d.core.base.*;
+ import away3d.core.math.*;
+ import away3d.core.utils.*;
+
+ /** Container that is drawn only if its scaling to to perspective fall within given range */
+ public class LODObject extends ObjectContainer3D implements ILODObject
+ {
+ public var maxp:Number;
+ public var minp:Number;
+
+ public function LODObject(init:Object = null, ...childarray)
+ {
+ super(init);
+
+ init = Init.parse(init);
+ maxp = (init as Init).getNumber("maxp", Infinity);
+ minp = (init as Init).getNumber("minp", 0);
+
+ for each (var child:Object3D in childarray)
+ addChild(child);
+ }
+
+ public function matchLOD(view:View3D):Boolean
+ {
+ var z:Number = viewTransform.tz;
+ var persp:Number = view.camera.zoom / (1 + z / view.camera.focus);
+
+ if (persp < minp)
+ return false;
+ if (persp >= maxp)
+ return false;
+
+ return true;
+ }
+ }
+}
Added: maven/trunk/ogoglio-viewer/away3d/containers/ObjectContainer3D.as
===================================================================
--- maven/trunk/ogoglio-viewer/away3d/containers/ObjectContainer3D.as (rev 0)
+++ maven/trunk/ogoglio-viewer/away3d/containers/ObjectContainer3D.as 2008-07-15 03:38:05 UTC (rev 798)
@@ -0,0 +1,462 @@
+package away3d.containers
+{
+ import away3d.core.*;
+ import away3d.core.base.*;
+ import away3d.core.draw.*;
+ import away3d.core.math.*;
+ import away3d.core.traverse.*;
+ import away3d.events.*;
+
+ /** Container node for other objects of the scene */
+ public class ObjectContainer3D extends Object3D implements IPrimitiveProvider
+ {
+ use namespace arcane;
+
+ private var _children:Array = new Array();
+
+ public function get children():Array
+ {
+ return _children;
+ }
+
+ private var _radiusChild:Object3D = null;
+ private var _radiusDirty:Boolean = false;
+ private var _radius:Number = 0;
+
+ public override function get radius():Number
+ {
+ if (_radiusDirty)
+ {
+ _radiusChild = null;
+ var mr:Number = 0;
+ for each (var child:Object3D in _children)
+ {
+ var r:Number = child.parentradius;
+ if (r > mr)
+ {
+ mr = r;
+ _radiusChild = child;
+ }
+ }
+ _radius = mr;
+ _radiusDirty = false;
+ }
+ return _radius;
+ }
+
+ private var _maxXChild:Object3D = null;
+ private var _maxXDirty:Boolean = false;
+ private var _maxX:Number = -Infinity;
+
+ public override function get maxX():Number
+ {
+ if (_maxXDirty)
+ {
+ _maxXChild = null;
+ var extrval:Number = -Infinity;
+ for each (var child:Object3D in _children)
+ {
+ var val:Number = child.parentmaxX;
+ if (val > extrval)
+ {
+ extrval = val;
+ _maxXChild = child;
+ }
+ }
+ _maxX = extrval;
+ _maxXDirty = false;
+ }
+ return _maxX;
+ }
+
+ private var _minXChild:Object3D = null;
+ private var _minXDirty:Boolean = false;
+ private var _minX:Number = Infinity;
+
+ public override function get minX():Number
+ {
+ if (_minXDirty)
+ {
+ _minXChild = null;
+ var extrval:Number = Infinity;
+ for each (var child:Object3D in _children)
+ {
+ var val:Number = child.parentminX;
+ if (val < extrval)
+ {
+ extrval = val;
+ _minXChild = child;
+ }
+ }
+ _minX = extrval;
+ _minXDirty = false;
+ }
+ return _minX;
+ }
+
+ private var _maxYChild:Object3D = null;
+ private var _maxYDirty:Boolean = false;
+ private var _maxY:Number = -Infinity;
+
+ public override function get maxY():Number
+ {
+ if (_maxYDirty)
+ {
+ var extrval:Number = -Infinity;
+ _maxYChild = null;
+ for each (var child:Object3D in _children)
+ {
+ var val:Number = child.parentmaxY;
+ if (val > extrval)
+ {
+ extrval = val;
+ _maxYChild = child;
+ }
+ }
+ _maxY = extrval;
+ _maxYDirty = false;
+ }
+ return _maxY;
+ }
+
+ private var _minYChild:Object3D = null;
+ private var _minYDirty:Boolean = false;
+ private var _minY:Number = Infinity;
+
+ public override function get minY():Number
+ {
+ if (_minYDirty)
+ {
+ var extrval:Number = Infinity;
+ _minYChild = null;
+ for each (var child:Object3D in _children)
+ {
+ var val:Number = child.parentminY;
+ if (val < extrval)
+ {
+ extrval = val;
+ _minYChild = child;
+ }
+ }
+ _minY = extrval;
+ _minYDirty = false;
+ }
+ return _minY;
+ }
+
+ private var _maxZChild:Object3D = null;
+ private var _maxZDirty:Boolean = false;
+ private var _maxZ:Number = -Infinity;
+
+ public override function get maxZ():Number
+ {
+ if (_maxZDirty)
+ {
+ var extrval:Number = -Infinity;
+ _maxZChild = null;
+ for each (var child:Object3D in _children)
+ {
+ var val:Number = child.parentmaxZ;
+ if (val > extrval)
+ {
+ extrval = val;
+ _maxZChild = child;
+ }
+ }
+ _maxZ = extrval;
+ _maxZDirty = false;
+ }
+ return _maxZ;
+ }
+
+ private var _minZChild:Object3D = null;
+ private var _minZDirty:Boolean = false;
+ private var _minZ:Number = Infinity;
+
+ public override function get minZ():Number
+ {
+ if (_minZDirty)
+ {
+ var extrval:Number = Infinity;
+ _minZChild = null;
+ for each (var child:Object3D in _children)
+ {
+ var val:Number = child.parentminZ;
+ if (val < extrval)
+ {
+ extrval = val;
+ _minZChild = child;
+ }
+ }
+ _minZ = extrval;
+ _minZDirty = false;
+ }
+ return _minZ;
+ }
+
+ public function ObjectContainer3D(init:Object = null, ...childarray)
+ {
+ if (init != null)
+ if (init is Object3D)
+ {
+ addChild(init as Object3D);
+ init = null;
+ }
+
+ super(init);
+
+ for each (var child:Object3D in childarray)
+ addChild(child);
+ }
+
+ public override function scale(scale:Number):void
+ {
+ for each (var child:Object3D in children)
+ {
+ child.x *= scale;
+ child.y *= scale;
+ child.z *= scale;
+ child.scale(scale);
+ }
+ }
+
+ public function addChildren(...childarray):void
+ {
+ for each (var child:Object3D in childarray)
+ addChild(child);
+ }
+
+ public function movePivot(dx:Number, dy:Number, dz:Number):void
+ {
+
+ for each (var child:Object3D in _children)
+ {
+ child.x -= dx;
+ child.y -= dy;
+ child.z -= dz;
+ }
+
+ var dV:Number3D = new Number3D(dx, dy, dz);
+ dV.rotate(dV.clone(), _transform);
+ dV.add(dV, position);
+ moveTo(dV);
+ }
+
+ public function addChild(child:Object3D):void
+ {
+ if (child == null)
+ throw new Error("ObjectContainer3D.addChild(null)");
+ if (child.parent == this)
+ return;
+ child.parent = this;
+ }
+
+ public function removeChild(child:Object3D):void
+ {
+ if (child == null)
+ throw new Error("ObjectContainer3D.removeChild(null)");
+ if (child.parent != this)
+ return;
+ child.parent = null;
+ }
+
+ arcane function internalAddChild(child:Object3D):void
+ {
+ _children.push(child);
+
+ child.addOnTransformChange(onChildChange);
+ child.addOnRadiusChange(onChildChange);
+
+ rememberChild(child);
+
+ launchNotifies();
+ }
+
+ arcane function internalRemoveChild(child:Object3D):void
+ {
+ var index:int = children.indexOf(child);
+ if (index == -1)
+ return;
+
+ forgetChild(child);
+
+ child.removeOnTransformChange(onChildChange);
+ child.removeOnRadiusChange(onChildChange);
+
+ _children.splice(index, 1);
+
+ launchNotifies();
+ }
+
+ private var _needNotifyRadiusChange:Boolean = false;
+ private var _needNotifyDimensionsChange:Boolean = false;
+
+ private function launchNotifies():void
+ {
+ if (_needNotifyRadiusChange)
+ {
+ _needNotifyRadiusChange = false;
+ notifyRadiusChange();
+ }
+ if (_needNotifyDimensionsChange)
+ {
+ _needNotifyDimensionsChange = false;
+ notifyDimensionsChange();
+ }
+ }
+
+ private function onChildChange(event:Object3DEvent):void
+ {
+ var child:Object3D = event.object;
+
+ forgetChild(child);
+ rememberChild(child);
+
+ launchNotifies();
+ }
+
+ private function forgetChild(child:Object3D):void
+ {
+ if (child == _radiusChild)
+ {
+ _radiusChild = null;
+ _radiusDirty = true;
+ _needNotifyRadiusChange = true;
+ }
+ if (child == _maxXChild)
+ {
+ _maxXChild = null;
+ _maxXDirty = true;
+ _needNotifyDimensionsChange = true;
+ }
+ if (child == _minXChild)
+ {
+ _minXChild = null;
+ _minXDirty = true;
+ _needNotifyDimensionsChange = true;
+ }
+ if (child == _maxYChild)
+ {
+ _maxYChild = null;
+ _maxYDirty = true;
+ _needNotifyDimensionsChange = true;
+ }
+ if (child == _minYChild)
+ {
+ _minYChild = null;
+ _minYDirty = true;
+ _needNotifyDimensionsChange = true;
+ }
+ if (child == _maxZChild)
+ {
+ _maxZChild = null;
+ _maxZDirty = true;
+ _needNotifyDimensionsChange = true;
+ }
+ if (child == _minZChild)
+ {
+ _minZChild = null;
+ _minZDirty = true;
+ _needNotifyDimensionsChange = true;
+ }
+ }
+
+ private function rememberChild(child:Object3D):void
+ {
+ var r:Number = child.parentradius;
+ if (r > _radius)
+ {
+ _radius = r;
+ _radiusChild = child;
+ _radiusDirty = false;
+ _needNotifyRadiusChange = true;
+ }
+ var mxX:Number = child.parentmaxX;
+ if (mxX > _maxX)
+ {
+ _maxX = mxX;
+ _maxXChild = child;
+ _maxXDirty = false;
+ _needNotifyDimensionsChange = true;
+ }
+ var mnX:Number = child.parentminX;
+ if (mnX < _minX)
+ {
+ _minX = mnX;
+ _minXChild = child;
+ _minXDirty = false;
+ _needNotifyDimensionsChange = true;
+ }
+ var mxY:Number = child.parentmaxY;
+ if (mxY > _maxY)
+ {
+ _maxY = mxY;
+ _maxYChild = child;
+ _maxYDirty = false;
+ _needNotifyDimensionsChange = true;
+ }
+ var mnY:Number = child.parentminY;
+ if (mnY < _minY)
+ {
+ _minY = mnY;
+ _minYChild = child;
+ _minYDirty = false;
+ _needNotifyDimensionsChange = true;
+ }
+ var mxZ:Number = child.parentmaxZ;
+ if (mxZ > _maxZ)
+ {
+ _maxZ = mxZ;
+ _maxZChild = child;
+ _maxZDirty = false;
+ _needNotifyDimensionsChange = true;
+ }
+ var mnZ:Number = child.parentminZ;
+ if (mnZ < _minZ)
+ {
+ _minZ = mnZ;
+ _minZChild = child;
+ _minZDirty = false;
+ _needNotifyDimensionsChange = true;
+ }
+ }
+
+ public function getChildByName(name:String):Object3D
+ {
+ for each (var child:Object3D in children)
+ if (child.name == name)
+ return child;
+
+ return null;
+ }
+
+ public function removeChildByName(name:String):void
+ {
+ removeChild(getChildByName(name));
+ }
+
+ public override function traverse(traverser:Traverser):void
+ {
+ if (traverser.match(this))
+ {
+ traverser.enter(this);
+ traverser.apply(this);
+ for each (var child:Object3D in children)
+ child.traverse(traverser);
+ traverser.leave(this);
+ }
+ }
+
+ public override function clone(object:* = null):*
+ {
+ var container:ObjectContainer3D = object || new ObjectContainer3D();
+ super.clone(container);
+
+ for each (var child:Object3D in children)
+ container.addChild(child.clone());
+
+ return container;
+ }
+
+ }
+}
Added: maven/trunk/ogoglio-viewer/away3d/containers/Scene3D.as
===================================================================
--- maven/trunk/ogoglio-viewer/away3d/containers/Scene3D.as (rev 0)
+++ maven/trunk/ogoglio-viewer/away3d/containers/Scene3D.as 2008-07-15 03:38:05 UTC (rev 798)
@@ -0,0 +1,67 @@
+package away3d.containers
+{
+ import away3d.core.math.*;
+ import away3d.core.base.*;
+ import away3d.core.traverse.*;
+ import away3d.core.utils.*;
+
+ import flash.utils.getTimer;
+
+ /** Scene that gets rendered */
+ public class Scene3D extends ObjectContainer3D
+ {
+ public var physics:IPhysicsScene;
+ public var tickTraverser:TickTraverser = new TickTraverser();
+
+ public function Scene3D(init:Object = null, ...objects)
+ {
+ if (init != null)
+ if (init is Object3D)
+ {
+ addChild(init as Object3D);
+ init = null;
+ }
+
+ var ini:Init = Init.parse(init);
+
+ var ph:Object = ini.getObject("physics");
+ if (ph is IPhysicsScene)
+ physics = ph as IPhysicsScene;
+ if (ph is Boolean)
+ if (ph == true)
+ physics = null; // new RobPhysicsEngine();
+ if (ph is Object)
+ physics = null; // new RobPhysicsEngine(ph); // ph - init object
+
+ for each (var object:Object3D in objects)
+ addChild(object);
+ }
+
+ public function updateTime(time:int = -1):void
+ {
+ //set current time
+ if (time == -1)
+ time = getTimer();
+
+ //traverser scene ticks
+ tickTraverser.now = time;
+ traverse(tickTraverser);
+
+
+ if (physics != null)
+ physics.updateTime(time);
+ }
+
+ public override function set parent(value:ObjectContainer3D):void
+ {
+ if (value != null)
+ throw new Error("Scene can't be parented");
+ }
+
+ public override function get sceneTransform():Matrix3D
+ {
+ return transform;
+ }
+
+ }
+}
Added: maven/trunk/ogoglio-viewer/away3d/containers/View3D.as
===================================================================
--- maven/trunk/ogoglio-viewer/away3d/containers/View3D.as (rev 0)
+++ maven/trunk/ogoglio-viewer/away3d/containers/View3D.as 2008-07-15 03:38:05 UTC (rev 798)
@@ -0,0 +1,330 @@
+package away3d.containers
+{
+ import away3d.cameras.*;
+ import away3d.core.*;
+ import away3d.core.base.*;
+ import away3d.core.render.*;
+ import away3d.core.stats.Stats;
+ import away3d.core.utils.*;
+ import away3d.events.*;
+ import away3d.materials.*;
+
+ import flash.display.Bitmap;
+ import flash.display.BitmapData;
+ import flash.display.BlendMode;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.EventPhase;
+ import flash.events.MouseEvent;
+
+ public class View3D extends Sprite
+ {
+ use namespace arcane;
+
+ internal var _session:AbstractRenderSession;
+ internal var _renderer:IRenderer;
+
+ /** Background under the rendered scene */
+ public var background:Sprite = new Sprite();
+ /** container for interactive materials over the scene */
+ public var interactiveLayer:Sprite = new Sprite();
+ /** Head up display over the scene */
+ public var hud:Sprite = new Sprite();
+
+ /** Enables/Disables stats panel */
+ public var stats:Boolean;
+ /** Determines whether stats panel is currently open */
+ public var statsOpen:Boolean;
+ /** Sprite instance for stats panel */
+ public var statsPanel:Stats;
+ /** string for storing source url */
+ public var sourceURL:String;
+
+ public var primitives:Array;
+
+ /** Fire mouse move events even in case mouse pointer doesn't move */
+ p...
[truncated message content] |