@@ -76,6 +76,13 @@ namespace sdf
76
76
// / \sa uint64_t VisualCount() const
77
77
public: const Visual *VisualByIndex (const uint64_t _index) const ;
78
78
79
+ // / \brief Get a mutable visual based on an index.
80
+ // / \param[in] _index Index of the visual. The index should be in the
81
+ // / range [0..VisualCount()).
82
+ // / \return Pointer to the visual. Nullptr if the index does not exist.
83
+ // / \sa uint64_t VisualCount() const
84
+ public: Visual *VisualByIndex (uint64_t _index);
85
+
79
86
// / \brief Get whether a visual name exists.
80
87
// / \param[in] _name Name of the visual to check.
81
88
// / \return True if there exists a visual with the given name.
@@ -86,6 +93,11 @@ namespace sdf
86
93
// / \return Pointer to the visual. Nullptr if the name does not exist.
87
94
public: const Visual *VisualByName (const std::string &_name) const ;
88
95
96
+ // / \brief Get a mutable visual based on a name.
97
+ // / \param[in] _name Name of the visual.
98
+ // / \return Pointer to the visual. Nullptr if the name does not exist.
99
+ public: Visual *VisualByName (const std::string &_name);
100
+
89
101
// / \brief Get the number of collisions.
90
102
// / \return Number of collisions contained in this Link object.
91
103
public: uint64_t CollisionCount () const ;
@@ -97,6 +109,13 @@ namespace sdf
97
109
// / \sa uint64_t CollisionCount() const
98
110
public: const Collision *CollisionByIndex (const uint64_t _index) const ;
99
111
112
+ // / \brief Get a mutable collision based on an index.
113
+ // / \param[in] _index Index of the collision. The index should be in the
114
+ // / range [0..CollisionCount()).
115
+ // / \return Pointer to the collision. Nullptr if the index does not exist.
116
+ // / \sa uint64_t CollisionCount() const
117
+ public: Collision *CollisionByIndex (uint64_t _index);
118
+
100
119
// / \brief Get whether a collision name exists.
101
120
// / \param[in] _name Name of the collision to check.
102
121
// / \return True if there exists a collision with the given name.
@@ -107,6 +126,11 @@ namespace sdf
107
126
// / \return Pointer to the collision. Nullptr if the name does not exist.
108
127
public: const Collision *CollisionByName (const std::string &_name) const ;
109
128
129
+ // / \brief Get a mutable collision based on a name.
130
+ // / \param[in] _name Name of the collision.
131
+ // / \return Pointer to the collision. Nullptr if the name does not exist.
132
+ public: Collision *CollisionByName (const std::string &_name);
133
+
110
134
// / \brief Get the number of lights.
111
135
// / \return Number of lights contained in this Link object.
112
136
public: uint64_t LightCount () const ;
@@ -118,6 +142,13 @@ namespace sdf
118
142
// / \sa uint64_t LightCount() const
119
143
public: const Light *LightByIndex (const uint64_t _index) const ;
120
144
145
+ // / \brief Get a mutable light based on an index.
146
+ // / \param[in] _index Index of the light. The index should be in the
147
+ // / range [0..LightCount()).
148
+ // / \return Pointer to the light. Nullptr if the index does not exist.
149
+ // / \sa uint64_t LightCount() const
150
+ public: Light *LightByIndex (uint64_t _index);
151
+
121
152
// / \brief Get whether a light name exists.
122
153
// / \param[in] _name Name of the light to check.
123
154
// / \return True if there exists a light with the given name.
@@ -128,6 +159,11 @@ namespace sdf
128
159
// / \return Pointer to the light. Nullptr if the name does not exist.
129
160
public: const Light *LightByName (const std::string &_name) const ;
130
161
162
+ // / \brief Get a mutable light based on a name.
163
+ // / \param[in] _name Name of the light.
164
+ // / \return Pointer to the light. Nullptr if the name does not exist.
165
+ public: Light *LightByName (const std::string &_name);
166
+
131
167
// / \brief Get the number of sensors.
132
168
// / \return Number of sensors contained in this Link object.
133
169
public: uint64_t SensorCount () const ;
@@ -139,6 +175,13 @@ namespace sdf
139
175
// / \sa uint64_t SensorCount() const
140
176
public: const Sensor *SensorByIndex (const uint64_t _index) const ;
141
177
178
+ // / \brief Get a mutable sensor based on an index.
179
+ // / \param[in] _index Index of the sensor. The index should be in the
180
+ // / range [0..SensorCount()).
181
+ // / \return Pointer to the sensor. Nullptr if the index does not exist.
182
+ // / \sa uint64_t SensorCount() const
183
+ public: Sensor *SensorByIndex (uint64_t _index);
184
+
142
185
// / \brief Get whether a sensor name exists.
143
186
// / \param[in] _name Name of the sensor to check.
144
187
// / \return True if there exists a sensor with the given name.
@@ -151,6 +194,13 @@ namespace sdf
151
194
// / \sa bool SensorNameExists(const std::string &_name) const
152
195
public: const Sensor *SensorByName (const std::string &_name) const ;
153
196
197
+ // / \brief Get a mutable sensor based on a name.
198
+ // / \param[in] _name Name of the sensor.
199
+ // / \return Pointer to the sensor. Nullptr if a sensor with the given name
200
+ // / does not exist.
201
+ // / \sa bool SensorNameExists(const std::string &_name) const
202
+ public: Sensor *SensorByName (const std::string &_name);
203
+
154
204
// / \brief Get the number of particle emitters.
155
205
// / \return Number of particle emitters contained in this Link object.
156
206
public: uint64_t ParticleEmitterCount () const ;
@@ -164,6 +214,14 @@ namespace sdf
164
214
public: const ParticleEmitter *ParticleEmitterByIndex (
165
215
const uint64_t _index) const ;
166
216
217
+ // / \brief Get a mutable particle emitter based on an index.
218
+ // / \param[in] _index Index of the particle emitter.
219
+ // / The index should be in the range [0..ParticleEmitterCount()).
220
+ // / \return Pointer to the particle emitter. Nullptr if the index does
221
+ // / not exist.
222
+ // / \sa uint64_t ParticleEmitterCount() const
223
+ public: ParticleEmitter *ParticleEmitterByIndex (uint64_t _index);
224
+
167
225
// / \brief Get whether a particle emitter name exists.
168
226
// / \param[in] _name Name of the particle emitter to check.
169
227
// / \return True if there exists a particle emitter with the given name.
@@ -177,6 +235,13 @@ namespace sdf
177
235
public: const ParticleEmitter *ParticleEmitterByName (
178
236
const std::string &_name) const ;
179
237
238
+ // / \brief Get a mutable particle emitter based on a name.
239
+ // / \param[in] _name Name of the particle emitter.
240
+ // / \return Pointer to the particle emitter. Nullptr if a particle emitter
241
+ // / with the given name does not exist.
242
+ // / \sa bool ParticleEmitterNameExists(const std::string &_name) const
243
+ public: ParticleEmitter *ParticleEmitterByName (const std::string &_name);
244
+
180
245
// / \brief Get the inertial value for this link. The inertial object
181
246
// / consists of the link's mass, a 3x3 rotational inertia matrix, and
182
247
// / a pose for the inertial reference frame. The units for mass is
0 commit comments