Clarisse 5.0 SP8 SDK  5.0.5.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Public Member Functions | Static Public Member Functions | List of all members
GasUvTree Class Reference

GAS tree for raytracing UV maps. More...

Inheritance diagram for GasUvTree:
GasTree

Public Member Functions

void update (AppBase &app, const CoreSet< OfObject * > &geometries, bool use_first_uv_map, const CoreString &uv_map_name)
 Updates the data needed to build the GasUvTree and marks it as dirty.
 
void build ()
 Builds the GasUvTree.
 
bool is_empty () const
 Returns the empty state. The GasUvTree is empty if there is no geometry data and no edge data.
 
bool is_dirty () const
 Returns the dirty state of the GasUvTree. If dirty it needs to be rebuilt.
 
float ray_hit (const CtxEval &eval_ctx, CtxShader &shader_ctx, GeometryRaytraceCtx &raytrace_ctx) const
 
const CoreSet< OfObject * > * get_geometries () const
 
bool get_use_first_uv_map () const
 
const CoreStringget_uv_map_name () const
 
size_t get_memory_size () const
 
- Public Member Functions inherited from GasTree
void create (const CoreBasicArray< GMathBbox3d > &bboxes, AppProgressBar *progress_bar=0)
 
void create (const CoreBasicArray< GMathBbox3f > &bboxes, AppProgressBar *progress_bar=0)
 
void create (const CoreBasicArray< GMathBbox3d > &bboxes, const CoreBasicArray< unsigned int > &bbox_indices, AppProgressBar *progress_bar=0)
 
void create (const CoreBasicArray< GMathBbox3f > &bboxes, const CoreBasicArray< unsigned int > &bbox_indices, AppProgressBar *progress_bar=0)
 
void create (const GMathBbox3f *bboxes, const unsigned int &bbox_count, AppProgressBar *progress_bar=0)
 
void create (const GMathBbox3f *bboxes, const unsigned int *bbox_indices, const unsigned int &index_count, AppProgressBar *progress_bar=0)
 
void set_leaf_indices (const unsigned int *indices)
 
CoreBasicArray< unsigned int > get_leaf_indices () const
 
bool refit (const CoreBasicArray< GMathBbox3f > &bboxes)
 
bool refit (const CoreBasicArray< GMathBbox3f > &bboxes, const CoreBasicArray< unsigned int > &bbox_indices)
 
bool is_empty () const
 
const unsigned int & get_leaf_count () const
 
const unsigned int & get_node_count () const
 
const unsigned int & get_depth () const
 
unsigned int get_leaf_index (const unsigned int &index) const
 
GMathBbox3f get_bbox () const
 
void get_leaf_bboxes (GMathBbox3f *bboxes) const
 
void get_leaf_bboxes (CoreArray< GMathBbox3f > &bboxes) const
 
void get_node_bboxes (const CoreBasicArray< unsigned int > &indices, GMathBbox3f *bboxes) const
 
void get_node_bbox (const unsigned int &index, GMathBbox3f &bbox) const
 
void get_node_bbox (const unsigned int &index, SimdF &bbox_min, SimdF &bbox_max) const
 
void get_node_children (const unsigned int &index, unsigned int &left_index, unsigned int &right_index) const
 
bool is_node_a_leaf (const unsigned int &index) const
 
unsigned int get_leaf_value (const unsigned int &index) const
 
void clear ()
 
void print () const
 
void get_node_coverages (CoreArray< GMathVec4f > &coverages) const
 
void get_clusters (CoreVector< void * > &clusters, const unsigned int &max_cluster_count, const float &min_cluster_coverage) const
 
void get_clusters_bboxes (const CoreBasicArray< void * > &clusters, GMathBbox3f *bboxes) const
 
void get_island_nodes (CoreVector< unsigned int > &node_indices, const float &min_coverage) const
 
void get_leaves_indices (const unsigned int &node_index, CoreVector< unsigned int > &leaves_indices) const
 
void set_split_callback (SplitCallback callback)
 
void set_leaf_raytrace_callbacks (LeafRayHitCallback ray_hit_callback, LeafRayHitCallback ray_hit_nearest_callback, void *data)
 
void set_leaf_ray_frustum_callback (LeafRayFrustumHitCallback ray_frustum_hit_callback, void *data)
 
