47 "ToolBarIco/SoftBody/SoftBody.png");
49 auto group = page->addGroup(
"Soft Body");
53 "ToolBarIco/SoftBody/SoftBody2.png",
54 [=]()->std::shared_ptr<Node> {
56 auto cloth = std::make_shared<Cloth<DataType3f>>();
59 auto pointRenderer = std::make_shared<GLPointVisualModule>();
60 pointRenderer->setColor(
Color(1, 0.2, 1));
61 pointRenderer->setColorMapMode(GLPointVisualModule::PER_OBJECT_SHADER);
62 pointRenderer->varPointSize()->setValue(0.002f);
63 cloth->stateTriangleSet()->connect(pointRenderer->inPointSet());
64 cloth->stateVelocity()->connect(pointRenderer->inColor());
66 cloth->graphicsPipeline()->pushModule(pointRenderer);
67 cloth->setVisible(
true);
69 auto wireRenderer = std::make_shared<GLWireframeVisualModule>();
70 wireRenderer->varBaseColor()->setValue(
Color(1.0, 0.8, 0.8));
71 wireRenderer->varRadius()->setValue(0.001f);
72 wireRenderer->varRenderMode()->setCurrentKey(GLWireframeVisualModule::CYLINDER);
73 cloth->stateTriangleSet()->connect(wireRenderer->inEdgeSet());
74 cloth->graphicsPipeline()->pushModule(wireRenderer);
76 auto surfaceRenderer = std::make_shared<GLSurfaceVisualModule>();
77 cloth->stateTriangleSet()->connect(surfaceRenderer->inTriangleSet());
78 cloth->graphicsPipeline()->pushModule(surfaceRenderer);
85 "ToolBarIco/SoftBody/SoftBody5.png",
86 [=]()->std::shared_ptr<Node> {
87 auto elasticBody = std::make_shared<ElasticBody<DataType3f>>();
void setDescription(std::string desc)
void setVersion(std::string pluginVersion)
void setName(std::string pluginName)