Public Member Functions | Public Attributes | Static Public Attributes | Private Attributes | List of all members
Scene Class Reference

#include <scene.h>

Public Member Functions

void addCircle (int id, float radius, const rtabmap::Transform &pose, const tango_gl::Color &color, float alpha=1.0f)
 
void addCloud (int id, const pcl::PointCloud< pcl::PointXYZRGB >::Ptr &cloud, const pcl::IndicesPtr &indices, const rtabmap::Transform &pose)
 
void addLine (int id, const cv::Point3f &pt1, const cv::Point3f &pt2, const tango_gl::Color &color=tango_gl::Color(1.0f, 1.0f, 1.0f))
 
void addMarker (int id, const rtabmap::Transform &pose)
 
void addMesh (int id, const rtabmap::Mesh &mesh, const rtabmap::Transform &pose, bool createWireframe=false)
 
void addQuad (int id, float size, const rtabmap::Transform &pose, const tango_gl::Color &color, float alpha=1.0f)
 
void addQuad (int id, float widthLeft, float widthRight, float heightBottom, float heightTop, const rtabmap::Transform &pose, const tango_gl::Color &color, float alpha=1.0f)
 
void addText (int id, const std::string &text, const rtabmap::Transform &pose, float size, const tango_gl::Color &color)
 
void clear ()
 
void clearCircles ()
 
void clearLines ()
 
void clearQuads ()
 
void clearTexts ()
 
void DeleteResources ()
 
std::set< intgetAddedClouds () const
 
std::set< intgetAddedMarkers () const
 
rtabmap::Transform GetCameraPose () const
 
tango_gl::GestureCamera::CameraType GetCameraType () const
 
rtabmap::Transform GetOpenGLCameraPose (float *fov=0) const
 
float getPointSize () const
 
rtabmap::ScreenRotation getScreenRotation () const
 
int getViewPortHeight () const
 
int getViewPortWidth () const
 
bool hasCircle (int id) const
 
bool hasCloud (int id) const
 
bool hasMarker (int id) const
 
bool hasMesh (int id) const
 
bool hasQuad (int id) const
 
bool hasTexture (int id) const
 
void InitGLContent ()
 
bool isBackfaceCulling () const
 
bool isBlending () const
 
bool isLighting () const
 
bool isMapRendering () const
 
bool isMeshRendering () const
 
bool isMeshTexturing () const
 
bool isWireframe () const
 
void OnTouchEvent (int touch_count, tango_gl::GestureCamera::TouchEvent event, float x0, float y0, float x1, float y1)
 
void removeCircle (int id)
 
void removeCloudOrMesh (int id)
 
void removeLine (int id)
 
void removeMarker (int id)
 
void removeQuad (int id)
 
void removeText (int id)
 
int Render (const float *uvsTransformed=0, glm::mat4 arViewMatrix=glm::mat4(0), glm::mat4 arProjectionMatrix=glm::mat4(0), const rtabmap::Mesh &occlusionMesh=rtabmap::Mesh(), bool mapping=false)
 
 Scene ()
 
void setBackfaceCulling (bool enabled)
 
void setBackgroundColor (float r, float g, float b)
 
void setBlending (bool enabled)
 
void SetCameraPose (const rtabmap::Transform &pose)
 
void SetCameraType (tango_gl::GestureCamera::CameraType camera_type)
 
void setCloudPose (int id, const rtabmap::Transform &pose)
 
void setCloudVisible (int id, bool visible)
 
void setFOV (float angle)
 
void setFrustumVisible (bool visible)
 
void setGraphVisible (bool visible)
 
void setGridColor (float r, float g, float b)
 
void setGridRotation (float angleDeg)
 
void setGridVisible (bool visible)
 
void setLighting (bool enabled)
 
void setMapRendering (bool enabled)
 
void setMarkerPose (int id, const rtabmap::Transform &pose)
 
void setMeshRendering (bool enabled, bool withTexture)
 
void setOrthoCropFactor (float value)
 
void setPointSize (float size)
 
void setScreenRotation (rtabmap::ScreenRotation colorCameraToDisplayRotation)
 
void setTextureColorSeamsHidden (bool hidden)
 
void setTraceVisible (bool visible)
 
void SetupViewPort (int w, int h)
 
void setWireframe (bool enabled)
 
void updateCloudPolygons (int id, const std::vector< pcl::Vertices > &polygons)
 
void updateGains (int id, float gainR, float gainG, float gainB)
 
