Blender
V3.3
|
#include "LinearMath/btTransform.h"
Go to the source code of this file.
Macros | |
#define | BT_SWAP_NUMBERS(a, b) |
Swap numbers. More... | |
#define | BT_MAX(a, b) (a < b ? b : a) |
#define | BT_MIN(a, b) (a > b ? b : a) |
#define | BT_GREATER(x, y) btFabs(x) > (y) |
#define | BT_MAX3(a, b, c) BT_MAX(a, BT_MAX(b, c)) |
#define | BT_MIN3(a, b, c) BT_MIN(a, BT_MIN(b, c)) |
#define | TEST_CROSS_EDGE_BOX_MCR(edge, absolute_edge, pointa, pointb, _extend, i_dir_0, i_dir_1, i_comp_0, i_comp_1) |
#define | TEST_CROSS_EDGE_BOX_X_AXIS_MCR(edge, absolute_edge, pointa, pointb, _extend) |
#define | TEST_CROSS_EDGE_BOX_Y_AXIS_MCR(edge, absolute_edge, pointa, pointb, _extend) |
#define | TEST_CROSS_EDGE_BOX_Z_AXIS_MCR(edge, absolute_edge, pointa, pointb, _extend) |
#define | BOX_PLANE_EPSILON 0.000001f |
Enumerations | |
enum | eBT_PLANE_INTERSECTION_TYPE { BT_CONST_BACK_PLANE = 0 , BT_CONST_COLLIDE_PLANE , BT_CONST_FRONT_PLANE } |
Functions | |
SIMD_FORCE_INLINE btScalar | bt_mat3_dot_col (const btMatrix3x3 &mat, const btVector3 &vec3, int colindex) |
Returns the dot product between a vec3f and the col of a matrix. More... | |
SIMD_FORCE_INLINE void | calc_absolute_matrix () |
SIMD_FORCE_INLINE void | calc_from_homogenic (const btTransform &trans0, const btTransform &trans1) |
Calc the transformation relative 1 to 0. Inverts matrics by transposing. More... | |
SIMD_FORCE_INLINE void | calc_from_full_invert (const btTransform &trans0, const btTransform &trans1) |
Calcs the full invertion of the matrices. Useful for scaling matrices. More... | |
SIMD_FORCE_INLINE btVector3 | transform (const btVector3 &point) const |
btAABB (const btVector3 &V1, const btVector3 &V2, const btVector3 &V3) | |
btAABB (const btVector3 &V1, const btVector3 &V2, const btVector3 &V3, btScalar margin) | |
btAABB (const btAABB &other) | |
btAABB (const btAABB &other, btScalar margin) | |
SIMD_FORCE_INLINE void | invalidate () |
SIMD_FORCE_INLINE void | increment_margin (btScalar margin) |
SIMD_FORCE_INLINE void | copy_with_margin (const btAABB &other, btScalar margin) |
template<typename CLASS_POINT > | |
SIMD_FORCE_INLINE void | calc_from_triangle (const CLASS_POINT &V1, const CLASS_POINT &V2, const CLASS_POINT &V3) |
template<typename CLASS_POINT > | |
SIMD_FORCE_INLINE void | calc_from_triangle_margin (const CLASS_POINT &V1, const CLASS_POINT &V2, const CLASS_POINT &V3, btScalar margin) |
SIMD_FORCE_INLINE void | appy_transform (const btTransform &trans) |
Apply a transform to an AABB. More... | |
SIMD_FORCE_INLINE void | appy_transform_trans_cache (const BT_BOX_BOX_TRANSFORM_CACHE &trans) |
Apply a transform to an AABB. More... | |
SIMD_FORCE_INLINE void | merge (const btAABB &box) |
Merges a Box. More... | |
template<typename CLASS_POINT > | |
SIMD_FORCE_INLINE void | merge_point (const CLASS_POINT &point) |
Merges a point. More... | |
SIMD_FORCE_INLINE void | get_center_extend (btVector3 ¢er, btVector3 &extend) const |
Gets the extend and center. More... | |
SIMD_FORCE_INLINE void | find_intersection (const btAABB &other, btAABB &intersection) const |
Finds the intersecting box between this box and the other. More... | |
SIMD_FORCE_INLINE bool | has_collision (const btAABB &other) const |
SIMD_FORCE_INLINE bool | collide_ray (const btVector3 &vorigin, const btVector3 &vdir) const |
Finds the Ray intersection parameter. More... | |
SIMD_FORCE_INLINE void | projection_interval (const btVector3 &direction, btScalar &vmin, btScalar &vmax) const |
SIMD_FORCE_INLINE eBT_PLANE_INTERSECTION_TYPE | plane_classify (const btVector4 &plane) const |
SIMD_FORCE_INLINE bool | overlapping_trans_conservative (const btAABB &box, btTransform &trans1_to_0) const |
SIMD_FORCE_INLINE bool | overlapping_trans_conservative2 (const btAABB &box, const BT_BOX_BOX_TRANSFORM_CACHE &trans1_to_0) const |
SIMD_FORCE_INLINE bool | overlapping_trans_cache (const btAABB &box, const BT_BOX_BOX_TRANSFORM_CACHE &transcache, bool fulltest) const |
transcache is the transformation cache from box to this AABB More... | |
SIMD_FORCE_INLINE bool | collide_plane (const btVector4 &plane) const |
Simple test for planes. More... | |
SIMD_FORCE_INLINE bool | collide_triangle_exact (const btVector3 &p1, const btVector3 &p2, const btVector3 &p3, const btVector4 &triangle_plane) const |
test for a triangle, with edges More... | |
SIMD_FORCE_INLINE bool | btCompareTransformsEqual (const btTransform &t1, const btTransform &t2) |
Compairison of transformation objects. More... | |
Variables | |
BT_BOX_BOX_TRANSFORM_CACHE | |
Class for transforming a model1 to the space of model0. More... | |
btMatrix3x3 | m_R1to0 |
Transforms Rotation of model1 to model 0, equal to R0' * R1. More... | |
btMatrix3x3 | m_AR |
Absolute value of m_R1to0. More... | |
btAABB | |
Axis aligned box. More... | |
btVector3 | m_max |
#define BOX_PLANE_EPSILON 0.000001f |
Definition at line 211 of file btBoxCollision.h.
#define BT_MAX | ( | a, | |
b | |||
) | (a < b ? b : a) |
Definition at line 37 of file btBoxCollision.h.
Definition at line 42 of file btBoxCollision.h.
#define BT_MIN | ( | a, | |
b | |||
) | (a > b ? b : a) |
Definition at line 38 of file btBoxCollision.h.
Definition at line 43 of file btBoxCollision.h.
#define BT_SWAP_NUMBERS | ( | a, | |
b | |||
) |
Swap numbers.
Definition at line 30 of file btBoxCollision.h.
#define TEST_CROSS_EDGE_BOX_MCR | ( | edge, | |
absolute_edge, | |||
pointa, | |||
pointb, | |||
_extend, | |||
i_dir_0, | |||
i_dir_1, | |||
i_comp_0, | |||
i_comp_1 | |||
) |
Definition at line 112 of file btBoxCollision.h.
#define TEST_CROSS_EDGE_BOX_X_AXIS_MCR | ( | edge, | |
absolute_edge, | |||
pointa, | |||
pointb, | |||
_extend | |||
) |
Definition at line 128 of file btBoxCollision.h.
#define TEST_CROSS_EDGE_BOX_Y_AXIS_MCR | ( | edge, | |
absolute_edge, | |||
pointa, | |||
pointb, | |||
_extend | |||
) |
Definition at line 133 of file btBoxCollision.h.
#define TEST_CROSS_EDGE_BOX_Z_AXIS_MCR | ( | edge, | |
absolute_edge, | |||
pointa, | |||
pointb, | |||
_extend | |||
) |
Definition at line 138 of file btBoxCollision.h.
Enumerator | |
---|---|
BT_CONST_BACK_PLANE | |
BT_CONST_COLLIDE_PLANE | |
BT_CONST_FRONT_PLANE |
Definition at line 45 of file btBoxCollision.h.
SIMD_FORCE_INLINE void appy_transform | ( | const btTransform & | trans | ) |
Apply a transform to an AABB.
Definition at line 342 of file btBoxCollision.h.
SIMD_FORCE_INLINE void appy_transform_trans_cache | ( | const BT_BOX_BOX_TRANSFORM_CACHE & | trans | ) |
Apply a transform to an AABB.
Definition at line 358 of file btBoxCollision.h.
SIMD_FORCE_INLINE btScalar bt_mat3_dot_col | ( | const btMatrix3x3 & | mat, |
const btVector3 & | vec3, | ||
int | colindex | ||
) |
Returns the dot product between a vec3f and the col of a matrix.
Definition at line 144 of file btBoxCollision.h.
Referenced by overlapping_trans_cache().
btAABB | ( | const btAABB & | other | ) |
Definition at line 259 of file btBoxCollision.h.
btAABB | ( | const btAABB & | other, |
btScalar | margin | ||
) |
Definition at line 263 of file btBoxCollision.h.
References m_max.
Definition at line 225 of file btBoxCollision.h.
Definition at line 238 of file btBoxCollision.h.
SIMD_FORCE_INLINE bool btCompareTransformsEqual | ( | const btTransform & | t1, |
const btTransform & | t2 | ||
) |
Compairison of transformation objects.
Definition at line 610 of file btBoxCollision.h.
SIMD_FORCE_INLINE void calc_absolute_matrix | ( | ) |
Definition at line 159 of file btBoxCollision.h.
References btFabs(), m_AR, and m_R1to0.
Referenced by calc_from_full_invert(), and calc_from_homogenic().
SIMD_FORCE_INLINE void calc_from_full_invert | ( | const btTransform & | trans0, |
const btTransform & | trans1 | ||
) |
Calcs the full invertion of the matrices. Useful for scaling matrices.
Definition at line 194 of file btBoxCollision.h.
References calc_absolute_matrix(), and m_R1to0.
SIMD_FORCE_INLINE void calc_from_homogenic | ( | const btTransform & | trans0, |
const btTransform & | trans1 | ||
) |
Calc the transformation relative 1 to 0. Inverts matrics by transposing.
Definition at line 182 of file btBoxCollision.h.
References btTransform, calc_absolute_matrix(), and m_R1to0.
SIMD_FORCE_INLINE void calc_from_triangle | ( | const CLASS_POINT & | V1, |
const CLASS_POINT & | V2, | ||
const CLASS_POINT & | V3 | ||
) |
Definition at line 305 of file btBoxCollision.h.
SIMD_FORCE_INLINE void calc_from_triangle_margin | ( | const CLASS_POINT & | V1, |
const CLASS_POINT & | V2, | ||
const CLASS_POINT & | V3, | ||
btScalar | margin | ||
) |
Definition at line 320 of file btBoxCollision.h.
SIMD_FORCE_INLINE bool collide_plane | ( | const btVector4 & | plane | ) | const |
Simple test for planes.
Definition at line 554 of file btBoxCollision.h.
References BT_CONST_COLLIDE_PLANE, and plane_classify().
Referenced by collide_triangle_exact().
SIMD_FORCE_INLINE bool collide_ray | ( | const btVector3 & | vorigin, |
const btVector3 & | vdir | ||
) | const |
Finds the Ray intersection parameter.
aabb | Aligned box |
vorigin | A vec3f with the origin of the ray |
vdir | A vec3f with the direction of the ray |
Definition at line 436 of file btBoxCollision.h.
References BT_GREATER, btFabs(), btVector3, center, and get_center_extend().
SIMD_FORCE_INLINE bool collide_triangle_exact | ( | const btVector3 & | p1, |
const btVector3 & | p2, | ||
const btVector3 & | p3, | ||
const btVector4 & | triangle_plane | ||
) | const |
test for a triangle, with edges
Definition at line 562 of file btBoxCollision.h.
References btVector3, center, collide_plane(), KDL::diff(), get_center_extend(), TEST_CROSS_EDGE_BOX_X_AXIS_MCR, TEST_CROSS_EDGE_BOX_Y_AXIS_MCR, TEST_CROSS_EDGE_BOX_Z_AXIS_MCR, v1, and v2.
SIMD_FORCE_INLINE void copy_with_margin | ( | const btAABB & | other, |
btScalar | margin | ||
) |
Definition at line 293 of file btBoxCollision.h.
References m_max.
SIMD_FORCE_INLINE void find_intersection | ( | const btAABB & | other, |
btAABB & | intersection | ||
) | const |
Finds the intersecting box between this box and the other.
Definition at line 406 of file btBoxCollision.h.
SIMD_FORCE_INLINE void get_center_extend | ( | btVector3 & | center, |
btVector3 & | extend | ||
) | const |
Gets the extend and center.
Definition at line 399 of file btBoxCollision.h.
Referenced by collide_ray(), collide_triangle_exact(), and overlapping_trans_cache().
SIMD_FORCE_INLINE bool has_collision | ( | const btAABB & | other | ) | const |
Definition at line 417 of file btBoxCollision.h.
References m_max.
Referenced by overlapping_trans_conservative(), and overlapping_trans_conservative2().
SIMD_FORCE_INLINE void increment_margin | ( | btScalar | margin | ) |
Definition at line 283 of file btBoxCollision.h.
References m_max.
SIMD_FORCE_INLINE void invalidate | ( | ) |
Definition at line 273 of file btBoxCollision.h.
References m_max, and SIMD_INFINITY.
Referenced by BM_mesh_decimate_collapse().
SIMD_FORCE_INLINE void merge | ( | const btAABB & | box | ) |
SIMD_FORCE_INLINE void merge_point | ( | const CLASS_POINT & | point | ) |
SIMD_FORCE_INLINE bool overlapping_trans_cache | ( | const btAABB & | box, |
const BT_BOX_BOX_TRANSFORM_CACHE & | transcache, | ||
bool | fulltest | ||
) | const |
transcache is the transformation cache from box to this AABB
Definition at line 502 of file btBoxCollision.h.
References BT_GREATER, bt_mat3_dot_col(), btVector3, get_center_extend(), r, T, and t.
SIMD_FORCE_INLINE bool overlapping_trans_conservative | ( | const btAABB & | box, |
btTransform & | trans1_to_0 | ||
) | const |
Definition at line 486 of file btBoxCollision.h.
References btAABB, and has_collision().
SIMD_FORCE_INLINE bool overlapping_trans_conservative2 | ( | const btAABB & | box, |
const BT_BOX_BOX_TRANSFORM_CACHE & | trans1_to_0 | ||
) | const |
Definition at line 493 of file btBoxCollision.h.
References btAABB, and has_collision().
SIMD_FORCE_INLINE eBT_PLANE_INTERSECTION_TYPE plane_classify | ( | const btVector4 & | plane | ) | const |
Definition at line 469 of file btBoxCollision.h.
References BOX_PLANE_EPSILON, BT_CONST_BACK_PLANE, BT_CONST_COLLIDE_PLANE, BT_CONST_FRONT_PLANE, and projection_interval().
Referenced by collide_plane().
SIMD_FORCE_INLINE void projection_interval | ( | const btVector3 & | direction, |
btScalar & | vmin, | ||
btScalar & | vmax | ||
) | const |
Definition at line 458 of file btBoxCollision.h.
References btVector3, center, and m_max.
Referenced by plane_classify().
SIMD_FORCE_INLINE btVector3 transform | ( | const btVector3 & | point | ) | const |
Definition at line 205 of file btBoxCollision.h.
References m_R1to0, and point.
Referenced by accessor_get_ibuf(), accessor_get_image_callback(), InstancesComponent::add_instance(), BCMatrix::add_inverted_transform(), AnimationExporter::add_source_parameters(), BCMatrix::add_transform(), BCMatrix::apply_transform(), Freestyle::ArbitraryGridDensityProvider::ArbitraryGridDensityProvider(), AnimationImporter::Assign_transform_animations(), autokeyframe_sequencer_image(), Freestyle::AverageAreaGridDensityProvider::AverageAreaGridDensityProvider(), bc_apply_global_transform(), BKE_shrinkwrap_compute_smooth_normal(), BKE_shrinkwrap_snap_point_to_surface(), BKE_volume_grid_transform_matrix(), blf_glyph_transform_slant(), btGImpactBvh::boxQueryTrans(), btGImpactQuantizedBvh::boxQueryTrans(), GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, _GIM_BOX_TREE_PROTOTYPE >::boxQueryTrans(), Freestyle::GridDensityProvider::calculateQuickProscenium(), cloth_filter_apply_forces_task_cb(), Freestyle::ViewMapBuilder::ComputeCumulativeVisibility(), Freestyle::ViewMapBuilder::ComputeDetailedVisibility(), HdCyclesInstancer::ComputeInstanceTransforms(), FallbackImpl::configGetProcessorWithNames(), blender::nodes::node_geo_mesh_primitive_ico_sphere_cc::create_ico_sphere_mesh(), blender::nodes::node_geo_scale_elements_cc::create_single_axis_transform(), FallbackImpl::createDisplayProcessor(), do_transform_effect(), btIDebugDraw::drawCapsule(), btIDebugDraw::drawCone(), btIDebugDraw::drawCylinder(), btIDebugDraw::drawPlane(), btIDebugDraw::drawSphere(), btIDebugDraw::drawTransform(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_instances(), InstancesComponent::ensure_geometry_instances(), exr_has_rgb(), AnimationImporter::find_frames_old(), Freestyle::GeomUtils::fromCoordAToCoordB(), Freestyle::GeomUtils::fromWorldToImage(), blender::geometry::gather_realize_tasks_for_instances(), blender::bke::geometry_set_collect_recursive(), blender::bke::geometry_set_collect_recursive_collection(), blender::bke::geometry_set_collect_recursive_collection_instance(), blender::bke::geometry_set_collect_recursive_object(), AnimationImporter::get_animation_type(), blender::ed::sculpt_paint::SlideOperationExecutor::get_slide_transform(), blender::bke::get_transform_position(), gim_inertia_add_transformed(), gizmo2d_calc_rotation(), init_transform_effect(), blender::nodes::node_geo_join_geometry_cc::join_components(), libmv_frameAccessorgetTransformKey(), libmv_frameAccessorgetTransformRun(), mesh_filter_task_cb(), modifyMesh(), Freestyle::ArbitraryGridDensityProviderFactory::newGridDensityProvider(), Freestyle::AverageAreaGridDensityProviderFactory::newGridDensityProvider(), Freestyle::HeuristicGridDensityProviderFactory::newGridDensityProvider(), Freestyle::Pow23GridDensityProviderFactory::newGridDensityProvider(), blender::nodes::node_geo_collection_info_cc::node_geo_exec(), blender::nodes::node_geo_object_info_cc::node_geo_exec(), GHOST_DirectManipulationViewportEventHandler::OnContentUpdated(), output_handle_geometry(), Freestyle::Pow23GridDensityProvider::Pow23GridDensityProvider(), blender::geometry::realize_instances(), recalcData_sequencer_image(), blender::ed::sculpt_paint::AddOperationExecutor::sample_in_center_with_symmetry(), blender::ed::sculpt_paint::DensityAddOperationExecutor::sample_projected_with_symmetry(), blender::ed::sculpt_paint::AddOperationExecutor::sample_spherical_with_symmetry(), SEQ_image_transform_origin_offset_pixelspace_get(), seq_image_transform_quad_get_ex(), SEQ_set_scale_to_fit(), seq_transform_filter_set(), seq_transform_origin_set(), SeqToTransData(), sequencer_image_crop_transform_matrix(), sequencer_preprocess_transform_crop(), sequencer_strip_transform_clear_exec(), sequencer_use_transform(), blender::bke::set_transform_position(), btGImpactCompoundShape::setChildTransform(), btGImpactMeshShapePart::setChildTransform(), btGImpactMeshShape::setChildTransform(), shrinkwrap_get_tarmat(), special_aftertrans_update__sequencer_image(), string_to_lower(), blender::ed::sculpt_paint::transform_brush_radius(), blender::nodes::transform_curve_edit_hints(), blender::nodes::transform_geometry_set(), blender::nodes::transform_instances(), blender::nodes::transform_mesh(), blender::nodes::transform_pointcloud(), blender::nodes::transform_volume(), AnimationImporter::translate_Animations(), and blender::nodes::translate_instances().
BT_BOX_BOX_TRANSFORM_CACHE |
Class for transforming a model1 to the space of model0.
Transforms translation of model1 to model 0
Definition at line 152 of file btBoxCollision.h.
Referenced by btGImpactBvh::find_collision(), and btGImpactQuantizedBvh::find_collision().
btAABB |
Axis aligned box.
Definition at line 215 of file btBoxCollision.h.
Referenced by btBvhTree::_build_sub_tree(), btQuantizedBvhTree::_build_sub_tree(), _node_collision(), _quantized_node_collision(), btGImpactBvh::boxQuery(), btGImpactBvh::boxQueryTrans(), btGImpactQuantizedBvh::boxQueryTrans(), btQuantizedBvhTree::calc_quantization(), btGImpactShapeInterface::getAabb(), btTriangleShapeEx::getAabb(), btGImpactShapeInterface::getChildAabb(), btGImpactBvh::getGlobalBox(), btGImpactQuantizedBvh::getGlobalBox(), btGImpactCollisionAlgorithm::gimpact_vs_gimpact_find_pairs(), btGImpactCollisionAlgorithm::gimpact_vs_shape_find_pairs(), btGImpactCollisionAlgorithm::gimpacttrimeshpart_vs_plane_collision(), overlapping_trans_conservative(), overlapping_trans_conservative2(), btGImpactMeshShapePart::processAllTriangles(), btGImpactBvh::rayQuery(), btGImpactQuantizedBvh::rayQuery(), btGImpactBvh::refit(), and btGImpactQuantizedBvh::refit().
btMatrix3x3 m_AR |
Absolute value of m_R1to0.
Definition at line 157 of file btBoxCollision.h.
Referenced by calc_absolute_matrix().
btVector3 m_max |
Definition at line 219 of file btBoxCollision.h.
Referenced by appy_transform(), appy_transform_trans_cache(), btAABB(), calc_from_triangle(), calc_from_triangle_margin(), copy_with_margin(), find_intersection(), get_center_extend(), has_collision(), increment_margin(), invalidate(), merge(), merge_point(), and projection_interval().
btMatrix3x3 m_R1to0 |
Transforms Rotation of model1 to model 0, equal to R0' * R1.
Definition at line 156 of file btBoxCollision.h.
Referenced by calc_absolute_matrix(), calc_from_full_invert(), calc_from_homogenic(), and transform().