History

Merge branch 'master' of https://github.com/worklist/hifi into voxel_animation

ZappoMan committed 13 years ago

Commit 0bcd6292 parents 869a100 6f0035b12 files · +216 −231Browse files

Showing the changes to interface/src/VoxelSystem.cpp (1 of 12 files). Show all

Unified · Split

interface/src/VoxelSystem.cpp+16−1
@@ -659,7 +659,8 @@ void VoxelSystem::render(bool texture) { · 658 unmodified lines
659659 // draw the number of voxels we have
660660 glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _vboIndicesID);
661661 glScalef(TREE_SCALE, TREE_SCALE, TREE_SCALE);
662− glDrawElements(GL_TRIANGLES, 36 * _voxelsInReadArrays, GL_UNSIGNED_INT, 0);
662+ glDrawRangeElementsEXT(GL_TRIANGLES, 0, VERTICES_PER_VOXEL * _voxelsInReadArrays,
663+ 36 * _voxelsInReadArrays, GL_UNSIGNED_INT, 0);
663664
664665 glEnable(GL_BLEND);
665666 glDisable(GL_CULL_FACE);
@@ -925,6 +926,20 @@ bool VoxelSystem::findRayIntersection(const glm::vec3& origin, const glm::vec3& · 259 unmodified lines
925926 return true;
926927 }
927928
929+bool VoxelSystem::findSpherePenetration(const glm::vec3& center, float radius, glm::vec3& penetration) {
930+ pthread_mutex_lock(&_treeLock);
931+ bool result = _tree->findSpherePenetration(center, radius, penetration);
932+ pthread_mutex_unlock(&_treeLock);
933+ return result;
934+}
935+
936+bool VoxelSystem::findCapsulePenetration(const glm::vec3& start, const glm::vec3& end, float radius, glm::vec3& penetration) {
937+ pthread_mutex_lock(&_treeLock);
938+ bool result = _tree->findCapsulePenetration(start, end, radius, penetration);
939+ pthread_mutex_unlock(&_treeLock);
940+ return result;
941+}
942+
928943 class falseColorizeRandomEveryOtherArgs {
929944 public:
930945 falseColorizeRandomEveryOtherArgs() : totalNodes(0), colorableNodes(0), coloredNodes(0), colorThis(true) {};

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t