void updateGraph (const std::map< int, rtabmap::Transform > &poses, const std::multimap< int, rtabmap::Link > &links)
 
void updateMesh (int id, const rtabmap::Mesh &mesh)
 
 ~Scene ()
 

Public Attributes

BackgroundRendererbackground_renderer_
 

Static Public Attributes

static const glm::vec3 kHeightOffset = glm::vec3(0.0f, -1.3f, 0.0f)
 

Private Attributes

tango_gl::Axisaxis_
 
float b_
 
bool backfaceCulling_
 
bool blending_
 
bool boundingBoxRendering_
 
BoundingBoxDrawablebox_
 
std::map< int, tango_gl::Circle * > circles_
 
rtabmap::ScreenRotation color_camera_to_display_rotation_
 
rtabmap::TransformcurrentPose_
 
GLuint depthTexture_
 
bool doubleTapOn_
 
cv::Point2f doubleTapPos_
 
GLuint fboId_
 
tango_gl::Frustumfrustum_
 
bool frustumVisible_
 
float g_
 
tango_gl::GestureCameragesture_camera_
 
GraphDrawablegraph_
 
GLuint graph_shader_program_
 
bool graphVisible_
 
tango_gl::Gridgrid_
 
bool gridVisible_
 
bool lighting_
 
std::map< int, tango_gl::Line * > lines_
 
bool mapRendering_
 
std::map< int, tango_gl::Axis * > markers_
 
bool meshRendering_
 
bool meshRenderingTexture_
 
std::map< int, PointCloudDrawable * > pointClouds_
 
float pointSize_
 
std::map< int, QuadColor * > quads_
 
float r_
 
GLuint rboId_
 
GLsizei screenHeight_
 
GLsizei screenWidth_
 
std::map< int, TextDrawable * > texts_
 
bool textureColorSeamsHidden_
 
tango_gl::Tracetrace_
 
bool traceVisible_
 
bool wireFrame_
 

Detailed Description

Definition at line 52 of file scene.h.

Constructor & Destructor Documentation

◆ Scene()

Scene::Scene ( )

Definition at line 71 of file scene.cpp.

◆ ~Scene()

Scene::~Scene ( )

Definition at line 112 of file scene.cpp.

Member Function Documentation

◆ addCircle()

void Scene::addCircle ( int  id,
float  radius,
const rtabmap::Transform pose,
const tango_gl::Color color,
float  alpha = 1.0f 
)

Definition at line 1111 of file scene.cpp.

◆ addCloud()

void Scene::addCloud ( int  id,
const pcl::PointCloud< pcl::PointXYZRGB >::Ptr &  cloud,
const pcl::IndicesPtr &  indices,
const rtabmap::Transform pose 
)

Definition at line 902 of file scene.cpp.

◆ addLine()

void Scene::addLine ( int  id,
const cv::Point3f &  pt1,
const cv::Point3f &  pt2,
const tango_gl::Color color = tango_gl::Color(1.0f, 1.0f, 1.0f) 
)

Definition at line 994 of file scene.cpp.

◆ addMarker()

void Scene::addMarker ( int  id,
const rtabmap::Transform pose 
)

Definition at line 855 of file scene.cpp.

◆ addMesh()

void Scene::addMesh ( int  id,
const rtabmap::Mesh mesh,
const rtabmap::Transform pose,
bool  createWireframe = false 
)

Definition at line 927 of file scene.cpp.

◆ addQuad() [1/2]

void Scene::addQuad ( int  id,
float  size,
const rtabmap::Transform pose,
const tango_gl::Color color,
float  alpha = 1.0f 
)

Definition at line 1052 of file scene.cpp.

◆ addQuad() [2/2]

void Scene::addQuad ( int  id,
float  widthLeft,
float  widthRight,
float  heightBottom,
float  heightTop,
const rtabmap::Transform pose,
const tango_gl::Color color,
float  alpha = 1.0f 
)

Definition at line 1075 of file scene.cpp.

◆ addText()

void Scene::addText ( int  id,
const std::string text,
const rtabmap::Transform pose,
float  size,
const tango_gl::Color color 
)

Definition at line 1028 of file scene.cpp.

◆ clear()

void Scene::clear ( )

Definition at line 193 of file scene.cpp.

◆ clearCircles()

void Scene::clearCircles ( )

Definition at line 249 of file scene.cpp.

◆ clearLines()

void Scene::clearLines ( )

Definition at line 225 of file scene.cpp.

◆ clearQuads()

void Scene::clearQuads ( )

Definition at line 241 of file scene.cpp.

◆ clearTexts()

