Choreonoid  1.8
Public Types | Public Member Functions | Static Public Member Functions | List of all members
cnoid::SceneWidget Class Reference

#include <SceneWidget.h>

Inheritance diagram for cnoid::SceneWidget:
cnoid::Widget

Public Types

enum  ViewpointOperationMode { ThirdPersonMode, FirstPersonMode }
 
enum  PolygonElement { PolygonFace = 1, PolygonEdge = 2, PolygonVertex = 4 }
 

Public Member Functions

 SceneWidget (QWidget *parent)
 
 ~SceneWidget ()
 
void setModeSyncEnabled (bool on)
 
SceneWidgetRootsceneRoot ()
 
SgGroupscene ()
 
SgGroupsystemNodeGroup ()
 
SceneRendererrenderer ()
 
void renderScene (bool doImmediately=false)
 
void draw ()
 
SignalProxy< void()> sigStateChanged () const
 
void setEditMode (bool on)
 
bool isEditMode () const
 
void activateCustomMode (SceneWidgetEventHandler *modeHandler, int modeId=1)
 
SceneWidgetEventHandleractiveCustomModeHandler ()
 
int activeCustomMode () const
 
void deactivateCustomMode (SceneWidgetEventHandler *modeHandler=nullptr)
 
SceneWidgetEventlatestEvent ()
 
Vector3 lastClickedPoint () const
 
void setViewpointOperationMode (ViewpointOperationMode mode)
 
ViewpointOperationMode viewpointOperationMode () const
 
SgPosTransformbuiltinCameraTransform (void)
 
SgPerspectiveCamerabuiltinPerspectiveCamera () const
 
SgOrthographicCamerabuiltinOrthographicCamera () const
 
bool isBuiltinCameraCurrent () const
 
bool isBuiltinCamera (SgCamera *camera) const
 
InteractiveCameraTransformfindOwnerInteractiveCameraTransform (int cameraIndex)
 
void startBuiltinCameraViewChange (const Vector3 &center)
 
void rotateBuiltinCameraView (double dPitch, double dYaw)
 
void translateBuiltinCameraView (const Vector3 &dp_local)
 
bool unproject (double x, double y, double z, Vector3 &out_projected) const
 
void viewAll ()
 
void setVisiblePolygonElements (int elementFlags)
 
int visiblePolygonElements () const
 
void setHighlightingEnabled (bool on)
 
bool isHighlightingEnabled () const
 
void setCollisionLineVisibility (bool on)
 
bool collisionLineVisibility () const
 
void setHeadLightIntensity (double value)
 
void setWorldLightIntensity (double value)
 
void setWorldLightAmbient (double value)
 
void setFloorGridSpan (double value)
 
void setFloorGridInterval (double value)
 
void setLineWidth (double value)
 
void setPointSize (double value)
 
void setNormalLength (double value)
 
void setHeadLightEnabled (bool on)
 
void setHeadLightLightingFromBack (bool on)
 
void setWorldLight (bool on)
 
void setAdditionalLights (bool on)
 
void setFloorGrid (bool on)
 
void setNormalVisualization (bool on)
 
void setCoordinateAxes (bool on)
 
void setShowFPS (bool on)
 
void setBackgroundColor (const Vector3 &color)
 
Vector3 backgroundColor ()
 
void setColor (const Vector4 &color)
 
void setCameraPosition (const Vector3 &eye, const Vector3 &direction, const Vector3 &up)
 
void setFieldOfView (double value)
 
void setHeight (double value)
 
void setNear (double value)
 
void setFar (double value)
 
bool setSceneFocus (const SgNodePath &path)
 
void setCursor (const QCursor cursor)
 
MenucontextMenu ()
 
void showContextMenuAtPointerPosition ()
 
SignalProxy< void(SceneWidgetEvent *event, MenuManager *menuManager)> sigContextMenuRequest ()
 
void showConfigDialog ()
 
QVBoxLayout * configDialogVBox ()
 
bool saveImage (const std::string &filename)
 
QImage getImage ()
 
void setScreenSize (int width, int height)
 
void updateIndicator (const std::string &text)
 
QWidget * indicator ()
 
bool storeState (Archive &archive)
 
bool restoreState (const Archive &archive)
 
SignalProxy< void(bool isFocused)> sigWidgetFocusChanged ()
 
SignalProxy< void()> sigAboutToBeDestroyed ()
 
- Public Member Functions inherited from cnoid::Widget
 Widget (QWidget *parent=0)
 
SignalProxy< void(std::string name)> sigObjectNameChanged ()
 
