CylinderVisualModel
Visualize a set of cylinders.
Target: Sofa.Component.Visual
namespace: sofa::component::visual
parents:
- VisualModel
- VisualState
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 |
radius | Radius of the cylinder. | 1 |
color | Color of the cylinders. | 1 1 1 1 |
edges | List of edge indices | |
Vector | ||
position | Vertices coordinates | |
restPosition | Vertices rest coordinates | |
normal | Normals of the model |
Links
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
CylinderVisualModel.scn
<?xml version="1.0"?>
<Node name="root" dt="0.02">
<RequiredPlugin name="Sofa.Component.Visual"/> <!-- Needed to use components [VisualStyle, CylinderVisualModel] -->
<DefaultAnimationLoop/>
<VisualStyle displayFlags="showVisual" />
<CylinderVisualModel position="0 0 0 10 0 0 " edges="0 1" color="yellow" />
</Node>
def createScene(root_node):
root = root_node.addChild('root', dt="0.02")
root.addObject('RequiredPlugin', name="Sofa.Component.Visual")
root.addObject('DefaultAnimationLoop', )
root.addObject('VisualStyle', displayFlags="showVisual")
root.addObject('CylinderVisualModel', position="0 0 0 10 0 0 ", edges="0 1", color="yellow")