void Scene::clearTexts ( )

Definition at line 233 of file scene.cpp.

◆ DeleteResources()

void Scene::DeleteResources ( )

Definition at line 156 of file scene.cpp.

◆ getAddedClouds()

std::set< int > Scene::getAddedClouds ( ) const

Definition at line 1183 of file scene.cpp.

◆ getAddedMarkers()

std::set< int > Scene::getAddedMarkers ( ) const

Definition at line 897 of file scene.cpp.

◆ GetCameraPose()

rtabmap::Transform Scene::GetCameraPose ( ) const
inline

Definition at line 96 of file scene.h.

◆ GetCameraType()

tango_gl::GestureCamera::CameraType Scene::GetCameraType ( ) const
inline

Definition at line 93 of file scene.h.

◆ GetOpenGLCameraPose()

rtabmap::Transform Scene::GetOpenGLCameraPose ( float fov = 0) const

Definition at line 793 of file scene.cpp.

◆ getPointSize()

float Scene::getPointSize ( ) const
inline

Definition at line 204 of file scene.h.

◆ getScreenRotation()

rtabmap::ScreenRotation Scene::getScreenRotation ( ) const
inline

Definition at line 71 of file scene.h.

◆ getViewPortHeight()

int Scene::getViewPortHeight ( ) const
inline

Definition at line 69 of file scene.h.

◆ getViewPortWidth()

int Scene::getViewPortWidth ( ) const
inline

Definition at line 68 of file scene.h.

◆ hasCircle()

bool Scene::hasCircle ( int  id) const

Definition at line 1144 of file scene.cpp.

◆ hasCloud()

bool Scene::hasCloud ( int  id) const

Definition at line 1168 of file scene.cpp.

◆ hasMarker()

bool Scene::hasMarker ( int  id) const

Definition at line 884 of file scene.cpp.

◆ hasMesh()

bool Scene::hasMesh ( int  id) const

Definition at line 1173 of file scene.cpp.

◆ hasQuad()

bool Scene::hasQuad ( int  id) const

Definition at line 1106 of file scene.cpp.

◆ hasTexture()

bool Scene::hasTexture ( int  id) const

Definition at line 1178 of file scene.cpp.

◆ InitGLContent()

void Scene::InitGLContent ( )

Definition at line 119 of file scene.cpp.

◆ isBackfaceCulling()

bool Scene::isBackfaceCulling ( ) const
inline

Definition at line 206 of file scene.h.

◆ isBlending()

bool Scene::isBlending ( ) const
inline

Definition at line 200 of file scene.h.

◆ isLighting()

bool Scene::isLighting ( ) const
inline

Definition at line 205 of file scene.h.

◆ isMapRendering()

bool Scene::isMapRendering ( ) const
inline

Definition at line 201 of file scene.h.

◆ isMeshRendering()

bool Scene::isMeshRendering ( ) const
inline

Definition at line 202 of file scene.h.

◆ isMeshTexturing()

bool Scene::isMeshTexturing ( ) const
inline

Definition at line 203 of file scene.h.

◆ isWireframe()

bool Scene::isWireframe ( ) const
inline

Definition at line 207 of file scene.h.

◆ OnTouchEvent()

void Scene::OnTouchEvent ( int  touch_count,
tango_gl::GestureCamera::TouchEvent  event,
float  x0,
float  y0,
float  x1,
float  y1 
)

Definition at line 802 of file scene.cpp.

◆ removeCircle()

void Scene::removeCircle ( int  id)

Definition at line 1134 of file scene.cpp.

◆ removeCloudOrMesh()

void Scene::removeCloudOrMesh ( int  id)

Definition at line 917 of file scene.cpp.

◆ removeLine()

void Scene::removeLine ( int  id)

Definition at line 1018 of file scene.cpp.

◆ removeMarker()

void Scene::removeMarker ( int  id)

Definition at line 888 of file scene.cpp.

◆ removeQuad()

void Scene::removeQuad ( int  id)

Definition at line 1096 of file scene.cpp.

◆ removeText()

void Scene::removeText ( int  id)

Definition at line 1042 of file scene.cpp.

◆ Render()

int Scene::Render ( const float uvsTransformed = 0,
glm::mat4  arViewMatrix = glm::mat4(0),
glm::mat4  arProjectionMatrix = glm::mat4(0),
const rtabmap::Mesh occlusionMesh = rtabmap::Mesh(),
bool  mapping = false 
)

Definition at line 425 of file scene.cpp.

◆ setBackfaceCulling()

