Vivian Meazza:
I attach the long-promised improved version of the USS Nimitz. It includes an improved version of the FLOLS, which requires the attached diff to be applied to AICarrier.cxx and AICArrier.hxx. I've made lots of eye-candy in the form or the flightdeck crew. Unfortunately, it about doubles the size of the tarball. I'll send it to you later; when I've figured out some way of only loading on request (any advice would be very welcome). I could provide a \u2018bare\u2019 version to cut down on the vertex count for less capable systems however, the count isn\u2019t huge in the first place. I've cut the textures down as far as I can without losing definition.
This commit is contained in:
parent
743379925e
commit
7cc58da6a9
2 changed files with 17 additions and 6 deletions
|
@ -102,15 +102,20 @@ void FGAICarrier::bind() {
|
||||||
props->tie("controls/flols/source-lights",
|
props->tie("controls/flols/source-lights",
|
||||||
SGRawValuePointer<int>(&source));
|
SGRawValuePointer<int>(&source));
|
||||||
props->tie("controls/flols/distance-m",
|
props->tie("controls/flols/distance-m",
|
||||||
SGRawValuePointer<double>(&dist));
|
SGRawValuePointer<double>(&dist));
|
||||||
|
props->tie("controls/flols/angle-degs",
|
||||||
|
SGRawValuePointer<double>(&angle));
|
||||||
props->setBoolValue("controls/flols/cut-lights", false);
|
props->setBoolValue("controls/flols/cut-lights", false);
|
||||||
props->setBoolValue("controls/flols/wave-off-lights", false);
|
props->setBoolValue("controls/flols/wave-off-lights", false);
|
||||||
props->setBoolValue("controls/flols/cond-datum-lights", true);
|
props->setBoolValue("controls/flols/cond-datum-lights", true);
|
||||||
|
props->setBoolValue("controls/crew", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FGAICarrier::unbind() {
|
void FGAICarrier::unbind() {
|
||||||
FGAIBase::unbind();
|
FGAIBase::unbind();
|
||||||
props->untie("controls/flols/source-lights");
|
props->untie("controls/flols/source-lights");
|
||||||
|
props->untie("controls/flols/distance-m");
|
||||||
|
props->untie("controls/flols/angle-degs");
|
||||||
}
|
}
|
||||||
|
|
||||||
void FGAICarrier::mark_nohot(ssgEntity* e) {
|
void FGAICarrier::mark_nohot(ssgEntity* e) {
|
||||||
|
@ -251,9 +256,9 @@ bool FGAICarrier::mark_cat(ssgEntity* e, const list<string>& cat_objects, bool m
|
||||||
if (ch) {
|
if (ch) {
|
||||||
SG_LOG(SG_GENERAL, SG_WARN,
|
SG_LOG(SG_GENERAL, SG_WARN,
|
||||||
"AICarrier: Carrier hardware gets marked twice!\n"
|
"AICarrier: Carrier hardware gets marked twice!\n"
|
||||||
" You have propably a whole branch marked as"
|
"You have probably a whole branch marked as"
|
||||||
" a catapult which also includes other carrier hardware."
|
"a catapult which also includes other carrier hardware."
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
SG_LOG(SG_GENERAL, SG_ALERT,
|
SG_LOG(SG_GENERAL, SG_ALERT,
|
||||||
"AICarrier: Found user data attached to a leaf node which "
|
"AICarrier: Found user data attached to a leaf node which "
|
||||||
|
@ -410,6 +415,10 @@ void FGAICarrier::UpdateFlols( double dt) {
|
||||||
//calculate the ditance from eye to flols
|
//calculate the ditance from eye to flols
|
||||||
|
|
||||||
dist = sgdDistanceVec3( flolsXYZ, eyeXYZ );
|
dist = sgdDistanceVec3( flolsXYZ, eyeXYZ );
|
||||||
|
|
||||||
|
//apply an index error
|
||||||
|
|
||||||
|
dist -= 100;
|
||||||
|
|
||||||
//cout << "distance " << dist << endl;
|
//cout << "distance " << dist << endl;
|
||||||
|
|
||||||
|
@ -419,7 +428,8 @@ void FGAICarrier::UpdateFlols( double dt) {
|
||||||
|
|
||||||
// calculate the angle from the flols to eye
|
// calculate the angle from the flols to eye
|
||||||
// above the horizontal
|
// above the horizontal
|
||||||
double angle;
|
// double angle;
|
||||||
|
|
||||||
if ( dist != 0 ) {
|
if ( dist != 0 ) {
|
||||||
angle = asin( y / dist );
|
angle = asin( y / dist );
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -115,8 +115,9 @@ private:
|
||||||
|
|
||||||
double flolsXYZ[3], eyeXYZ[3];
|
double flolsXYZ[3], eyeXYZ[3];
|
||||||
double lat, lon, alt;
|
double lat, lon, alt;
|
||||||
double dist;
|
double dist, angle;
|
||||||
int source;
|
int source;
|
||||||
|
|
||||||
Point3D eyepos;
|
Point3D eyepos;
|
||||||
Point3D flolspos;
|
Point3D flolspos;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue