![]() |
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.
|
The class allows to operate over voxels/surface on the relatively low-level. More...
#include <CoreAPI.h>
Public Member Functions | |
| bool | valid () const |
| checks if object is valid More... | |
| bool | isSurface () const |
| Check if in surface mode. More... | |
| bool | isVoxelized () const |
| Check if in voxel mode. More... | |
| void | toSurface () |
| turn to surface mode, the triangles will be tangentially relaxed More... | |
| void | toVoxels () |
| turn to voxels, auto-voxelize More... | |
| void | mergeMesh (const Mesh &mesh, const mat4 &transform=mat4::Identity, BoolOpType op=BOOL_MERGE) |
| merge the mesh into scene More... | |
| Volume & | makeVoxelFigure (std::function< float(vec3)> densityFunction, const list< vec3 > &growCenters, bool Subtract=false, bool useTempLocation=false, bool overHidden=false) |
| This function is fast (generally realtime) way to fill the volume with voxels. Voxel Brush Engune completely based on this routine. More... | |
| float | getExactDencity (int x, int y, int z, bool fromBackup, cache &cache_ref) |
| returns the exact voxel density in local space at the exact integer location More... | |
| float | getInterpolatedValue (const vec3 &pos, bool fromBackup) |
| returns interolated voxels density More... | |
The class allows to operate over voxels/surface on the relatively low-level.
| float coat::Volume::getExactDencity | ( | int | x, |
| int | y, | ||
| int | z, | ||
| bool | fromBackup, | ||
| cache & | cache_ref | ||
| ) |
returns the exact voxel density in local space at the exact integer location
| x | X-coordinate |
| y | Y-coordinate (up) |
| z | Z-coordinate |
| fromBackup | take the values from the backup (kept before the modifications started) |
| define | the variable coat::Volume::cache and pass there (in sae thread) to speed up access; |
| float coat::Volume::getInterpolatedValue | ( | const vec3 & | pos, |
| bool | fromBackup | ||
| ) |
returns interolated voxels density
| pos | position in local space |
| fromBackup | take from the backup |
| bool coat::Volume::isSurface | ( | ) | const |
Check if in surface mode.
| bool coat::Volume::isVoxelized | ( | ) | const |
Check if in voxel mode.
| coat::Volume & coat::Volume::makeVoxelFigure | ( | std::function< float(vec3)> | densityFunction, |
| const list< vec3 > & | growCenters, | ||
| bool | Subtract = false, |
||
| bool | useTempLocation = false, |
||
| bool | overHidden = false |
||
| ) |
This function is fast (generally realtime) way to fill the volume with voxels. Voxel Brush Engune completely based on this routine.
| densityFunction | the function should return the value 0..1, where 0 means empty, 1-filled, 0.5 means we are on the surface. Be careful, function should be limited in space. Coordinates passed in volume's local space. |
| growCenters | the list of points where function is not zero - that are grow centers |
| Subtract | true if you need to subtract, in this case you return value that will be subtracted from the volume |
| useTempLocation | if true all your modifications will be applied after you will finish all chnages |
| overHidden | if true the function will work as Hide tool (Subtract taken into account) |
| void coat::Volume::mergeMesh | ( | const Mesh & | mesh, |
| const mat4 & | transform = mat4::Identity, |
||
| BoolOpType | op = BOOL_MERGE |
||
| ) |
merge the mesh into scene
| mesh | the Mesh rference |
| transform | the transform applied |
| op | the type of the merge |
References coat::BOOL_ADD, and coat::BOOL_MERGE.
| void coat::Volume::toSurface | ( | ) |
turn to surface mode, the triangles will be tangentially relaxed
| void coat::Volume::toVoxels | ( | ) |
turn to voxels, auto-voxelize
| bool coat::Volume::valid | ( | ) | const |
checks if object is valid