3DCoat
3D-COAT 4.9.xx
3DCoat is the one application that has all the tools you need to take your 3D idea from a block of digital clay all the way to a production ready, fully textured organic or hard surface model.
|
Contains voxel values. More...
#include <VolumeCell.h>
Public Member Functions | |
void | Compact8 () |
Public Attributes | |
VolumeCellAttrib * | Attr |
Represents cell's polygonal surface. More... | |
VolumeObject * | Owner |
owner - who refers this cell More... | |
int | BackupDropTick |
Cells before this change. More... | |
VoxType * | Temp |
used as temp storage for voxels for some tools More... | |
VoxType * | Values |
Pointer to voxels array 9x9x9. More... | |
VoxType | SameValue |
WORD | RenderStamp |
if differs from other cells something happened and cell's mesh should be rebuilt More... | |
bool | HaveEmpty:1 |
has some emty space in cell - only for voxel mode More... | |
bool | HaveFilled:1 |
has filled spave, some alues are above 32767 More... | |
bool | IsDirty:1 |
mesh should be updated More... | |
bool | IsExplicit:1 |
cell is unpacked even if trivial, used temporary for operations, cell should be compactified after all dids More... | |
bool | ToErase:1 |
cell should be erased More... | |
bool | Hidden:1 |
cell hidden from render More... | |
bool | Locked:1 |
cell is locked for changes, rather used for temporary purposes More... | |
BYTE | Nx |
usually = 9, Cell is (Nx * Nx * Nx) More... | |
Contains voxel values.
Each volume / surface object consists of cells. In case of voxels all cells has same width in space - 8 voxels, array of voxels is 9x9x9 - last, 9's is from right neighbour cell.
In voxel mode you are operating with voxels, surface will be generated by voxels using marshing cubes.
In case of surface there is no voxel data (polygons / layers / colors) are kept in VolumeCellAttrib
.
void VolumeCell::Compact8 | ( | ) |
WhatTodo | 1 - allocate, 2 - fill, 3 - all |
References HaveEmpty, HaveFilled, IsExplicit, Owner, SameValue, and Values.
VolumeCellAttrib* VolumeCell::Attr |
Represents cell's polygonal surface.
If it is nullptr
, there are no faces in the cell.
Referenced by VolumeObject::AddIndexedCellTriangulation(), OneFacture::ApplyToChangedCells(), TopoDist::Create(), VolumeObject::CreateIndexedStructure(), VolumeObject::CreateIndexedStructure2(), VolumeObject::Decompose(), VoxTreeBranch::ProcessItem(), QuadrangulationParams::Quadrangulate(), VolumeObject::RemoveConnectedParts(), VolumeObject::Reproject(), VolumeObject::ToRawMesh(), and VolumeObject::VoxelizePureGeometry().
int VolumeCell::BackupDropTick |
Cells before this change.
Undo will get to this state when applied.
bool VolumeCell::HaveEmpty |
has some emty space in cell - only for voxel mode
Referenced by VolumeObject::AddIndexedCellTriangulation(), Compact8(), and VolumeObject::ToRawMesh().
bool VolumeCell::HaveFilled |
has filled spave, some alues are above 32767
Referenced by VolumeObject::AddIndexedCellTriangulation(), Compact8(), and VolumeObject::ToRawMesh().
bool VolumeCell::Hidden |
cell hidden from render
bool VolumeCell::IsDirty |
mesh should be updated
bool VolumeCell::IsExplicit |
cell is unpacked even if trivial, used temporary for operations, cell should be compactified after all dids
Referenced by Compact8().
bool VolumeCell::Locked |
cell is locked for changes, rather used for temporary purposes
Referenced by VolumeObject::RemoveConnectedParts(), and scalc::VolumeObjectCellsGPU::TrajectoryOverGPU().
BYTE VolumeCell::Nx |
usually = 9, Cell is (Nx * Nx * Nx)
Referenced by VolumeObject::AddIndexedCellTriangulation().
VolumeObject* VolumeCell::Owner |
owner - who refers this cell
Referenced by Compact8().
WORD VolumeCell::RenderStamp |
if differs from other cells something happened and cell's mesh should be rebuilt
VoxType VolumeCell::SameValue |
If cell is completely filled or empty and Values == nullptr
the value is used as cell filler.
Referenced by Compact8().
VoxType* VolumeCell::Temp |
used as temp storage for voxels for some tools
bool VolumeCell::ToErase |
cell should be erased
VoxType* VolumeCell::Values |
Pointer to voxels array 9x9x9.
Voxel values itself, <=32767 - empty space, >=32768 - filled space.
For details, it may be zero if all voxels are the same. In this case SameValue
contains this same value. Surface is determined by the value 32767 using marching cubes.
Referenced by scalc::VolumeObjectCellsGPU::AddCells(), VolumeObject::AddIndexedCellTriangulation(), scalc::VolumeObjectCellsGPU::BackToCells(), Compact8(), and scalc::VolumeObjectCellsGPU::TrajectoryOverGPU().