Apollo
10.0
自动驾驶开放平台
pointcloud.h
浏览该文件的文档.
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/common_msgs/sensor_msgs/pointcloud.pb.h"
22
#include "
modules/tools/visualizer/renderable_object.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
};
PointCloud
Definition
pointcloud.h:26
PointCloud::FillData
bool FillData(const std::shared_ptr< const apollo::drivers::PointCloud > &pData)
Definition
pointcloud.cc:47
PointCloud::~PointCloud
~PointCloud(void)
Definition
pointcloud.cc:27
PointCloud::GetPrimitiveType
virtual GLenum GetPrimitiveType(void) const
Definition
pointcloud.h:33
RenderableObject
Definition
renderable_object.h:25
RenderableObject::vertex_element_count
int vertex_element_count(void) const
Definition
renderable_object.h:45
RenderableObject::NullRenderableObj
static std::shared_ptr< QOpenGLShaderProgram > NullRenderableObj
Definition
renderable_object.h:27
renderable_object.h
modules
tools
visualizer
pointcloud.h