void Scene::setBackfaceCulling ( bool  enabled)
inline

Definition at line 194 of file scene.h.

◆ setBackgroundColor()

void Scene::setBackgroundColor ( float  r,
float  g,
float  b 
)
inline

Definition at line 197 of file scene.h.

◆ setBlending()

void Scene::setBlending ( bool  enabled)
inline

Definition at line 186 of file scene.h.

◆ SetCameraPose()

void Scene::SetCameraPose ( const rtabmap::Transform pose)

Definition at line 765 of file scene.cpp.

◆ SetCameraType()

void Scene::SetCameraType ( tango_gl::GestureCamera::CameraType  camera_type)

Definition at line 761 of file scene.cpp.

◆ setCloudPose()

void Scene::setCloudPose ( int  id,
const rtabmap::Transform pose 
)

Definition at line 1149 of file scene.cpp.

◆ setCloudVisible()

void Scene::setCloudVisible ( int  id,
bool  visible 
)

Definition at line 1159 of file scene.cpp.

◆ setFOV()

void Scene::setFOV ( float  angle)

Definition at line 775 of file scene.cpp.

◆ setFrustumVisible()

void Scene::setFrustumVisible ( bool  visible)

Definition at line 849 of file scene.cpp.

◆ setGraphVisible()

void Scene::setGraphVisible ( bool  visible)

Definition at line 834 of file scene.cpp.

◆ setGridColor()

void Scene::setGridColor ( float  r,
float  g,
float  b 
)

Definition at line 1215 of file scene.cpp.

◆ setGridRotation()

void Scene::setGridRotation ( float  angleDeg)

Definition at line 783 of file scene.cpp.

◆ setGridVisible()

void Scene::setGridVisible ( bool  visible)

Definition at line 839 of file scene.cpp.

◆ setLighting()

void Scene::setLighting ( bool  enabled)
inline

Definition at line 193 of file scene.h.

◆ setMapRendering()

void Scene::setMapRendering ( bool  enabled)
inline

Definition at line 187 of file scene.h.

◆ setMarkerPose()

void Scene::setMarkerPose ( int  id,
const rtabmap::Transform pose 
)

Definition at line 871 of file scene.cpp.

◆ setMeshRendering()

void Scene::setMeshRendering ( bool  enabled,
bool  withTexture 
)
inline

Definition at line 188 of file scene.h.

◆ setOrthoCropFactor()

void Scene::setOrthoCropFactor ( float  value)

Definition at line 779 of file scene.cpp.

◆ setPointSize()

void Scene::setPointSize ( float  size)
inline

Definition at line 189 of file scene.h.

◆ setScreenRotation()

void Scene::setScreenRotation ( rtabmap::ScreenRotation  colorCameraToDisplayRotation)
inline

Definition at line 72 of file scene.h.

◆ setTextureColorSeamsHidden()

void Scene::setTextureColorSeamsHidden ( bool  hidden)
inline

Definition at line 196 of file scene.h.

◆ setTraceVisible()

void Scene::setTraceVisible ( bool  visible)

Definition at line 844 of file scene.cpp.

◆ SetupViewPort()

void Scene::SetupViewPort ( int  w,
int  h 
)

Definition at line 259 of file scene.cpp.

◆ setWireframe()

void Scene::setWireframe ( bool  enabled)
inline

Definition at line 195 of file scene.h.

◆ updateCloudPolygons()

void Scene::updateCloudPolygons ( int  id,
const std::vector< pcl::Vertices > &  polygons 
)

Definition at line 1188 of file scene.cpp.

◆ updateGains()

void Scene::updateGains ( int  id,
float  gainR,
float  gainG,
float  gainB 
)

Definition at line 1206 of file scene.cpp.

◆ updateGraph()

void Scene::updateGraph ( const std::map< int, rtabmap::Transform > &  poses,
const std::multimap< int, rtabmap::Link > &  links 
)

Definition at line 823 of file scene.cpp.

◆ updateMesh()

void Scene::updateMesh ( int  id,
const rtabmap::Mesh mesh 
)

Definition at line 1197 of file scene.cpp.

Member Data Documentation

◆ axis_

tango_gl::Axis* Scene::axis_
private

Definition at line 216 of file scene.h.

◆ b_

float Scene::b_
private

Definition at line 262 of file scene.h.

◆ backfaceCulling_

bool Scene::backfaceCulling_
private

Definition at line 257 of file scene.h.

◆ background_renderer_

BackgroundRenderer* Scene::background_renderer_

