NTRT Simulator
Version: Master
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Friends
Pages
tgStairs.h
Go to the documentation of this file.
1
/*
2
* Copyright © 2014, United States Government, as represented by the
3
* Administrator of the National Aeronautics and Space Administration.
4
* All rights reserved.
5
*
6
* The NASA Tensegrity Robotics Toolkit (NTRT) v1 platform is licensed
7
* under the Apache License, Version 2.0 (the "License");
8
* you may not use this file except in compliance with the License.
9
* You may obtain a copy of the License at
10
* http://www.apache.org/licenses/LICENSE-2.0.
11
*
12
* Unless required by applicable law or agreed to in writing,
13
* software distributed under the License is distributed on an
14
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
15
* either express or implied. See the License for the specific language
16
* governing permissions and limitations under the License.
17
*/
18
19
#ifndef TG_STAIRS
20
#define TG_STAIRS
21
31
// This library
32
#include "
core/tgModel.h
"
33
// The Bullet Physics Library
34
#include "LinearMath/btVector3.h"
35
// The C++ Standard Library
36
#include <vector>
37
38
// Forward declarations
39
class
tgModelVisitor
;
40
class
tgStructure
;
41
class
tgWorld
;
42
47
class
tgStairs
:
public
tgModel
48
{
49
public
:
50
51
struct
Config
52
{
53
public
:
54
Config
(btVector3 origin = btVector3(0.0, 0.0, 0.0),
55
btScalar friction = 0.5,
56
btScalar restitution = 0.0,
57
size_t
nStairs = 10,
58
double
stairWidth = 20.0,
59
double
stepWidth = 5.0,
60
double
stepHeight = 1.0,
61
double
angle = 0.0);
62
64
btVector3
m_origin
;
65
67
btScalar
m_friction
;
68
70
btScalar
m_restitution
;
71
73
size_t
m_nBlocks
;
74
76
double
m_length
;
77
79
double
m_width
;
80
82
double
m_height
;
83
85
double
m_angle
;
86
};
87
91
tgStairs
();
92
97
tgStairs
(
tgStairs::Config
& config);
98
103
virtual
~tgStairs
();
104
109
virtual
void
setup
(
tgWorld
& world);
110
115
virtual
void
step
(
double
dt);
116
124
virtual
void
onVisit
(
tgModelVisitor
& r);
125
130
void
teardown
();
131
132
private
:
133
140
void
addNodes(
tgStructure
& s);
141
142
tgStairs::Config
m_config;
143
144
};
145
146
#endif // TETRA_COLLISIONS_WALL
tgStairs
Definition:
tgStairs.h:47
tgStairs::Config::m_restitution
btScalar m_restitution
Definition:
tgStairs.h:70
tgStairs::tgStairs
tgStairs()
Definition:
tgStairs.cpp:66
tgStairs::~tgStairs
virtual ~tgStairs()
Definition:
tgStairs.cpp:78
tgStairs::Config::m_width
double m_width
Definition:
tgStairs.h:79
tgStairs::Config::m_origin
btVector3 m_origin
Definition:
tgStairs.h:64
tgStairs::teardown
void teardown()
Definition:
tgStairs.cpp:116
tgStairs::Config::m_angle
double m_angle
Definition:
tgStairs.h:85
tgModel
Definition:
tgModel.h:49
tgModel.h
Contains the definition of class tgModel.
tgStairs::onVisit
virtual void onVisit(tgModelVisitor &r)
Definition:
tgStairs.cpp:112
tgModelVisitor
Definition:
tgModelVisitor.h:38
tgStairs::Config::m_nBlocks
size_t m_nBlocks
Definition:
tgStairs.h:73
tgStairs::Config::m_length
double m_length
Definition:
tgStairs.h:76
tgStairs::Config::m_height
double m_height
Definition:
tgStairs.h:82
tgStairs::Config::m_friction
btScalar m_friction
Definition:
tgStairs.h:67
tgStairs::step
virtual void step(double dt)
Definition:
tgStairs.cpp:102
tgStairs::Config
Definition:
tgStairs.h:51
tgWorld
Definition:
tgWorld.h:37
tgStructure
Definition:
tgStructure.h:54
tgStairs::setup
virtual void setup(tgWorld &world)
Definition:
tgStairs.cpp:80
models
obstacles
tgStairs.h
Generated on Wed Dec 19 2018 16:44:29 for NTRT Simulator by
1.8.6