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

Method Instance

kernels/common/scene_instance.cpp:11–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9#if defined(EMBREE_LOWEST_ISA)
10
11 Instance::Instance (Device* device, Accel* object, unsigned int numTimeSteps)
12 : Geometry(device,Geometry::GTY_INSTANCE_CHEAP,1,numTimeSteps)
13 , object(object)
14 , local2world(nullptr)
15 {
16 if (object) object->refInc();
17 gsubtype = GTY_SUBTYPE_INSTANCE_LINEAR;
18 world2local0 = one;
19 device->memoryMonitor(numTimeSteps*sizeof(AffineSpace3ff), false);
20 local2world = (AffineSpace3ff*) device->malloc(numTimeSteps*sizeof(AffineSpace3ff),16,EmbreeMemoryType::MALLOC);
21 for (size_t i = 0; i < numTimeSteps; i++)
22 local2world[i] = one;
23 device->memoryMonitor(sizeof(*this), false);
24 }
25
26 Instance::~Instance()
27 {

Callers

nothing calls this directly

Calls 3

refIncMethod · 0.80
memoryMonitorMethod · 0.45
mallocMethod · 0.45

Tested by

no test coverage detected