Blender V5.0
Octree Class Reference

#include <octree.h>

Public Member Functions

 Octree (const BoundBox &bbox)
 ~Octree ()=default
void build (Device *, Progress &, const Object *, const Shader *)
void flatten (KernelOctreeNode *, const int, const std::shared_ptr< OctreeNode > &, int &) const
void set_flattened (const bool=true)
bool is_flattened () const
int flatten_index (int x, int y, int z) const
float3 index_to_position (int x, int y, int z) const
float3 voxel_size () const
int get_num_nodes () const
std::shared_ptr< OctreeNodeget_root () const
bool is_built () const
void visualize (std::ofstream &file, const std::string object_name) const
 Octree (ModelReader *mr, DualConAllocOutput alloc_output_func, DualConAddVert add_vert_func, DualConAddQuad add_quad_func, DualConFlags flags, DualConMode dualcon_mode, int depth, float threshold, float sharpness)
 ~Octree ()
void scanConvert ()
void * getOutputMesh ()

Public Attributes

VirtualMemoryAllocatoralloc [9]
VirtualMemoryAllocatorleafalloc [4]
Noderoot
ModelReaderreader
Cubescubes
int dimen
int mindimen
int minshift
int maxDepth
float origin [3]
float range
int nodeCount
int nodeSpace
int nodeCounts [9]
int actualQuads
int actualVerts
PathListringList
int maxTrianglePerCell
int outType
int use_flood_fill
float thresh
int use_manifold
float hermite_num
DualConMode mode

Detailed Description

Class for building and processing an octree

Definition at line 58 of file cycles/bvh/octree.h.

Constructor & Destructor Documentation

◆ Octree() [1/2]

Octree::Octree ( const BoundBox & bbox)

Definition at line 381 of file cycles/bvh/octree.cpp.

References BoundBox::min.

◆ ~Octree() [1/2]

Octree::~Octree ( )
default

Definition at line 91 of file dualcon/intern/octree.cpp.

References cubes.

◆ Octree() [2/2]

Octree::Octree ( ModelReader * mr,
DualConAllocOutput alloc_output_func,
DualConAddVert add_vert_func,
DualConAddQuad add_quad_func,
DualConFlags flags,
DualConMode dualcon_mode,
int depth,
float threshold,
float sharpness )

◆ ~Octree() [2/2]

Octree::~Octree ( )

Destructor

Member Function Documentation

◆ build()

void Octree::build ( Device * device,
Progress & progress,
const Object * object,
const Shader * shader )

◆ flatten()

void Octree::flatten ( KernelOctreeNode * knodes,
const int current_index,
const std::shared_ptr< OctreeNode > & node,
int & child_index ) const

◆ flatten_index()

CCL_NAMESPACE_BEGIN __forceinline int Octree::flatten_index ( int x,
int y,
int z ) const

Definition at line 21 of file cycles/bvh/octree.cpp.

References __forceinline, x, y, and z().

Referenced by fill_shader_input(), and read_shader_output().

◆ get_num_nodes()

int Octree::get_num_nodes ( ) const

Definition at line 394 of file cycles/bvh/octree.cpp.

◆ get_root()

std::shared_ptr< OctreeNode > Octree::get_root ( ) const

Definition at line 399 of file cycles/bvh/octree.cpp.

◆ getOutputMesh()

void * Octree::getOutputMesh ( )
inline

Definition at line 279 of file dualcon/intern/octree.h.

Referenced by dualcon().

◆ index_to_position()

__forceinline float3 Octree::index_to_position ( int x,
int y,
int z ) const

Definition at line 72 of file cycles/bvh/octree.cpp.

References __forceinline, make_float3(), x, y, and z().

Referenced by fill_shader_input().

◆ is_built()

bool Octree::is_built ( ) const

Definition at line 389 of file cycles/bvh/octree.cpp.

◆ is_flattened()

bool Octree::is_flattened ( ) const

Definition at line 345 of file cycles/bvh/octree.cpp.

◆ scanConvert()

void Octree::scanConvert ( )

