QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
MovingPoint.h
Go to the documentation of this file.
1/******************************************************************************
2 * Project: libspatialindex - A C++ library for spatial indexing
3 * Author: Marios Hadjieleftheriou, [email protected]
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
30namespace 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);
41 virtual ~MovingPoint();
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 virtual MovingPoint* clone();
55
56 //
57 // ISerializable interface
58 //
59 virtual uint32_t getByteArraySize();
60 virtual void loadFromByteArray(const byte* data);
61 virtual void storeToByteArray(byte** data, uint32_t& len);
62
63 //
64 // IEvolvingShape interface
65 //
66 virtual void getVMBR(Region& out) const;
67 virtual void getMBRAtTime(double t, Region& out) const;
68
69 virtual void makeInfinite(uint32_t dimension);
70 virtual void makeDimension(uint32_t dimension);
71
72 private:
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
Definition SpatialIndex.h:98
Definition MovingPoint.h:33
MovingPoint(const double *pCoords, const double *pVCoords, double tStart, double tEnd, uint32_t dimension)
virtual double getCoord(uint32_t index, double t) const
virtual void makeInfinite(uint32_t dimension)
virtual double getVCoord(uint32_t index) const
MovingPoint(const MovingPoint &p)
virtual void getMBRAtTime(double t, Region &out) const
virtual void getPointAtTime(double t, Point &out) const
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)
double * m_pVCoords
Definition MovingPoint.h:78
virtual void makeDimension(uint32_t dimension)
virtual bool operator==(const MovingPoint &p) const
virtual uint32_t getByteArraySize()
MovingPoint(const Point &p, const Point &vp, double tStart, double tEnd)
friend SIDX_DLL std::ostream & operator<<(std::ostream &os, const MovingPoint &pt)
virtual MovingPoint & operator=(const MovingPoint &p)
virtual void storeToByteArray(byte **data, uint32_t &len)
virtual void loadFromByteArray(const byte *data)
virtual MovingPoint * clone()
virtual double getProjectedCoord(uint32_t index, double t) const
void initialize(const double *pCoords, const double *pVCoords, double tStart, double tEnd, uint32_t dimension)
virtual void getVMBR(Region &out) const
Definition Point.h:35
Definition Region.h:33
Definition TimePoint.h:33
Definition Tools.h:201
Definition CustomStorage.h:34
SIDX_DLL std::ostream & operator<<(std::ostream &os, const LineSegment &pt)
#define SIDX_DLL
Definition sidx_export.h:41