1 #ifndef BT_CLIP_POLYGON_H_INCLUDED
2 #define BT_CLIP_POLYGON_H_INCLUDED
32 return point.dot(plane) - plane[3];
39 vr = (1 - blend_factor) * va + blend_factor * vb;
53 if (_classif != _prevclassif)
55 btScalar blendfactor = -dist0 / (dist1 - dist0);
56 bt_vec_blend(clipped[clipped_count], point0, point1, blendfactor);
61 clipped[clipped_count] = point1;
73 int polygon_point_count,
76 int clipped_count = 0;
83 clipped[clipped_count] = polygon_points[0];
88 for (
int i = 1; i < polygon_point_count; i++)
93 polygon_points[i - 1], polygon_points[i],
105 polygon_points[polygon_point_count - 1], polygon_points[0],
111 return clipped_count;
127 int clipped_count = 0;
134 clipped[clipped_count] = point0;
170 return clipped_count;
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
SIMD_FORCE_INLINE void bt_vec_blend(btVector3 &vr, const btVector3 &va, const btVector3 &vb, btScalar blend_factor)
SIMD_FORCE_INLINE btScalar bt_distance_point_plane(const btVector4 &plane, const btVector3 &point)
SIMD_FORCE_INLINE int bt_plane_clip_triangle(const btVector4 &plane, const btVector3 &point0, const btVector3 &point1, const btVector3 &point2, btVector3 *clipped)
Clips a polygon by a plane.
SIMD_FORCE_INLINE void bt_plane_clip_polygon_collect(const btVector3 &point0, const btVector3 &point1, btScalar dist0, btScalar dist1, btVector3 *clipped, int &clipped_count)
This function calcs the distance from a 3D plane.
SIMD_FORCE_INLINE int bt_plane_clip_polygon(const btVector4 &plane, const btVector3 *polygon_points, int polygon_point_count, btVector3 *clipped)
Clips a polygon by a plane.
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
#define SIMD_FORCE_INLINE
btVector3
btVector3 can be used to represent 3D points and vectors. It has an un-used w component to suit 16-by...