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
659 // draw the number of voxels we have659 // draw the number of voxels we have
660 glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _vboIndicesID);660 glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _vboIndicesID);
661 glScalef(TREE_SCALE, TREE_SCALE, TREE_SCALE);661 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);
663 664
664 glEnable(GL_BLEND);665 glEnable(GL_BLEND);
665 glDisable(GL_CULL_FACE);666 glDisable(GL_CULL_FACE);
@@ -925,6 +926,20 @@ bool VoxelSystem::findRayIntersection(const glm::vec3& origin, const glm::vec3& · 259 unmodified lines
925 return true;926 return true;
926}927}
927 928
929bool 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
936bool 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
928class falseColorizeRandomEveryOtherArgs {943class falseColorizeRandomEveryOtherArgs {
929public:944public:
930 falseColorizeRandomEveryOtherArgs() : totalNodes(0), colorableNodes(0), coloredNodes(0), colorThis(true) {};945 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