unfortunately, if it's there in graphic form, the deciding factor may be the stores selling the book. advertised as a 'gay space opera,' i'm pretty sure wal*mart isn't going to carry it. okay, i'm damn skippy they won't.
in those examples you provided, i think it depends on the detail of the laison more than if it happened and was gone in the same paragraph. and i venture to say that lesbian acts are by far more acceptable than male/male acts, eh? there's also a difference between your side characters being caught in the airlock together as opposed to the main character hiding his or her homosexuality. i think you could get away the heroine being gay as long as there's a strong male hero, and her actions don't go into terrific detail and people would be cool with it, especially if you threw in a sexual tension even between them. on the flip side, a strong gay male protagonist, even glossing over sex with another male, i think you're going to have a hard time getting it the same shelves as piers anthony if the store knows about the content.
when i write, if sex comes up, it's dealt with in the way i think it's appropriate. i certainly don't shy away from it. gimme a hundred people in a real-life work scenario and i'll show you people having sex with one another, heh heh. so, from that standpoint, which tries to come from a practical skew, sex, to me, is as much of a natural premise as religion. of course, neither should just be thrown in there with reckless abandon without purpose. i think that's whay you were asking for in the last sentence, no? if not, i'm not sure if sex is ever the entire premise of many, if any, SF/F books, is it? i mean, it's not exactly very noble for the ragtag band of misfit warriors going off to kill the bad guy just so they can score with chicks afterwards, is it? lol.
i think it was always understood back in the day that the hero was going to get some *after* they sped away from the dying planet, beautiful mad scientist's daughter in tow. then you had captain kirk put on his boots after rolling out of bed, not to mention the controversial first inter-racial kiss ever on t.v.. and it's funny you gave examples that were all science fiction, which has seemed to advance far beyond fantasy's standards (advance or degrade, however you want to look at it, but i ask you, which genre is 'worth' more to an investor, SF or F?). is it safe to say there's more sex and sexuality in SF? is that something an editor might look for, and if it's too strong of a scene, is that something he'd want edited out?