Apollo  6.0
Open source self driving car software
pointcloud.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright 2018 The Apollo Authors. All Rights Reserved.
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 
17 #pragma once
18 
19 #include <memory>
20 
21 #include "modules/drivers/proto/pointcloud.pb.h"
23 
24 class QOpenGLShaderProgram;
25 
26 class PointCloud : public RenderableObject {
27  public:
28  explicit PointCloud(int pointCount = 1, int vertex_element_count = 3,
29  const std::shared_ptr<QOpenGLShaderProgram>&
30  shaderProgram = NullRenderableObj);
31  ~PointCloud(void);
32 
33  virtual GLenum GetPrimitiveType(void) const { return GL_POINTS; }
34 
35  bool FillData(
36  const std::shared_ptr<const apollo::drivers::PointCloud>& pData);
37 
38  private:
39  virtual bool FillVertexBuffer(GLfloat* vertexBuffer);
40 
41  GLfloat* buffer_;
42 };
static std::shared_ptr< QOpenGLShaderProgram > NullRenderableObj
Definition: renderable_object.h:27
virtual GLenum GetPrimitiveType(void) const
Definition: pointcloud.h:33
Definition: pointcloud.h:26
bool FillData(const std::shared_ptr< const apollo::drivers::PointCloud > &pData)
Definition: renderable_object.h:25
PointCloud(int pointCount=1, int vertex_element_count=3, const std::shared_ptr< QOpenGLShaderProgram > &shaderProgram=NullRenderableObj)
~PointCloud(void)
int vertex_element_count(void) const
Definition: renderable_object.h:45