Blender V5.0
BVHSpatialSplit Class Reference

#include <split.h>

Public Member Functions

 BVHSpatialSplit ()
 BVHSpatialSplit (const BVHBuild &builder, BVHSpatialStorage *storage, const BVHRange &range, vector< BVHReference > &references, const float nodeSAH, const BVHUnaligned *unaligned_heuristic=nullptr, const Transform *aligned_space=nullptr)
void split (BVHBuild *builder, BVHRange &left, BVHRange &right, const BVHRange &range)
void split_reference (const BVHBuild &builder, BVHReference &left, BVHReference &right, const BVHReference &ref, const int dim, float pos)

Public Attributes

float sah
int dim
float pos

Protected Member Functions

void split_triangle_primitive (const Mesh *mesh, const Transform *tfm, const int prim_index, const int dim, const float pos, BoundBox &left_bounds, BoundBox &right_bounds)
void split_curve_primitive (const Hair *hair, const Transform *tfm, const int prim_index, const int segment_index, const int dim, const float pos, BoundBox &left_bounds, BoundBox &right_bounds)
void split_point_primitive (const PointCloud *pointcloud, const Transform *tfm, const int prim_index, const int dim, const float pos, BoundBox &left_bounds, BoundBox &right_bounds)
void split_triangle_reference (const BVHReference &ref, const Mesh *mesh, const int dim, const float pos, BoundBox &left_bounds, BoundBox &right_bounds)
void split_curve_reference (const BVHReference &ref, const Hair *hair, const int dim, const float pos, BoundBox &left_bounds, BoundBox &right_bounds)
void split_point_reference (const BVHReference &ref, const PointCloud *pointcloud, const int dim, const float pos, BoundBox &left_bounds, BoundBox &right_bounds)
void split_object_reference (const Object *object, const int dim, const float pos, BoundBox &left_bounds, BoundBox &right_bounds)
__forceinline BoundBox get_prim_bounds (const BVHReference &prim) const
__forceinline float3 get_unaligned_point (const float3 &point) const

Protected Attributes

BVHSpatialStoragestorage_
vector< BVHReference > * references_
const BVHUnalignedunaligned_heuristic_
const Transformaligned_space_

Detailed Description

Definition at line 59 of file bvh/split.h.

Constructor & Destructor Documentation

◆ BVHSpatialSplit() [1/2]

BVHSpatialSplit::BVHSpatialSplit ( )
inline

Definition at line 65 of file bvh/split.h.

References dim, FLT_MAX, nullptr, pos, references_, sah, and storage_.

◆ BVHSpatialSplit() [2/2]

Member Function Documentation

◆ get_prim_bounds()

__forceinline BoundBox BVHSpatialSplit::get_prim_bounds ( const BVHReference & prim) const
inlineprotected

Definition at line 147 of file bvh/split.h.

References __forceinline, aligned_space_, BVHReference::bounds(), and unaligned_heuristic_.

Referenced by BVHSpatialSplit(), and split().

◆ get_unaligned_point()

__forceinline float3 BVHSpatialSplit::get_unaligned_point ( const float3 & point) const
inlineprotected

◆ split()

◆ split_curve_primitive()

void BVHSpatialSplit::split_curve_primitive ( const Hair * hair,
const Transform * tfm,
const int prim_index,
const int segment_index,
const int dim,
const float pos,
BoundBox & left_bounds,
BoundBox & right_bounds )
protected

◆ split_curve_reference()

void BVHSpatialSplit::split_curve_reference ( const BVHReference & ref,
const Hair * hair,
const int dim,
const float pos,
BoundBox & left_bounds,
BoundBox & right_bounds )
protected

◆ split_object_reference()

void BVHSpatialSplit::split_object_reference ( const Object * object,
const int dim,
const float pos,
BoundBox & left_bounds,
BoundBox & right_bounds )
protected

◆ split_point_primitive()

void BVHSpatialSplit::split_point_primitive ( const PointCloud * pointcloud,
const Transform * tfm,
const int prim_index,
const int dim,
const float pos,
BoundBox & left_bounds,
BoundBox & right_bounds )
protected

◆ split_point_reference()

void BVHSpatialSplit::split_point_reference ( const BVHReference & ref,
const PointCloud * pointcloud,
const int dim,
const float pos,
BoundBox & left_bounds,
BoundBox & right_bounds )
protected

Definition at line 488 of file bvh/split.cpp.

References dim, pos, BVHReference::prim_index(), and split_point_primitive().

Referenced by split_reference().

◆ split_reference()

◆ split_triangle_primitive()

void BVHSpatialSplit::split_triangle_primitive ( const Mesh * mesh,
const Transform * tfm,
const int prim_index,
const int dim,
const float pos,
BoundBox & left_bounds,
BoundBox & right_bounds )
protected

◆ split_triangle_reference()

void BVHSpatialSplit::split_triangle_reference ( const BVHReference & ref,
const Mesh * mesh,
const int dim,
const float pos,
BoundBox & left_bounds,
BoundBox & right_bounds )
protected

Definition at line 461 of file bvh/split.cpp.

References dim, pos, BVHReference::prim_index(), and split_triangle_primitive().

Referenced by split_reference().

Member Data Documentation

◆ aligned_space_

const Transform* BVHSpatialSplit::aligned_space_
protected

Definition at line 87 of file bvh/split.h.

Referenced by BVHSpatialSplit(), get_prim_bounds(), get_unaligned_point(), and split().

◆ dim

◆ pos

◆ references_

vector<BVHReference>* BVHSpatialSplit::references_
protected

Definition at line 85 of file bvh/split.h.

Referenced by BVHSpatialSplit(), BVHSpatialSplit(), and split().

◆ sah

float BVHSpatialSplit::sah

Definition at line 61 of file bvh/split.h.

Referenced by BVHSpatialSplit(), and BVHSpatialSplit().

◆ storage_

BVHSpatialStorage* BVHSpatialSplit::storage_
protected

Definition at line 84 of file bvh/split.h.

Referenced by BVHSpatialSplit(), BVHSpatialSplit(), and split().

◆ unaligned_heuristic_

const BVHUnaligned* BVHSpatialSplit::unaligned_heuristic_
protected

Definition at line 86 of file bvh/split.h.

Referenced by BVHSpatialSplit(), and get_prim_bounds().


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