Blender  V3.3
btContactProcessing.h
Go to the documentation of this file.
1 #ifndef BT_CONTACT_H_INCLUDED
2 #define BT_CONTACT_H_INCLUDED
3 
7 /*
8 This source file is part of GIMPACT Library.
9 
10 For the latest info, see http://gimpact.sourceforge.net/
11 
12 Copyright (c) 2007 Francisco Leon Najera. C.C. 80087371.
13 email: projectileman@yahoo.com
14 
15 
16 This software is provided 'as-is', without any express or implied warranty.
17 In no event will the authors be held liable for any damages arising from the use of this software.
18 Permission is granted to anyone to use this software for any purpose,
19 including commercial applications, and to alter it and redistribute it freely,
20 subject to the following restrictions:
21 
22 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
23 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
24 3. This notice may not be removed or altered from any source distribution.
25 */
26 
27 #include "LinearMath/btTransform.h"
29 #include "btTriangleShapeEx.h"
31 
32 class btContactArray : public btAlignedObjectArray<GIM_CONTACT>
33 {
34 public:
36  {
37  reserve(64);
38  }
39 
41  const btVector3 &point, const btVector3 &normal,
42  btScalar depth, int feature1, int feature2)
43  {
44  push_back(GIM_CONTACT(point, normal, depth, feature1, feature2));
45  }
46 
48  const GIM_TRIANGLE_CONTACT &tricontact,
49  int feature1, int feature2)
50  {
51  for (int i = 0; i < tricontact.m_point_count; i++)
52  {
54  tricontact.m_points[i],
55  tricontact.m_separating_normal,
56  tricontact.m_penetration_depth, feature1, feature2);
57  }
58  }
59 
60  void merge_contacts(const btContactArray &contacts, bool normal_contact_average = true);
61 
62  void merge_contacts_unique(const btContactArray &contacts);
63 };
64 
65 #endif // GIM_CONTACT_H_INCLUDED
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Sky Generate a procedural sky texture Noise Generate fractal Perlin noise Wave Generate procedural bands or rings with noise Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a point
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
Definition: btScalar.h:314
#define SIMD_FORCE_INLINE
Definition: btScalar.h:280
btVector3
btVector3 can be used to represent 3D points and vectors. It has an un-used w component to suit 16-by...
Definition: btVector3.h:82
SIMD_FORCE_INLINE void reserve(int _Count)
SIMD_FORCE_INLINE void push_back(const GIM_CONTACT &_Val)
SIMD_FORCE_INLINE void push_triangle_contacts(const GIM_TRIANGLE_CONTACT &tricontact, int feature1, int feature2)
SIMD_FORCE_INLINE void push_contact(const btVector3 &point, const btVector3 &normal, btScalar depth, int feature1, int feature2)
void merge_contacts_unique(const btContactArray &contacts)
void merge_contacts(const btContactArray &contacts, bool normal_contact_average=true)
IconTextureDrawCall normal
Structure for collision.
btVector3 m_points[MAX_TRI_CLIPPING]