Definition at line 209 of file scene.h.

◆ blending_

bool Scene::blending_
private

Definition at line 250 of file scene.h.

◆ boundingBoxRendering_

bool Scene::boundingBoxRendering_
private

Definition at line 255 of file scene.h.

◆ box_

BoundingBoxDrawable* Scene::box_
private

Definition at line 225 of file scene.h.

◆ circles_

std::map<int, tango_gl::Circle*> Scene::circles_
private

Definition at line 243 of file scene.h.

◆ color_camera_to_display_rotation_

rtabmap::ScreenRotation Scene::color_camera_to_display_rotation_
private

Definition at line 237 of file scene.h.

◆ currentPose_

rtabmap::Transform* Scene::currentPose_
private

Definition at line 245 of file scene.h.

◆ depthTexture_

GLuint Scene::depthTexture_
private

Definition at line 265 of file scene.h.

◆ doubleTapOn_

bool Scene::doubleTapOn_
private

Definition at line 268 of file scene.h.

◆ doubleTapPos_

cv::Point2f Scene::doubleTapPos_
private

Definition at line 269 of file scene.h.

◆ fboId_

GLuint Scene::fboId_
private

Definition at line 263 of file scene.h.

◆ frustum_

tango_gl::Frustum* Scene::frustum_
private

Definition at line 219 of file scene.h.

◆ frustumVisible_

bool Scene::frustumVisible_
private

Definition at line 233 of file scene.h.

◆ g_

float Scene::g_
private

Definition at line 261 of file scene.h.

◆ gesture_camera_

tango_gl::GestureCamera* Scene::gesture_camera_
private

Definition at line 213 of file scene.h.

◆ graph_

GraphDrawable* Scene::graph_
private

Definition at line 229 of file scene.h.

◆ graph_shader_program_

GLuint Scene::graph_shader_program_
private

Definition at line 248 of file scene.h.

◆ graphVisible_

bool Scene::graphVisible_
private

Definition at line 230 of file scene.h.

◆ grid_

tango_gl::Grid* Scene::grid_
private

Definition at line 222 of file scene.h.

◆ gridVisible_

bool Scene::gridVisible_
private

Definition at line 231 of file scene.h.

◆ kHeightOffset

const glm::vec3 Scene::kHeightOffset = glm::vec3(0.0f, -1.3f, 0.0f)
static

Definition at line 54 of file scene.h.

◆ lighting_

bool Scene::lighting_
private

Definition at line 256 of file scene.h.

◆ lines_

std::map<int, tango_gl::Line*> Scene::lines_
private

Definition at line 240 of file scene.h.

◆ mapRendering_

bool Scene::mapRendering_
private

Definition at line 251 of file scene.h.

◆ markers_

std::map<int, tango_gl::Axis*> Scene::markers_
private

Definition at line 235 of file scene.h.

◆ meshRendering_

bool Scene::meshRendering_
private

Definition at line 252 of file scene.h.

◆ meshRenderingTexture_

bool Scene::meshRenderingTexture_
private

Definition at line 253 of file scene.h.

◆ pointClouds_

std::map<int, PointCloudDrawable*> Scene::pointClouds_
private

Definition at line 239 of file scene.h.

◆ pointSize_

float Scene::pointSize_
private

Definition at line 254 of file scene.h.

◆ quads_

std::map<int, QuadColor*> Scene::quads_
private

Definition at line 242 of file scene.h.

◆ r_

float Scene::r_
private

Definition at line 260 of file scene.h.

◆ rboId_

GLuint Scene::rboId_
private

Definition at line 264 of file scene.h.

◆ screenHeight_

GLsizei Scene::screenHeight_
private

Definition at line 267 of file scene.h.

◆ screenWidth_

GLsizei Scene::screenWidth_
private

Definition at line 266 of file scene.h.

◆ texts_

std::map<int, TextDrawable*> Scene::texts_
private

Definition at line 241 of file scene.h.

◆ textureColorSeamsHidden_

bool Scene::textureColorSeamsHidden_
private

Definition at line 259 of file scene.h.

◆ trace_

tango_gl::Trace* Scene::trace_
private

Definition at line 228 of file scene.h.

◆ traceVisible_

bool Scene::traceVisible_
private

Definition at line 232 of file scene.h.

◆ wireFrame_

bool Scene::wireFrame_
private

Definition at line 258 of file scene.h.


The documentation for this class was generated from the following files:


rtabmap
Author(s): Mathieu Labbe
autogenerated on Mon Apr 28 2025 02:46:09