Skip to content

OglSceneFrame

Display a frame at the corner of the scene view.

Target: Sofa.GL.Component.Rendering3D

namespace: sofa::gl::component::rendering3d

parents:

  • VisualModel

Data

Name Description Default value
name object name unnamed
printLog if true, emits extra messages at runtime. 0
tags list of the subsets the object belongs to
bbox this object bounding box
componentState The state of the component among (Dirty, Valid, Undefined, Loading, Invalid). Undefined
listening if true, handle the events, otherwise ignore the events 0
enable Display the object or not 1
style Style of the frame - Arrows: The frame is composed of arrows - Cylinders: The frame is composed of cylinders - CubeCones: The frame is composed of cubes and cones Cylinders
alignment Alignment of the frame in the view - BottomLeft: The scene frame is displayed in the bottom-left corner - BottomRight: The scene frame is displayed in the bottom-right corner - TopRight: The scene frame is displayed in the top-right corner - TopLeft: The scene frame is displayed in the top-left corner BottomRight
viewportSize Size of the viewport where the frame is rendered 150
Visualization
draw Display the frame or not 1
Name Description Destination type name
context Graph Node containing this object (or BaseContext::getDefault() if no graph is used) BaseContext
slaves Sub-objects used internally by this object BaseObject
master nullptr for regular objects, or master object for which this object is one sub-objects BaseObject

Examples

OglSceneFrame.scn

<Node name="root" dt="0.01">
    <RequiredPlugin name="Sofa.Component.IO.Mesh"/> <!-- Needed to use components [MeshOBJLoader] -->
    <RequiredPlugin name="Sofa.GL.Component.Rendering3D"/> <!-- Needed to use components [OglModel OglSceneFrame] -->
    <DefaultAnimationLoop/>

    <MeshOBJLoader name="meshLoader_0" filename="mesh/liver-smooth.obj" handleSeams="1" />
    <OglModel name="VisualModel" src="@meshLoader_0" color="red" />
    <!-- <OglSceneFrame style="0"/> -->
    <OglSceneFrame style="1"/>
    <!-- <OglSceneFrame style="2"/> -->
</Node>
def createScene(root_node):

   root = root_node.addChild('root', dt="0.01")

   root.addObject('RequiredPlugin', name="Sofa.Component.IO.Mesh")
   root.addObject('RequiredPlugin', name="Sofa.GL.Component.Rendering3D")
   root.addObject('DefaultAnimationLoop', )
   root.addObject('MeshOBJLoader', name="meshLoader_0", filename="mesh/liver-smooth.obj", handleSeams="1")
   root.addObject('OglModel', name="VisualModel", src="@meshLoader_0", color="red")
   root.addObject('OglSceneFrame', style="1")