SignalProxy< void(std::string title)> sigWindowTitleChanged ()
 

Static Public Member Functions

static void initializeClass (ExtensionManager *ext)
 
static SignalProxy< void(SceneWidget *)> sigSceneWidgetCreated ()
 
static void forEachInstance (SgNode *node, std::function< void(SceneWidget *sceneWidget, const SgNodePath &path)> function)
 
static int issueUniqueCustomModeId ()
 

Member Enumeration Documentation

◆ PolygonElement

Enumerator
PolygonFace 
PolygonEdge 
PolygonVertex 

◆ ViewpointOperationMode

Enumerator
ThirdPersonMode 
FirstPersonMode 

Constructor & Destructor Documentation

◆ SceneWidget()

SceneWidget::SceneWidget ( QWidget *  parent)

◆ ~SceneWidget()

SceneWidget::~SceneWidget ( )

Member Function Documentation

◆ activateCustomMode()

void SceneWidget::activateCustomMode ( SceneWidgetEventHandler modeHandler,
int  modeId = 1 
)

◆ activeCustomMode()

int SceneWidget::activeCustomMode ( ) const

◆ activeCustomModeHandler()

SceneWidgetEventHandler * SceneWidget::activeCustomModeHandler ( )

◆ backgroundColor()

Vector3 SceneWidget::backgroundColor ( )

◆ builtinCameraTransform()

SgPosTransform * SceneWidget::builtinCameraTransform ( void  )

◆ builtinOrthographicCamera()

SgOrthographicCamera * SceneWidget::builtinOrthographicCamera ( ) const

◆ builtinPerspectiveCamera()

SgPerspectiveCamera * SceneWidget::builtinPerspectiveCamera ( ) const

◆ collisionLineVisibility()

bool SceneWidget::collisionLineVisibility ( ) const

◆ configDialogVBox()

QVBoxLayout * SceneWidget::configDialogVBox ( )

◆ contextMenu()

Menu * SceneWidget::contextMenu ( )

◆ deactivateCustomMode()

void SceneWidget::deactivateCustomMode ( SceneWidgetEventHandler modeHandler = nullptr)

◆ draw()

void cnoid::SceneWidget::draw ( )
inline

◆ findOwnerInteractiveCameraTransform()

InteractiveCameraTransform * SceneWidget::findOwnerInteractiveCameraTransform ( int  cameraIndex)

◆ forEachInstance()

void SceneWidget::forEachInstance ( SgNode node,
std::function< void(SceneWidget *sceneWidget, const SgNodePath &path)>  function 
)
static

◆ getImage()

QImage SceneWidget::getImage ( )

◆ indicator()

QWidget * SceneWidget::indicator ( )

◆ initializeClass()

void SceneWidget::initializeClass ( ExtensionManager ext)
static

◆ isBuiltinCamera()

bool SceneWidget::isBuiltinCamera ( SgCamera camera) const

◆ isBuiltinCameraCurrent()

bool SceneWidget::isBuiltinCameraCurrent ( ) const

◆ isEditMode()

bool SceneWidget::isEditMode ( ) const

◆ isHighlightingEnabled()

bool SceneWidget::isHighlightingEnabled ( ) const

◆ issueUniqueCustomModeId()

int SceneWidget::issueUniqueCustomModeId ( )
static

◆ lastClickedPoint()

Vector3 SceneWidget::lastClickedPoint ( ) const

◆ latestEvent()

SceneWidgetEvent * SceneWidget::latestEvent ( )

◆ renderer()

SceneRenderer * SceneWidget::renderer ( )

◆ renderScene()

void SceneWidget::renderScene ( bool  doImmediately = false)

◆ restoreState()

bool SceneWidget::restoreState ( const Archive archive)

◆ rotateBuiltinCameraView()

void SceneWidget::rotateBuiltinCameraView ( double  dPitch,
double  dYaw 
)

◆ saveImage()

bool SceneWidget::saveImage ( const std::string &  filename)

◆ scene()

SgGroup * SceneWidget::scene ( )

◆ sceneRoot()

SceneWidgetRoot * SceneWidget::sceneRoot ( )

◆ setAdditionalLights()

void SceneWidget::setAdditionalLights ( bool  on)

◆ setBackgroundColor()

void SceneWidget::setBackgroundColor ( const Vector3 color)

◆ setCameraPosition()

void SceneWidget::setCameraPosition ( const Vector3 eye,
const Vector3 direction,
const Vector3 up 
)

◆ setCollisionLineVisibility()

