Blender V4.3
BVHSpatialSplit Class Reference

#include <split.h>

Public Member Functions

 BVHSpatialSplit ()
 BVHSpatialSplit (const BVHBuild &builder, BVHSpatialStorage *storage, const BVHRange &range, vector< BVHReference > &references, float nodeSAH, const BVHUnaligned *unaligned_heuristic=NULL, const Transform *aligned_space=NULL)
void split (BVHBuild *builder, BVHRange &left, BVHRange &right, const BVHRange &range)
void split_reference (const BVHBuild &builder, BVHReference &left, BVHReference &right, const BVHReference &ref, 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, int prim_index, int dim, float pos, BoundBox &left_bounds, BoundBox &right_bounds)
void split_curve_primitive (const Hair *hair, const Transform *tfm, int prim_index, int segment_index, int dim, float pos, BoundBox &left_bounds, BoundBox &right_bounds)
void split_point_primitive (const PointCloud *pointcloud, const Transform *tfm, int prim_index, int dim, float pos, BoundBox &left_bounds, BoundBox &right_bounds)
void split_triangle_reference (const BVHReference &ref, const Mesh *mesh, int dim, float pos, BoundBox &left_bounds, BoundBox &right_bounds)
void split_curve_reference (const BVHReference &ref, const Hair *hair, int dim, float pos, BoundBox &left_bounds, BoundBox &right_bounds)
void split_point_reference (const BVHReference &ref, const PointCloud *pointcloud, int dim, float pos, BoundBox &left_bounds, BoundBox &right_bounds)
void split_object_reference (const Object *object, int dim, 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 62 of file bvh/split.h.

Constructor & Destructor Documentation

◆ BVHSpatialSplit() [1/2]

BVHSpatialSplit::BVHSpatialSplit ( )
inline

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

References dim, FLT_MAX, NULL, 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(), NULL, and unaligned_heuristic_.

Referenced by 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,
int prim_index,
int segment_index,
int dim,
float pos,
BoundBox & left_bounds,
BoundBox & right_bounds )
protected

◆ split_curve_reference()

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

◆ split_object_reference()

◆ split_point_primitive()

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

◆ split_point_reference()

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

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

References dim, NULL, 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,
int prim_index,
int dim,
float pos,
BoundBox & left_bounds,
BoundBox & right_bounds )
protected

◆ split_triangle_reference()

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

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

References dim, NULL, 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 90 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 88 of file bvh/split.h.

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

◆ sah

float BVHSpatialSplit::sah

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

Referenced by BVHSpatialSplit(), and BVHSpatialSplit().

◆ storage_

BVHSpatialStorage* BVHSpatialSplit::storage_
protected

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

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

◆ unaligned_heuristic_

const BVHUnaligned* BVHSpatialSplit::unaligned_heuristic_
protected

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

Referenced by BVHSpatialSplit(), and get_prim_bounds().


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