Scan convert

Definition at line 97 of file dualcon/intern/octree.cpp.

References dc_printf, root, and use_flood_fill.

Referenced by dualcon().

◆ set_flattened()

void Octree::set_flattened ( const bool flattened = true)

Definition at line 340 of file cycles/bvh/octree.cpp.

◆ visualize()

void Octree::visualize ( std::ofstream & file,
const std::string object_name ) const

Definition at line 445 of file cycles/bvh/octree.cpp.

References size(), and str.

◆ voxel_size()

__forceinline float3 Octree::voxel_size ( ) const

Definition at line 77 of file cycles/bvh/octree.cpp.

References __forceinline.

Referenced by fill_shader_input().

Member Data Documentation

◆ actualQuads

int Octree::actualQuads

Definition at line 239 of file dualcon/intern/octree.h.

◆ actualVerts

int Octree::actualVerts

Definition at line 239 of file dualcon/intern/octree.h.

◆ alloc

VirtualMemoryAllocator* Octree::alloc[9]

Memory allocators

Definition at line 211 of file dualcon/intern/octree.h.

◆ cubes

Cubes* Octree::cubes

Marching cubes table

Definition at line 221 of file dualcon/intern/octree.h.

Referenced by Octree(), and ~Octree().

◆ dimen

int Octree::dimen

Length of grid

Definition at line 224 of file dualcon/intern/octree.h.

Referenced by Octree().

◆ hermite_num

float Octree::hermite_num

Definition at line 252 of file dualcon/intern/octree.h.

Referenced by Octree().

◆ leafalloc

VirtualMemoryAllocator* Octree::leafalloc[4]

Definition at line 212 of file dualcon/intern/octree.h.

◆ maxDepth

int Octree::maxDepth

Maximum depth

Definition at line 228 of file dualcon/intern/octree.h.

Referenced by Octree().

◆ maxTrianglePerCell

int Octree::maxTrianglePerCell

Definition at line 243 of file dualcon/intern/octree.h.

Referenced by Octree().

◆ mindimen

int Octree::mindimen

Definition at line 225 of file dualcon/intern/octree.h.

Referenced by Octree().

◆ minshift

int Octree::minshift

Definition at line 225 of file dualcon/intern/octree.h.

Referenced by Octree().

◆ mode

DualConMode Octree::mode

Definition at line 254 of file dualcon/intern/octree.h.

Referenced by Octree().

◆ nodeCount

int Octree::nodeCount

Counting information

Definition at line 235 of file dualcon/intern/octree.h.

Referenced by Octree().

◆ nodeCounts

int Octree::nodeCounts[9]

Definition at line 237 of file dualcon/intern/octree.h.

◆ nodeSpace

int Octree::nodeSpace

Definition at line 236 of file dualcon/intern/octree.h.

Referenced by Octree().

◆ origin

float Octree::origin[3]

The lower corner of the bounding box and the size

Definition at line 231 of file dualcon/intern/octree.h.

Referenced by Octree().

◆ outType

int Octree::outType

Definition at line 244 of file dualcon/intern/octree.h.

◆ range

float Octree::range

Definition at line 232 of file dualcon/intern/octree.h.

Referenced by Octree().

◆ reader

ModelReader* Octree::reader

Model reader

Definition at line 218 of file dualcon/intern/octree.h.

Referenced by Octree().

◆ ringList

PathList* Octree::ringList

Definition at line 241 of file dualcon/intern/octree.h.

◆ root

Node* Octree::root

Root node

Definition at line 215 of file dualcon/intern/octree.h.

Referenced by Octree(), and scanConvert().

◆ thresh

float Octree::thresh

Definition at line 248 of file dualcon/intern/octree.h.

Referenced by Octree().

◆ use_flood_fill

int Octree::use_flood_fill

Definition at line 247 of file dualcon/intern/octree.h.

Referenced by Octree(), and scanConvert().

◆ use_manifold

int Octree::use_manifold

Definition at line 250 of file dualcon/intern/octree.h.

Referenced by Octree().


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