| 103 | } |
| 104 | |
| 105 | void Points::updateBuffer(RTCBufferType type, unsigned int slot) |
| 106 | { |
| 107 | if (type == RTC_BUFFER_TYPE_VERTEX) { |
| 108 | if (slot >= vertices.size()) |
| 109 | throw_RTCError(RTC_ERROR_INVALID_ARGUMENT, "invalid buffer slot"); |
| 110 | vertices[slot].setModified(); |
| 111 | } else if (type == RTC_BUFFER_TYPE_NORMAL) { |
| 112 | if (slot >= normals.size()) |
| 113 | throw_RTCError(RTC_ERROR_INVALID_ARGUMENT, "invalid buffer slot"); |
| 114 | normals[slot].setModified(); |
| 115 | } else if (type == RTC_BUFFER_TYPE_VERTEX_ATTRIBUTE) { |
| 116 | if (slot >= vertexAttribs.size()) |
| 117 | throw_RTCError(RTC_ERROR_INVALID_ARGUMENT, "invalid buffer slot"); |
| 118 | vertexAttribs[slot].setModified(); |
| 119 | } else { |
| 120 | throw_RTCError(RTC_ERROR_INVALID_ARGUMENT, "unknown buffer type"); |
| 121 | } |
| 122 | |
| 123 | Geometry::update(); |
| 124 | } |
| 125 | |
| 126 | void Points::setMaxRadiusScale(float s) { |
| 127 | maxRadiusScale = s; |
no test coverage detected