MCPcopy Create free account
hub / github.com/NVIDIA/cuda-samples / createPlane

Function createPlane

cpp/4_CUDA_Libraries/randomFog/randomFog.cpp:125–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123}
124
125void createPlane(void)
126{
127 int startVertex = 0;
128
129 for (int i = startVertex; i < g_nVerticesPopulated; i++) {
130 g_pVertices[i].x = (g_pRng->getNextU01() - .5f) * 2;
131
132 for (int j = 0; j < nSkip1; j++) {
133 g_pRng->getNextU01();
134 }
135
136 g_pVertices[i].y = (g_pRng->getNextU01() - .5f) * 2;
137
138 for (int j = 0; j < nSkip2; j++) {
139 g_pRng->getNextU01();
140 }
141
142 g_pVertices[i].z = 0.0f;
143
144 g_pVertices[i].r = 1.0f;
145 g_pVertices[i].g = 1.0f;
146 g_pVertices[i].b = 1.0f;
147 }
148}
149
150void createSphere(void)
151{

Callers 2

reCreateFunction · 0.85
keyboardFunction · 0.85

Calls 1

getNextU01Method · 0.80

Tested by

no test coverage detected