Skip to content

UpsamplePointCloud

Generates a denser point cloud from an input point cloud

Target: CGALPlugin

namespace: cgal

parents:

  • DataEngine

Data

Name Description Default value
name object name unnamed
printLog if true, emits extra messages at runtime. 0
tags list of the subsets the objet 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
Inputs
position Input point cloud positions
normals Input point cloud normals
Outputs
outputPosition Output denser point cloud positions
outputNormals Output normals of denser point cloud
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

UpsamplePointCloud.scn

<?xml version="1.0"?>
<Node name="root" gravity="0 0 0" dt="1"  >
    <RequiredPlugin pluginName="CGALPlugin"/>
  <RequiredPlugin pluginName='SofaOpenglVisual'/>

    <VisualStyle displayFlags="showVisual" />

    <Node name="PointCloud">
        <MeshOBJLoader name="loader" filename="mesh/liver.obj"/>
        <MeshTopology src="@loader"/>
        <MechanicalObject showObject="1" showObjectScale="5" showColor="1 0 0"/>
    </Node>

    <Node name="UpsamplePointCloud">
        <UpsamplePointCloud name="engine" src="@../PointCloud/loader"/>
        <MeshTopology name="topology" position="@engine.outputPosition"/>
        <MechanicalObject src="@topology" showObject="1" showObjectScale="5"/>
    </Node>

</Node>
def createScene(root_node):

   root = root_node.addChild('root', gravity="0 0 0", dt="1")

   root.addObject('RequiredPlugin', pluginName="CGALPlugin")
   root.addObject('RequiredPlugin', pluginName="SofaOpenglVisual")
   root.addObject('VisualStyle', displayFlags="showVisual")

   point_cloud = root.addChild('PointCloud')

   point_cloud.addObject('MeshOBJLoader', name="loader", filename="mesh/liver.obj")
   point_cloud.addObject('MeshTopology', src="@loader")
   point_cloud.addObject('MechanicalObject', showObject="1", showObjectScale="5", showColor="1 0 0")

   upsample_point_cloud = root.addChild('UpsamplePointCloud')

   upsample_point_cloud.addObject('UpsamplePointCloud', name="engine", src="@../PointCloud/loader")
   upsample_point_cloud.addObject('MeshTopology', name="topology", position="@engine.outputPosition")
   upsample_point_cloud.addObject('MechanicalObject', src="@topology", showObject="1", showObjectScale="5")