Changeset 374

Show
Ignore:
Timestamp:
11/15/02 10:54:58 (6 years ago)
Author:
sholloway
Message:

bugfixes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/RBRapier/RBRapier/Formats/Lightwave/Loader.py

    r368 r374  
    149149                    SubChunk.skip() 
    150150                    continue 
    151                 if name: setattr(self, name, value) 
     151                if name:  
     152                    setattr(self, name, value) 
     153                    print name, value 
    152154        except EOFError: 
    153155            pass # end of chunk 
  • trunk/RBRapier/RBRapier/Tools/Geometry/Analysis/TriangleStripifier.py

    r370 r374  
    356356    def _FindStartFaceIndex(self, FaceList): 
    357357        """Find a good face to start stripification with.""" 
    358         bestfaceindex, bestscore = None, None 
     358        bestfaceindex, bestscore = 0, None 
    359359        faceindex = -1 
    360360 
     
    376376        startstep = lenFaceList / 10 
    377377        startidx = self._FindStartFaceIndex(FaceList) 
    378         while 1
     378        while startidx is not None
    379379            for idx in _xwrap(startidx, lenFaceList): 
    380380                face = FaceList[idx] 
  • trunk/RBRapier/RBRapier/Tools/Geometry/Synthesis/VertexNormals.py

    r366 r374  
    4040    def IntegrateNormal(self, normal, cosToler=0.): 
    4141        for idx, value in self.Normals.iteritems(): 
    42             if normal.Dot(value) > cosToler: 
     42            if normal.Dot(value) < cosToler: 
    4343                # Found one within tolerance... average them 
    4444                self.Normals[idx] = normal + value 
  • trunk/RBRapier/demo/Lightwave/scene.py

    r372 r374  
    7474        self.Lights = [] 
    7575        self.Lights.append(Lighting.SpotLight(0, SpotCutoff=10., SpotExponent=16.)) 
     76        self.Lights[0].Active = 1 
    7677        self.Lights[0].Position = (0., .4, 0., 1.) 
    7778        self.Lights[0].SpotDirection = (0., -1., 0., 0.) 
    7879        self.Lights.append(Lighting.Light(1)) 
     80        self.Lights[1].Active = 1 
    7981        self.Lights[1].Specular = 1., 0., 0. 
    80         self.Lights[1].Diffuse = .8, .6, .6 
     82        self.Lights[1].Diffuse = .6, .6, .6 
    8183        self.Lights.append(Lighting.Light(2)) 
     84        self.Lights[2].Active = 1 
    8285        self.Lights[2].Specular = 0., 0., 1. 
    83         self.Lights[2].Diffuse = .6, .6, .8 
     86        self.Lights[2].Diffuse = .6, .6, .6 
    8487 
    8588        #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     
    123126        self.Sequence.AddElement(self.Grid) 
    124127 
    125         self.GeoObj = self.LigthwaveLWO('data/ki162a.lwo', 1, 3) 
     128        self.GeoObj = self.LigthwaveLWO('data/dodecahedron.lwo', 1, 3) 
     129        #self.GeoObj = self.LigthwaveLWO('data/ki162a.lwo', 1, 3) 
    126130        #self.GeoObj = self.LigthwaveLWO('data/fi110a.lwo', 1, 3) 
    127131        #self.GeoObj = self.LigthwaveLWO('data/ga102a.lwo', 1, 0)