Changeset 357

Show
Ignore:
Timestamp:
11/04/02 16:19:40 (6 years ago)
Author:
sholloway
Message:

*** empty log message ***

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/RBRapier/RBRapier/Tools/Geometry/Analysis/TriangleMesh.py

    r356 r357  
    105105    def CalculateNormal(self, VertexList, KeepNormal=0): 
    106106        vectors = [Vector3(VertexList[v]) for v in self.v] 
    107         e01 = vectors[1] - vectors[0] 
    108         e02 = vectors[2] - vectors[0] 
    109         normal = e01.Cross3(e02).Normalize().asarray() 
     107        e01 = (vectors[1] - vectors[0]).Normalize() 
     108        e02 = (vectors[2] - vectors[0]).Normalize() 
     109        normal = e01.Cross3(e02)#.Normalize() 
     110        normal = normal.asarray() 
    110111        if KeepNormal: self.normal = normal 
    111112        return normal 
     
    186187    """ 
    187188 
     189    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     190    #~ Constants / Variables / Etc.  
     191    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     192 
     193    WarnOnOddities = 0 
     194 
     195    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     196    #~ Public Methods  
     197    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     198 
    188199    def __init__(self, FaceClass=EdgedFace, EdgeClass=Edge): 
    189200        FaceClassName = '%s&%s'%(self.__class__.__name__, FaceClass.__name__) 
  • trunk/RBRapier/demo/Lightwave/scene.py

    r356 r357  
    6060 
    6161        self.GeoObj = self.LigthwaveLWO('data/ki162a.lwo', 1, 0) 
     62        #self.GeoObj = self.LigthwaveLWO('data/fi110a.lwo', 1, 3) 
    6263 
     64        GL.glEnable(GL.GL_NORMALIZE) 
    6365        GL.glEnable(GL.GL_LIGHTING) 
    6466        GL.glEnable(GL.GL_LIGHT0)