~ubuntu-branches/ubuntu/natty/stormbaancoureur/natty

« back to all changes in this revision

Viewing changes to src-stormbaancoureur/doorstand.h

  • Committer: Bazaar Package Importer
  • Author(s): Barry deFreese, Barry deFreese, Jon Dowland, Paul Wise
  • Date: 2008-01-03 10:47:41 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080103104741-kbt7suy6ciaapgyf
Tags: 2.1.1-1
[ Barry deFreese ]
* New upstream release. (Closes: #461149).
  + Upstream has replaced potentially non-free engine.tga file.
  + Update patches for new upstream.
* Add myself to uploaders.
* Remove deprecated Encoding tag from desktop file.
* Remove XS- prefix from VCS fields.
* Remove Homepage field from package descriptions.
* Version debhelper build-depends for dh_icons (>= 5.0.51).
* Bump Standards Version to 3.7.3 (No changes needed).
* Add call to dh_desktop in rules.

[ Jon Dowland ]
* add Homepage: to source stanza.

[ Paul Wise ]
* Call dh_icons to update icon caches.
* Improve the description for the data package.
* Clean up the watch file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
      // Take care of bodies
34
34
      chassis_body = dBodyCreate(world);
35
35
      dBodySetAutoDisableFlag(chassis_body, false);
36
 
      dBodySetPosition (chassis_body,initialpos[0],initialpos[1],initialpos[2]);
37
 
 
 
36
      dBodySetPosition (chassis_body,initialpos[0],initialpos[1],initialpos[2]+0.3);
38
37
 
39
38
      dReal sizes[4][3] = { {0.1, 0.1, 1.0}, {0.1, 0.1, 1.0}, {1.0, 0.1, 0.1}, {1.0, 0.1, 0.1} };
40
 
      dReal xlats[4][3] = { {0,-0.65,0.50}, {0,0.65,0.50}, {0,-0.65,0.05}, {0,0.65,0.05} };
 
39
      dReal xlats[4][3] = { {0,-0.75,0.20}, {0,0.75,0.20}, {0,-0.75,-0.25}, {0,0.75,-0.25} };
41
40
 
42
41
      // Take care of geoms
43
42
      dMass m_total;
45
44
      int i;
46
45
      for (i=0; i<4; i++)
47
46
      {
 
47
        box_geom[i] = dCreateBox(0, sizes[i][0], sizes[i][1], sizes[i][2]);
 
48
        dGeomSetData(box_geom[i], this);
 
49
        dGeomSetBody(box_geom[i], chassis_body);
 
50
        dGeomSetOffsetPosition(box_geom[i], xlats[i][0], xlats[i][1], xlats[i][2]);
 
51
        // do mass
48
52
        dMass m;
49
53
        dMassSetZero(&m_total);
50
 
        box_geom[i] = dCreateBox(0, sizes[i][0], sizes[i][1], sizes[i][2]);
51
 
        // do mass
52
54
        dMassSetBox(&m, 28, sizes[i][0], sizes[i][1], sizes[i][2]);
53
55
        dMassTranslate(&m, xlats[i][0], xlats[i][1], xlats[i][2]);
54
56
        dMassAdd (&m_total, &m);
55
 
        dGeomSetData (box_geom[i], this);
56
 
        trf_geom[i] = dCreateGeomTransform(0);
57
 
        dGeomSetData (trf_geom[i], this);
58
 
        dGeomSetBody (trf_geom[i], chassis_body);
59
 
        dGeomTransformSetInfo(trf_geom[i], 1);
60
 
        dGeomTransformSetGeom(trf_geom[i], box_geom[i]);
61
 
        dGeomSetPosition(trf_geom[i], initialpos[0],initialpos[1],initialpos[2]);
62
 
        dGeomSetPosition(box_geom[i], xlats[i][0], xlats[i][1], xlats[i][2]);
63
57
      }
64
 
      
 
58
 
65
59
      dReal *o = m_total.c;
66
60
      dMassTranslate(&m_total, -o[0], -o[1], -o[2]);
67
 
      dBodySetMass (chassis_body, &m_total);
 
61
      dMassAdjust(&m_total, 3.0);
 
62
      dBodySetMass(chassis_body, &m_total);
68
63
 
69
64
      // Do the door
70
 
      dReal sz[3] = { 0.1, 1.2, 1.6 };
 
65
      dReal sz[3] = { 0.1, 1.4, 1.6 };
71
66
      dReal ps[3] = { initialpos[0], initialpos[1], initialpos[2]+0.85 };
72
67
      door_body = dBodyCreate(world);
73
68
      dBodySetAutoDisableFlag(door_body, false);
94
89
      space = dSimpleSpaceCreate(bigspace);
95
90
      dSpaceSetCleanup(space,0);
96
91
      for (i=0; i<4; i++)
97
 
        dSpaceAdd (space, trf_geom[i]);
 
92
        dSpaceAdd (space, box_geom[i]);
98
93
      dSpaceAdd(space, door_geom);
99
94
    }
100
95
 
125
120
    // For the stand
126
121
    ssgTransform *chassis_trf;
127
122
    dBodyID  chassis_body;
128
 
    dGeomID  trf_geom[4];
129
123
    dGeomID  box_geom[4];
130
124
 
131
125
    // For the door