MCPcopy Create free account
hub / github.com/RenderKit/embree / updateBuffer

Method updateBuffer

kernels/common/scene_points.cpp:105–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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;

Callers 1

rtcUpdateGeometryBufferFunction · 0.45

Calls 2

setModifiedMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected