In June 2008, on a flight home from Europe to San Francisco, I was given a fascinating demo of some jaw-dropping technology.

I was sitting next Inon Beracha, CEO of Israeli company PrimeSense, which had developed a low-cost chip and software to do 3D machine vision.

The system used a pair of cameras and an infrared sensor to highlight people and track their movements.

On his laptop, Beracha showed me videos of people waving their hands in the air to control Wii-like games. He showed people controlling TV programming menus by gesturing their hands in the air. And, most impressive of all, someone flipping through a photo slide show like they were Tom Cruise in Minority Report. It was so slick, I asked him if it was CGI. It was real, he said, and so cheap, the technology could eventually be found everywhere in the home, office and car.

Of course, PrimeSense’s system is at the heart of Microsoft’s new Kinect game controller, which is getting rave reviews and looks set to be a monster hit. It’s a “crazy, magical, omigosh rush,” says the New York Times‘ David Pogue.

And it almost belonged to Apple.

On the plane, Beracha told me the technology had the potential to revolutionize all kinds of interfaces. Wii-like gaming was the most obvious example, but Beracha believed it would also replace remote controls completely and inspire all kinds of new automation systems for homes and workplaces.

The technology had been developed by a bunch of engineers in the Israeli military. They had recently hired him to shop it around Silicon Valley and find partners to commercialize it. It was hot. He had back-to-back meetings at all the big companies in the valley, and had already signed some leading names in gaming, tech and consumer electronics.

In fact, he’d already had several meetings at Apple. It was the first place he and his engineers thought of. “It was the most natural place for the technology,” he said.

Apple has a history of interface innovation, of course, and had recently introduced the iPhone with its paradigm-shifting multitouch UI. PrimeSense’s system went one step further: It was multitouch that you didn’t even have to touch. Apple seemed like a natural fit.

Yet the initial meetings hadn’t gone so well. Obsessed with secrecy, Apple had already asked Beracha to sign a stack of crippling legal agreements and NDAs.

He shook his head. Why didn’t he want to do a deal with Apple? No need. The technology was hot. He could sell it to anyone.

“Apple is a pain in the ass,” he said, smiling.