| 614 | } |
| 615 | |
| 616 | ISPCPointSet::ISPCPointSet (RTCDevice device, TutorialScene* scene_in, RTCGeometryType type, Ref<SceneGraph::PointSetNode> in) |
| 617 | : geom(POINTS), positions(nullptr), normals(nullptr), type(type) |
| 618 | { |
| 619 | geom.geometry = rtcNewGeometry(device, type); |
| 620 | |
| 621 | positions = (Vec3fa**) alignedUSMMalloc(sizeof(Vec3fa*)*in->numTimeSteps()); |
| 622 | for (size_t i=0; i<in->numTimeSteps(); i++) |
| 623 | positions[i] = (Vec3fa*) copyArrayToUSM(in->positions[i]); |
| 624 | |
| 625 | if (in->normals.size()) { |
| 626 | normals = (Vec3fa**) alignedUSMMalloc(sizeof(Vec3fa*)*in->numTimeSteps()); |
| 627 | for (size_t i=0; i<in->numTimeSteps(); i++) |
| 628 | normals[i] = copyArrayToUSM(in->normals[i]); |
| 629 | } |
| 630 | |
| 631 | startTime = in->time_range.lower; |
| 632 | endTime = in->time_range.upper; |
| 633 | numTimeSteps = (unsigned) in->numTimeSteps(); |
| 634 | numVertices = (unsigned) in->numVertices(); |
| 635 | geom.materialID = scene_in->materialID(in->material); |
| 636 | } |
| 637 | |
| 638 | ISPCPointSet::~ISPCPointSet () |
| 639 | { |
nothing calls this directly
no test coverage detected