Existing works on moving objects mainly focus on a single environment such as free space and road network, and do not investigate the complete trip for humans who can pass several environments, e.g., road network, pavement areas, indoor. In this paper, we consider multiple environments and study moving objects with different transportation modes, also called generic moving objects. We aim to answer a new class of queries supporting three kinds of conditions: temporal, spatial, and transportation modes. To efficiently provide the result, we propose an index structure called TM-RTree, which takes into account the feature of moving objects in different environments and has the capability of managing objects on not only temporal and spatial data but also transportation modes. This property is not maintained by existing indices for moving objects. Different cases on transportation modes are supported. Correspondingly, several algorithms are developed. The TM-RTree and related algorithms are developed in a real DBMS to have a practical and solid result for applications. In the experiment, we conduct the performance evaluation using extensive datasets and compare the proposed technique with the other two competitors, demonstrating the efficiency and significant superiority of our solution in various settings.