Choreonoid  1.8
Public Member Functions | Protected Member Functions | List of all members
cnoid::GL1SceneRenderer Class Reference

#include <GL1SceneRenderer.h>

Inheritance diagram for cnoid::GL1SceneRenderer:
cnoid::GLSceneRenderer cnoid::SceneRenderer

Public Member Functions

 GL1SceneRenderer (SgGroup *root=nullptr)
 
virtual ~GL1SceneRenderer ()
 
virtual void setOutputStream (std::ostream &os) override
 
virtual PolymorphicSceneNodeFunctionSetrenderingFunctions () override
 
virtual void renderCustomGroup (SgGroup *transform, std::function< void()> traverseFunction) override
 
virtual void renderCustomTransform (SgTransform *transform, std::function< void()> traverseFunction) override
 
virtual void renderNode (SgNode *node) override
 
virtual void addNodeDecoration (SgNode *targetNode, NodeDecorationFunction func, int id) override
 
virtual void clearNodeDecorations (int id) override
 
virtual const Affine3currentModelTransform () const override
 
virtual const Matrix4projectionMatrix () const override
 
virtual double projectedPixelSizeRatio (const Vector3 &position) const override
 
virtual bool initializeGL () override
 
virtual void flushGL () override
 
virtual const std::string & glVendor () const override
 
virtual void setViewport (int x, int y, int width, int height) override
 
virtual const Vector3pickedPoint () const override
 
virtual const SgNodePathpickedNodePath () const override
 
virtual bool isRenderingPickingImage () const override
 
virtual void setLightingMode (LightingMode mode) override
 
virtual LightingMode lightingMode () const override
 
void setHeadLightLightingFromBackEnabled (bool on)
 
virtual void setDefaultSmoothShading (bool on) override
 
virtual SgMaterialdefaultMaterial () override
 
virtual void enableTexture (bool on) override
 
virtual void setDefaultPointSize (double size) override
 
virtual void setDefaultLineWidth (double width) override
 
virtual void showNormalVectors (double length) override
 
virtual void requestToClearResources () override
 
virtual void enableUnusedResourceCheck (bool on) override
 
virtual void setColor (const Vector3f &color) override
 
virtual void setBackFaceCullingMode (int mode) override
 
virtual int backFaceCullingMode () const override
 
- Public Member Functions inherited from cnoid::GLSceneRenderer
 GLSceneRenderer (SgGroup *root=nullptr)
 
virtual ~GLSceneRenderer ()
 
virtual SgGroupsceneRoot () override
 
virtual SgGroupscene () override
 
virtual void clearGL ()
 
virtual void setDefaultFramebufferObject (unsigned int id)
 
virtual void updateViewportInformation (int x, int y, int width, int height)
 
Array4i viewport () const
 
void getViewport (int &out_x, int &out_y, int &out_width, int &out_height) const
 
double aspectRatio () const
 
void getPerspectiveProjectionMatrix (double fovy, double aspect, double zNear, double zFar, Matrix4 &out_matrix)
 
void getOrthographicProjectionMatrix (double left, double right, double bottom, double top, double nearVal, double farVal, Matrix4 &out_matrix)
 
void getViewFrustum (const SgPerspectiveCamera *camera, double &left, double &right, double &bottom, double &top) const
 
void getViewVolume (const SgOrthographicCamera *camera, float &out_left, float &out_right, float &out_bottom, float &out_top) const
 
bool unproject (double x, double y, double z, Vector3 &out_projected) const
 
const Vector3f & backgroundColor () const
 
void setBackgroundColor (const Vector3f &color)
 
const Vector3f & defaultColor () const
 
void setDefaultColor (const Vector3f &color)
 
virtual void clearShadows ()
 
virtual void enableShadowOfLight (int index, bool on=true)
 
virtual void enableShadowAntiAliasing (bool on)
 
virtual void setUpsideDown (bool on)
 
virtual void setBoundingBoxRenderingForLightweightRenderingGroupEnabled (bool on)
 
virtual void setPickingImageOutputEnabled (bool on)
 
virtual bool getPickingImage (Image &out_image)
 
virtual bool isShadowCastingAvailable () const
 
- Public Member Functions inherited from cnoid::SceneRenderer
 SceneRenderer ()
 
virtual ~SceneRenderer ()
 
void setName (const std::string &name)
 
const std::string & name () const
 
virtual void applyExtensions ()
 
virtual bool applyNewExtensions ()
 
virtual void clearScene ()
 
int numCameras () const
 
SgCameracamera (int index)
 
const SgNodePathcameraPath (int index) const
 
const Isometry3cameraPosition (int index) const
 
const Isometry3currentCameraPosition () const
 
SignalProxy< void()> sigCamerasChanged () const
 
SgCameracurrentCamera () 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)
 
SgLightheadLight ()
 
void setHeadLight (SgLight *light)
 
void enableAdditionalLights (bool on)
 
void enableFog (bool on)
 
bool isFogEnabled () const
 
int numFogs () const
 
SgFogfog (int index) const
 
void extractPreprocessedNodes ()
 
void setFlagVariableToUpdatePreprocessedNodeTree (bool &flag)
 
void render ()
 
bool pick (int x, int y)
 
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
 

Protected Member Functions

virtual void doRender () override
 
virtual bool doPick (int x, int y) override
 

Additional Inherited Members

- Public Types inherited from cnoid::GLSceneRenderer
enum  RendererType { GL1_RENDERER, GLSL_RENDERER }
 
enum  LightingMode {
  NormalLighting, MinimumLighting, SolidColorLighting, NoLighting,
  NumLightingModes
}
 
enum  CullingMode { ENABLE_BACK_FACE_CULLING, DISABLE_BACK_FACE_CULLING, FORCE_BACK_FACE_CULLING, N_CULLING_MODES }
 
