19 if ( w >= 0 && w < static_cast<int>(
starships.size()) )
24 Vector direction( fin-cur );
25 float dirmag = direction.Magnitude();
28 direction = direction*(speed*SIMULATION_ATOM/dirmag);
37 if (end.MagnitudeSquared() > .000001) {
42 q =
q-r*( r.Dot(
q )/r.MagnitudeSquared() );
43 if (
q.MagnitudeSquared() < .000001) {
47 q =
q-r*( r.Dot(
q )/r.MagnitudeSquared() );
50 ScaledCrossProduct(
q, r, p );
79 if ( !orders.empty() ) {
80 UpdatePosition( pos, Position(), orders.front().vec, orders.front().speed*interpol );
81 dir = orders.front().vec;
88 for (
unsigned int i = 0;
i < meshdata.size();
i++) {
89 int scloak =
int( cloak*( (-1) > 1 ) );
90 if ( (scloak&0x1) == 0 )
92 meshdata[
i]->Draw( 1, camfinal, 1, cloak > .99 ? -1 : scloak );
104 for (
unsigned int i = 0;
i < meshdata.size();
i++)
112 cam.
SetPosition(
QVector( 0, 0, 0 ),
Vector( 0, 0, 0 ),
Vector( 0, 0, 0 ),
Vector( 0, 0, 0 ) );
127 if (which < (
int)
starships.size() && which >= 0)
132 if (which < (
int)
starships.size() && which >= 0)
137 if (which < (
int)
starships.size() && which >= 0)
142 if (which < (
int)
starships.size() && which >= 0)
147 if (which < (
int)
starships.size() && which >= 0)
153 Ship *tmp =
new Ship( fn, faction, pos );
168 if ( !orders.empty() ) {
170 if (
UpdatePosition( finpos, Position(), orders.front().vec, orders.front().speed ) ) {