[f949a5]: / VoxelPlotter.m

Download this file

16 lines (16 with data), 348 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
function [vol_handle,FV]=VoxelPlotter(VoxelMat,Vox_Size)
%detect the external voxels and faces
vol_handle=0;
if nargin==1
Vox_Size=1;
end
FV=FindExternalVoxels(VoxelMat,Vox_Size);
%plot only external faces of external voxels
cla;
if size(FV.vertices,1)==0
cla;
else
%patch voxel
vol_handle=patch(FV,'FaceColor','r');
end
end