@@ -165,14 +165,24 @@ class SceneNode : public MagnumObject,
165165 semanticId;
166166 }
167167
168+ // ! Gets node's owning objectID, for panoptic rendering.
169+ virtual int getBaseObjectId () const {
170+ return semanticIDs_[static_cast <int >(SceneNodeSemanticDataIDX::OBJECT_ID)];
171+ }
172+
168173 // ! Sets node's owning objectID, for panoptic rendering.
169- virtual void setBaseObjectId (int objectId) {
174+ void setBaseObjectId (int objectId) {
170175 semanticIDs_[static_cast <int >(SceneNodeSemanticDataIDX::OBJECT_ID)] =
171176 objectId;
172177 }
178+ // ! Gets node's corresponding drawable's id, for panoptic rendering.
179+ virtual int getDrawableId () const {
180+ return semanticIDs_[static_cast <int >(
181+ SceneNodeSemanticDataIDX::DRAWABLE_ID)];
182+ }
173183
174184 // ! Sets node's corresponding drawable's id, for panoptic rendering.
175- virtual void setDrawableId (int drawableId) {
185+ void setDrawableId (int drawableId) {
176186 semanticIDs_[static_cast <int >(SceneNodeSemanticDataIDX::DRAWABLE_ID)] =
177187 drawableId;
178188 }
@@ -182,7 +192,7 @@ class SceneNode : public MagnumObject,
182192 * @param idToGetIDX The index of the ID to get
183193 * @return the semantic value corresponding to the given index
184194 */
185- virtual int getShaderObjectID (int idToGetIDX) const {
195+ int getShaderObjectID (int idToGetIDX) const {
186196 return semanticIDs_[idToGetIDX];
187197 }
188198
@@ -191,6 +201,17 @@ class SceneNode : public MagnumObject,
191201 * scene node.
192202 */
193203 const std::vector<int >& getSemanticIDVector () const { return semanticIDs_; }
204+
205+ /* *
206+ * @brief Set the value for the various semantic IDs to be rendered by this
207+ * scene node. As values are added, we want to make sure we support shorter,
208+ * older vectors.
209+ * @param _semanticIDs The vector of semantic sensor IDs this scene node will
210+ * use for rendering. This vector might not be the same size as the current
211+ * vector.
212+ */
213+ void setSemanticIDVector (const std::vector<int >& _semanticIDs);
214+
194215 Magnum::Vector3 absoluteTranslation () const ;
195216
196217 Magnum::Vector3 absoluteTranslation ();
@@ -408,6 +429,15 @@ void preOrderFeatureTraversalWithCallback(SceneNode& node, Callable&& cb) {
408429 */
409430void setSemanticIdForSubtree (SceneNode* node, int semanticId);
410431
432+ /* *
433+ * @brief Set the semantic and instance IDs of a scene graph subtree.
434+ *
435+ * @param node Root node of the subtree.
436+ * @param semanticIDs Vector of semantic and instance ids to set
437+ */
438+ void setSemanticInfoForSubtree (SceneNode* node,
439+ const std::vector<int >& _semanticIDs);
440+
411441CORRADE_ENUMSET_OPERATORS (SceneNodeTags)
412442} // namespace scene
413443} // namespace esp
0 commit comments