Compare commits
2 Commits
1989ff4cc2
...
3c2db2dc2c
Author | SHA1 | Date | |
---|---|---|---|
3c2db2dc2c | |||
6859c8b200 |
@ -127,11 +127,11 @@ class KDTree {
|
|||||||
nearest = current_distance;
|
nearest = current_distance;
|
||||||
nearest_triangle = triangle;
|
nearest_triangle = triangle;
|
||||||
result = current_result;
|
result = current_result;
|
||||||
} else {
|
}
|
||||||
|
}
|
||||||
|
|
||||||
delete[] current_result.c;
|
delete[] current_result.c;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Is the ray origin within the left or right child node bounding box?
|
// Is the ray origin within the left or right child node bounding box?
|
||||||
Node *near =
|
Node *near =
|
||||||
|
14
main.cpp
14
main.cpp
@ -205,20 +205,6 @@ int main(int argc, char **argv) {
|
|||||||
ring->assign<Material>(0.1, 0.9);
|
ring->assign<Material>(0.1, 0.9);
|
||||||
ring->get<Transform>()->set_origin(glm::vec3(-5.0f, 2.0f, 0.0f));
|
ring->get<Transform>()->set_origin(glm::vec3(-5.0f, 2.0f, 0.0f));
|
||||||
|
|
||||||
/* for (int i = 0; i < 20; i++) {
|
|
||||||
Entity *ring = world->create();
|
|
||||||
ring->assign<Transform>();
|
|
||||||
ring->assign<ObjMesh>(ObjMesh("Resources/ring.obj", ObjMesh::Settings()));
|
|
||||||
ring->assign<Texture>("Resources/Metal007_2K_Color.jpg", Texture::Settings(true),
|
|
||||||
false); ring->get<Texture>()->addNormalmap("Resources/Metal007_2K_Normal.jpg",
|
|
||||||
Texture::Settings(true));
|
|
||||||
ring->assign<Material>(0.1, 0.9);
|
|
||||||
ring->get<Transform>()->set_origin(
|
|
||||||
glm::vec3(((float)(rand() - RAND_MAX / 2) / (float)RAND_MAX) * 50.0,
|
|
||||||
((float)(rand() - RAND_MAX / 2) / (float)RAND_MAX) * 50.0,
|
|
||||||
((float)(rand() - RAND_MAX / 2) / (float)RAND_MAX) * 50.0));
|
|
||||||
} */
|
|
||||||
|
|
||||||
Entity *sun = world->create();
|
Entity *sun = world->create();
|
||||||
sun->assign<DirectionalLight>(glm::normalize(glm::vec3(1.0, 1.0, 1.0)));
|
sun->assign<DirectionalLight>(glm::normalize(glm::vec3(1.0, 1.0, 1.0)));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user