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

Method getBufferData

kernels/common/scene_points.cpp:85–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83 }
84
85 void* Points::getBufferData(RTCBufferType type, unsigned int slot, BufferDataPointerType pointerType)
86 {
87 if (type == RTC_BUFFER_TYPE_VERTEX) {
88 if (slot >= vertices.size())
89 throw_RTCError(RTC_ERROR_INVALID_ARGUMENT, "invalid buffer slot");
90 return vertices[slot].getPtr(pointerType);
91 } else if (type == RTC_BUFFER_TYPE_NORMAL) {
92 if (slot >= normals.size())
93 throw_RTCError(RTC_ERROR_INVALID_ARGUMENT, "invalid buffer slot");
94 return normals[slot].getPtr(pointerType);
95 } else if (type == RTC_BUFFER_TYPE_VERTEX_ATTRIBUTE) {
96 if (slot >= vertexAttribs.size())
97 throw_RTCError(RTC_ERROR_INVALID_ARGUMENT, "invalid buffer slot");
98 return vertexAttribs[slot].getPtr(pointerType);
99 } else {
100 throw_RTCError(RTC_ERROR_INVALID_ARGUMENT, "unknown buffer type");
101 return nullptr;
102 }
103 }
104
105 void Points::updateBuffer(RTCBufferType type, unsigned int slot)
106 {

Callers 2

rtcGetGeometryBufferDataFunction · 0.45

Calls 2

sizeMethod · 0.45
getPtrMethod · 0.45

Tested by

no test coverage detected