Open3D (C++ API)
0.19.0
Toggle main menu visibility
Loading...
Searching...
No Matches
cpp
open3d
visualization
shader
SimpleBlackShader.h
Go to the documentation of this file.
1
// ----------------------------------------------------------------------------
2
// - Open3D: www.open3d.org -
3
// ----------------------------------------------------------------------------
4
// Copyright (c) 2018-2024 www.open3d.org
5
// SPDX-License-Identifier: MIT
6
// ----------------------------------------------------------------------------
7
8
#pragma once
9
10
#include <Eigen/Core>
11
#include <vector>
12
13
#include "
open3d/visualization/shader/ShaderWrapper.h
"
14
15
namespace
open3d
{
16
namespace
visualization
{
17
18
namespace
glsl
{
19
20
class
SimpleBlackShader
:
public
ShaderWrapper
{
21
public
:
22
~SimpleBlackShader
()
override
{
Release
(); }
23
24
protected
:
25
SimpleBlackShader
(
const
std::string &name) :
ShaderWrapper
(name) {
26
Compile
();
27
}
28
29
protected
:
30
bool
Compile
() final;
31
void
Release
() final;
32
bool
BindGeometry
(const
geometry
::
Geometry
&
geometry
,
33
const
RenderOption
&option,
34
const
ViewControl
&view) final;
35
bool
RenderGeometry
(const
geometry
::
Geometry
&
geometry
,
36
const
RenderOption
&option,
37
const
ViewControl
&view) final;
38
void
UnbindGeometry
() final;
39
40
protected:
41
virtual
bool
PrepareRendering
(const
geometry
::
Geometry
&
geometry
,
42
const
RenderOption
&option,
43
const
ViewControl
&view) = 0;
44
virtual
bool
PrepareBinding
(const
geometry
::
Geometry
&
geometry
,
45
const
RenderOption
&option,
46
const
ViewControl
&view,
47
std
::vector<
Eigen
::Vector3f> &points) = 0;
48
49
protected:
50
GLuint
vertex_position_
;
51
GLuint
vertex_position_buffer_
;
52
GLuint
MVP_
;
53
};
54
55
class
SimpleBlackShaderForPointCloudNormal
: public
SimpleBlackShader
{
56
public
:
57
SimpleBlackShaderForPointCloudNormal
()
58
:
SimpleBlackShader
(
"SimpleBlackShaderForPointCloudNormal"
) {}
59
60
protected
:
61
bool
PrepareRendering
(
const
geometry::Geometry
&
geometry
,
62
const
RenderOption
&option,
63
const
ViewControl
&view)
final
;
64
bool
PrepareBinding
(
const
geometry::Geometry
&
geometry
,
65
const
RenderOption
&option,
66
const
ViewControl
&view,
67
std::vector<Eigen::Vector3f> &points)
final
;
68
};
69
70
class
SimpleBlackShaderForTriangleMeshWireFrame
:
public
SimpleBlackShader
{
71
public
:
72
SimpleBlackShaderForTriangleMeshWireFrame
()
73
:
SimpleBlackShader
(
"SimpleBlackShaderForTriangleMeshWireFrame"
) {}
74
75
protected
:
76
bool
PrepareRendering(
const
geometry::Geometry
&
geometry
,
77
const
RenderOption
&option,
78
const
ViewControl
&view)
final
;
79
bool
PrepareBinding(
const
geometry::Geometry
&
geometry
,
80
const
RenderOption
&option,
81
const
ViewControl
&view,
82
std::vector<Eigen::Vector3f> &points)
final
;
83
};
84
85
}
// namespace glsl
86
87
}
// namespace visualization
88
}
// namespace open3d
ShaderWrapper.h
open3d::geometry::Geometry
The base geometry class.
Definition
Geometry.h:18
open3d::visualization::RenderOption
Defines rendering options for visualizer.
Definition
RenderOption.h:20
open3d::visualization::ViewControl
View controller for visualizer.
Definition
ViewControl.h:23
open3d::visualization::glsl::ShaderWrapper::ShaderWrapper
ShaderWrapper(const ShaderWrapper &)=delete
open3d::visualization::glsl::SimpleBlackShaderForPointCloudNormal::SimpleBlackShaderForPointCloudNormal
SimpleBlackShaderForPointCloudNormal()
Definition
SimpleBlackShader.h:57
open3d::visualization::glsl::SimpleBlackShaderForTriangleMeshWireFrame::SimpleBlackShaderForTriangleMeshWireFrame
SimpleBlackShaderForTriangleMeshWireFrame()
Definition
SimpleBlackShader.h:72
open3d::visualization::glsl::SimpleBlackShader::PrepareRendering
virtual bool PrepareRendering(const geometry::Geometry &geometry, const RenderOption &option, const ViewControl &view)=0
open3d::visualization::glsl::SimpleBlackShader::RenderGeometry
bool RenderGeometry(const geometry::Geometry &geometry, const RenderOption &option, const ViewControl &view) final
Definition
SimpleBlackShader.cpp:64
open3d::visualization::glsl::SimpleBlackShader::Release
void Release() final
Definition
SimpleBlackShader.cpp:31
open3d::visualization::glsl::SimpleBlackShader::PrepareBinding
virtual bool PrepareBinding(const geometry::Geometry &geometry, const RenderOption &option, const ViewControl &view, std::vector< Eigen::Vector3f > &points)=0
open3d::visualization::glsl::SimpleBlackShader::Compile
bool Compile() final
Definition
SimpleBlackShader.cpp:20
open3d::visualization::glsl::SimpleBlackShader::SimpleBlackShader
SimpleBlackShader(const std::string &name)
Definition
SimpleBlackShader.h:25
open3d::visualization::glsl::SimpleBlackShader::~SimpleBlackShader
~SimpleBlackShader() override
Definition
SimpleBlackShader.h:22
open3d::visualization::glsl::SimpleBlackShader::UnbindGeometry
void UnbindGeometry() final
Definition
SimpleBlackShader.cpp:81
open3d::visualization::glsl::SimpleBlackShader::vertex_position_
GLuint vertex_position_
Definition
SimpleBlackShader.h:50
open3d::visualization::glsl::SimpleBlackShader::vertex_position_buffer_
GLuint vertex_position_buffer_
Definition
SimpleBlackShader.h:51
open3d::visualization::glsl::SimpleBlackShader::MVP_
GLuint MVP_
Definition
SimpleBlackShader.h:52
open3d::visualization::glsl::SimpleBlackShader::BindGeometry
bool BindGeometry(const geometry::Geometry &geometry, const RenderOption &option, const ViewControl &view) final
Definition
SimpleBlackShader.cpp:36
Eigen
Definition
NonRigidOptimizer.cpp:22
open3d::geometry
Definition
BoundingVolume.cpp:19
open3d::visualization::glsl
Definition
GeometryRenderer.cpp:21
open3d::visualization
Definition
ModelIO.h:14
open3d
Definition
PinholeCameraIntrinsic.cpp:16
std
Definition
Device.h:111
Generated by
1.17.0