|
Blender
V2.93
|
#include "render/camera.h"#include "render/colorspace.h"#include "render/mesh.h"#include "render/object.h"#include "render/scene.h"#include "blender/blender_session.h"#include "blender/blender_sync.h"#include "blender/blender_util.h"#include "subd/subd_patch.h"#include "subd/subd_split.h"#include "util/util_algorithm.h"#include "util/util_disjoint_set.h"#include "util/util_foreach.h"#include "util/util_hash.h"#include "util/util_logging.h"#include "util/util_math.h"#include "mikktspace.h"Go to the source code of this file.
Classes | |
| struct | MikkUserData |
| class | VertexAverageComparator |
Functions | |
| static int | mikk_get_num_faces (const SMikkTSpaceContext *context) |
| static int | mikk_get_num_verts_of_face (const SMikkTSpaceContext *context, const int face_num) |
| static int | mikk_vertex_index (const Mesh *mesh, const int face_num, const int vert_num) |
| static int | mikk_corner_index (const Mesh *mesh, const int face_num, const int vert_num) |
| static void | mikk_get_position (const SMikkTSpaceContext *context, float P[3], const int face_num, const int vert_num) |
| static void | mikk_get_texture_coordinate (const SMikkTSpaceContext *context, float uv[2], const int face_num, const int vert_num) |
| static void | mikk_get_normal (const SMikkTSpaceContext *context, float N[3], const int face_num, const int vert_num) |
| static void | mikk_set_tangent_space (const SMikkTSpaceContext *context, const float T[], const float sign, const int face_num, const int vert_num) |
| static void | mikk_compute_tangents (const BL::Mesh &b_mesh, const char *layer_name, Mesh *mesh, bool need_sign, bool active_render) |
| static void | attr_create_sculpt_vertex_color (Scene *scene, Mesh *mesh, BL::Mesh &b_mesh, bool subdivision) |
| template<typename TypeInCycles , typename GetValueAtIndex > | |
| static void | fill_generic_attribute (BL::Mesh &b_mesh, TypeInCycles *data, const AttributeElement element, const GetValueAtIndex &get_value_at_index) |
| static void | attr_create_generic (Scene *scene, Mesh *mesh, BL::Mesh &b_mesh, bool subdivision) |
| static void | attr_create_vertex_color (Scene *scene, Mesh *mesh, BL::Mesh &b_mesh, bool subdivision) |
| static void | attr_create_uv_map (Scene *scene, Mesh *mesh, BL::Mesh &b_mesh) |
| static void | attr_create_subd_uv_map (Scene *scene, Mesh *mesh, BL::Mesh &b_mesh, bool subdivide_uvs) |
| static void | attr_create_pointiness (Scene *scene, Mesh *mesh, BL::Mesh &b_mesh, bool subdivision) |
| static void | attr_create_random_per_island (Scene *scene, Mesh *mesh, BL::Mesh &b_mesh, bool subdivision) |
| static void | create_mesh (Scene *scene, Mesh *mesh, BL::Mesh &b_mesh, const array< Node * > &used_shaders, bool subdivision=false, bool subdivide_uvs=true) |
| static void | create_subd_mesh (Scene *scene, Mesh *mesh, BL::Object &b_ob, BL::Mesh &b_mesh, const array< Node * > &used_shaders, float dicing_rate, int max_subdivisions) |
| static BL::MeshSequenceCacheModifier | object_mesh_cache_find (BL::Object &b_ob) |
| static void | sync_mesh_cached_velocities (BL::Object &b_ob, Scene *scene, Mesh *mesh) |
| static void | sync_mesh_fluid_motion (BL::Object &b_ob, Scene *scene, Mesh *mesh) |
|
static |
Definition at line 350 of file blender_mesh.cpp.
References AttributeSet::add(), ATTR_ELEMENT_CORNER, ATTR_ELEMENT_FACE, ATTR_ELEMENT_NONE, ATTR_ELEMENT_VERTEX, Geometry::attributes, data, Attribute::data_float(), Attribute::data_float2(), Attribute::data_float3(), Attribute::data_float4(), element, fill_generic_attribute(), AttributeSet::find(), make_float2, make_float3, make_float4, mesh, Geometry::need_attribute(), scene, TypeFloat2(), TypeRGBA(), and v.
Referenced by create_mesh().
|
static |
Definition at line 670 of file blender_mesh.cpp.
References AttributeSet::add(), angle(), ATTR_STD_POINTINESS, Geometry::attributes, EdgeMap::clear(), data, dot(), e, EdgeMap::exists(), vector< value_type, allocator_type >::free_memory(), get_float3(), EdgeMap::insert(), len_squared(), M_1_PI_F, mesh, Geometry::need_attribute(), normal, normalize(), safe_acosf(), scene, sort(), v1, float3::x, float3::y, float3::z, and zero_float3().
Referenced by create_mesh().
|
static |
Definition at line 820 of file blender_mesh.cpp.
References AttributeSet::add(), ATTR_STD_RANDOM_PER_ISLAND, Geometry::attributes, data, e, DisjointSet::find(), hash_uint_to_float(), DisjointSet::join(), mesh, Geometry::need_attribute(), scene, and t.
Referenced by create_mesh().
|
static |
Definition at line 283 of file blender_mesh.cpp.
References AttributeSet::add(), ATTR_ELEMENT_VERTEX, ATTR_STD_NONE, ATTR_STD_VERTEX_COLOR, Geometry::attributes, get_float4(), l, mesh, Geometry::need_attribute(), scene, Attribute::std, and TypeRGBA().
Referenced by create_mesh().
|
static |
Definition at line 578 of file blender_mesh.cpp.
References ATTR_ELEMENT_CORNER, ATTR_STD_GENERATED, ATTR_STD_NONE, ATTR_STD_UV, ATTR_STD_UV_TANGENT, ATTR_STD_UV_TANGENT_SIGN, ATTR_SUBDIVIDED, Attribute::data_float2(), Attribute::flags, get_float2(), l, mesh, mikk_compute_tangents(), Geometry::need_attribute(), NULL, scene, and TypeFloat2().
Referenced by create_mesh().
Definition at line 514 of file blender_mesh.cpp.
References AttributeSet::add(), ATTR_ELEMENT_CORNER, ATTR_STD_GENERATED, ATTR_STD_NONE, ATTR_STD_UV, ATTR_STD_UV_TANGENT, ATTR_STD_UV_TANGENT_SIGN, Geometry::attributes, Attribute::data_float2(), get_float2(), get_int3(), l, mesh, mikk_compute_tangents(), Geometry::need_attribute(), NULL, AttributeSet::remove(), scene, t, and TypeFloat2().
Referenced by create_mesh().
|
static |
Definition at line 451 of file blender_mesh.cpp.
References AttributeSet::add(), ATTR_ELEMENT_CORNER_BYTE, ATTR_STD_NONE, ATTR_STD_VERTEX_COLOR, Geometry::attributes, color_float4_to_uchar4(), Attribute::data_uchar4(), get_float4(), get_int3(), l, mesh, Geometry::need_attribute(), NULL, scene, t, and TypeRGBA().
Referenced by create_mesh().
|
static |
Definition at line 858 of file blender_mesh.cpp.
References AttributeSet::add(), Mesh::add_subd_face(), Mesh::add_triangle(), Mesh::add_vertex(), attr_create_generic(), attr_create_pointiness(), attr_create_random_per_island(), attr_create_sculpt_vertex_color(), attr_create_subd_uv_map(), attr_create_uv_map(), attr_create_vertex_color(), ATTR_STD_GENERATED, ATTR_STD_GENERATED_TRANSFORM, ATTR_STD_UV_TANGENT, ATTR_STD_VERTEX_NORMAL, ATTR_SUBDIVIDED, Geometry::attributes, clamp(), BMVert::co, Attribute::data_float3(), Attribute::data_transform(), Attribute::flags, get_float3(), get_int3(), make_float3, mesh, mesh_texture_space(), N, Geometry::need_attribute(), Mesh::reserve_mesh(), Mesh::reserve_subd_faces(), scene, shader(), array< T, alignment >::size(), size(), Mesh::SUBDIVISION_CATMULL_CLARK, t, transform_scale(), transform_translate(), and v.
Referenced by create_subd_mesh().
|
static |
Definition at line 1000 of file blender_mesh.cpp.
References Mesh::add_crease(), create_mesh(), e, get_transform(), max, mesh, Mesh::reserve_subd_creases(), RNA_float_get(), RNA_pointer_get(), and scene.
|
static |
Definition at line 314 of file blender_mesh.cpp.
References ATTR_ELEMENT_CORNER, ATTR_ELEMENT_FACE, ATTR_ELEMENT_VERTEX, data, element, and t.
Referenced by attr_create_generic().
|
static |
Definition at line 221 of file blender_mesh.cpp.
References AttributeSet::add(), ATTR_ELEMENT_CORNER, ATTR_STD_UV_TANGENT, ATTR_STD_UV_TANGENT_SIGN, Geometry::attributes, context, Attribute::data_float(), genTangSpaceDefault(), Mesh::get_num_subd_faces(), if(), SMikkTSpaceInterface::m_getNormal, SMikkTSpaceInterface::m_getNumFaces, SMikkTSpaceInterface::m_getNumVerticesOfFace, SMikkTSpaceInterface::m_getPosition, SMikkTSpaceInterface::m_getTexCoord, SMikkTSpaceInterface::m_setTSpaceBasic, mesh, mikk_get_normal(), mikk_get_num_faces(), mikk_get_num_verts_of_face(), mikk_get_position(), mikk_get_texture_coordinate(), mikk_set_tangent_space(), and NULL.
Referenced by attr_create_subd_uv_map(), and attr_create_uv_map().
|
static |
Definition at line 119 of file blender_mesh.cpp.
References Mesh::get_num_subd_faces(), Mesh::get_subd_face(), mesh, and Mesh::SubdFace::start_corner.
Referenced by mikk_get_texture_coordinate(), and mikk_set_tangent_space().
|
static |
Definition at line 173 of file blender_mesh.cpp.
References Mesh::Triangle::compute_normal(), context, Mesh::get_num_subd_faces(), Mesh::get_subd_face(), Mesh::get_triangle(), if(), MikkUserData::mesh, mesh, mikk_vertex_index(), N, Mesh::SubdFace::normal(), Mesh::SubdFace::smooth, and MikkUserData::vertex_normal.
Referenced by mikk_compute_tangents().
|
static |
Definition at line 85 of file blender_mesh.cpp.
References context, Mesh::get_num_subd_faces(), if(), MikkUserData::mesh, and Mesh::num_triangles().
Referenced by mikk_compute_tangents().
|
static |
Definition at line 96 of file blender_mesh.cpp.
References context, Mesh::get_num_subd_faces(), if(), MikkUserData::mesh, and mesh.
Referenced by mikk_compute_tangents().
|
static |
Definition at line 130 of file blender_mesh.cpp.
References context, MikkUserData::mesh, mesh, mikk_vertex_index(), P(), float3::x, float3::y, and float3::z.
Referenced by mikk_compute_tangents().
|
static |
Definition at line 144 of file blender_mesh.cpp.
References context, if(), map_to_sphere(), MikkUserData::mesh, mesh, mikk_corner_index(), mikk_vertex_index(), NULL, MikkUserData::orco, MikkUserData::orco_loc, MikkUserData::orco_size, MikkUserData::texface, float2::x, and float2::y.
Referenced by mikk_compute_tangents().
|
static |
Definition at line 206 of file blender_mesh.cpp.
References context, make_float3, MikkUserData::mesh, mesh, mikk_corner_index(), NULL, KDL::sign(), T, MikkUserData::tangent, and MikkUserData::tangent_sign.
Referenced by mikk_compute_tangents().
|
static |
Definition at line 108 of file blender_mesh.cpp.
References Mesh::get_num_subd_faces(), Mesh::get_subd_face(), mesh, and Mesh::SubdFace::start_corner.
Referenced by mikk_get_normal(), mikk_get_position(), and mikk_get_texture_coordinate().
|
static |
Definition at line 1041 of file blender_mesh.cpp.
References PointerRNA_NULL.
Referenced by sync_mesh_cached_velocities().
|
static |
Definition at line 1058 of file blender_mesh.cpp.
References AttributeSet::add(), ATTR_STD_MOTION_VERTEX_POSITION, Geometry::attributes, Attribute::data_float3(), AttributeSet::find(), get_float3(), mesh, Scene::MOTION_NONE, Scene::motion_shutter_time(), Scene::need_motion(), object_mesh_cache_find(), P(), scene, and Mesh::size.
|
static |
Definition at line 1103 of file blender_mesh.cpp.
References AttributeSet::add(), ATTR_STD_MOTION_VERTEX_POSITION, Geometry::attributes, Attribute::data_float3(), AttributeSet::find(), get_float3(), mesh, Scene::MOTION_NONE, Scene::motion_shutter_time(), Scene::need_motion(), object_fluid_liquid_domain_find(), P(), scene, and Mesh::size.