Changeset 374
- Timestamp:
- 11/15/02 10:54:58 (6 years ago)
- Files:
-
- trunk/RBRapier/RBRapier/Formats/Lightwave/Loader.py (modified) (1 diff)
- trunk/RBRapier/RBRapier/Tools/Geometry/Analysis/TriangleStripifier.py (modified) (2 diffs)
- trunk/RBRapier/RBRapier/Tools/Geometry/Synthesis/VertexNormals.py (modified) (1 diff)
- trunk/RBRapier/demo/Lightwave/scene.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/RBRapier/RBRapier/Formats/Lightwave/Loader.py
r368 r374 149 149 SubChunk.skip() 150 150 continue 151 if name: setattr(self, name, value) 151 if name: 152 setattr(self, name, value) 153 print name, value 152 154 except EOFError: 153 155 pass # end of chunk trunk/RBRapier/RBRapier/Tools/Geometry/Analysis/TriangleStripifier.py
r370 r374 356 356 def _FindStartFaceIndex(self, FaceList): 357 357 """Find a good face to start stripification with.""" 358 bestfaceindex, bestscore = None, None358 bestfaceindex, bestscore = 0, None 359 359 faceindex = -1 360 360 … … 376 376 startstep = lenFaceList / 10 377 377 startidx = self._FindStartFaceIndex(FaceList) 378 while 1:378 while startidx is not None: 379 379 for idx in _xwrap(startidx, lenFaceList): 380 380 face = FaceList[idx] trunk/RBRapier/RBRapier/Tools/Geometry/Synthesis/VertexNormals.py
r366 r374 40 40 def IntegrateNormal(self, normal, cosToler=0.): 41 41 for idx, value in self.Normals.iteritems(): 42 if normal.Dot(value) >cosToler:42 if normal.Dot(value) < cosToler: 43 43 # Found one within tolerance... average them 44 44 self.Normals[idx] = normal + value trunk/RBRapier/demo/Lightwave/scene.py
r372 r374 74 74 self.Lights = [] 75 75 self.Lights.append(Lighting.SpotLight(0, SpotCutoff=10., SpotExponent=16.)) 76 self.Lights[0].Active = 1 76 77 self.Lights[0].Position = (0., .4, 0., 1.) 77 78 self.Lights[0].SpotDirection = (0., -1., 0., 0.) 78 79 self.Lights.append(Lighting.Light(1)) 80 self.Lights[1].Active = 1 79 81 self.Lights[1].Specular = 1., 0., 0. 80 self.Lights[1].Diffuse = . 8, .6, .682 self.Lights[1].Diffuse = .6, .6, .6 81 83 self.Lights.append(Lighting.Light(2)) 84 self.Lights[2].Active = 1 82 85 self.Lights[2].Specular = 0., 0., 1. 83 self.Lights[2].Diffuse = .6, .6, . 886 self.Lights[2].Diffuse = .6, .6, .6 84 87 85 88 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 123 126 self.Sequence.AddElement(self.Grid) 124 127 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) 126 130 #self.GeoObj = self.LigthwaveLWO('data/fi110a.lwo', 1, 3) 127 131 #self.GeoObj = self.LigthwaveLWO('data/ga102a.lwo', 1, 0)
