Blender V2.61 - r43446
|
#include <mesh.h>
Public Member Functions | |
MeshManager () | |
~MeshManager () | |
bool | displace (Device *device, Scene *scene, Mesh *mesh, Progress &progress) |
void | update_osl_attributes (Device *device, Scene *scene, vector< AttributeRequestSet > &mesh_attributes) |
void | update_svm_attributes (Device *device, DeviceScene *dscene, Scene *scene, vector< AttributeRequestSet > &mesh_attributes) |
void | device_update (Device *device, DeviceScene *dscene, Scene *scene, Progress &progress) |
void | device_update_object (Device *device, DeviceScene *dscene, Scene *scene, Progress &progress) |
void | device_update_mesh (Device *device, DeviceScene *dscene, Scene *scene, Progress &progress) |
void | device_update_attributes (Device *device, DeviceScene *dscene, Scene *scene, Progress &progress) |
void | device_update_bvh (Device *device, DeviceScene *dscene, Scene *scene, Progress &progress) |
void | device_free (Device *device, DeviceScene *dscene) |
void | tag_update (Scene *scene) |
Public Attributes | |
BVH * | bvh |
bool | need_update |
MeshManager::MeshManager | ( | ) |
Definition at line 290 of file mesh.cpp.
References bvh, need_update, and NULL.
void MeshManager::device_free | ( | Device * | device, |
DeviceScene * | dscene | ||
) |
Definition at line 723 of file mesh.cpp.
References DeviceScene::attributes_float, DeviceScene::attributes_float3, DeviceScene::attributes_map, DeviceScene::bvh_nodes, device_vector< T >::clear(), DeviceScene::object_node, DeviceScene::prim_index, DeviceScene::prim_object, DeviceScene::prim_visibility, Device::tex_free(), DeviceScene::tri_normal, DeviceScene::tri_verts, DeviceScene::tri_vindex, DeviceScene::tri_vnormal, and DeviceScene::tri_woop.
Referenced by device_update(), and Scene::~Scene().
void MeshManager::device_update | ( | Device * | device, |
DeviceScene * | dscene, | ||
Scene * | scene, | ||
Progress & | progress | ||
) |
Definition at line 630 of file mesh.cpp.
References Mesh::add_face_normals(), Mesh::add_vertex_normals(), Mesh::compute_bounds(), Mesh::compute_bvh(), device_free(), device_update_attributes(), device_update_bvh(), device_update_mesh(), displace(), i, Scene::meshes, Mesh::name, Mesh::need_update, need_update, Shader::need_update_attributes, Mesh::need_update_rebuild, Scene::objects, Scene::params, Scene::shaders, string_printf(), Mesh::transform_applied, uint, and Mesh::used_shaders.
Referenced by Scene::device_update().
void MeshManager::device_update_attributes | ( | Device * | device, |
DeviceScene * | dscene, | ||
Scene * | scene, | ||
Progress & | progress | ||
) |
Definition at line 423 of file mesh.cpp.
References AttributeSet::add(), ATTR_ELEMENT_CORNER, ATTR_ELEMENT_FACE, ATTR_ELEMENT_NONE, ATTR_ELEMENT_VERTEX, Mesh::attributes, Shader::attributes, DeviceScene::attributes_float, DeviceScene::attributes_float3, device_vector< T >::copy(), Attribute::CORNER, data, Attribute::data_float(), Attribute::data_float3(), Attribute::element, AttributeRequest::element, Attribute::element_size(), Attribute::FACE, AttributeSet::find(), i, make_float4(), Scene::meshes, AttributeRequest::offset, SceneParams::OSL, Scene::params, AttributeRequestSet::requests, Scene::shaders, SceneParams::shadingsystem, size(), AttributeRequest::std, Attribute::STD_GENERATED, Device::tex_alloc(), Mesh::tri_offset, Mesh::triangles, Attribute::type, AttributeRequest::type, update_osl_attributes(), update_svm_attributes(), Mesh::used_shaders, Mesh::vert_offset, Attribute::VERTEX, Mesh::verts, float3::x, float3::y, and float3::z.
Referenced by device_update().
void MeshManager::device_update_bvh | ( | Device * | device, |
DeviceScene * | dscene, | ||
Scene * | scene, | ||
Progress & | progress | ||
) |
Definition at line 580 of file mesh.cpp.
References BVH::build(), bvh, KernelData::bvh, DeviceScene::bvh_nodes, addon::engine::create(), DeviceScene::data, PackedBVH::nodes, PackedBVH::object_node, DeviceScene::object_node, Scene::objects, BVH::pack, Scene::params, DeviceScene::prim_index, PackedBVH::prim_index, DeviceScene::prim_object, PackedBVH::prim_object, PackedBVH::prim_visibility, DeviceScene::prim_visibility, device_vector< T >::reference(), KernelBVH::root, PackedBVH::root_index, array< T >::size(), Device::tex_alloc(), BVHParams::top_level, PackedBVH::tri_woop, DeviceScene::tri_woop, SceneParams::use_bvh_cache, SceneParams::use_bvh_spatial_split, BVHParams::use_cache, SceneParams::use_qbvh, BVHParams::use_qbvh, and BVHParams::use_spatial_split.
Referenced by device_update().
void MeshManager::device_update_mesh | ( | Device * | device, |
DeviceScene * | dscene, | ||
Scene * | scene, | ||
Progress & | progress | ||
) |
Definition at line 539 of file mesh.cpp.
References Scene::meshes, Mesh::pack_normals(), Mesh::pack_verts(), device_vector< T >::resize(), Device::tex_alloc(), DeviceScene::tri_normal, Mesh::tri_offset, DeviceScene::tri_verts, DeviceScene::tri_vindex, DeviceScene::tri_vnormal, Mesh::triangles, Mesh::vert_offset, Mesh::verts, and vnormal().
Referenced by device_update().
void MeshManager::device_update_object | ( | Device * | device, |
DeviceScene * | dscene, | ||
Scene * | scene, | ||
Progress & | progress | ||
) |
CCL_NAMESPACE_BEGIN bool MeshManager::displace | ( | Device * | device, |
Scene * | scene, | ||
Mesh * | mesh, | ||
Progress & | progress | ||
) |
Definition at line 30 of file mesh_displace.cpp.
References __float_as_int(), Mesh::add_face_normals(), Mesh::add_vertex_normals(), Mesh::attributes, device_memory::data_pointer, device_memory::device_pointer, Mesh::DISPLACE_BUMP, Mesh::DISPLACE_TRUE, Mesh::displacement_method, Shader::has_displacement, i, make_uint4(), Device::mem_alloc(), Device::mem_copy_from(), Device::mem_copy_to(), Device::mem_free(), MEM_READ_ONLY, MEM_WRITE_ONLY, AttributeSet::remove(), device_vector< T >::resize(), DeviceTask::SHADER, Mesh::shader, SHADER_EVAL_DISPLACE, DeviceTask::shader_eval_type, DeviceTask::shader_input, DeviceTask::shader_output, DeviceTask::shader_w, DeviceTask::shader_x, Scene::shaders, device_vector< T >::size(), Attribute::STD_FACE_NORMAL, Attribute::STD_VERTEX_NORMAL, Device::task_add(), Device::task_wait(), Mesh::tri_offset, Mesh::triangles, Mesh::used_shaders, Mesh::Triangle::v, and Mesh::verts.
Referenced by device_update().
void MeshManager::tag_update | ( | Scene * | scene | ) |
Definition at line 754 of file mesh.cpp.
References ObjectManager::need_update, need_update, and Scene::object_manager.
void MeshManager::update_osl_attributes | ( | Device * | device, |
Scene * | scene, | ||
vector< AttributeRequestSet > & | mesh_attributes | ||
) |
Definition at line 301 of file mesh.cpp.
References ATTR_ELEMENT_VALUE, Object::attributes, AttributeRequest::element, i, Object::mesh, Scene::meshes, AttributeRequest::name, Scene::objects, AttributeRequest::offset, Device::osl_memory(), AttributeRequestSet::requests, Attribute::standard_name(), AttributeRequest::std, Attribute::STD_NONE, and AttributeRequest::type.
Referenced by device_update_attributes().
void MeshManager::update_svm_attributes | ( | Device * | device, |
DeviceScene * | dscene, | ||
Scene * | scene, | ||
vector< AttributeRequestSet > & | mesh_attributes | ||
) |
Definition at line 363 of file mesh.cpp.
References DeviceScene::attributes_map, KernelBVH::attributes_map_stride, KernelData::bvh, DeviceScene::data, AttributeRequest::element, ShaderManager::get_attribute_id(), i, max, Object::mesh, Scene::meshes, AttributeRequest::name, NODE_ATTR_FLOAT, NODE_ATTR_FLOAT3, Scene::objects, AttributeRequest::offset, AttributeRequestSet::requests, device_vector< T >::resize(), Scene::shader_manager, device_vector< T >::size(), size(), AttributeRequest::std, Attribute::STD_NONE, Device::tex_alloc(), AttributeRequest::type, uint, uint4::w, uint4::x, uint4::y, and uint4::z.
Referenced by device_update_attributes().
Definition at line 108 of file mesh.h.
Referenced by device_update_bvh(), MeshManager(), and ~MeshManager().
Definition at line 110 of file mesh.h.
Referenced by device_update(), MeshManager(), Scene::need_reset(), tag_update(), Shader::tag_update(), Object::tag_update(), Mesh::tag_update(), and ObjectManager::tag_update().