libspatialindex API Reference  (git-trunk)
MovingPoint.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Project: libspatialindex - A C++ library for spatial indexing
3  * Author: Marios Hadjieleftheriou, mhadji@gmail.com
4  ******************************************************************************
5  * Copyright (c) 2003, Marios Hadjieleftheriou
6  *
7  * All rights reserved.
8  *
9  * Permission is hereby granted, free of charge, to any person obtaining a
10  * copy of this software and associated documentation files (the "Software"),
11  * to deal in the Software without restriction, including without limitation
12  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13  * and/or sell copies of the Software, and to permit persons to whom the
14  * Software is furnished to do so, subject to the following conditions:
15  *
16  * The above copyright notice and this permission notice shall be included
17  * in all copies or substantial portions of the Software.
18  *
19  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25  * DEALINGS IN THE SOFTWARE.
26 ******************************************************************************/
27 
28 #pragma once
29 
30 namespace SpatialIndex
31 {
33  {
34  public:
36  MovingPoint(const double* pCoords, const double* pVCoords, const Tools::IInterval& ti, uint32_t dimension);
37  MovingPoint(const double* pCoords, const double* pVCoords, double tStart, double tEnd, uint32_t dimension);
38  MovingPoint(const Point& p, const Point& vp, const Tools::IInterval& ti);
39  MovingPoint(const Point& p, const Point& vp, double tStart, double tEnd);
40  MovingPoint(const MovingPoint& p);
41  ~MovingPoint() override;
42 
43  virtual MovingPoint& operator=(const MovingPoint& p);
44  virtual bool operator==(const MovingPoint& p) const;
45 
46  virtual double getCoord(uint32_t index, double t) const;
47  virtual double getProjectedCoord(uint32_t index, double t) const;
48  virtual double getVCoord(uint32_t index) const;
49  virtual void getPointAtTime(double t, Point& out) const;
50 
51  //
52  // IObject interface
53  //
54  MovingPoint* clone() override;
55 
56  //
57  // ISerializable interface
58  //
59  uint32_t getByteArraySize() override;
60  void loadFromByteArray(const uint8_t* data) override;
61  void storeToByteArray(uint8_t** data, uint32_t& len) override;
62 
63  //
64  // IEvolvingShape interface
65  //
66  void getVMBR(Region& out) const override;
67  void getMBRAtTime(double t, Region& out) const override;
68 
69  void makeInfinite(uint32_t dimension) override;
70  void makeDimension(uint32_t dimension) override;
71 
72  private:
73  void initialize(
74  const double* pCoords, const double* pVCoords,
75  double tStart, double tEnd, uint32_t dimension);
76 
77  public:
78  double* m_pVCoords;
79 
80  friend SIDX_DLL std::ostream& operator<<(std::ostream& os, const MovingPoint& pt);
81  }; // MovingPoint
82 
83  SIDX_DLL std::ostream& operator<<(std::ostream& os, const MovingPoint& pt);
84 }
85 
MovingPoint(const Point &p, const Point &vp, const Tools::IInterval &ti)
MovingPoint(const double *pCoords, const double *pVCoords, const Tools::IInterval &ti, uint32_t dimension)
friend SIDX_DLL std::ostream & operator<<(std::ostream &os, const MovingPoint &pt)
SIDX_DLL std::ostream & operator<<(std::ostream &os, const Ball &ball)
Definition: Ball.cc:215
#define SIDX_DLL
Definition: sidx_export.h:41