void set_leaf_frustum_callback (LeafFrustumHitCallback frustum_hit_callback, void *data)
 
void ray_hit (const CtxEval &eval_ctx, CtxShader &shader_ctx, GeometryRaytraceCtx &raytrace_ctx, const bool &use_shortcut=true) const
 
void ray_hit_nearest (const CtxEval &eval_ctx, CtxShader &shader_ctx, GeometryRaytraceCtx &raytrace_ctx, const bool &use_shortcut=true) const
 
void frustum_hit (const CtxEval &eval_ctx, CtxShader &shader_ctx, GeometryFrustumCtx &frustum_ctx, const bool &use_shortcut=true) const
 
void ray_frustum_hit (const CtxEval &eval_ctx, CtxShader &shader_ctx, GeometryRayFrustumCtx &ray_frustum_ctx, const bool &use_shortcut=true) const
 
void get_leaves_in_bbox (GasTreeCtx &tree_ctx, const GMathBbox3f &bbox, CoreVector< unsigned int > &leaves) const
 
unsigned int get_nearest_leaves (GasTreeCtx &tree_ctx, const GMathVec3f &position, const float &max_distance, const unsigned int &max_count, unsigned int *leaves, float *distances) const
 

Static Public Member Functions

static void leaf_raytrace_callback (void *data, const unsigned int &index, const CtxEval &eval_ctx, CtxShader &shader_ctx, GeometryRaytraceCtx &raytrace_ctx)
 
- Static Public Member Functions inherited from GasTree
static void split_sah_bins (const GasTreeSplitContext &ctx, unsigned int *ids, unsigned int count, unsigned int &split_index)
 
static void split_sah_bins_fast (const GasTreeSplitContext &ctx, unsigned int *ids, unsigned int count, unsigned int &split_index)
 
static void split_median (const GasTreeSplitContext &ctx, unsigned int *ids, unsigned int count, unsigned int &split_index)
 
static void split_hybrid (const GasTreeSplitContext &ctx, unsigned int *ids, unsigned int count, unsigned int &split_index)
 

Additional Inherited Members

- Public Types inherited from GasTree
typedef void(* LeafRayHitCallback )(void *data, const unsigned int &index, const CtxEval &eval_ctx, CtxShader &shader_ctx, GeometryRaytraceCtx &raytrace_ctx)
 
typedef void(* LeafFrustumHitCallback )(void *data, const unsigned int &index, const CtxEval &eval_ctx, CtxShader &shader_ctx, GeometryFrustumCtx &frustum_ctx)
 
typedef void(* LeafRayFrustumHitCallback )(void *data, const unsigned int &index, const CtxEval &eval_ctx, CtxShader &shader_ctx, GeometryRayFrustumCtx &ray_frustum_ctx)
 
typedef void(* SplitCallback )(const GasTreeSplitContext &ctx, unsigned int *ids, unsigned int count, unsigned int &split_index)
 
- Protected Member Functions inherited from GasTree
void ray_hit_extent (const CtxEval &eval_ctx, CtxShader &shader_ctx, GeometryRaytraceCtx &raytrace_ctx) const
 
void ray_hit_extent (const CtxEval &eval_ctx, CtxShader &shader_ctx, GeometryRaytraceCtx &raytrace_ctx, void *user_data) const
 

Detailed Description

GAS tree for raytracing UV maps.

Member Function Documentation

bool GasUvTree::is_dirty ( ) const
inline

Returns the dirty state of the GasUvTree. If dirty it needs to be rebuilt.

Returns
true if dirty, false otherwise
bool GasUvTree::is_empty ( ) const

Returns the empty state. The GasUvTree is empty if there is no geometry data and no edge data.

Returns
true if empty, false otherwise.
void GasUvTree::update ( AppBase app,
const CoreSet< OfObject * > &  geometries,
bool  use_first_uv_map,
const CoreString uv_map_name 
)

Updates the data needed to build the GasUvTree and marks it as dirty.

The parameters are used by the method build() to actually load and build the GasUvTree.

Parameters
appThe application.
geometriesList of geometries for which their UV maps will be used.
use_first_uv_mapIf true, the GasUvTree will use the first UV map of each geometry in the list.
uv_map_nameThe UV map name to use for each geometry from the list. This parameter is ignored if use_first_uv_map is true. If a geometry doesn't have any UV map matching the name, the geometry is ignored.