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.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
VolumeCell Class Reference

Contains voxel values. More...

#include <VolumeCell.h>

Public Member Functions

void Compact8 ()
 

Public Attributes

VolumeCellAttribAttr
 Represents cell's polygonal surface. More...
 
VolumeObjectOwner
 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...
 

Detailed Description

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.

Member Function Documentation

void VolumeCell::Compact8 ( )
Parameters
WhatTodo1 - allocate, 2 - fill, 3 - all

References HaveEmpty, HaveFilled, IsExplicit, Owner, SameValue, and Values.

Member Data Documentation

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().


The documentation for this class was generated from the following files: