Choreonoid
1.5
|
#include <GLSceneRenderer.h>
Public Types | |
enum | PolygonMode { FILL_MODE, LINE_MODE, POINT_MODE } |
Public Member Functions | |
GLSceneRenderer () | |
GLSceneRenderer (SgGroup *root) | |
virtual | ~GLSceneRenderer () |
virtual SgGroup * | sceneRoot () |
virtual SgGroup * | scene () |
virtual void | clearScene () |
virtual int | numCameras () const |
virtual SgCamera * | camera (int index) |
virtual const SgNodePath & | cameraPath (int index) const |
virtual SignalProxy< void()> | sigCamerasChanged () const |
virtual SgCamera * | currentCamera () const |
virtual int | currentCameraIndex () const |
virtual void | setCurrentCamera (int index) |
virtual bool | setCurrentCamera (SgCamera *camera) |
virtual SignalProxy< void()> | sigCurrentCameraChanged () |
virtual void | setViewport (int x, int y, int width, int height) |
virtual Array4i | viewport () const |
void | getViewport (int &out_x, int &out_y, int &out_width, int &out_height) const |
virtual double | aspectRatio () const |
virtual const Affine3 & | currentModelTransform () const |
virtual const Affine3 & | currentCameraPosition () const |
virtual const Matrix4 & | projectionMatrix () const |
void | getViewFrustum (const SgPerspectiveCamera &camera, double &left, double &right, double &bottom, double &top) const |
void | getViewVolume (const SgOrthographicCamera &camera, double &left, double &right, double &bottom, double &top) const |
bool | initializeGL () |
bool | setSwapInterval (int interval) |
int | getSwapInterval () const |
virtual void | initializeRendering () |
virtual SignalProxy< void()> | sigRenderingRequest () |
void | extractPreprocessedNodes () |
virtual void | beginRendering () |
virtual void | endRendering () |
virtual void | render () |
virtual void | flush () |
bool | pick (int x, int y) |
const Vector3 & | pickedPoint () const |
const SgNodePath & | pickedNodePath () const |
const Vector3f & | backgroundColor () const |
void | setBackgroundColor (const Vector3f &color) |
virtual SgLight * | headLight () |
virtual void | setHeadLight (SgLight *light) |
void | setHeadLightLightingFromBackEnabled (bool on) |
void | setAsDefaultLight (SgLight *light) |
void | unsetDefaultLight (SgLight *light) |
void | enableAdditionalLights (bool on) |
void | setPolygonMode (PolygonMode mode) |
void | setDefaultLighting (bool on) |
void | setDefaultSmoothShading (bool on) |
SgMaterial * | defaultMaterial () |
void | setDefaultColor (const Vector4f &color) |
void | enableTexture (bool on) |
void | setDefaultPointSize (double size) |
void | setDefaultLineWidth (double width) |
void | enableFog (bool on) |
SgFog * | currentFog () |
void | setNewDisplayListDoubleRenderingEnabled (bool on) |
void | showNormalVectors (double length) |
void | requestToClearCache () |
virtual void | enableUnusedCacheCheck (bool on) |
virtual void | visitGroup (SgGroup *group) |
virtual void | visitInvariantGroup (SgInvariantGroup *group) |
virtual void | visitTransform (SgTransform *transform) |
virtual void | visitUnpickableGroup (SgUnpickableGroup *group) |
virtual void | visitShape (SgShape *shape) |
virtual void | visitPointSet (SgPointSet *pointSet) |
virtual void | visitLineSet (SgLineSet *lineSet) |
virtual void | visitPreprocessed (SgPreprocessed *preprocessed) |
virtual void | visitLight (SgLight *light) |
virtual void | visitOverlay (SgOverlay *overlay) |
virtual void | visitOutlineGroup (SgOutlineGroup *outline) |
bool | isPicking () |
void | setColor (const Vector4f &color) |
void | enableColorMaterial (bool on) |
void | setDiffuseColor (const Vector4f &color) |
void | setAmbientColor (const Vector4f &color) |
void | setEmissionColor (const Vector4f &color) |
void | setSpecularColor (const Vector4f &color) |
void | setShininess (float shininess) |
void | enableCullFace (bool on) |
void | setFrontCCW (bool on) |
void | enableLighting (bool on) |
void | setLightModelTwoSide (bool on) |
void | enableBlend (bool on) |
void | enableDepthMask (bool on) |
void | setPointSize (float size) |
void | setLineWidth (float width) |
![]() | |
bool | getSimplifiedCameraPathStrings (int index, std::vector< std::string > &out_pathStrings) |
int | findCameraPath (const std::vector< std::string > &simplifiedPathStrings) |
bool | setCurrentCameraPath (const std::vector< std::string > &simplifiedPathStrings) |
![]() | |
SceneVisitor () | |
virtual | ~SceneVisitor () |
virtual void | visitNode (SgNode *node) |
virtual void | visitPosTransform (SgPosTransform *transform) |
virtual void | visitScaleTransform (SgScaleTransform *transform) |
virtual void | visitSwitch (SgSwitch *switchNode) |
virtual void | visitPlot (SgPlot *plot) |
virtual void | visitFog (SgFog *fog) |
virtual void | visitCamera (SgCamera *camera) |
Mapping * | property () |
Friends | |
class | SgCustomGLNode |
GLSceneRenderer::GLSceneRenderer | ( | ) |
GLSceneRenderer::GLSceneRenderer | ( | SgGroup * | root | ) |
|
virtual |
|
virtual |
Implements cnoid::SceneRenderer.
const Vector3f & GLSceneRenderer::backgroundColor | ( | ) | const |
|
virtual |
Implements cnoid::SceneRenderer.
|
virtual |
Implements cnoid::SceneRenderer.
|
virtual |
Implements cnoid::SceneRenderer.
|
virtual |
Implements cnoid::SceneRenderer.
|
virtual |
Implements cnoid::SceneRenderer.
|
virtual |
Implements cnoid::SceneRenderer.
|
virtual |
Implements cnoid::SceneRenderer.
SgFog * GLSceneRenderer::currentFog | ( | ) |
|
virtual |
Implements cnoid::SceneRenderer.
SgMaterial * GLSceneRenderer::defaultMaterial | ( | ) |
void GLSceneRenderer::enableAdditionalLights | ( | bool | on | ) |
void GLSceneRenderer::enableBlend | ( | bool | on | ) |
void GLSceneRenderer::enableColorMaterial | ( | bool | on | ) |
void GLSceneRenderer::enableCullFace | ( | bool | on | ) |
void GLSceneRenderer::enableDepthMask | ( | bool | on | ) |
void GLSceneRenderer::enableFog | ( | bool | on | ) |
void GLSceneRenderer::enableLighting | ( | bool | on | ) |
void GLSceneRenderer::enableTexture | ( | bool | on | ) |
|
virtual |
If this is enabled, OpenGL resources such as display lists, vertex buffer objects are checked if they are still used or not, and the unused resources are released when finalizeRendering() is called. The default value is true.
|
virtual |
Implements cnoid::SceneRenderer.
void GLSceneRenderer::extractPreprocessedNodes | ( | ) |
|
virtual |
Implements cnoid::SceneRenderer.
int GLSceneRenderer::getSwapInterval | ( | ) | const |
void GLSceneRenderer::getViewFrustum | ( | const SgPerspectiveCamera & | camera, |
double & | left, | ||
double & | right, | ||
double & | bottom, | ||
double & | top | ||
) | const |
void GLSceneRenderer::getViewport | ( | int & | out_x, |
int & | out_y, | ||
int & | out_width, | ||
int & | out_height | ||
) | const |
void GLSceneRenderer::getViewVolume | ( | const SgOrthographicCamera & | camera, |
double & | left, | ||
double & | right, | ||
double & | bottom, | ||
double & | top | ||
) | const |
|
virtual |
Implements cnoid::SceneRenderer.
bool GLSceneRenderer::initializeGL | ( | ) |
|
virtual |
This function does the same things as beginRendering() except that actual GL commands are not executed. This should only be called when you want to initialize the rendering without doing any GL rendering commands. For example, you can obtain cameras without rendering, and you can render the scene after selecting the current camera.
Implements cnoid::SceneRenderer.
bool GLSceneRenderer::isPicking | ( | ) |
|
virtual |
Implements cnoid::SceneRenderer.
bool GLSceneRenderer::pick | ( | int | x, |
int | y | ||
) |
const std::vector< SgNode * > & GLSceneRenderer::pickedNodePath | ( | ) | const |
const Vector3 & GLSceneRenderer::pickedPoint | ( | ) | const |
|
virtual |
Implements cnoid::SceneRenderer.
|
virtual |
Implements cnoid::SceneRenderer.
void GLSceneRenderer::requestToClearCache | ( | ) |
|
virtual |
Implements cnoid::SceneRenderer.
|
virtual |
Implements cnoid::SceneRenderer.
void GLSceneRenderer::setAmbientColor | ( | const Vector4f & | color | ) |
void GLSceneRenderer::setAsDefaultLight | ( | SgLight * | light | ) |
void GLSceneRenderer::setBackgroundColor | ( | const Vector3f & | color | ) |
void GLSceneRenderer::setColor | ( | const Vector4f & | color | ) |
|
virtual |
Implements cnoid::SceneRenderer.
|
virtual |
Implements cnoid::SceneRenderer.
void GLSceneRenderer::setDefaultColor | ( | const Vector4f & | color | ) |
void GLSceneRenderer::setDefaultLighting | ( | bool | on | ) |
void GLSceneRenderer::setDefaultLineWidth | ( | double | width | ) |
void GLSceneRenderer::setDefaultPointSize | ( | double | size | ) |
void GLSceneRenderer::setDefaultSmoothShading | ( | bool | on | ) |
void GLSceneRenderer::setDiffuseColor | ( | const Vector4f & | color | ) |
void GLSceneRenderer::setEmissionColor | ( | const Vector4f & | color | ) |
void GLSceneRenderer::setFrontCCW | ( | bool | on | ) |
|
virtual |
Implements cnoid::SceneRenderer.
void GLSceneRenderer::setHeadLightLightingFromBackEnabled | ( | bool | on | ) |
void GLSceneRenderer::setLightModelTwoSide | ( | bool | on | ) |
void GLSceneRenderer::setLineWidth | ( | float | width | ) |
void GLSceneRenderer::setNewDisplayListDoubleRenderingEnabled | ( | bool | on | ) |
void GLSceneRenderer::setPointSize | ( | float | size | ) |
void GLSceneRenderer::setPolygonMode | ( | PolygonMode | mode | ) |
void GLSceneRenderer::setShininess | ( | float | shininess | ) |
void GLSceneRenderer::setSpecularColor | ( | const Vector4f & | color | ) |
bool GLSceneRenderer::setSwapInterval | ( | int | interval | ) |
|
virtual |
Implements cnoid::SceneRenderer.
void GLSceneRenderer::showNormalVectors | ( | double | length | ) |
|
virtual |
Implements cnoid::SceneRenderer.
|
virtual |
Implements cnoid::SceneRenderer.
|
virtual |
Implements cnoid::SceneRenderer.
void GLSceneRenderer::unsetDefaultLight | ( | SgLight * | light | ) |
|
virtual |
Implements cnoid::SceneRenderer.
|
virtual |
Reimplemented from cnoid::SceneVisitor.
|
virtual |
Reimplemented from cnoid::SceneVisitor.
|
virtual |
Reimplemented from cnoid::SceneVisitor.
|
virtual |
Reimplemented from cnoid::SceneVisitor.
|
virtual |
Reimplemented from cnoid::SceneVisitor.
|
virtual |
Reimplemented from cnoid::SceneVisitor.
|
virtual |
Reimplemented from cnoid::SceneVisitor.
|
virtual |
Reimplemented from cnoid::SceneVisitor.
|
virtual |
Reimplemented from cnoid::SceneVisitor.
|
virtual |
Reimplemented from cnoid::SceneVisitor.
|
virtual |
Reimplemented from cnoid::SceneVisitor.
|
friend |