de.mirell.m3d

class CScene

Object | +--de.mirell.m3d.CScene
Implemented Interfaces: IXMLSerializable

dynamic class CScene extends Object
Definition of a 3D scene with lights, styles, objects and used cameras
  • Author:
    Mirell Development
  • Version:
    1.0.0

Field Summary

public onFileLoaded: Function
public onRender: Function

Constructor

public CScene ( )

Method Summary

public addCamera ( Cam: CCamera ): CCamera
public addLight ( Light: CLight ): CLight
public addObject ( A3DObject: C3DObject ): C3DObject
public addStyle ( Style: CStyle ): CStyle
public fromXML ( value: XML ): Void
Unserializes XML into the object
public getActiveCamera ( ): CCamera
public getCameras ( ): Array
public getLights ( ): Array
public getObject ( index: Number ): C3DObject
public getObjectByName ( Value: String ): C3DObject
public getObjects ( ): Array
public loadFromFile ( Filename: String ): Void
Loads a scene from the specified filename.
public removeCamera ( Cam: CCamera ): Void
public removeLight ( Light: CLight ): Void
public removeObject ( A3DObject: C3DObject )
public removeStyle ( Style: CStyle ): Void
public setActiveCamera ( Cam: CCamera ): Void
public setViewport ( Movie: MovieClip ): Void
Sets the movie to render this scene on.
public setViewportPosition ( x: Number, y: Number ): Void
Sets the position of the movie the scene is renderen on.
public setViewportSize ( width: Number, height: Number )
Sets the boundries of the viewport.
public toXML ( ): XML
Serializes the object into XML

Field Documentation

onFileLoaded

public var onFileLoaded: Function

    onRender

    public var onRender: Function

      Constructor Documentation

      CScene

      public function CScene (
      )

        Method Documentation

        addCamera

        public function addCamera (
        Cam: CCamera): CCamera

          addLight

          public function addLight (
          Light: CLight): CLight

            addObject

            public function addObject (
            A3DObject: C3DObject): C3DObject

              addStyle

              public function addStyle (
              Style: CStyle): CStyle

                fromXML

                public function fromXML (
                value: XML): Void
                Unserializes XML into the object
                Object state is set according to XML.

                getActiveCamera

                public function getActiveCamera (
                ): CCamera

                  getCameras

                  public function getCameras (
                  ): Array

                    getLights

                    public function getLights (
                    ): Array

                      getObject

                      public function getObject (
                      index: Number): C3DObject

                        getObjectByName

                        public function getObjectByName (
                        Value: String): C3DObject

                          getObjects

                          public function getObjects (
                          ): Array

                            loadFromFile

                            public function loadFromFile (
                            Filename: String): Void
                            Loads a scene from the specified filename.
                            Loads a scene from a XML file containing a CScene object in serialized-XML form equal to the output of toXML
                            • Parameters:
                              Filename
                              A valid XML file containing serialized XML data

                            removeCamera

                            public function removeCamera (
                            Cam: CCamera): Void

                              removeLight

                              public function removeLight (
                              Light: CLight): Void

                                removeObject

                                public function removeObject (
                                A3DObject: C3DObject)

                                  removeStyle

                                  public function removeStyle (
                                  Style: CStyle): Void

                                    setActiveCamera

                                    public function setActiveCamera (
                                    Cam: CCamera): Void

                                      setViewport

                                      public function setViewport (
                                      Movie: MovieClip): Void
                                      Sets the movie to render this scene on.
                                      A Viewport is a MovieClip which is used to render the graphical output on.
                                      • Parameters:
                                        Movie
                                        The MovieClip this Scene will be drawn on

                                      setViewportPosition

                                      public function setViewportPosition (
                                      x: Number,
                                      y: Number): Void
                                      Sets the position of the movie the scene is renderen on.
                                      Moves the movie set using setViewport to the designated x and y coordinates. In order to have correct rendering, do not position the viewport movieclip using the _x and _x properties!
                                      • Parameters:
                                        x
                                        Horizontal position relative to parent movie of the viewport movie.
                                        y
                                        Vertical position relative to parent movie of the viewport movie.

                                      setViewportSize

                                      public function setViewportSize (
                                      width: Number,
                                      height: Number)
                                      Sets the boundries of the viewport.
                                      • Parameters:
                                        width
                                        New width of the viewport
                                        height
                                        New height of the viewport

                                      toXML

                                      public function toXML (
                                      ): XML
                                      Serializes the object into XML
                                      The current object state will be serialized. The fromXML method must be able to unserialize the XML.

                                      The documentation was generated from the following file:
                                      • CScene.as, Last Modified: 29.11.2004 01:39:38