Choreonoid
1.8
|
#include <SceneRenderer.h>
Classes | |
class | PropertyKey |
Public Types | |
typedef PolymorphicSceneNodeFunctionSet | NodeFunctionSet |
typedef std::function< SgNode *(SgNode *targetNode)> | NodeDecorationFunction |
Public Member Functions | |
SceneRenderer () | |
virtual | ~SceneRenderer () |
void | setName (const std::string &name) |
const std::string & | name () const |
virtual void | applyExtensions () |
virtual bool | applyNewExtensions () |
virtual SgGroup * | sceneRoot ()=0 |
virtual SgGroup * | scene ()=0 |
virtual void | clearScene () |
virtual PolymorphicSceneNodeFunctionSet * | renderingFunctions ()=0 |
virtual void | renderCustomGroup (SgGroup *group, std::function< void()> traverseFunction)=0 |
virtual void | renderCustomTransform (SgTransform *transform, std::function< void()> traverseFunction)=0 |
virtual void | renderNode (SgNode *node)=0 |
virtual void | addNodeDecoration (SgNode *targetNode, NodeDecorationFunction func, int id)=0 |
virtual void | clearNodeDecorations (int id)=0 |
int | numCameras () const |
SgCamera * | camera (int index) |
const SgNodePath & | cameraPath (int index) const |
const Isometry3 & | cameraPosition (int index) const |
const Isometry3 & | currentCameraPosition () const |
SignalProxy< void()> | sigCamerasChanged () const |
SgCamera * | currentCamera () const |
int | currentCameraIndex () const |
void | setCurrentCamera (int index) |
bool | setCurrentCamera (SgCamera *camera) |
SignalProxy< void()> | sigCurrentCameraChanged () |
std::vector< std::string > | simplifiedCameraPathStrings (int cameraIndex) |
bool | getSimplifiedCameraPathStrings (int cameraIndex, std::vector< std::string > &out_pathStrings) |
int | findCameraPath (const std::vector< std::string > &simplifiedPathStrings) |
bool | setCurrentCameraPath (const std::vector< std::string > &simplifiedPathStrings) |
void | setCurrentCameraAutoRestorationMode (bool on) |
int | numLights () const |
void | getLightInfo (int index, SgLight *&out_light, Isometry3 &out_position) const |
void | setAsDefaultLight (SgLight *light) |
void | unsetDefaultLight (SgLight *light) |
SgLight * | headLight () |
void | setHeadLight (SgLight *light) |
void | enableAdditionalLights (bool on) |
void | enableFog (bool on) |
bool | isFogEnabled () const |
int | numFogs () const |
SgFog * | fog (int index) const |
virtual const Affine3 & | currentModelTransform () const =0 |
virtual const Matrix4 & | projectionMatrix () const =0 |
virtual double | projectedPixelSizeRatio (const Vector3 &position) const =0 |
void | extractPreprocessedNodes () |
void | setFlagVariableToUpdatePreprocessedNodeTree (bool &flag) |
void | render () |
bool | pick (int x, int y) |
virtual bool | isRenderingPickingImage () const |
void | setProperty (PropertyKey key, bool value) |
void | setProperty (PropertyKey key, int value) |
void | setProperty (PropertyKey key, double value) |
bool | property (PropertyKey key, bool defaultValue) const |
int | property (PropertyKey key, int defaultValue) const |
double | property (PropertyKey key, double defaultValue) const |
Static Public Member Functions | |
static void | addExtension (std::function< void(SceneRenderer *renderer)> func) |
Protected Member Functions | |
virtual void | doRender ()=0 |
virtual bool | doPick (int x, int y) |
typedef std::function<SgNode*(SgNode* targetNode)> cnoid::SceneRenderer::NodeDecorationFunction |
SceneRenderer::SceneRenderer | ( | ) |
|
virtual |
|
static |
|
pure virtual |
Implemented in cnoid::GL1SceneRenderer, and cnoid::GLSLSceneRenderer.
|
virtual |
Reimplemented in cnoid::GLSLSceneRenderer.
|
virtual |
Reimplemented in cnoid::GLSLSceneRenderer.
SgCamera * SceneRenderer::camera | ( | int | index | ) |
const SgNodePath & SceneRenderer::cameraPath | ( | int | index | ) | const |
const Isometry3 & SceneRenderer::cameraPosition | ( | int | index | ) | const |
|
pure virtual |
Implemented in cnoid::GLSLSceneRenderer, and cnoid::GL1SceneRenderer.
|
virtual |
SgCamera * SceneRenderer::currentCamera | ( | ) | const |
int SceneRenderer::currentCameraIndex | ( | ) | const |
const Isometry3 & SceneRenderer::currentCameraPosition | ( | ) | const |
|
pure virtual |
Implemented in cnoid::GLSLSceneRenderer, and cnoid::GL1SceneRenderer.
|
protectedvirtual |
Reimplemented in cnoid::GLSLSceneRenderer, and cnoid::GL1SceneRenderer.
|
protectedpure virtual |
Implemented in cnoid::GLSLSceneRenderer, and cnoid::GL1SceneRenderer.
void SceneRenderer::enableAdditionalLights | ( | bool | on | ) |
void SceneRenderer::enableFog | ( | bool | on | ) |
void SceneRenderer::extractPreprocessedNodes | ( | ) |
This function updates the information on preprocessed nodes such as cameras, lights, and fogs.
int SceneRenderer::findCameraPath | ( | const std::vector< std::string > & | simplifiedPathStrings | ) |
SgFog * SceneRenderer::fog | ( | int | index | ) | const |
void SceneRenderer::getLightInfo | ( | int | index, |
SgLight *& | out_light, | ||
Isometry3 & | out_position | ||
) | const |
bool SceneRenderer::getSimplifiedCameraPathStrings | ( | int | cameraIndex, |
std::vector< std::string > & | out_pathStrings | ||
) |
SgLight * SceneRenderer::headLight | ( | ) |
bool SceneRenderer::isFogEnabled | ( | ) | const |
|
virtual |
Reimplemented in cnoid::GLSLSceneRenderer, and cnoid::GL1SceneRenderer.
const std::string & SceneRenderer::name | ( | ) | const |
int SceneRenderer::numCameras | ( | ) | const |
int SceneRenderer::numFogs | ( | ) | const |
int SceneRenderer::numLights | ( | ) | const |
bool SceneRenderer::pick | ( | int | x, |
int | y | ||
) |
|
pure virtual |
Implemented in cnoid::GLSLSceneRenderer, and cnoid::GL1SceneRenderer.
|
pure virtual |
Implemented in cnoid::GLSLSceneRenderer, and cnoid::GL1SceneRenderer.
bool SceneRenderer::property | ( | PropertyKey | key, |
bool | defaultValue | ||
) | const |
double SceneRenderer::property | ( | PropertyKey | key, |
double | defaultValue | ||
) | const |
int SceneRenderer::property | ( | PropertyKey | key, |
int | defaultValue | ||
) | const |
void SceneRenderer::render | ( | ) |
|
pure virtual |
Implemented in cnoid::GLSLSceneRenderer, and cnoid::GL1SceneRenderer.
|
pure virtual |
Implemented in cnoid::GLSLSceneRenderer, and cnoid::GL1SceneRenderer.
|
pure virtual |
Implemented in cnoid::GLSLSceneRenderer, and cnoid::GL1SceneRenderer.
|
pure virtual |
Implemented in cnoid::GLSLSceneRenderer, and cnoid::GL1SceneRenderer.
|
pure virtual |
Implemented in cnoid::GLSceneRenderer.
|
pure virtual |
Implemented in cnoid::GLSceneRenderer.
void SceneRenderer::setAsDefaultLight | ( | SgLight * | light | ) |
void SceneRenderer::setCurrentCamera | ( | int | index | ) |
bool SceneRenderer::setCurrentCamera | ( | SgCamera * | camera | ) |
void SceneRenderer::setCurrentCameraAutoRestorationMode | ( | bool | on | ) |
bool SceneRenderer::setCurrentCameraPath | ( | const std::vector< std::string > & | simplifiedPathStrings | ) |
void SceneRenderer::setFlagVariableToUpdatePreprocessedNodeTree | ( | bool & | flag | ) |
void SceneRenderer::setHeadLight | ( | SgLight * | light | ) |
void SceneRenderer::setName | ( | const std::string & | name | ) |
void SceneRenderer::setProperty | ( | PropertyKey | key, |
bool | value | ||
) |
void SceneRenderer::setProperty | ( | PropertyKey | key, |
double | value | ||
) |
void SceneRenderer::setProperty | ( | PropertyKey | key, |
int | value | ||
) |
SignalProxy< void()> SceneRenderer::sigCamerasChanged | ( | ) | const |
SignalProxy< void()> SceneRenderer::sigCurrentCameraChanged | ( | ) |
std::vector< std::string > SceneRenderer::simplifiedCameraPathStrings | ( | int | cameraIndex | ) |
void SceneRenderer::unsetDefaultLight | ( | SgLight * | light | ) |