Astra SDK  v2.1.3
Point.hpp
1 // This file is part of the Orbbec Astra SDK [https://orbbec3d.com]
2 // Copyright (c) 2015-2017 Orbbec 3D
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16 // Be excellent to each other.
17 #ifndef ASTRA_POINT_HPP
18 #define ASTRA_POINT_HPP
19 
20 #include <astra_core/astra_core.hpp>
21 #include <astra/capi/astra_ctypes.h>
22 #include <astra/capi/streams/point_capi.h>
23 #include <astra/streams/Image.hpp>
24 
25 namespace astra {
26 
38  class PointStream : public DataStream
39  {
40  public:
41  PointStream()
42  {}
43 
50  : DataStream(connection)
51  {
52  pointStream_ = reinterpret_cast<astra_pointstream_t>(connection);
53  }
54 
55  static const astra_stream_type_t id = ASTRA_STREAM_POINT;
56 
57  private:
58  astra_pointstream_t pointStream_;
59  };
60 
66  class PointFrame : public ImageFrame<Vector3f, ASTRA_STREAM_POINT>
67  {
68  public:
75  : ImageFrame(frame, ASTRA_PIXEL_FORMAT_POINT)
76  {}
77  };
79 }
80 
81 #endif // ASTRA_POINT_HPP
Data Stream
Definition: DataStream.hpp:33
Basic Image Frame
Definition: Image.hpp:397
A Point Data Frame
Definition: Point.hpp:67
PointFrame(astra_imageframe_t frame)
default constructs
Definition: Point.hpp:74
A Point Data Stream
Definition: Point.hpp:39
PointStream(astra_streamconnection_t connection)
default constructs
Definition: Point.hpp:49
Definition: stream_types.h:37
Definition: astra_plugin.h:24