21#ifdef WITH_CXX_GUARDEDALLOC
72 for (
uint i = 0; i < 2; ++i) {
90 return (t > 0.0) ? t : -t;
95 for (
uint i = 0; i < 2; ++i) {
109#ifdef WITH_CXX_GUARDEDALLOC
110 MEM_CXX_CLASS_ALLOC_FUNCS(
"Freestyle:GridHelpers:Transform")
122 if (bbMax[0] < proscenium[0] || bbMin[0] > proscenium[1] || bbMax[1] < proscenium[2] ||
123 bbMin[1] > proscenium[3])
128 Vec3r boxCenter(proscenium[0] + (proscenium[1] - proscenium[0]) / 2.0,
129 proscenium[2] + (proscenium[3] - proscenium[2]) / 2.0,
132 (proscenium[1] - proscenium[0]) / 2.0, (proscenium[3] - proscenium[2]) / 2.0, 1.0);
133 Vec3r triverts[3] = {
143 vector<Vec3r> points;
145 for (vector<WOEdge *>::const_iterator woe = fedges.begin(), woend = fedges.end(); woe != woend;
148 points.push_back((*woe)->GetaVertex()->GetVertex());
161 const real epsilon = 1.0e-6;
163 if (bbMin[0] <= proscenium[0]) {
164 proscenium[0] = bbMin[0] - epsilon;
167 if (bbMin[1] <= proscenium[2]) {
168 proscenium[2] = bbMin[1] - epsilon;
171 if (bbMax[0] >= proscenium[1]) {
172 proscenium[1] = bbMax[0] + epsilon;
175 if (bbMax[1] >= proscenium[3]) {
176 proscenium[3] = bbMax[1] + epsilon;
182 const real epsilon = 1.0e-6;
184 if (
point[0] <= proscenium[0]) {
185 proscenium[0] =
point[0] - epsilon;
188 if (
point[1] <= proscenium[2]) {
189 proscenium[2] =
point[1] - epsilon;
192 if (
point[0] >= proscenium[1]) {
193 proscenium[1] =
point[0] + epsilon;
196 if (
point[1] >= proscenium[3]) {
197 proscenium[3] =
point[1] + epsilon;
Various tools for geometry.
Read Guarded memory(de)allocation.
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 Gabor Generate Gabor noise Gradient Generate interpolated color and intensity values based on the input vector Magic Generate a psychedelic color texture 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
Class to define a polygon.
Classes to define a Winged Edge data structure.
ATTR_WARN_UNUSED_RESULT const BMVert * v
bool closest(btVector3 &v)
bool rayIntersect(const Vec3r &orig, const Vec3r &dir, real &t, real &u, real &v, real epsilon=M_EPSILON) const
void getBBox(Point &min, Point &max) const
const vector< Point > & getVertices() const
local_group_size(16, 16) .push_constant(Type b
bool overlapTriangleBox(const Vec3r &boxcenter, const Vec3r &boxhalfsize, const Vec3r triverts[3])
real distPointSegment(const T &P, const T &A, const T &B)
VecMat::Vec3< real > Vec3r
void getDefaultViewProscenium(real viewProscenium[4])
void expandProscenium(real proscenium[4], const Polygon3r &polygon)
real distancePointToPolygon(const Vec3r &point, const Polygon3r &poly)
T closestPointToSegment(const T &P, const T &A, const T &B, real &distance)
bool insideProscenium(const real proscenium[4], const Polygon3r &polygon)
Vec3r closestPointOnPolygon(const Vec3r &point, const Polygon3r &poly)
vector< Vec3r > enumerateVertices(const vector< WOEdge * > &fedges)
float distance(float a, float b)