- Public Types inherited from cnoid::SceneRenderer
typedef PolymorphicSceneNodeFunctionSet NodeFunctionSet
 
typedef std::function< SgNode *(SgNode *targetNode)> NodeDecorationFunction
 
- Static Public Member Functions inherited from cnoid::GLSceneRenderer
static void initializeClass ()
 
static int rendererType ()
 
static GLSceneRenderercreate (SgGroup *root=nullptr)
 
- Static Public Member Functions inherited from cnoid::SceneRenderer
static void addExtension (std::function< void(SceneRenderer *renderer)> func)
 

Constructor & Destructor Documentation

◆ GL1SceneRenderer()

GL1SceneRenderer::GL1SceneRenderer ( SgGroup root = nullptr)

◆ ~GL1SceneRenderer()

GL1SceneRenderer::~GL1SceneRenderer ( )
virtual

Member Function Documentation

◆ addNodeDecoration()

void GL1SceneRenderer::addNodeDecoration ( SgNode targetNode,
NodeDecorationFunction  func,
int  id 
)
overridevirtual

Implements cnoid::SceneRenderer.

◆ backFaceCullingMode()

int GL1SceneRenderer::backFaceCullingMode ( ) const
overridevirtual

◆ clearNodeDecorations()

void GL1SceneRenderer::clearNodeDecorations ( int  id)
overridevirtual

Implements cnoid::SceneRenderer.

◆ currentModelTransform()

const Affine3 & GL1SceneRenderer::currentModelTransform ( ) const
overridevirtual

Implements cnoid::SceneRenderer.

◆ defaultMaterial()

SgMaterial * GL1SceneRenderer::defaultMaterial ( )
overridevirtual

◆ doPick()

bool GL1SceneRenderer::doPick ( int  x,
int  y 
)
overrideprotectedvirtual

Reimplemented from cnoid::SceneRenderer.

◆ doRender()

void GL1SceneRenderer::doRender ( )
overrideprotectedvirtual

Implements cnoid::SceneRenderer.

◆ enableTexture()

void GL1SceneRenderer::enableTexture ( bool  on)
overridevirtual

◆ enableUnusedResourceCheck()

void GL1SceneRenderer::enableUnusedResourceCheck ( bool  on)
overridevirtual

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.

Implements cnoid::GLSceneRenderer.

◆ flushGL()

void GL1SceneRenderer::flushGL ( )
overridevirtual

◆ glVendor()

const std::string & GL1SceneRenderer::glVendor ( ) const
overridevirtual

◆ initializeGL()

bool GL1SceneRenderer::initializeGL ( )
overridevirtual

◆ isRenderingPickingImage()

bool GL1SceneRenderer::isRenderingPickingImage ( ) const
overridevirtual

Reimplemented from cnoid::SceneRenderer.

◆ lightingMode()

GLSceneRenderer::LightingMode GL1SceneRenderer::lightingMode ( ) const
overridevirtual

◆ pickedNodePath()

const SgNodePath & GL1SceneRenderer::pickedNodePath ( ) const
overridevirtual

◆ pickedPoint()

const Vector3 & GL1SceneRenderer::pickedPoint ( ) const
overridevirtual

◆ projectedPixelSizeRatio()

double GL1SceneRenderer::projectedPixelSizeRatio ( const Vector3 position) const
overridevirtual

Implements cnoid::SceneRenderer.

◆ projectionMatrix()

const Matrix4 & GL1SceneRenderer::projectionMatrix ( ) const
overridevirtual

Implements cnoid::SceneRenderer.

◆ renderCustomGroup()

void GL1SceneRenderer::renderCustomGroup ( SgGroup transform,
std::function< void()>  traverseFunction 
)
overridevirtual

Implements cnoid::SceneRenderer.

◆ renderCustomTransform()

void GL1SceneRenderer::renderCustomTransform ( SgTransform transform,
std::function< void()>  traverseFunction 
)
overridevirtual

Implements cnoid::SceneRenderer.

◆ renderingFunctions()

SceneRenderer::NodeFunctionSet * GL1SceneRenderer::renderingFunctions ( )
overridevirtual

Implements cnoid::SceneRenderer.

◆ renderNode()

void GL1SceneRenderer::renderNode ( SgNode node)
overridevirtual

Implements cnoid::SceneRenderer.

◆ requestToClearResources()

void GL1SceneRenderer::requestToClearResources ( )
overridevirtual

◆ setBackFaceCullingMode()

void GL1SceneRenderer::setBackFaceCullingMode ( int  mode)
overridevirtual

◆ setColor()

void GL1SceneRenderer::setColor ( const Vector3f &  color)
overridevirtual

◆ setDefaultLineWidth()

void GL1SceneRenderer::setDefaultLineWidth ( double  width)
overridevirtual

◆ setDefaultPointSize()

void GL1SceneRenderer::setDefaultPointSize ( double  size)
overridevirtual

◆ setDefaultSmoothShading()

void GL1SceneRenderer::setDefaultSmoothShading ( bool  on)
overridevirtual

◆ setHeadLightLightingFromBackEnabled()

void GL1SceneRenderer::setHeadLightLightingFromBackEnabled ( bool  on)

◆ setLightingMode()

void GL1SceneRenderer::setLightingMode ( LightingMode  mode)
overridevirtual

◆ setOutputStream()

void GL1SceneRenderer::setOutputStream ( std::ostream &  os)
overridevirtual

Reimplemented from cnoid::GLSceneRenderer.

◆ setViewport()

void GL1SceneRenderer::setViewport ( int  x,
int  y,
int  width,
int  height 
)
overridevirtual

◆ showNormalVectors()

void GL1SceneRenderer::showNormalVectors ( double  length)
overridevirtual

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