triangle.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2014 Google Inc. 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 #include "tango-gl/triangle.h"
18 
19 namespace tango_gl {
20 
21 static const GLfloat const_vertices[]
22  = {-0.15f, 0.0f, 0.0f, 0.15f, 0.0f, 0.0f, 0.0f, 0.0f, -0.2f};
23 
24 static const GLushort const_indices[] = {0, 1, 2};
25 
27  SetShader();
28  std::vector<GLfloat> vertices(
30  const_vertices + sizeof(const_vertices) / sizeof(GLfloat));
31  std::vector<GLushort> indices(
32  const_indices, const_indices + sizeof(const_indices) / sizeof(GLushort));
34 }
35 } // namespace tango_gl
tango_gl::DrawableObject::SetVertices
void SetVertices(const std::vector< GLfloat > &vertices)
Definition: drawable_object.cpp:51
tango_gl::const_vertices
static const GLfloat const_vertices[]
Definition: cube.cpp:21
tango_gl::Triangle::Triangle
Triangle()
Definition: triangle.cpp:26
tango_gl::vertices
static const float vertices[]
Definition: quad.cpp:39
triangle.h
indices
indices
tango_gl::const_indices
static const GLushort const_indices[]
Definition: goal_marker.cpp:36
tango_gl::Mesh::SetShader
void SetShader()
Definition: mesh.cpp:28
tango_gl
Definition: axis.cpp:20


rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jul 25 2024 02:50:22