Skip to content

Commit

Permalink
Decouple voxel volume size from entity scale
Browse files Browse the repository at this point in the history
  • Loading branch information
WhyPenguins committed Feb 13, 2020
1 parent a14f63b commit ce2efd5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ public override bool Enabled
public List<VoxelAttribute> Attributes { get; set; } = new List<VoxelAttribute>();


[DataMember(35)]
public float VoxelVolumeSize { get; set; } = 20f;
[DataMember(40)]
public float AproximateVoxelSize { get; set; } = 0.15f;
[DataMember(50)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,7 @@ private void RegenerateVoxelVolumes()
processedVoxelVolumes.Add(volume, new ProcessedVoxelVolume());

data.VolumeTranslation = volume.Entity.Transform.WorldMatrix.TranslationVector;
//data.VolumeSize = volume.Entity.Transform.Scale;
//TODO: Get non cube volumes working again
//Temporarily force to cube
float largestSide = Math.Max(volume.Entity.Transform.Scale.X, Math.Max(volume.Entity.Transform.Scale.Y, volume.Entity.Transform.Scale.Z));
data.VolumeSize = new Vector3(largestSide);
data.VolumeSize = new Vector3(volume.VoxelVolumeSize);


data.Voxelize = volume.Voxelize;
Expand Down

0 comments on commit ce2efd5

Please sign in to comment.