void SceneWidget::setCollisionLineVisibility ( bool  on)

◆ setColor()

void SceneWidget::setColor ( const Vector4 color)

◆ setCoordinateAxes()

void SceneWidget::setCoordinateAxes ( bool  on)

◆ setCursor()

void SceneWidget::setCursor ( const QCursor  cursor)
Returns
cursor id which is passed to releaseCursor()

◆ setEditMode()

void SceneWidget::setEditMode ( bool  on)

◆ setFar()

void SceneWidget::setFar ( double  value)

◆ setFieldOfView()

void SceneWidget::setFieldOfView ( double  value)

◆ setFloorGrid()

void SceneWidget::setFloorGrid ( bool  on)

◆ setFloorGridInterval()

void SceneWidget::setFloorGridInterval ( double  value)

◆ setFloorGridSpan()

void SceneWidget::setFloorGridSpan ( double  value)

◆ setHeadLightEnabled()

void SceneWidget::setHeadLightEnabled ( bool  on)

◆ setHeadLightIntensity()

void SceneWidget::setHeadLightIntensity ( double  value)

◆ setHeadLightLightingFromBack()

void SceneWidget::setHeadLightLightingFromBack ( bool  on)

◆ setHeight()

void SceneWidget::setHeight ( double  value)

◆ setHighlightingEnabled()

void SceneWidget::setHighlightingEnabled ( bool  on)

◆ setLineWidth()

void SceneWidget::setLineWidth ( double  value)

◆ setModeSyncEnabled()

void SceneWidget::setModeSyncEnabled ( bool  on)

◆ setNear()

void SceneWidget::setNear ( double  value)

◆ setNormalLength()

void SceneWidget::setNormalLength ( double  value)

◆ setNormalVisualization()

void SceneWidget::setNormalVisualization ( bool  on)

◆ setPointSize()

void SceneWidget::setPointSize ( double  value)

◆ setSceneFocus()

bool SceneWidget::setSceneFocus ( const SgNodePath path)

◆ setScreenSize()

void SceneWidget::setScreenSize ( int  width,
int  height 
)

◆ setShowFPS()

void SceneWidget::setShowFPS ( bool  on)

◆ setViewpointOperationMode()

void SceneWidget::setViewpointOperationMode ( ViewpointOperationMode  mode)

◆ setVisiblePolygonElements()

void SceneWidget::setVisiblePolygonElements ( int  elementFlags)

◆ setWorldLight()

void SceneWidget::setWorldLight ( bool  on)

◆ setWorldLightAmbient()

void SceneWidget::setWorldLightAmbient ( double  value)

◆ setWorldLightIntensity()

void SceneWidget::setWorldLightIntensity ( double  value)

◆ showConfigDialog()

void SceneWidget::showConfigDialog ( )

◆ showContextMenuAtPointerPosition()

void SceneWidget::showContextMenuAtPointerPosition ( )

◆ sigAboutToBeDestroyed()

SignalProxy< void()> SceneWidget::sigAboutToBeDestroyed ( )

◆ sigContextMenuRequest()

SignalProxy< void(SceneWidgetEvent *event, MenuManager *menuManager)> SceneWidget::sigContextMenuRequest ( )

◆ sigSceneWidgetCreated()

SignalProxy< void(SceneWidget *)> SceneWidget::sigSceneWidgetCreated ( )
static

◆ sigStateChanged()

SignalProxy< void()> SceneWidget::sigStateChanged ( ) const

◆ sigWidgetFocusChanged()

SignalProxy< void(bool isFocused)> SceneWidget::sigWidgetFocusChanged ( )

◆ startBuiltinCameraViewChange()

void SceneWidget::startBuiltinCameraViewChange ( const Vector3 center)

◆ storeState()

bool SceneWidget::storeState ( Archive archive)

◆ systemNodeGroup()

SgGroup * SceneWidget::systemNodeGroup ( )

◆ translateBuiltinCameraView()

void SceneWidget::translateBuiltinCameraView ( const Vector3 dp_local)

◆ unproject()

bool SceneWidget::unproject ( double  x,
double  y,
double  z,
Vector3 out_projected 
) const

◆ updateIndicator()

void SceneWidget::updateIndicator ( const std::string &  text)

◆ viewAll()

void SceneWidget::viewAll ( )

◆ viewpointOperationMode()

SceneWidget::ViewpointOperationMode SceneWidget::viewpointOperationMode ( ) const

◆ visiblePolygonElements()

int SceneWidget::visiblePolygonElements ( ) const

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