Changeset 73 for trunk

Show
Ignore:
Timestamp:
06/07/08 00:24:28 (3 months ago)
Author:
JoeCoder
Message:

Renamed node package to scene, since it contains the scenegraph.
Reverted back to using regular arrays instead of self-indexed associative for trees (like the scene graph) after performing some benchmarks.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/demo1/gameobj.d

    r71 r73  
    1616import yage.resource.resource; 
    1717import yage.resource.model; 
    18 import yage.node.all; 
     18import yage.scene.all; 
    1919 
    2020 
  • trunk/src/demo2/gameobj.d

    r71 r73  
    1616import yage.resource.resource; 
    1717import yage.resource.model; 
    18 import yage.node.all; 
     18import yage.scene.all; 
    1919 
    2020 
  • trunk/src/demo2/main.d

    r71 r73  
    2020import demo2.gameobj; 
    2121 
    22 // Current program entry point.  This may change in the future. 
    23 int main(){ 
     22// program entry point. 
     23int main() 
     24
     25    /* 
     26    Object[] array1; 
     27    Object[uint] array2; 
     28     
     29    Timer a = new Timer(); 
     30    for (int j=0; j<100; j++) 
     31    for (int i=0; i<1000; i++) 
     32        array1 ~= new Object(); 
     33    writefln("array create: " ~ a.toString()); 
     34 
     35     
     36    a.reset(); 
     37    for (int j=0; j<100; j++) 
     38    for (int i=0; i<1000; i++) 
     39    {};  
     40    writefln("array loop: " ~ a.toString()); 
     41     
     42    a.reset(); 
     43    for (int j=0; j<100; j++) 
     44    for (int i=0; i<1000; i++) 
     45    {   Object b = new Object; 
     46        array2[b.toHash()] = b;  
     47    } 
     48    writefln("aa create: " ~ a.toString()); 
     49    //array2.rehash; 
     50 
     51    Timer c = new Timer(); 
     52    for (int j=0; j<100; j++) 
     53    foreach (i; array2) 
     54    {} 
     55    writefln("aa loop: " ~ c.toString()); 
     56     
     57    return 0; 
     58    */ 
    2459     
    2560    // Init (resolution, depth, fullscreen, aa-samples) 
  • trunk/src/yage/all.d

    r36 r73  
    1313{   import yage.core.all; 
    1414    import yage.resource.all; 
    15     import yage.node.all; 
     15    import yage.scene.all; 
    1616    import yage.util.all; 
    1717    import yage.system.all; 
  • trunk/src/yage/core/array.d

    r68 r73  
    6969 
    7070 
    71 /// Return the maximum value of an array. 
    72 T amax(T)(T[] array
     71/// Return the element with the maximum value of an array. 
     72T amax(T)(T[] array,
    7373{   T m = array[0]; 
    7474    foreach (T a; array) 
    7575        if (a>m) 
    7676            m=a;     
     77    return m; 
     78} 
     79///  
     80T amax(T, K)(T[] array, K delegate(T elem) getKey) 
     81{   T m = array[0]; 
     82    K mk = getKey(array[0]); 
     83    foreach (T a; array) 
     84        if (getKey(a)>mk) 
     85            m=a;     
     86    return m; 
     87} 
     88T amax(T, K)(T[T] array, K delegate(T elem) getKey) 
     89{   T m; 
     90    K mk; 
     91    foreach (T a; array) 
     92    {   m = a; 
     93        mk = getKey(a); 
     94        break;       
     95    } 
     96    foreach (T a; array) 
     97    {   if (getKey(a)>mk) 
     98            m=a;     
     99    } 
    77100    return m; 
    78101} 
     
    169192 * --------------------------------  
    170193 */ 
    171 void radixSort(T)(inout T[] array
    172 {   radixSort(array, (T a) { return a; }); 
     194void radixSort(T)(inout T[] array, bool increasing=true
     195{   radixSort(array, increasing, (T a) { return a; }); 
    173196} 
    174197 
    175198/// ditto 
    176 void radixSort(T, K)(inout T[] array, K delegate(T elem) getKey, bool signed=true) 
     199void radixSort(T, K)(inout T[] array, bool increasing, K delegate(T elem) getKey, bool signed=true) 
    177200{   // Are we sorting floats? 
    178201    bool isfloat = false; 
     
    255278    // Move everything back again 
    256279    // Radix is not in place, if odd number of passes, move data back to return buffer 
    257     static if (K.sizeof % 2 == 1) 
    258         for (size_t i=0; i<count; i++) 
    259             array[i] = elem_copy[i].data; 
     280    if (increasing) 
     281    {   static if (K.sizeof % 2 == 1) 
     282            for (size_t i=0; i<count; i++) 
     283                array[i] = elem_copy[i].data; 
     284        else 
     285            for (size_t i=0; i<count; i++) 
     286                array[i] = elem[i].data; 
     287    } 
    260288    else 
    261         for (size_t i=0; i<count; i++) 
    262             array[i] = elem[i].data; 
     289    {   static if (K.sizeof % 2 == 1) 
     290            for (size_t i=0; i<count; i++) 
     291                array[count-i-1] = elem_copy[i].data; 
     292        else 
     293            for (size_t i=0; i<count; i++) 
     294                array[count-i-1] = elem[i].data; 
     295    } 
    263296 
    264297    // free memory 
     
    281314    test2.radixSort(); 
    282315    assert(test2 == [-4, -1, 0, 2, 3, 5, 7]); 
     316    test2.radixSort(false); 
     317    assert(test2 == [7, 5, 3, 2, 0, -1, -4]); 
    283318     
    284319    // Sort doubles 
  • trunk/src/yage/core/tree.d

    r72 r73  
    77 
    88import std.gc; 
     9import std.stdio; 
     10import yage.core.array; 
    911 
    1012/** 
     
    1921{    
    2022    T parent; 
    21     T[T] children; 
     23    T[] children; 
     24    int index=-1; 
    2225     
    2326    /// Ensure that child is removed from its parent. 
    24   ~this() 
    25   {   remove();        
    26   } 
     27//    ~this() 
     28//    {   remove();        
     29//    } 
    2730     
    2831    /** 
     
    4043     
    4144    /// Get an array of this element's children 
    42     T[T] getChildren() 
     45    T[] getChildren() 
    4346    {   return children; 
    4447    } 
     
    5356    in { assert(_parent !is null); 
    5457    }body 
    55     {   if (parent && cast(T)this in parent.children
    56             parent.children.remove(cast(T)this); 
     58    {   if (parent && parent.isChild(cast(T)this)
     59            yage.core.array.remove(parent.children, index); 
    5760         
    5861        // Add to new parent 
    5962        parent = _parent; 
    60         parent.children[cast(T)this] = cast(T)this; 
     63        parent.children ~= cast(T)this; 
     64        index = parent.children.length-1; 
    6165        return cast(T)this; 
    6266    } 
     
    6468    /// Is elem a child of this element? 
    6569    bool isChild(T elem) 
    66     {   return cast(bool)(elem in children); 
     70    {   if (elem.index < 0 || elem.index >= children.length) 
     71            return false; 
     72        return cast(bool)(children[elem.index] == elem); 
    6773    } 
    6874     
     
    7076    void remove() 
    7177    {   // this needs to happen because some children (like lights) may need to do more in their remove() function. 
    72         foreach(T c; children) 
     78        foreach_reverse(T c; children) 
    7379            c.remove(); 
    74         if (parent && cast(T)this in parent.children) 
    75             parent.children.remove(cast(T)this); 
     80         
     81        if (index > 0) 
     82        {   yage.core.all.remove(parent.children, index, false); 
     83            if (index < parent.children.length) 
     84                parent.children[index].index = index; 
     85            index = -1; // so remove can't be called twice. 
     86        } 
     87 
    7688    } 
    7789} 
  • trunk/src/yage/gui/surface.d

    r71 r73  
    3333 * Surfacs are positioned relative to their parent.  
    3434 * A style struct defines most of the styles associated with the Surface. */ 
    35 class Surface{ 
     35class Surface : Tree!(Surface) 
     36
    3637    static final Style defaultStyle; 
    3738    Style style; 
     
    4041    protected GPUTexture texture; 
    4142     
    42     Surface parent; 
    43     Surface[] children; 
     43    //Surface parent; 
     44    //Surface[] children; 
    4445    //Not sure if I should have a reference to Parent or not, but for now, I will. 
    4546     
     
    106107    void mouseleave(Surface next, byte buttons, Vec2i coordinates){ 
    107108        if(mouseIn == true){ 
    108             if(isSub(next)) 
     109            if(isChild(next)) 
    109110                return; 
    110111            else{ 
     
    477478            } 
    478479             
    479             //I am clueless about this, so it's commented 
    480             // Sort subs 
    481             //if (!subs.ordered(true, (Surface s){return s.style.zIndex;} )) 
    482             //  subs.radixSort((Surface s){return s.style.zIndex;} ); 
     480            // Using a zbuffer might make this unecessary.  tradeoffs? 
     481            if (!children.sorted(true, (Surface s){return s.style.zIndex;} )) 
     482                children.radixSort(true, (Surface s){return s.style.zIndex;} ); 
    483483             
    484             foreach(sub; children) 
    485                 sub.draw(); 
     484            if (children.length) 
     485            {   writefln("zIndices:"); 
     486                foreach(surf; children) 
     487                    writefln(surf.style.zIndex); 
     488                writefln("end"); 
     489            } 
     490             
     491            foreach(surf; children) 
     492                surf.draw(); 
    486493        } 
    487494    } 
     
    491498    } 
    492499     
    493     void raise(){ //Could be cleaner, whatever, I'll fix it later 
    494         if(parent is null){ 
    495             uint index = findIndex(this, Device.children); 
    496             for(; index < Device.children.length - 1; index++) 
    497                 Device.children[index] = Device.children[index+1]; 
    498             Device.children[$-1] = this; 
    499         } 
    500         else{ 
    501             uint index = findIndex(this, parent.children); 
    502             for(; index < parent.children.length - 1; index++) 
    503                 parent.children[index] = parent.children[index+1]; 
    504             parent.children[$-1] = this; 
    505         } 
    506         if(onFocus) onFocus(this); 
     500    void raise() 
     501    {   this.style.zIndex = amax(parent.children, (Surface s){return s.style.zIndex;}).style.zIndex + 1; 
     502        writefln(this.style.zIndex); 
    507503    } 
    508504     
     
    534530        Input.grabbed = grab; 
    535531    } 
    536          
    537     bool isSub(Surface surf){ 
    538         foreach(sub; children){ 
    539             if (sub == surf) return true; 
    540         } 
    541         return false; 
    542     } 
     532 
    543533} 
    544534 
    545535//Perhaps put into yage.system.input 
    546536//Could be better, a method perhaps... 
     537/* 
    547538Surface findSurface(int x, int y){ 
    548     foreach_reverse(sub; Device.children){ 
     539    foreach(sub; Device.children){ 
    549540        if(sub.position1.x <= x && x <= sub.position2.x && sub.position1.y <= y && y <= sub.position2.y){ 
    550541            return findSurface(sub, x, y); 
     
    553544    return null; 
    554545} 
     546*/ 
    555547//Could be better, a method perhaps... 
     548//TODO: Modify to search from highest to lowest z-index. 
     549/* 
    556550Surface findSurface(Surface surface,int x, int y){ 
    557     foreach_reverse(sub; surface.children){ 
     551    foreach(sub; surface.children){ 
    558552        if(sub.position1.x <= x && x <= sub.position2.x && sub.position1.y <= y && y <= sub.position2.y){ 
    559553            return findSurface(sub, x, y); 
     
    562556    return surface; 
    563557} 
    564  
     558*/ 
     559 
     560 
     561Surface findSurface(int x, int y, Surface self=null) 
     562{   // Get children as array. 
     563    Surface[] children_sorted; 
     564    if (self is null) 
     565        children_sorted = Device.children; 
     566    else     
     567        children_sorted = self.children; 
     568     
     569    // Sort 
     570    if (!children_sorted.sorted(false, (Surface s){return s.style.zIndex;} )) 
     571        children_sorted.radixSort(false, (Surface s){return s.style.zIndex;} ); 
     572     
     573    foreach(surf; children_sorted) 
     574        if(surf.position1.x <= x && x <= surf.position2.x && surf.position1.y <= y && y <= surf.position2.y) 
     575            return findSurface(x, y, surf);  
     576    return self; 
     577
     578 
     579/* 
    565580uint findIndex(Surface surface, Surface[] array){ //perhaps put into a template 
    566581    foreach(uint index, Surface current; array){ 
     
    569584    return 1 << 8;  //Implement this for not in subs 
    570585} 
     586*/ 
  • trunk/src/yage/resource/layer.d

    r68 r73  
    2121import yage.resource.resource; 
    2222import yage.resource.shader; 
    23 import yage.node.light; 
     23import yage.scene.light; 
    2424 
    2525// Used as default values for function params 
  • trunk/src/yage/resource/model.d

    r70 r73  
    2121import yage.resource.mesh; 
    2222import yage.resource.resource; 
    23 import yage.node.visible; 
     23import yage.scene.visible; 
    2424import yage.system.constant; 
    2525import yage.system.device; 
  • trunk/src/yage/scene/all.d

    r70 r73  
    1010 */ 
    1111 
    12 module yage.node.all; 
     12module yage.scene.all; 
    1313 
    1414public 
    15 {   import yage.node.movable; 
    16     import yage.node.camera; 
    17     import yage.node.graph; 
    18     import yage.node.light; 
    19     import yage.node.model; 
    20     import yage.node.visible; 
    21     import yage.node.node; 
    22     import yage.node.movable; 
    23     import yage.node.scene; 
    24     import yage.node.sprite; 
    25     import yage.node.sound; 
    26     import yage.node.terrain; 
     15{   import yage.scene.movable; 
     16    import yage.scene.camera; 
     17    import yage.scene.graph; 
     18    import yage.scene.light; 
     19    import yage.scene.model; 
     20    import yage.scene.visible; 
     21    import yage.scene.node; 
     22    import yage.scene.movable; 
     23    import yage.scene.scene; 
     24    import yage.scene.sprite; 
     25    import yage.scene.sound; 
     26    import yage.scene.terrain; 
    2727} 
  • trunk/src/yage/scene/camera.d

    r70 r73  
    55 */ 
    66 
    7 module yage.node.camera; 
     7module yage.scene.camera; 
    88 
    99import std.math; 
     
    1717import yage.core.vector; 
    1818import yage.resource.texture; 
    19 import yage.node.visible; 
    20 import yage.node.node; 
    21 import yage.node.scene; 
    22 import yage.node.movable; 
     19import yage.scene.visible; 
     20import yage.scene.node; 
     21import yage.scene.scene; 
     22import yage.scene.movable; 
    2323import yage.system.constant; 
    2424import yage.system.device; 
  • trunk/src/yage/scene/graph.d

    r71 r73  
    55 */ 
    66 
    7 module yage.node.graph; 
     7module yage.scene.graph; 
    88 
    99import std.stdio; 
     
    1515import yage.resource.mesh; 
    1616import yage.resource.model; 
    17 import yage.node.node; 
    18 import yage.node.visible; 
    19 import yage.node.scene; 
     17import yage.scene.node; 
     18import yage.scene.visible; 
     19import yage.scene.scene; 
    2020 
    2121/** 
  • trunk/src/yage/scene/light.d

    r70 r73  
    55 */ 
    66 
    7 module yage.node.light; 
     7module yage.scene.light; 
    88 
    99import std.math; 
     
    1313import yage.core.all; 
    1414import yage.resource.material; 
    15 import yage.node.node; 
    16 import yage.node.movable; 
    17 import yage.node.scene; 
     15import yage.scene.node; 
     16import yage.scene.movable; 
     17import yage.scene.scene; 
    1818import yage.system.device; 
    1919import yage.system.constant; 
    2020import yage.system.render; 
    21 import yage.node.camera: CameraNode; 
     21import yage.scene.camera: CameraNode; 
    2222 
    2323/** 
  • trunk/src/yage/scene/model.d

    r72 r73  
    55 */ 
    66 
    7 module yage.node.model; 
     7module yage.scene.model; 
    88 
    99import yage.core.vector; 
     
    1313import yage.resource.model; 
    1414import yage.resource.material; 
    15 import yage.node.visible; 
    16 import yage.node.node; 
     15import yage.scene.visible; 
     16import yage.scene.node; 
    1717 
    1818 
  • trunk/src/yage/scene/movable.d

    r70 r73  
    55 */ 
    66 
    7 module yage.node.movable; 
     7module yage.scene.movable; 
    88 
    99import std.stdio; 
     
    1111import yage.core.vector; 
    1212import yage.core.misc; 
    13 import yage.node.all; 
    14 import yage.node.scene; 
    15 import yage.node.light; 
    16 import yage.node.node; 
    17 import yage.node.movable; 
     13import yage.scene.all; 
     14import yage.scene.scene; 
     15import yage.scene.light; 
     16import yage.scene.node; 
     17import yage.scene.movable; 
    1818 
    1919 
     
    2121 * This class adds numerous methods for getting and setting position, rotation, velocity, and angular velocity. 
    2222 * See_Also: 
    23  * yage.node.visible 
    24  * yage.node.node */ 
     23 * yage.scene.visible 
     24 * yage.scene.node */ 
    2525class MovableNode : Node 
    2626{ 
  • trunk/src/yage/scene/node.d

    r72 r73  
    55 */ 
    66 
    7 module yage.node.node; 
     7module yage.scene.node; 
    88 
    99import std.stdio; 
     
    1212import yage.core.all; 
    1313import yage.core.tree; 
    14 import yage.node.visible; 
    15 import yage.node.scene; 
    16 import yage.node.movable; 
    17 import yage.node.all; 
    18 import yage.node.light; 
    19 import yage.node.node; 
     14import yage.scene.visible; 
     15import yage.scene.scene; 
     16import yage.scene.movable; 
     17import yage.scene.all; 
     18import yage.scene.light; 
     19import yage.scene.node; 
    2020 
    2121/** 
     
    107107            // Is there a better way to do this? 
    108108            switch (c.classinfo.name) 
    109             {   case "yage.node.camera.CameraNode": new CameraNode(this, cast(CameraNode)c); break; 
    110                 case "yage.node.graph.GraphNode": new GraphNode(this, cast(GraphNode)c); break; 
    111                 case "yage.node.light.LightNode": new LightNode(this, cast(LightNode)c); break; 
    112                 case "yage.node.model.ModelNode": new ModelNode(this, cast(ModelNode)c); break; 
    113                 case "yage.node.sound.SoundNode": new SoundNode(this, cast(SoundNode)c); break; 
    114                 case "yage.node.sprite.SpriteNode": new SpriteNode(this, cast(SpriteNode)c); break; 
    115                 case "yage.node.terrain.TerrainNode": new TerrainNode(this, cast(TerrainNode)c); break;                
     109            {   case "yage.scene.camera.CameraNode": new CameraNode(this, cast(CameraNode)c); break; 
     110                case "yage.scene.graph.GraphNode": new GraphNode(this, cast(GraphNode)c); break; 
     111                case "yage.scene.light.LightNode": new LightNode(this, cast(LightNode)c); break; 
     112                case "yage.scene.model.ModelNode": new ModelNode(this, cast(ModelNode)c); break; 
     113                case "yage.scene.sound.SoundNode": new SoundNode(this, cast(SoundNode)c); break; 
     114                case "yage.scene.sprite.SpriteNode": new SpriteNode(this, cast(SpriteNode)c); break; 
     115                case "yage.scene.terrain.TerrainNode": new TerrainNode(this, cast(TerrainNode)c); break;               
    116116                default: 
    117117            } 
     
    153153    } 
    154154 
    155     /// Get the type of this Node as a string; i.e. "yage.node.visible.ModelNode". 
     155    /// Get the type of this Node as a string; i.e. "yage.scene.visible.ModelNode". 
    156156    char[] getType() 
    157157    {   return this.classinfo.name; 
     
    237237            on_update(this); 
    238238 
    239         foreach(Node c; children) 
     239        // We iterate in reverse in case a child deletes itself. 
     240        // What about one child deleting another? 
     241        // I guess the preferred way to remove an object would be to set its lifetime to 0. 
     242        // Perhaps we should override remove to do this so that items are removed in a controlled way? 
     243        foreach_reverse(Node c; children) 
    240244            c.update(delta); 
    241245         
  • trunk/src/yage/scene/scene.d

    r70 r73  
    55 */ 
    66 
    7 module yage.node.scene; 
     7module yage.scene.scene; 
    88 
    99import derelict.opengl.gl; 
    1010import derelict.openal.al; 
    1111import yage.core.all; 
    12 import yage.node.visible; 
    13 import yage.node.light; 
    14 import yage.node.node; 
     12import yage.scene.visible; 
     13import yage.scene.light; 
     14import yage.scene.node; 
    1515 
    1616 
  • trunk/src/yage/scene/sound.d

    r70 r73  
    55 */ 
    66 
    7 module yage.node.sound; 
     7module yage.scene.sound; 
    88 
    99import std.math; 
     
    1414import yage.resource.resource; 
    1515import yage.resource.sound; 
    16 import yage.node.node; 
    17 import yage.node.movable; 
    18 import yage.node.scene; 
     16import yage.scene.node; 
     17import yage.scene.movable; 
     18import yage.scene.scene; 
    1919 
    2020 
  • trunk/src/yage/scene/sprite.d

    r71 r73  
    55 */ 
    66 
    7 module yage.node.sprite; 
     7module yage.scene.sprite; 
    88 
    99import yage.resource.resource; 
    1010import yage.resource.material; 
    11 import yage.node.node; 
    12 import yage.node.visible; 
     11import yage.scene.node; 
     12import yage.scene.visible; 
    1313 
    1414 
  • trunk/src/yage/scene/terrain.d

    r71 r73  
    55 */ 
    66 
    7 module yage.node.terrain; 
     7module yage.scene.terrain; 
    88 
    99import std.conv; 
     
    1818import yage.resource.mesh; 
    1919import yage.resource.image; 
    20 import yage.node.node; 
    21 import yage.node.visible; 
     20import yage.scene.node; 
     21import yage.scene.visible; 
    2222import yage.core.matrix; 
    2323import yage.core.vector; 
  • trunk/src/yage/scene/visible.d

    r72 r73  
    55 */ 
    66 
    7 module yage.node.visible; 
     7module yage.scene.visible; 
    88 
    99import std.math; 
     
    1515import derelict.sdl.sdl; 
    1616import yage.core.all; 
    17 import yage.node.all; 
    18 import yage.node.scene; 
    19 import yage.node.light; 
    20 import yage.node.node; 
    21 import yage.node.movable; 
     17import yage.scene.all; 
     18import yage.scene.scene; 
     19import yage.scene.light; 
     20import yage.scene.node; 
     21import yage.scene.movable; 
    2222import yage.system.constant; 
    2323import yage.system.device; 
     
    2828 * VisibleNode is the parent of all Nodes that are visible and can be rendered. 
    2929 * See_Also: 
    30  * yage.node.MovableNode 
    31  * yage.node.Node */ 
     30 * yage.scene.MovableNode 
     31 * yage.scene.Node */ 
    3232abstract class VisibleNode : MovableNode 
    3333{    
  • trunk/src/yage/system/device.d

    r71 r73  
    238238    /** 
    239239     * Get the number from the hardware specified by constant. 
    240      * Params: constant is a DEVICE constant defined in yage.device.constant.*/ 
     240     * Params: constant is a DEVICE constant defined in yage.device.constant, can be 
     241     * DEVICE_MAX_LIGHTS, DEVICE_MAX_TEXTURE_SIZE, or DEVICE_MAX_TEXTURES. */ 
    241242    static int getLimit(int constant) 
    242243    {   int result; 
  • trunk/src/yage/system/render.d

    r71 r73  
    1818import yage.resource.model; 
    1919import yage.resource.mesh; 
    20 import yage.node.all; 
    21 import yage.node.camera: CameraNode; 
     20import yage.scene.all; 
     21import yage.scene.camera: CameraNode; 
    2222 
    2323private struct Attribute2 
     
    8888 
    8989            switch(n.getType()) 
    90             {   case "yage.node.model.ModelNode": 
     90            {   case "yage.scene.model.ModelNode": 
    9191                    model((cast(ModelNode)n).getModel(), n); 
    9292                    break; 
    93                 case "yage.node.sprite.SpriteNode": 
     93                case "yage.scene.sprite.SpriteNode": 
    9494                    sprite((cast(SpriteNode)n).getMaterial(), n); 
    9595                    break; 
    96                 case "yage.node.graph.GraphNode": 
     96                case "yage.scene.graph.GraphNode": 
    9797                    model((cast(GraphNode)n).getModel(), n); 
    9898                    break; 
    99                 case "yage.node.terrain.TerrainNode": 
     99                case "yage.scene.terrain.TerrainNode": 
    100100                    model((cast(TerrainNode)n).getModel(), n); 
    101101                    break; 
    102                 case "yage.node.terrain.LightNode": 
     102                case "yage.scene.terrain.LightNode": 
    103103                    cube(n);    // todo: render as color of light? 
    104104                    break; 
  • trunk/src/yage/util/flyer.d

    r70 r73  
    88 
    99import yage.core.all; 
    10 import yage.node.node; 
    11 import yage.node.camera; 
    12 import yage.node.movable; 
     10import yage.scene.node; 
     11import yage.scene.camera; 
     12import yage.scene.movable; 
    1313import yage.system.input; 
    1414 
  • trunk/src/yage/util/misc.d

    r71 r73  
    1313import yage.resource.resource; 
    1414import yage.system.input; 
    15 import yage.node.all; 
     15import yage.scene.all; 
    1616import yage.core.all; 
    1717 
     
    2727                if (instance.getType() == "SoundNode") 
    2828                    a = new SoundNode(instance.getParent(), cast(SoundNode)instance); 
    29                 if (instance.getType() == "yage.node.model.ModelNode") 
     29                if (instance.getType() == "yage.scene.model.ModelNode") 
    3030                    a = new ModelNode(instance.getParent(), cast(ModelNode)instance); 
    3131                if (instance.getType() == "LightNode") 
  • trunk/src/yage/util/spring.d

    r71 r73  
    99import std.stdio; 
    1010import yage.core.all; 
    11 import yage.node.all; 
     11import yage.scene.all; 
    1212 
    1313