| 664 | |
| 665 | |
| 666 | Ref<SceneGraph::Node> SceneGraph::createGarbagePointSet(int hash, size_t numPoints, bool mblur, Ref<MaterialNode> material) |
| 667 | { |
| 668 | RandomSampler sampler; |
| 669 | RandomSampler_init(sampler,hash); |
| 670 | |
| 671 | Ref<SceneGraph::PointSetNode> mesh = new SceneGraph::PointSetNode(RTC_GEOMETRY_TYPE_SPHERE_POINT, material,BBox1f(0,1),mblur?2:1); |
| 672 | |
| 673 | for (size_t i = 0; i < numPoints; i++) |
| 674 | { |
| 675 | const float x = cast_i2f(RandomSampler_getUInt(sampler)); |
| 676 | const float y = cast_i2f(RandomSampler_getUInt(sampler)); |
| 677 | const float z = cast_i2f(RandomSampler_getUInt(sampler)); |
| 678 | const float r = cast_i2f(RandomSampler_getUInt(sampler)); |
| 679 | mesh->positions[0].push_back(Vec3ff(x, y, z, r)); |
| 680 | |
| 681 | if (mblur) |
| 682 | { |
| 683 | const float x = cast_i2f(RandomSampler_getUInt(sampler)); |
| 684 | const float y = cast_i2f(RandomSampler_getUInt(sampler)); |
| 685 | const float z = cast_i2f(RandomSampler_getUInt(sampler)); |
| 686 | const float r = cast_i2f(RandomSampler_getUInt(sampler)); |
| 687 | mesh->positions[1].push_back(Vec3ff(x, y, z, r)); |
| 688 | } |
| 689 | } |
| 690 | |
| 691 | return mesh.dynamicCast<SceneGraph::Node>(); |
| 692 | } |
| 693 | } |
nothing calls this directly
no test coverage detected