Subversion Repositories gelsvn

Rev

Rev 305 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 305 Rev 315
Line 37... Line 37...
37
    Vec3f p0, p7;
37
    Vec3f p0, p7;
38
    m.get_bbox(p0, p7);
38
    m.get_bbox(p0, p7);
39
    Vec3f d = p7-p0;
39
    Vec3f d = p7-p0;
40
    float s = 1.0/d.max_coord();
40
    float s = 1.0/d.max_coord();
41
    cout << p0 << p7 << d << s << endl;
41
    cout << p0 << p7 << d << s << endl;
42
    
42
    Vec3f pcentre = (p7+p0)/2.0;
43
    for(VertexIter vi = m.vertices_begin(); vi != m.vertices_end(); ++vi)
43
    for(VertexIter vi = m.vertices_begin(); vi != m.vertices_end(); ++vi)
44
    {
44
    {
45
				vi->pos = (vi->pos - p0) * s;
45
				vi->pos = (vi->pos - pcentre) * s;
46
    }
46
    }
47
 
47
 
48
    m.get_bbox(p0, p7);
48
    m.get_bbox(p0, p7);
49
    cout << p0 << p7 << endl;
49
    cout << p0 << p7 << endl;
50
 
50