(geom_bsc.c:3040)
Prototype:
int GM2BiTansFromCircCirc(const IrtPtType Center1,
IrtRType Radius1,
const IrtPtType Center2,
IrtRType Radius2,
int OuterTans,
IrtPtType TanPts[2][2])
Description:
Finds the two pairs of tangent points of the given two planar circles.
Parameters:
Center1, Radius1: | Geometry of first circle.
|
---|
Center2, Radius2: | Geometry of second circle.
|
---|
OuterTans: | TRUE for outer two tangents, FALSE for inner two.
|
---|
TanPts: | The two tangents designated by the end points of the
Segments.
|
---|
Returned Value:
int: TRUE for successful computation, FALSE for failure or no such
bitangents exist for the current configuration.
|
---|
See Also:
GM2PointsFromLineLine
GM2PointsFromCircCirc3D
GMCircleFrom3Points
GMCircleFrom2Pts2Tans
GM2PointsFromCircCirc
GM2TanLinesFromCircCirc
GM2IsPtInsideCirc
Keywords:
circle circle tangenties
(geom_bsc.c:2617)
Prototype:
int GM2PointsFromCircCirc(const IrtPtType Center1,
IrtRType Radius1,
const IrtPtType Center2,
IrtRType Radius2,
IrtPtType Inter1,
IrtPtType Inter2)
Description:
Finds the two intersection points of the given two planar circles.
Parameters:
Center1, Radius1: | Geometry of first circle.
|
---|
Center2, Radius2: | Geometry of second circle.
|
---|
Inter1, Inter2: | Where the two intersection locations will be placed.
|
---|
Returned Value:
int: TRUE for successful computation, FALSE for failure.
|
---|
See Also:
GM2PointsFromLineLine
GM2PointsFromCircCirc3D
GMCircleFrom3Points
GMCircleFrom2Pts2Tans
GM2BiTansFromCircCirc
GM2TanLinesFromCircCirc
GM2IsPtInsideCirc
Keywords:
circle circle intersection
(geom_bsc.c:2701)
Prototype:
int GM2PointsFromCircCirc3D(const IrtPtType Cntr1,
const IrtVecType Nrml1,
IrtRType Rad1,
const IrtPtType Cntr2,
const IrtVecType Nrml2,
IrtRType Rad2,
IrtPtType Inter1,
IrtPtType Inter2)
Description:
Compute the intersection of two circles in general position in R^3.
The circles are centered at Cntr1/2 in a plane normal to Nrml1/2 and have
a radius of Rad1/2. The upto two intersections are returned in Inter1/2.
Parameters:
Cntr1, Nrml1, Rad1: | Center, normal and radius of first circle.
|
---|
Cntr2, Nrml2, Rad2: | Center, normal and radius of second circle.
|
---|
Inter1: | First intersection location in E3.
|
---|
Inter2: | Second intersection location in E3.
|
---|
Returned Value:
int: Number of intersections found - 0, 1, or 2.
|
---|
See Also:
GM2PointsFromLineLine
GM2PointsFromCircCirc
GMCircleFrom3Points
GMCircleFrom2Pts2Tans
GM2BiTansFromCircCirc
GM2TanLinesFromCircCirc
GM2IsPtInsideCirc
Keywords:
(geom_bsc.c:1223)
Prototype:
int GM2PointsFromLineLine(const IrtPtType Pl1,
const IrtPtType Vl1,
const IrtPtType Pl2,
const IrtPtType Vl2,
IrtPtType Pt1,
IrtRType *t1,
IrtPtType Pt2,
IrtRType *t2)
Description:
Routine to find the two points Pti on the lines (Pli, Vli), i = 1, 2
with the minimal Euclidean distance between them. In other words, the
distance between Pt1 and Pt2 is defined as distance between the two lines.
The two points are calculated using the fact that if V = (Vl1 cross Vl2)
then these two points are the intersection point between the following:
Point 1 - a plane (defined by V and line1) and the line line2.
Point 2 - a plane (defined by V and line2) and the line line1.
This function returns TRUE iff the two lines are not parallel!
This function is also valid for the case of coplanar lines.
Parameters:
Pl1, Vl1: | Position and direction defining the first line.
|
---|
Pl2, Vl2: | Position and direction defining the second line.
|
---|
Pt1: | Point on Pt1 that is closest to line 2.
|
---|
t1: | Parameter value of Pt1 as (Pl1 + Vl1 * t1).
|
---|
Pt2: | Point on Pt2 that is closest to line 1.
|
---|
t2: | Parameter value of Pt2 as (Pl2 + Vl2 * t2).
|
---|
Returned Value:
int: TRUE, if successful.
|
---|
See Also:
GGMPointFromPlanarLineLine
Keywords:
line line distance
line line intersection
(geom_bsc.c:3089)
Prototype:
int GM2TanLinesFromCircCirc(const IrtPtType Center1,
IrtRType Radius1,
const IrtPtType Center2,
IrtRType Radius2,
int OuterTans,
IrtLnType Tans[2])
Description:
Finds the two tangent lines to the given two planar circles.
Parameters:
Center1, Radius1: | Geometry of first circle.
|
---|
Center2, Radius2: | Geometry of second circle.
|
---|
OuterTans: | TRUE for outer two tangents, FALSE for inner two.
|
---|
Tans: | The two tangent lines designated by line equatios.
|
---|
Returned Value:
int: TRUE for successful computation, FALSE for failure or no such
bitangents exist for the current configuration.
|
---|
See Also:
GM2PointsFromLineLine
GM2PointsFromCircCirc3D
GMCircleFrom3Points
GMCircleFrom2Pts2Tans
GM2PointsFromCircCirc
GM2BiTansFromCircCirc
GM2IsPtInsideCirc
Keywords:
circle circle tangenties
(geomat3d.c:1267)
Prototype:
int GM3Pts2EqltrlTriMat(const IrtPtType Pt1Orig,
const IrtPtType Pt2Orig,
const IrtPtType Pt3Orig,
IrtHmgnMatType Mat)
Description:
Compute the linear transform that maps the given planar triangle
Pt1Pt2Pt3 to an equilateral triangle around the origin so that edge
Pt1Pt2 is horizontal and remains of the same size.
Parameters:
Pt1Orig, Pt2Orig, Pt3Orig: | The three vertices of the input triangle.
|
---|
Mat: | The computed transform.
|
---|
Returned Value:
int: TRUE if successful, FALSE otherwise.
|
---|
See Also:
GMGenMatrix3Pts2EqltrlTri
Keywords:
(poly_pts.c:1815)
Prototype:
void GMAffineTransUVVals(IPObjectStruct *PObj,
const IrtRType Scale[2],
const IrtRType Trans[2])
Description:
Affine transform the given UV coordinates in polygonal object PObj, in
place.
Parameters:
PObj: | A polygonal object to affine transform the UV vals.
|
---|
Scale: | UV scale factors.
|
---|
Trans: | UV translational factors.
|
---|
Returned Value:
See Also:
GMGenUVValsForPolys
Keywords:
(polysmth.c:618)
Prototype:
int GMAllIntersLinePolygon2D(const IPVertexStruct *VS,
const IrtPtType V1,
const IrtPtType V2,
IrtRType *AllPrms)
Description:
Check if a line V1V2 and polygon VS interest, in 2D.
Parameters:
VS: | Cyclic List of vertices of the Polygon.
|
---|
V1, V2: | The end points of the line.
|
---|
AllPrms: | All the blending values from V1 to V2 where the intersections
have occurred will be placed here as - t*V1 + (1-t)*V2.
Can be NULL to ignore.
The vector, if exists, will be sorted in increasing values.
|
---|
Returned Value:
int: Number of intersections that detected, zero to ignore.
|
---|
See Also:
GMIsInterLinePolygon2D
GMIsInterLineLine2D
Keywords:
(geom_bsc.c:1990)
Prototype:
IrtRType GMAngleSphericalTriangle(const IrtVecType Dir,
const IrtVecType ODir1,
const IrtVecType ODir2)
Description:
Computes the angle at Dir, with respect to ODir1 and ODir2.
Parameters:
Dir: | Spherical vertex to compute its angle with respect to ODir1/2.
|
---|
ODir1, ODir2: | Other two vertices of spherical triangle.
|
---|
Returned Value:
IrtRType: Spherical angle at Dir.
|
---|
See Also:
GMAreaSphericalTriangle
Keywords:
(animate.c:271)
Prototype:
int GMAnimAffineTransAnimation(const IPObjectStruct *PObjs,
IrtRType Trans,
IrtRType Scale)
Description:
Affine transform the animation domain in the given object(s), in place.
Domain "D" is mapped to domain "D * Scale + Trans".
Parameters:
PObjs: | Objects to update animation domain.
|
---|
Trans: | Translation amount.
|
---|
Scale: | Scale amount.
|
---|
Returned Value:
int: TRUE if there are animation attributes. FALSE otherwise.
|
---|
See Also:
GMAnimHasAnimationOne
Keywords:
animation
(animate.c:458)
Prototype:
int GMAnimAffineTransAnimation2(const IPObjectStruct *PObjs,
IrtRType Min,
IrtRType Max)
Description:
Affine transform the animation domain in the given object(s), in place.
Animation domain is mapped to "Min, Max".
Parameters:
PObjs: | Objects to update animation domain.
|
---|
Min, Max: | Desired time domain of animation.
|
---|
Returned Value:
int: TRUE if there are animation attributes. FALSE otherwise.
|
---|
See Also:
GMAnimHasAnimationOne
Keywords:
animation
(animate.c:304)
Prototype:
int GMAnimAffineTransAnimationOne(const IPObjectStruct *PObj,
IrtRType Trans,
IrtRType Scale)
Description:
Affine transform the animation domain in the given object, in place.
Domain "D" is mapped to domain "D * Scale + Trans".
Parameters:
PObj: | Object to update animation domain.
|
---|
Trans: | Translation amount.
|
---|
Scale: | Scale amount.
|
---|
Returned Value:
int: TRUE if there are animation attributes. FALSE otherwise.
|
---|
See Also:
GMAnimHasAnimation
Keywords:
animation
(animate.c:493)
Prototype:
int GMAnimAffineTransAnimationOne2(const IPObjectStruct *PObj,
IrtRType Min,
IrtRType Max)
Description:
Affine transform the animation domain in the given object, in place.
Animation domain is mapped to "Min, Max".
Parameters:
PObj: | Object to update animation domain.
|
---|
Min, Max: | Desired time domain of animation.
|
---|
Returned Value:
int: TRUE if there are animation attributes. FALSE otherwise.
|
---|
See Also:
GMAnimHasAnimation
Keywords:
animation
(anim_aux.c:44)
Prototype:
int GMAnimCheckInterrupt(GMAnimationStruct *Anim)
Description:
Should we stop this animation. Senses the event queue of X11.
Parameters:
Anim: | The animation to abort.
|
---|
Returned Value:
int: TRUE if we need to abort, FALSE otherwise.
|
---|
Keywords:
(animate.c:916)
Prototype:
void GMAnimDoAnimation(GMAnimationStruct *Anim, IPObjectStruct *PObjs)
Description:
Routine to run a sequence of objects through an animation according to
animation attributes of matrices and curves that are attached to them.
Parameters:
Anim: | Animation structure.
|
---|
PObjs: | Objects to render.
|
---|
Returned Value:
See Also:
GMAnimEvalAnimation
Keywords:
animation
(animate.c:1162)
Prototype:
void GMAnimDoSingleStep(GMAnimationStruct *Anim, IPObjectStruct *PObjs)
Description:
Routine to exectue a single step the animation, at current time.
Parameters:
Anim: | Animation structure.
|
---|
PObjs: | Objects to render.
|
---|
Returned Value:
See Also:
GMAnimDoAnimation
GMAnimEvalAnimation
GMAnimSetAnimInternalNodes
Keywords:
animation
(animate.c:1052)
Prototype:
void GMAnimEvalAnimation(IrtRType t, IPObjectStruct *PObj)
Description:
Evaluate the animation curves at the given time, setting the proper
animation attributes ("_animation_mat" and "_isvisible"), in place.
Parameters:
t: | Time to evaluate the animation at.
|
---|
PObj: | To evaluate their animation curves.
|
---|
Returned Value:
See Also:
GMAnimDoAnimation
GMAnimEvalAnimationList
GMAnimSetAnimInternalNodes
GMAnimEvalObjAtTime
Keywords:
animation
(animate.c:1137)
Prototype:
void GMAnimEvalAnimationList(IrtRType t, IPObjectStruct *PObjList)
Description:
Evaluate the animation curves at the given time, setting the proper
animation attributes ("_animation_mat" and "_isvisible"), in place.
Parameters:
t: | Time to evaluate the animation at.
|
---|
PObjList: | A list of objects to evaluate their animation curves.
|
---|
Returned Value:
See Also:
GMAnimDoAnimation
GMAnimEvalAnimation
GMAnimSetAnimInternalNodes
Keywords:
animation
(animate.c:1086)
Prototype:
IPObjectStruct *GMAnimEvalObjAtTime(IrtRType t, IPObjectStruct *PObj)
Description:
Evaluate the animation curves at the given time, and creating the object
in the proper place in time.
Parameters:
t: | Time to evaluate the animation at.
|
---|
PObj: | To evaluate their animation curves.
|
---|
Returned Value:
IPObjectStruct *: Input object positioned at time t.
|
---|
See Also:
GMAnimDoAnimation
GMAnimEvalAnimationList
GMAnimSetAnimInternalNodes
GMAnimEvalAnimation
Keywords:
animation
(animate.c:526)
Prototype:
void GMAnimFindAnimationTime(GMAnimationStruct *Anim,
const IPObjectStruct *PObjs)
Description:
Computes the time span for which the animation executes.
Parameters:
Anim: | Animation structure to update.
|
---|
PObjs: | Objects to scan for animation attributes.
|
---|
Returned Value:
See Also:
GMAnimFindAnimationTimeOne
Keywords:
animation
(animate.c:569)
Prototype:
void GMAnimFindAnimationTimeOne(GMAnimationStruct *Anim,
const IPObjectStruct *PObj)
Description:
Computes the time span for which the animation executes.
Parameters:
Anim: | Animation structure to update.
|
---|
PObj: | One object to scan for animation attributes.
|
---|
Returned Value:
See Also:
GMAnimFindAnimationTime
Keywords:
animation
(animate.c:91)
Prototype:
void GMAnimGetAnimInfoText(GMAnimationStruct *Anim)
Description:
Getting input parameters of animation from user using textual user
interface.
Parameters:
Anim: | The animation state to update.
|
---|
Returned Value:
Keywords:
animation
(animate.c:204)
Prototype:
int GMAnimHasAnimation(const IPObjectStruct *PObjs)
Description:
Scan the given geometry for possible animation attributes.
Parameters:
PObjs: | Objects to scan for animation attributes.
|
---|
Returned Value:
int: TRUE if there are animation attributes. FALSE otherwise.
|
---|
See Also:
GMAnimHasAnimationOne
Keywords:
animation
(animate.c:232)
Prototype:
int GMAnimHasAnimationOne(const IPObjectStruct *PObj)
Description:
Scan the given geometry for possible animation attributes.
Parameters:
PObj: | One object to scan for animation attributes.
|
---|
Returned Value:
int: TRUE if there are animation attributes. FALSE otherwise.
|
---|
See Also:
GMAnimHasAnimation
Keywords:
animation
(animate.c:58)
Prototype:
void GMAnimResetAnimStruct(GMAnimationStruct *Anim)
Description:
Resets the slots of an animation structure.
Parameters:
Anim: | The animation state to reset.
|
---|
Returned Value:
Keywords:
animation
(anim_aux.c:64)
Prototype:
void GMAnimSaveIterationsAsImages(GMAnimationStruct *Anim,
IPObjectStruct *PObjs)
Description:
Saves one iteration of the animation sequence as an image.
Parameters:
Anim: | Animation structure.
|
---|
PObjs: | Objects to render.
|
---|
Returned Value:
Keywords:
animation
(animate.c:1204)
Prototype:
void GMAnimSaveIterationsToFiles(GMAnimationStruct *Anim,
IPObjectStruct *PObjs)
Description:
Saves one iteration of the animation sequence as IRIT data (*.itd).
The objects that are saved are those that are visibled on the current
time frame as set via current animation_mat attribute.
Parameters:
Anim: | Animation structure.
|
---|
PObjs: | Objects to render.
|
---|
Returned Value:
Keywords:
animation
(animate.c:1020)
Prototype:
int GMAnimSetAnimInternalNodes(int AnimInternalNodes)
Description:
Allows animation transformations to be saved at internal nodes.
Parameters:
AnimInternalNodes: | New setting for internal animation nodes.
|
---|
Returned Value:
See Also:
GMAnimEvalAnimation
Keywords:
(animate.c:991)
Prototype:
int GMAnimSetReverseHierarchyMatProd(int ReverseHierarchyMatProd)
Description:
Controls the order in which animation matrices are multiplied in the
hierarchy.
Parameters:
ReverseHierarchyMatProd: | TRUE to reversedefautl order.
|
---|
Returned Value:
See Also:
GMAnimEvalAnimation
Keywords:
(geom_bsc.c:3228)
Prototype:
IrtRType GMAreaOfTriangle(const IrtRType *Pt1,
const IrtRType *Pt2,
const IrtRType *Pt3)
Description:
Computing the Area of the triangle formed by points Pt1, Pt2 and Pt3.
This can be used as a test to identify whether point Pt3 lies to the
left, right, or on the line (vector) formed by Pt1 and Pt2 using the
this signed area of the triangle's computation.
Parameters:
Pt1, Pt2, Pt3: | oints to compute the area of a triangle formed by Pt1,
Pt2, and Pt3, in the XY plane.
|
---|
Returned Value:
IrtRType: Resulting area.
|
---|
Keywords:
(geom_bsc.c:1954)
Prototype:
IrtRType GMAreaSphericalTriangle(const IrtVecType Dir1,
const IrtVecType Dir2,
const IrtVecType Dir3)
Description:
Computes the area of a spherical triangle over the unit sphere with
given three (unit vector) vertices, Dir1, Dir2, Dir3.
Area is equal to (Alpha1 + Alpha2 + Alpha3 - Pi) where Alphai is the
angle at vertex Diri with the other two vertices.
Parameters:
Dir1, Dir2, Dir3: | Vertices of the spherical triangle. unit vectors.
|
---|
Returned Value:
See Also:
GMAngleSphericalTriangle
Keywords:
(bbox.c:89)
Prototype:
GMBBBboxStruct *GMBBComputeBboxObject(const IPObjectStruct *PObj,
GMBBBboxStruct *Bbox)
Description:
Computes a bounding box of a given object of any type.
Parameters:
PObj: | To compute a bounding box for.
|
---|
Bbox: | A bounding box of PObj is saved here.
|
---|
Returned Value:
GMBBBboxStruct *: A bounding box of PObj - reference to Bbox.
|
---|
See Also:
Keywords:
bounding box
(bbox.c:287)
Prototype:
GMBBBboxStruct *GMBBComputeBboxObjectList(const IPObjectStruct *PObj,
GMBBBboxStruct *Bbox)
Description:
Computes a bounding box of a list of objects of any type.
Parameters:
PObj: | To compute a bounding box for.
|
---|
Bbox: | A pointer to a bounding box
holding bounding box information on objects PObj.
|
---|
Returned Value:
GMBBBboxStruct *: A pointer to a bounding box
holding bounding box information on objects PObj.
|
---|
Keywords:
bounding box
(bbox.c:349)
Prototype:
GMBBBboxStruct *GMBBComputeOnePolyBbox(const IPPolygonStruct *PPoly,
GMBBBboxStruct *Bbox)
Description:
Computes a bounding box of a polygon/polyline/pointlist object.
Parameters:
PPoly: | To compute a bounding box for.
|
---|
Bbox: | A pointer to a bounding box
holding bounding box information on PPoly.
|
---|
Returned Value:
GMBBBboxStruct *: A pointer to a bounding box
holding bounding box information on PPoly.
|
---|
Keywords:
bounding box
(bbox.c:420)
Prototype:
GMBBBboxStruct *GMBBComputePointBbox(const IrtRType *Pt, GMBBBboxStruct *Bbox)
Description:
Computes a bounding box of a point object.
Parameters:
Pt: | To compute a bounding box for.
|
---|
Bbox: | A pointer to a bounding box
holding bounding box information on Pt.
|
---|
Returned Value:
GMBBBboxStruct *: A pointer to a bounding box
holding bounding box information on Pt.
|
---|
Keywords:
bounding box
(bbox.c:383)
Prototype:
GMBBBboxStruct *GMBBComputePolyListBbox(const IPPolygonStruct *PPoly,
GMBBBboxStruct *Bbox)
Description:
Computes a bounding box for a list of polygon/polyline/pointlist objects.
Parameters:
PPoly: | To compute a bounding box for.
|
---|
Bbox: | A pointer to a bounding box
holding bounding box information on PPoly list.
|
---|
Returned Value:
GMBBBboxStruct *: A pointer to a bounding box
holding bounding box information on PPoly list.
|
---|
Keywords:
bounding box
(bbox.c:498)
Prototype:
GMBBBboxStruct *GMBBMergeBbox(GMBBBboxStruct *MergedBbox,
const GMBBBboxStruct *Bbox)
Description:
Merges (union) given two bounding boxes into one.
Note Dim can be different in both Bboxes in which case higher dims are
simply copied from the Bbox that has them.
Parameters:
MergedBbox: | first bounding box, to merge Bbox into.
|
---|
Bbox: | A second bounding box to merge with MergedBBox.
|
---|
Returned Value:
GMBBBboxStruct *: A merged bounding box. Same as MergedBbox.
|
---|
Keywords:
bounding box
(bbox.c:450)
Prototype:
GMBBBboxStruct *GMBBMergeBboxTo(const GMBBBboxStruct *Bbox1,
const GMBBBboxStruct *Bbox2,
GMBBBboxStruct *MergedBbox)
Description:
Merges (union) given two bounding boxes into one.
Either Bbox1 or Bbox2 can be pointing to the same address as MergedBBox.
Note Dim can be different in both Bboxes in which case higher dims are
simply copied from the Bbox that has them.
Parameters:
Bbox1: | First bounding box to union up.
|
---|
Bbox2: | Second bounding box to union up.
|
---|
MergedBbox: | unioned bounding box that contains both BBox1 and BBox2.
|
---|
Returned Value:
GMBBBboxStruct *: A unioned bounding box that contains both BBox1 and
BBox2. Same as MergedBBox.
|
---|
Keywords:
bounding box
(bbox.c:59)
Prototype:
int GMBBSetBBoxPrecise(int Precise)
Description:
Enforce the computation of a precise bounding box for a freeform.
Parameters:
Precise: | 0 for, simpler, looser bbox that is derived using the control
poly/mesh.
1 for a better bbox on freeforms, by refining geometry first.
2 for a precise bbox on freeforms, by computing extrema.
|
---|
Returned Value:
See Also:
GMBBComputeBboxObject
Keywords:
bbox
bounding box
(bbox.c:319)
Prototype:
const IPObjectStruct *GMBBSetGlblBBInstncObjList(const IPObjectStruct
*BBInstObjList)
Description:
Sets the global list object to search instances at.
Parameters:
BBInstObjList: | Global object list to search instances at.
|
---|
Returned Value:
const IPObjectStruct *: Old global object list.
|
---|
Keywords:
bounding box
(geom_bsc.c:2480)
Prototype:
IrtRType *GMBaryCentric3Pts2DToData(const IrtPtType Pt1,
const IrtPtType Pt2,
const IrtPtType Pt3,
const IrtPtType Pt,
IrtVecType RetVal)
Description:
Computes the Barycentric coordinates of given point Pt with respect to
given Triangle Pt1 Pt2 Pt3. All points are assumed to be in the XY plane.
Parameters:
Pt1, Pt2, Pt3: | Three points forming a triangular in general position.
|
---|
Pt: | A point for which the barycentric coordinates are to be
computed.
|
---|
RetVal: | A pointer to a space holding the three Barycentric
coefficients, or NULL if point Pt is outside the
triangle Pt1 Pt2 Pt3.
|
---|
Returned Value:
IrtRType *: A pointer to a space holding the three Barycentric
coefficients, or NULL if point Pt is outside the triangle
Pt1 Pt2 Pt3.
|
---|
See Also:
GMBaryCentric3PtsToData
Keywords:
(geom_bsc.c:2541)
Prototype:
IrtRType *GMBaryCentric3PtsToData(const IrtPtType Pt1,
const IrtPtType Pt2,
const IrtPtType Pt3,
const IrtPtType Pt,
IrtVecType RetVal)
Description:
Computes the Barycentric coordinates of given point Pt with respect to
given Triangle Pt1 Pt2 Pt3. All points are assumed to be coplanar.
Parameters:
Pt1, Pt2, Pt3: | Three points forming a triangular in general position.
|
---|
Pt: | A point for which the barycentric coordinates are to be
computed.
|
---|
RetVal: | A pointer to a space holding the three Barycentric
coefficients, or NULL if point Pt is outside the
triangle Pt1 Pt2 Pt3.
|
---|
Returned Value:
IrtRType *: A pointer to a space holding the three Barycentric
coefficients, or NULL if point Pt is outside the triangle
Pt1 Pt2 Pt3.
|
---|
See Also:
GMBaryCentric3Pts2DToData
Keywords:
(geom_bsc.c:60)
Prototype:
IrtRType GMBasicSetEps(IrtRType Eps)
Description:
Sets the epsilon to use in basic geometry processing.
Parameters:
Returned Value:
IrtRType: Old epsilon value.
|
---|
Keywords:
(intrnrml.c:740)
Prototype:
void GMBlendNormalsToVertices(IPPolygonStruct *PlList,
IrtRType MaxAngle)
Description:
Approximate normals to all vertices of the given geometry by blending
the normals of the faces that share the vertex. Assumes polygons are
properly oriented. Places on each vertex an "_CosNrmlMaxDev"
attribute with the maximal deviation of this normal from an adjacent
polygon plane (cosine of the maximal angle).
Parameters:
PlList: | List of polygons to blend the normals of their vertices
|
---|
MaxAngle: | etween approximated normal at vertex and polygon normal of
the vertex to allow averaging. In degrees.
If negative, all vertices normals are cleared and all
polygon normals reevaluated (and no vertices normals are
evaluated).
|
---|
Returned Value:
See Also:
GMUpdateVerticesByInterp
GMFixNormalsOfPolyModel
Keywords:
(box2BVH.c:300)
Prototype:
void GMBoxBVHConstructGeneralAlignedFrustum(const IrtRType Center[3],
IrtRType SizeX,
IrtRType SizeY,
const IrtRType XAxis[3],
const IrtRType HeightAxis[3],
IrtRType Height,
IrtRType XAngle,
IrtRType YAngle,
GMGeneralFrustumInfoStruct *Frustum)
Description:
Construct a frustum with the given parameters. The frustum consists of six
quadrilateral sides, each with an inward-pointing normal.
Parameters:
Center: | The center of the narrow base of the frustum.
|
---|
SizeX, SizeY: | The size of the narrow base of the frustum.
|
---|
XAxis: | The X direction of the bases of the frustum.
|
---|
HeightAxis: | The height (Z) axis of the frustum.
|
---|
Height: | The height of the frustum.
|
---|
XAngle, YAngle: | The angles of the frustum in the X and Y directions,
respectively.
|
---|
Frustum: | The resulting Frustum.
|
---|
Returned Value:
Keywords:
(box_BVH.c:433)
Prototype:
GMBoxBVHStruct *GMBoxBVHCreate(const GMBoxBVHInfoStruct **Boxes,
int Num,
int Size)
Description:
construct a box BVH with the given boxes.
Parameters:
Boxes: | The boxes to arrange in the BVH.
|
---|
Num: | The number of boxes.
|
---|
Size: | The size of the leaf nodes.
|
---|
Returned Value:
GMBoxBVHStruct *: The returned BVH.
|
---|
See Also:
Keywords:
(box2BVH.c:497)
Prototype:
IPPolygonStruct *GMBoxBVHDbgConstructGeneralAlignedFrustum(
const IrtRType Center[3],
IrtRType SizeX,
IrtRType SizeY,
const IrtRType XAxis[3],
const IrtRType HeightAxis[3],
IrtRType Height,
IrtRType XAngle,
IrtRType YAngle)
Description:
Construct a 3D visualization of the frustum, based on its parameters.
The frustum is represented by a list of six IPPolygonStruct, one for
side of the frustum.
Parameters:
Center: | The center of the narrow base of the frustum.
|
---|
SizeX, SizeY: | The size of the narrow base of the frustum.
|
---|
XAxis: | The X direction of the bases of the frustum.
|
---|
HeightAxis: | The height (Z) axis of the frustum.
|
---|
Height: | The height of the frustum.
|
---|
XAngle, YAngle: | The angles of the frustum in the X and Y directions,
respectively.
|
---|
Returned Value:
IPPolygonStruct *: a 3D visualization of the frustum.
|
---|
See Also:
Keywords:
(box2BVH.c:569)
Prototype:
IPObjectStruct *GMBoxBVHDbgConstructGeneralAlignedFrustum2(
const IrtRType Center[3],
IrtRType SizeX,
IrtRType SizeY,
const IrtRType XAxis[3],
const IrtRType HeightAxis[3],
IrtRType Height,
IrtRType XAngle,
IrtRType YAngle)
Description:
Construct a 3D visualization of the frustum, based on its parameters.
The frustum is represented by a IPObjectStruct, construed as a "ruled"
object of two bases of the frustum.
Parameters:
Center: | The center of the narrow base of the frustum.
|
---|
SizeX, SizeY: | The size of the narrow base of the frustum.
|
---|
XAxis: | The X direction of the bases of the frustum.
|
---|
HeightAxis: | The height (Z) axis of the frustum.
|
---|
Height: | The height of the frustum.
|
---|
XAngle, YAngle: | The angles of the frustum in the X and Y directions,
respectively.
|
---|
Returned Value:
IPObjectStruct *: a 3D visualization of the frustum.
|
---|
See Also:
Keywords:
(box_BVH.c:464)
Prototype:
void GMBoxBVHFree(GMBoxBVHStruct *BVH)
Description:
frees a box BVH .
Parameters:
Returned Value:
See Also:
Keywords:
(box_BVH.c:513)
Prototype:
int GMBoxBVHGetBoxIntersection(const GMBoxBVHStruct *BVH,
const IrtRType *Max,
const IrtRType *Min,
int *Res)
Description:
Get the Id for all boxes intersecting the given box.
Parameters:
BVH: | The BVH.
|
---|
Max: | The maximum coordinates of the box.
|
---|
Min: | The minimum coordinates of the box.
|
---|
Res: | The array to write the result into.
|
---|
Returned Value:
int: The number of boxes in the result.
|
---|
See Also:
Keywords:
(box_BVH.c:486)
Prototype:
int GMBoxBVHGetBoxNum(const GMBoxBVHStruct *BVH)
Description:
Get the number of boxes in a box BVH.
Parameters:
Returned Value:
int: the number of boxes in the BVH.
|
---|
See Also:
Keywords:
(box_BVH.c:545)
Prototype:
int GMBoxBVHGetFrustumIntersection(const GMBoxBVHStruct *BVH,
const IrtRType *Max,
const IrtRType *Min,
IrtRType Angle,
int *Res)
Description:
Get the Id for all boxes intersecting the given frustum.
The frustum is z aligned wider towards the top.
Parameters:
BVH: | The BVH.
|
---|
Max: | The maximum coordinates of the frustum (z is the frustum top,
x, y are the maximum coordinates of the lower base).
|
---|
Min: | The minimum coordinates of the frustum (z is the frustum bottom,
x, y are the minimum coordinates of the lower base).
|
---|
Angle: | The angle of the frustum.
|
---|
Res: | The array to write the result into.
|
---|
Returned Value:
int: the number of boxes in the result.
|
---|
See Also:
Keywords:
(box2BVH.c:423)
Prototype:
int GMBoxBVHGetGeneralAlignedFrustumIntersection(const GMBoxBVHStruct *BVH,
const IrtRType Center[3],
IrtRType SizeX,
IrtRType SizeY,
const IrtRType XAxis[3],
const IrtRType HeightAxis[3],
IrtRType Height,
IrtRType XAngle,
IrtRType YAngle,
int *Res)
Description:
Get the Id for all boxes overlapping the given frustum.
The frustum can have a general-aligned axis and orientation. It is defined
by a center point, x and y sizes of the NARROW base, x and height axis
directions, height and angle.
Parameters:
BVH: | The BVH.
|
---|
Center: | The center of the narrow base of the frustum.
|
---|
SizeX, SizeY: | The size of the narrow base of the frustum.
|
---|
XAxis: | The X direction of the bases of the frustum.
|
---|
HeightAxis: | The height (Z) axis of the frustum.
|
---|
Height: | The height of the frustum.
|
---|
XAngle, YAngle: | The angles of the frustum in the X and Y directions,
respectively.
|
---|
Res: | The array to write the result into.
|
---|
Returned Value:
int: the number of boxes in the result.
|
---|
See Also:
Keywords:
(box2BVH.c:460)
Prototype:
int GMBoxBVHGetGeneralAlignedFrustumIntersection2(
const GMBoxBVHStruct *BVH,
const GMGeneralFrustumInfoStruct *Frustum,
int *Res)
Description:
Get the Id for all boxes overlapping the given frustum.
The frustum can have a general-aligned axis and orientation. The frustum
can be constructed with the function
GMBoxBVHConstructGeneralAlignedFrustum.
Parameters:
BVH: | The BVH.
|
---|
Frustum: | The frustum with to interse
|
---|
Res: | The array to write the result into.
|
---|
Returned Value:
int: the number of boxes in the result.
|
---|
See Also:
GMBoxBVHConstructGeneralAlignedFrustum
Keywords:
(box_BVH.c:584)
Prototype:
int GMBoxBVHTestFrustumIntersection(const GMBoxBVHStruct *BVH,
const IrtRType *Max,
const IrtRType *Min,
IrtRType Angle)
Description:
Check if any Boxes are in the frustum aligned along the Z axis.
Parameters:
BVH: | The BVH.
|
---|
Max: | The maximum coordinates of the frustum (z is the frustum top,
x, y are the maximum coordinates of the lower base).
|
---|
Min: | The minimum coordinates of the frustum (z is the frustum bottom,
x, y are the minimum coordinates of the lower base).
|
---|
Angle: | The angle of the frustum.
|
---|
Returned Value:
int: 0 if no BVH data intersects the frustum.
|
---|
See Also:
Keywords:
(geom_bsc.c:2876)
Prototype:
int GMCircleFrom2Pts2Tans(IrtPtType Center,
IrtRType *Radius,
const IrtPtType Pt1,
const IrtPtType Pt2,
const IrtVecType Tan1,
const IrtVecType Tan2)
Description:
Routine to construct a circle through given 3 points. If two of the
points are the same or the three points are collinear it returns FALSE,
otherwise (successful), it returns TRUE.
Parameters:
Center: | Of computed circle.
|
---|
Radius: | Of computed circle.
|
---|
Pt1, Pt2: | Two points to fit a circle through.
|
---|
Tan1, Tan2: | Two tangents to the circle at Pt1, Pt2.
|
---|
Returned Value:
int: TRUE if successful, FALSE otherwise.
|
---|
See Also:
GM2PointsFromCircCirc3D
GM2PointsFromLineLine
GM2PointsFromCircCirc
GMCircleFrom3Points
GM2BiTansFromCircCirc
GM2TanLinesFromCircCirc
GM2IsPtInsideCirc
Keywords:
circle
(geom_bsc.c:2809)
Prototype:
int GMCircleFrom3Points(IrtPtType Center,
IrtRType *Radius,
const IrtPtType Pt1,
const IrtPtType Pt2,
const IrtPtType Pt3)
Description:
Routine to construct a circle through given 3 points. If two of the
points are the same or the three points are collinear it returns FALSE,
otherwise (successful), it returns TRUE.
Parameters:
Center: | Of computed circle.
|
---|
Radius: | Of computed circle.
|
---|
Pt1, Pt2, Pt3: | Three points to fit a circle through.
|
---|
Returned Value:
int: TRUE if successful, FALSE otherwise.
|
---|
See Also:
GM2PointsFromCircCirc3D
GM2PointsFromLineLine
GM2PointsFromCircCirc
GMCircleFrom2Pts2Tans
GM2BiTansFromCircCirc
GM2TanLinesFromCircCirc
GM2IsPtInsideCirc
Keywords:
circle
(geom_bsc.c:2939)
Prototype:
int GMCircleFromLstSqrPts(IrtPtType Center,
IrtRType *Radius,
const IrtPtType *Pts,
int PtsSize)
Description:
Compute a least-sqaures fitted circle to a set of points, in the XY
plane. Returns the center and radius of the computed circle.
Solving the problem in a new (U,V) apace by minimizing P^2,
P=(U-Uc)^2+(V-Vc)^2-R^2, where (Uc,Vc) the circle center.
For the full solution, see
http://www.dtcenter.org/met/users/docs/write_ups/circle_fit.pdf.
Parameters:
Center: | The circle's center is returned in this param.
|
---|
Radius: | The circle's radius is returned in this param.
|
---|
Pts: | Vector of points to fit a circle to, least squares.
|
---|
PtsSize: | Size of the PTs vector.
|
---|
Returned Value:
int: TRUE if successful, FALSE otherwise.
|
---|
See Also:
Keywords:
(poly_cln.c:139)
Prototype:
IPPolygonStruct *GMCleanUpDupPolys(IPPolygonStruct **PPolygons, IrtRType Eps)
Description:
Routine to search and remove duplicated identical polygons in the input
model, in place.
Parameters:
PPolygons: | List of polygons to clean, in place.
|
---|
Eps: | Tolerance of vertices equality, etc.
|
---|
Returned Value:
IPPolygonStruct *: Reference to the filtered polygons.
|
---|
See Also:
GMCleanUpPolylineList
GMVrtxListToCircOrLin
GMFilterInteriorVertices
GMCleanUpPolygonList
GMTwoPolySameGeom
Keywords:
duplicated polygons
cleaning
(poly_cln.c:184)
Prototype:
IPPolygonStruct *GMCleanUpPolygonList(IPPolygonStruct **PPolygons,
IrtRType Eps)
Description:
Routine to clean up polygons - delete zero length edges, and polygons
with less than 3 vertices, in place.
Parameters:
PPolygons: | List of polygons to clean, in place.
|
---|
Eps: | Tolerance of vertices equality, etc.
|
---|
Returned Value:
IPPolygonStruct *: Reference to the filtered polygons.
|
---|
See Also:
GMCleanUpPolylineList
GMVrtxListToCircOrLin
GMFilterInteriorVertices
GMCleanUpDupPolys
Keywords:
zero length edges
cleaning
(poly_cln.c:274)
Prototype:
IPPolygonStruct *GMCleanUpPolylineList(IPPolygonStruct **PPolylines,
IrtRType Eps)
Description:
Routine to clean up polylines of zero length, in place.
Valid polylines are assumed to hold at least 3 points, by this function.
Parameters:
PPolylines: | List of polylines to clean, in place.
|
---|
Eps: | Tolerance of vertices equality, etc.
|
---|
Returned Value:
IPPolygonStruct *: Reference to the filtered polylines.
|
---|
See Also:
GMCleanUpPolygonList
GMVrtxListToCircOrLin
GMFilterInteriorVertices
GMCleanUpPolylineList2
Keywords:
zero length polyline
cleaning
(poly_cln.c:343)
Prototype:
IPPolygonStruct *GMCleanUpPolylineList2(IPPolygonStruct *PPolylines)
Description:
Routine to clean up colinear points in polylines, in place.
Parameters:
PPolylines: | List of polylines to clean, in place.
|
---|
Returned Value:
IPPolygonStruct *: Reference to the filtered polylines.
|
---|
See Also:
GMCleanUpPolygonList
GMVrtxListToCircOrLin
GMFilterInteriorVertices
GMCleanUpPolylineList
Keywords:
colinear points
cleaning
(poly_cln.c:673)
Prototype:
IPPolygonStruct *GMClipPolysAgainstPlane(IPPolygonStruct *PHead,
IPPolygonStruct **PClipped,
IPPolygonStruct **PInter,
IrtPlnType Plane)
Description:
Clips polygons that are at the negative side of the plane foreach
Ax + By + Cz + D < 0. Clipped polygons are returned in PClipped list
whereas polygons that intersects the plane Plane are returned in PInter.
Parameters:
PHead: | Pointer to head of a NULL terminated list of polygons.
|
---|
PClipped: | ist of clipped polygons on the negative side of Plane, if any.
|
---|
PInter: | List of polygons that intersects Plane, if any.
|
---|
Plane: | Plane to clip against.
|
---|
Returned Value:
IPPolygonStruct *: List of polygons in the positive domain of the Plane.
|
---|
Keywords:
(geom_bsc.c:358)
Prototype:
int GMCollinear3Pts(const IrtPtType Pt1,
const IrtPtType Pt2,
const IrtPtType Pt3)
Description:
Verifies the collinearity of three points.
Parameters:
Pt1, Pt2, Pt3: | hree points to verify for collinearity.
|
---|
Returned Value:
int: TRUE if collinear, FALSE otherwise.
|
---|
See Also:
GMCollinear3PtsInside
Keywords:
collinearity
(geom_bsc.c:439)
Prototype:
int GMCollinear3PtsInside(const IrtPtType Pt1,
const IrtPtType Pt2,
const IrtPtType Pt3)
Description:
Verifies the collinearity of three points and that Pt2 is inside (up to
GMBasicColinEps) the line segment (Pt1, Pt3).
Parameters:
Pt1, Pt2, Pt3: | hree points to verify for collinearity.
|
---|
Returned Value:
int: TRUE if collinear and inside segment, FALSE otherwise
(including the case of Pt1 == Pt2 or Pt3 == Pt2).
|
---|
See Also:
GMCollinear3Pts
Keywords:
collinearity
(intrnrml.c:200)
Prototype:
int GMCollinear3Vertices(const IPVertexStruct *V1,
const IPVertexStruct *V2,
const IPVertexStruct *V3)
Description:
Verify the collinearity of the given three vertices.
Parameters:
V1, V2, V3: | ertices to test for collinearity.
|
---|
Returned Value:
int: TRUE if collinear, FALSE otherwise.
|
---|
Keywords:
collinearity
(geom_bsc.c:3798)
Prototype:
void GMComplexRoot(IrtRType RealVal,
IrtRType ImageVal,
IrtRType *RealRoot,
IrtRType *ImageRoot)
Description:
Computes one root of an imagniary number.
Parameters:
RealVal, ImageVal: | The number to compute the root for.
|
---|
RealRoot, ImageRoot: | The computed root.
|
---|
Returned Value:
Keywords:
(polysmth.c:546)
Prototype:
int GMComputeAverageVertex(const IPVertexStruct *VS,
IrtPtType CenterPoint,
IrtRType BlendFactor)
Description:
Computes the average location of the vertices in poly VS and blend this
average with CenterPoint with ratio BlendFactor (== CenterPoint if 0).
Parameters:
VS: | List of vertices of the Polygon.
|
---|
CenterPoint: | Input center location into which average is to be blended.
|
---|
BlendFactor: | 1.0 to move the vertex all the way to the average position
otherwise (less than 1.0) to the proper fraction.
|
---|
Returned Value:
int: TRUE if computed average is valid, FALSE otherwise.
|
---|
See Also:
GMPolyCentroid
GMComputeAverageVertex2
Keywords:
(polysmth.c:482)
Prototype:
int GMComputeAverageVertex2(const int *NS,
const IPPolyVrtxArrayStruct *PVIdx,
IrtPtType CenterPoint,
int CenterIndex,
IrtRType BlendFactor,
IrtRType DesiredRadius)
Description:
Computes the average location of the vertices in vertex indices NS and
blend this average with CenterPoint with ratio BlendFactor (== CenterPoint
if 0).
Parameters:
NS: | List of indices of vertices to average in PVIdx.
|
---|
PVIdx: | Vertex array data structure.
|
---|
CenterPoint: | Input center location into which average is to be blended.
|
---|
CenterIndex: | Input center location index in PVIdx structure.
|
---|
BlendFactor: | 1.0 to move the vertex all the way to the average position
otherwise (less than 1.0) to the proper fraction.
|
---|
DesiredRadius: | If positive and curvature attributes (K1Curv and K2Curv)
are provided, verify we do not smooth this vertex beyond
DesiredRadius (examining max. principle curvature value).
|
---|
Returned Value:
int: TRUE if computed average is valid, FALSE otherwise.
|
---|
See Also:
GMPolyCentroid
GMComputeAverageVertex
Keywords:
(poly_pts.c:260)
Prototype:
IPPolygonStruct *GMConvertPolyToTriangles(IPPolygonStruct *Pl)
Description:
Converts a single convex polygon to a set of triangles, in place.
Parameters:
Pl: | A convex polygon to convert to triangles. If Pl contains collinear
edges, singular polygons are likely to be generated as a result.
|
---|
Returned Value:
IPPolygonStruct *: A list of triangles, to which Pl also points.
|
---|
See Also:
GMConvertPolysToTriangles2
GMConvertPolysToTriangles
Keywords:
(poly_pts.c:145)
Prototype:
IPObjectStruct *GMConvertPolysToNGons(const IPObjectStruct *PlObj,
int n,
int HandleNormals)
Description:
Creates a new polygonal objects out of given one, that contains only
polygons of up to n vertices. Non convex polygons are split to convex one
so the result will contain convex data only.
Parameters:
PlObj: | Polygonal object to split into up to n-gons.
|
---|
n: | Maximal number of vertices.
|
---|
HandleNormals: | TRUE to also process normals of vertices.
|
---|
Returned Value:
IPObjectStruct *: A polygonal object containing polygons with upto n
vertices, representing the same model as PolyObj.
|
---|
See Also:
ConvexPolyObjectN
GMConvertPolysToTriangles
GMConvertPolysToRectangles
Keywords:
(poly_pts.c:766)
Prototype:
IPObjectStruct *GMConvertPolysToRectangles(IPObjectStruct *PolyObj)
Description:
Creates a new polygonal object out of given one, that contains only
rectangles. Non convex polygons with an empty kernel will generate self-
intersecting results.
By selecting a centroid location in the kernel of each polygon and
connecting that centroid location to all the middle two adjacent edges,
for all edges, n rectangular regions are defined for each n-gon, about
half the (edge) size.
Parameters:
PolyObj: | Polygonal object to split into rectangles, in place.
|
---|
Returned Value:
IPObjectStruct *: Return list of rectangular polygons.
|
---|
See Also:
ConvexPolyObjectN
GMConvertPolysToNGons
GMLimitTrianglesEdgeLen
GMConvertPolysToTriangles
GMConvertPolysToTriangles2
Keywords:
(poly_pts.c:527)
Prototype:
IPObjectStruct *GMConvertPolysToTriangles(const IPObjectStruct *PObj)
Description:
Creates a new polygonal objects out of given one, that contains only
triangles. Non convex polygons are split to convex one which, in turn,
converted to triangles. Collinear points are purged away.
Parameters:
PObj: | Polygonal object to split into triangles.
|
---|
Returned Value:
IPObjectStruct *: A polygonal object containing only triangles
representing the same model as PolyObj.
|
---|
See Also:
ConvexPolyObjectN
GMConvertPolysToNGons
GMLimitTrianglesEdgeLen
GMConvertPolysToTriangles2
GMConvertPolysToRectangles
GMConvertPolyToTriangles
Keywords:
(poly_pts.c:567)
Prototype:
IPObjectStruct *GMConvertPolysToTriangles2(const IPObjectStruct *PObj)
Description:
Creates a new polygonal objects out of given one, that contains only
triangles. Non convex polygons are split to convex one which, in turn,
converted to triangles. Collinear points are used and split at.
Parameters:
PObj: | Polygonal object to split into triangles.
|
---|
Returned Value:
IPObjectStruct *: A polygonal object containing only triangles
representing the same model as PolyObj.
|
---|
See Also:
ConvexPolyObjectN
GMConvertPolysToNGons
GMLimitTrianglesEdgeLen
GMConvertPolysToTriangles
GMConvertPolysToRectangles
Keywords:
(poly_pts.c:673)
Prototype:
IPObjectStruct *GMConvertPolysToTrianglesIntrrPt(IPObjectStruct *PolyObj)
Description:
Creates a new polygonal objects out of given one, that contains only
triangles. Non convex polygons are split to convex one which, in turn,
converted to triangles. This version triangulates convex polygons by
connecting each vertex to the geometric centroid, hence co-linear pts are
not purged, and do not create degenerate triangles. All other fields are
not handled (normals, etc').
Parameters:
PolyObj: | Polygonal object to split into triangles, in place.
|
---|
Returned Value:
IPObjectStruct *: A polygonal object containing only triangles
representing the same model as PolyObj.
|
---|
See Also:
ConvexPolyObjectN
GMConvertPolysToNGons
GMLimitTrianglesEdgeLen
GMConvertPolysToTriangles
GMConvertPolysToRectangles
Keywords:
(cnvxhull.c:61)
Prototype:
int GMConvexHull(IrtE2PtStruct *DTPts, int *NumOfPoints)
Description:
Convex Hull computation of a set of points. The Convex Hull is returned
in place, updating NumOfPoints.
Algorithm is based on two articles:
1. An Efficient Algorithm For Determining The convex Hull of a Finite Set.
By R.L. Graham, Information processing letters (1972) 132-133.
2. A Reevolution of an Efficient Algorithm For Determining The Convex Hull
of a Finite Planar Set. By K.R. Anderson, Information Processing
Letters, January 1978, Vol. 7, Num. 1, 53-55.
Parameters:
DTPts: | The set of point to compute their convex hull.
|
---|
NumOfPoints: | Number of points in set DTPts.
|
---|
Returned Value:
int: TRUE if successful, FALSE otherwise.
|
---|
See Also:
GMMonotonePolyConvex
Keywords:
(convex.c:200)
Prototype:
int GMConvexNormalizeNormal(int NormalizeNormals)
Description:
Routine to set how normals are blended - with or without normalizations.
Parameters:
NormalizeNormals: | TRUE to normalize after blend, FALSE just to blend.
|
---|
Returned Value:
See Also:
GMConvexPolyObjectN
GMConvexPolyObject
Keywords:
convexity
convex polygon
(convex.c:266)
Prototype:
void GMConvexPolyObject(IPObjectStruct *PObj, int HandleNormals)
Description:
Routine to test all polygons in a given object for convexity, and split
non convex ones, in place.
This function will introduce new vertices to the split polygons.
Parameters:
PObj: | To test for convexity of its polygons, and split into convex
polygons non convex polygons found, in place. Either a
polygonal object or a list of polygonal objects.
|
---|
HandleNormals: | TRUE to also handle normals of vertices.
|
---|
Returned Value:
See Also:
GMConvertPolysToTriangles
GMConvexPolyObjectN
GMIsConvexPolygon
SplitNonConvexPoly
Keywords:
convexity
convex polygon
(convex.c:233)
Prototype:
IPObjectStruct *GMConvexPolyObjectN(const IPObjectStruct *PObj,
int HandleNormals)
Description:
Routine to test all polygons in a given object for convexity, and split
non convex ones, non destructively - the original object is not modified.
This function will introduce new vertices to the split polygons.
Parameters:
PObj: | To test for convexity of its polygons.
|
---|
HandleNormals: | TRUE to also handle normals of vertices.
|
---|
Returned Value:
IPObjectStruct *: A duplicate of PObj, but with convex polygons only.
|
---|
See Also:
GMConvertPolysToTriangles
GMConvexPolyObject
GMConvexPolygon
SplitNonConvexPoly
Keywords:
convexity
convex polygon
(convex.c:172)
Prototype:
int GMConvexRaysToVertices(int RaysToVertices)
Description:
If TRUE, ray will be fired to vertices. If FALSE, ray as angle bisectors
will be used.
Parameters:
RaysToVertices: | TRUE for rays to vertices, FALSE bisector rays.
|
---|
Returned Value:
int: Previous state of raay casting.
|
---|
See Also:
GMConvexPolyObjectN
GMConvertPolysToTriangles
ConvexPolyObject
nvexPolygon
SplitNonConvexPoly
GMConvexPolyNormals
Keywords:
(geom_bsc.c:479)
Prototype:
int GMCoplanar4Pts(const IrtPtType Pt1,
const IrtPtType Pt2,
const IrtPtType Pt3,
const IrtPtType Pt4)
Description:
Verifies the coplanarity of four points.
Parameters:
Pt1, Pt2, Pt3, Pt4: | our points to verify for coplanarity.
|
---|
Returned Value:
int: TRUE if coplanar, FALSE otherwise.
|
---|
See Also:
GMCollinear3Pts
Keywords:
coplanarity
(geom_bsc.c:1393)
Prototype:
IrtRType GMDistLineLine(const IrtPtType Pl1,
const IrtPtType Vl1,
const IrtPtType Pl2,
const IrtPtType Vl2)
Description:
Routine to find the distance between two lines (Pli, Vli) , i = 1, 2.
Parameters:
Pl1, Vl1: | Position and direction defining the first line.
|
---|
Pl2, Vl2: | Position and direction defining the second line.
|
---|
Returned Value:
IrtRType: Distance between the two lines.
|
---|
Keywords:
line line distance
(geom_bsc.c:910)
Prototype:
IrtRType GMDistPointLine(const IrtPtType Point,
const IrtPtType Pl,
const IrtPtType Vl)
Description:
Routine to compute the disstance between a 3d point and a 3d line.
The line is prescribed using a point on it (Pl) and vector (Vl).
Parameters:
Point: | To find the distance to on the line.
|
---|
Pl, Vl: | Position and direction that defines the line.
|
---|
Returned Value:
IrtRType: The computed distance.
|
---|
See Also:
MvarDistPointLine
Keywords:
point line distance
(geom_bsc.c:947)
Prototype:
IrtRType GMDistPointPlane(const IrtPtType Point, const IrtPlnType Plane)
Description:
Routine to compute the distance between a Point and a Plane. The Plane
is prescribed using its four coefficients : Ax + By + Cz + D = 0 given as
four elements vector.
Parameters:
Point: | To find the distance to on the plane.
|
---|
Plane: | To find the distance to on the point.
|
---|
Returned Value:
IrtRType: The computed distance.
|
---|
Keywords:
point plane distance
(geom_bsc.c:586)
Prototype:
IrtRType GMDistPointPoint(const IrtPtType P1, const IrtPtType P2)
Description:
Routine to compute the distance between two 3d points.
Parameters:
P1, P2: | Two points to compute the distance between.
|
---|
Returned Value:
IrtRType: Computed distance.
|
---|
Keywords:
point point distance
(geom_bsc.c:1607)
Prototype:
IrtRType GMDistPolyPoly(const IPPolygonStruct *Pl1,
const IPPolygonStruct *Pl2,
IPVertexStruct **V1,
IPVertexStruct **V2,
int TagIgnoreV)
Description:
Finds the closest vertices of Pl1 and Pl2.
Parameters:
Pl1, Pl2: | Two polys we seek the closest vertices of the two.
|
---|
V1, V2: | Two vertices on Pl1 and Pl2, respectively that are closest.
|
---|
TagIgnoreV: | f non zero, vertices that own this tag are ignored.
|
---|
Returned Value:
IrtRType: Distance between V1 and V2.
|
---|
See Also:
GMDistPolyPt
Keywords:
(geom_bsc.c:1438)
Prototype:
IrtRType GMDistPolyPt(const IPPolygonStruct *Pl,
IrtPtType Pt,
const IPVertexStruct **ExtremeV,
int MaxDist)
Description:
Computes the extreme distance between point Pt and polygons/lines Poly.
The extreme distance is computed on the vertices of Pl only.
Parameters:
Pl: | Poly to examine its extreme distance from point Pt.
|
---|
Pt: | Point to examine its extreme distance from poly Pl.
|
---|
ExtremeV: | Will be set to the vertex at the extreme distance.
If NULL it is ignored.
|
---|
MaxDist: | TRUE to compute the maximum distance, FALSE for the minimum.
|
---|
Returned Value:
IrtRType: Extreme distance, -1.0 if error.
|
---|
See Also:
GMDistPolyPoly
GMDistPolyPt2
UserMinDistPointPolylineList
Keywords:
(geom_bsc.c:1507)
Prototype:
IrtRType GMDistPolyPt2(const IPPolygonStruct *Pl,
int IsPolyline,
IrtPtType Pt,
IPVertexStruct **ExtremeV,
int MaxDist)
Description:
Computes the extreme distance between point Pt and polygons/lines Poly.
The extreme distance is computed on the vertices and edges of Pl only.
Parameters:
Pl: | Poly to examine its extreme distance from point Pt.
|
---|
IsPolyline: | RUE if Pl holds polylines, FALSE if polygons.
|
---|
Pt: | Point to examine its extreme distance from poly Pl.
|
---|
ExtremeV: | Will be set to the location at the vertex with the extreme.
If happens between this and next vertex, will be set to this
and this vertex with have a "Param" real attribute with the
blend factor in [0, 1]. Will be allocated dynamically.
|
---|
MaxDist: | TRUE to compute the maximum distance, FALSE for the minimum.
|
---|
Returned Value:
IrtRType: Extreme distance, -1.0 if error.
|
---|
See Also:
GMDistPolyPoly
GMDistPolyPt
UserMinDistPointPolylineList
Keywords:
(intrnrml.c:250)
Prototype:
int GMEvalWeightsVFromPl(const IrtRType *Coord,
const IPPolygonStruct *Pl,
IrtRType *Wgt)
Description:
Compues blending weights for a vertex inside a polygon. Computes the
barycentric coordinates of the triangle in Pl, V is in.
Parameters:
Coord: | Of vertex that its weights we seek.
|
---|
Pl: | Polygon including V.
|
---|
Wgt: | Vector to update with two weights. Must be of length larger or
equal to the number of vertices in Pl.
|
---|
Returned Value:
int: TRUE if successful, FALSE if failed (V outside Pl).
|
---|
See Also:
GMUpdateVerticesByInterp
GMInterpVrtxNrmlBetweenTwo
GMInterpVrtxNrmlBetweenTwo2
GMInterpVrtxNrmlFromPl
GMInterpVrtxRGBBetweenTwo
GMInterpVrtxRGBFromPl
GMInterpVrtxUVBetweenTwo
GMInterpVrtxUVFromPl
Keywords:
barycentric coordinates
(animate.c:796)
Prototype:
IrtRType GMExecuteAnimationEvalMat(IPObjectStruct *AnimationP,
IrtRType Time,
IrtHmgnMatType ObjMat)
Description:
Auxiliary function of ExecuteAnimation. Processes a linked list of
objects.
Parameters:
AnimationP: | A (list of) animation curve(s) to evaluate at time t.
|
---|
Time: | Time of animation.
|
---|
ObjMat: | A matrix to chain the new animation matrices into.
|
---|
Returned Value:
IrtRType: Positive if visible (between zero and one hints on
opacity), 0.0 otherwise, -1.0 if no visible curve found.
|
---|
Keywords:
(poly_cln.c:593)
Prototype:
IPVertexStruct *GMFilterInteriorVertices(IPVertexStruct *VHead,
IrtRType MinTol,
int n)
Description:
Filters out interior vertices to upto n interior vertices, in place.
Computes the angle between adjacent edges and purge the almost collinear
ones until we have n interior vertices.
Parameters:
VHead: | Pointer to head of NULL terminated list of vertices.
|
---|
MinTol: | Vertices that the inner product of previous edge direction and
next edge direction is more than MinTol are purged.
|
---|
n: | Number of interior vertices to keep.
|
---|
Returned Value:
IPVertexStruct *: Similar list modified in place with only n interior
vertices.
|
---|
See Also:
GMCleanUpPolylineList
GMCleanUpPolygonList
GMVrtxListToCircOrLin
Keywords:
(geom_bsc.c:626)
Prototype:
int GMFindLinComb2Vecs(const IrtVecType V1,
const IrtVecType V2,
const IrtVecType V,
IrtRType w[2])
Description:
Computes the linear combination of V1 and V2 that yields V. It is
assumed that the three vectors are coplanar.
Parameters:
V1, V2: | The two vectors that span the plane containing V.
|
---|
V: | To compute lin. comb. "w[0] * V1 + w[1] * V2" for.
|
---|
w: | The two scalar coefficients to be computed.
|
---|
Returned Value:
int: TRUE if successful, FALSE otherwise.
|
---|
Keywords:
(polysmth.c:759)
Prototype:
int GMFindPtInsidePoly(const IPPolygonStruct *Pl, IrtPtType PtInside)
Description:
Computes a point inside the given polygon, in the XY plane.
Parameters:
Pl: | Polygon to find a point inside.
|
---|
PtInside: | Computed interior point.
|
---|
Returned Value:
int: TRUE if kernel is not empty, FALSE otherwise.
|
---|
Keywords:
(polysmth.c:819)
Prototype:
int GMFindPtInsidePolyKernel(const IPVertexStruct *VE, IrtPtType KrnlPt)
Description:
Computes a point inside the kernel of the given polygon, if has any.
Parameters:
VE: | Cyclic list of vertices of the Polygon.
|
---|
KrnlPt: | Computed interior kernel point.
|
---|
Returned Value:
int: TRUE if kernel is not empty, FALSE otherwise.
|
---|
Keywords:
(poly_cln.c:737)
Prototype:
IPVertexStruct *GMFindThirdPointInTriangle(const IPPolygonStruct *Pl,
const IPVertexStruct *V,
const IPVertexStruct *VNext)
Description:
Given two points in triangle, find the third (other) point (vertex) in
the triangle.
Parameters:
Pl: | Triangle containing edge (V, VNext).
|
---|
V, VNext: | Two given points in triangle.
|
---|
Returned Value:
IPVertexStruct *: Pointer to the third vertex, or NULL if error.
|
---|
Keywords:
(polysmth.c:927)
Prototype:
void GMFindUnConvexPolygonNormal(const IPVertexStruct *VL, IrtVecType Nrml)
Description:
Finds the normal of polygon that can be non-convex.
Parameters:
VL: | List of vertices of the Polygon.
|
---|
Nrml: | Computed normal of the polygon. Not normalized.
|
---|
Returned Value:
Keywords:
(fit1pts.c:83)
Prototype:
IrtRType GMFitData(IrtRType** PointData,
unsigned int NumberOfPointsToFit,
GMFittingModelType FittingModel,
IrtRType ModelExtParams[],
IrtRType Tolerance)
Description:
This function finds the best model params in the least-squares sense.
Parameters:
PointData: | List of data points.
|
---|
NumberOfPointsToFit: | he length of the list of points.
|
---|
FittingModel: | An enumerator indicating which shape type to fit.
|
---|
ModelExtParams: | The resulting external params of the shape.
|
---|
Tolerance: | If the error is smaller then Tolerance return.
|
---|
Returned Value:
IrtRType: The avereage squared error.
|
---|
See Also:
Keywords:
(fit1pts.c:394)
Prototype:
IrtRType GMFitDataWithOutliers(IrtRType **PointData,
unsigned int NumberOfPointsToFit,
GMFittingModelType FittingModel,
IrtRType ModelExtParams[],
IrtRType Tolerance,
unsigned int NumOfChecks)
Description:
This function finds the best model params in the minimal median least
squares sense.
Parameters:
PointData: | List of data points.
|
---|
NumberOfPointsToFit: | he length of the list of points.
|
---|
FittingModel: | An enumerator indicating which shape type to fit.
|
---|
ModelExtParams: | The resulting params of the shape.
|
---|
Tolerance: | If the error is smaller then Tolerance return.
|
---|
NumOfChecks: | The number of attempts to calculate best sigma.
|
---|
Returned Value:
IrtRType: The median squared error.
|
---|
See Also:
GMFitData
Keywords:
Outliers
(fit1pts.c:810)
Prototype:
IrtRType GMFitEstimateRotationAxis(IrtPtType *PointsOnObject,
IrtVecType *Normals,
unsigned int NumberOfPoints,
IrtPtType PointOnRotationAxis,
IrtVecType RotationAxisDirection)
Description:
This function estimates a rotation axis of a surface of revolution.
Parameters:
PointsOnObject: | Points on the surface.
|
---|
Normals: | Corresponding normals.
|
---|
NumberOfPoints: | The number of points/normals.
|
---|
PointOnRotationAxis: | The result.
|
---|
RotationAxisDirection: | he result.
|
---|
Returned Value:
See Also:
Keywords:
(fit1pts.c:666)
Prototype:
IrtRType GMFitObjectWithOutliers(IPPolygonStruct *PPoly,
GMFittingModelType FittingModel,
IrtRType ModelExtParams[],
IrtRType Tolerance,
unsigned int NumOfChecks)
Description:
This function finds the best model params in the minimal median least
squares sense.
Warning: This function is NOT thread-safe.
Parameters:
PPoly: | Pointer the object to estimate.
|
---|
FittingModel: | An enumerator indicating which shape type to fit.
|
---|
ModelExtParams: | The resulting params of the shape.
if FittingModel is
GM_FIT_PLANE - A, B, C, D of plane equation.
GM_FIT_SPHERE - Xcntr, Ycntr, Zcntr, Radius.
GM_FIT_CYLINDER - Xcntr, Ycntr, Zcntr,
Xdir, Ydir, Zdir, Radius.
GM_FIT_CIRCLE - Xcntr, Ycntr, Radius.
GM_FIT_CONE - Xapex, Yapex, Zapex, apex semi
angle,
Xdir, Ydir, Zdir.
GM_FIT_TORUS - Xpnt, Ypnt, Zpnt, DiscRad,
ExtRad, Xdir, Ydir, Zdir.
|
---|
Tolerance: | If the error is smaller than Tolerance return.
|
---|
NumOfChecks: | The number of attempts to calculate best sigma,
100 is a good start.
|
---|
Returned Value:
IrtRType: The median squared error.
|
---|
See Also:
GMFitDataWithOutliers
Keywords:
(intrnrml.c:1001)
Prototype:
void GMFixNormalsOfPolyModel(IPPolygonStruct *PlList, int TrustFixedPt)
Description:
Fix orientation discrepancy between polygon normals and vertices normals.
Parameters:
PlList: | Polygonal object to correct normals.
|
---|
TrustFixedPt: | 0 to trust the vertices' normal,
1 to trust the orientation of polygons' normals,
2 to reorient the polygons so all plane normals point
outside or all inside (based on first poly).
|
---|
Returned Value:
See Also:
GMBlendNormalsToVertices
GMFixOrientationOfPolyModel
Keywords:
(intrnrml.c:880)
Prototype:
void GMFixOrientationOfPolyModel(IPPolygonStruct *Pls)
Description:
Using computed adjacency information, propagate the orientation of first
polygon in the given poly object until all polygons are processed.
Disjoint poly-meshes will be marked with an _OrientDisjoint attribute
on the first polygon of each disjoint part.
Parameters:
Pls: | Polygons to reorient them all based on first polygon.
|
---|
Returned Value:
See Also:
Keywords:
(intrnrml.c:1068)
Prototype:
void GMFixPolyNormals(IPObjectStruct *PObj, int TrustFixPt)
Description:
Correct the (polygonal and/or vertices) normals of a polygonal object
via adjacency propagations.
As a side effect also allow the split of a polygonal models with
disjoint parts, into the disjoint parts. That is, the connected
components in the input will be organized as a list object, in place.
Parameters:
PObj: | Polygonal object to correct normals, in place.
|
---|
TrustFixPt: | 0 to trust the vertices' normal,
1 to trust the orientation of polygons' normals,
2 to reorient the polygons so all plane normals point
outside or all inside (based on first poly).
3 same as 2 but splits disjoint parts in the input object
into different objects.
|
---|
Returned Value:
See Also:
GMBlendNormalsToVertices
GMFixNormalsOfPolyModel
Keywords:
(geomat3d.c:175)
Prototype:
IPObjectStruct *GMGenMatObjectRotVec(const IrtVecType Vec,
const IrtRType *Degree)
Description:
Routine to generate rotation object around the vector Vec in Degree degs:
Parameters:
Vec: | Vector to rotate along its axis.
|
---|
Degree: | Amount of rotation, in degrees.
|
---|
Returned Value:
IPObjectStruct *: A matrix object.
|
---|
See Also:
GMGenMatrixZ2Dir
GMGenMatrixZ2Dir2
GMGenMatObjectZ2Dir2
GMGenMatrixRotVec
Keywords:
rotation
transformations
(geomat3d.c:46)
Prototype:
IPObjectStruct *GMGenMatObjectRotX(const IrtRType *Degree)
Description:
Routine to generate rotation object around the X axis in Degree degrees:
Parameters:
Degree: | Amount of rotation, in degrees.
|
---|
Returned Value:
IPObjectStruct *: A matrix object.
|
---|
Keywords:
rotation
transformations
(geomat3d.c:68)
Prototype:
IPObjectStruct *GMGenMatObjectRotY(const IrtRType *Degree)
Description:
Routine to generate rotation object around the Y axis in Degree degrees:
Parameters:
Degree: | Amount of rotation, in degrees.
|
---|
Returned Value:
IPObjectStruct *: A matrix object.
|
---|
Keywords:
rotation
transformations
(geomat3d.c:90)
Prototype:
IPObjectStruct *GMGenMatObjectRotZ(const IrtRType *Degree)
Description:
Routine to generate rotation object around the Z axis in Degree degrees:
Parameters:
Degree: | Amount of rotation, in degrees.
|
---|
Returned Value:
IPObjectStruct *: A matrix object.
|
---|
Keywords:
rotation
transformations
(geomat3d.c:226)
Prototype:
IPObjectStruct *GMGenMatObjectScale(const IrtVecType Vec)
Description:
Routine to generate a scaling object.
Parameters:
Vec: | Amount of scaling, in X, Y, and Z.
|
---|
Returned Value:
IPObjectStruct *: A matrix object.
|
---|
See Also:
MatGenMatScale
Keywords:
scaling
transformations
(geomat3d.c:200)
Prototype:
IPObjectStruct *GMGenMatObjectTrans(const IrtVecType Vec)
Description:
Routine to generate a translation object.
Parameters:
Vec: | Amount of translation, in X, Y, and Z.
|
---|
Returned Value:
IPObjectStruct *: A matrix object.
|
---|
See Also:
MatGenMatTrans
Keywords:
translation
transformations
(geomat3d.c:1236)
Prototype:
IPObjectStruct *GMGenMatObjectV2V(const IrtVecType V1, const IrtVecType V2)
Description:
Generates a transformation matrix that rotates V1 to V2.
Parameters:
V1, V2: | To compute the rotation from (V1) to (V2).
|
---|
Returned Value:
IPObjectStruct *: A matrix object.
|
---|
See Also:
GMGenMatrixZ2Dir
GMGenMatrixZ2Dir2
GMGenMatObjectZ2Dir2
GMGenMatrixRotVec
GMGenMatrixRotV2V
Keywords:
rotation
transformations
(geomat3d.c:116)
Prototype:
IPObjectStruct *GMGenMatObjectZ2Dir(const IrtVecType Dir)
Description:
Routine to generate rotation object to rotate Z to Dir:
Parameters:
Dir: | Vector to rotate Z axis to it.
|
---|
Returned Value:
IPObjectStruct *: A matrix object.
|
---|
See Also:
GMGenMatrixZ2Dir
GMGenMatrixZ2Dir2
GMGenMatObjectZ2Dir2
GMGenMatrixRotV2V
GMGenMatrixRotVec
Keywords:
rotation
transformations
(geomat3d.c:147)
Prototype:
IPObjectStruct *GMGenMatObjectZ2Dir2(const IrtVecType Dir,
const IrtVecType Dir2)
Description:
Routine to generate rotation object around the vector Dir in Degree degs:
Parameters:
Dir: | Vector to rotate Z axis to it.
|
---|
Dir2: | Vector to rotate X axis to it.
|
---|
Returned Value:
IPObjectStruct *: A matrix object.
|
---|
See Also:
GMGenMatrixZ2Dir2
E
GMGenMatrixZ2Dir2
GMGenMatrixZ2Dir
GMGenMatObjectZ2Dir
GMGenMatrixRotV2V
GMGenMatrixRotVec
Keywords:
rotation
transformations
(geomat3d.c:1361)
Prototype:
IPObjectStruct *GMGenMatrix3Pts2EqltrlTri(const IrtPtType Pt1,
const IrtPtType Pt2,
const IrtPtType Pt3)
Description:
Compute the linear transform that maps the given planar triangle
Pt1Pt2Pt3 to an equilateral triangle around the origin so that edge
Pt1Pt2 is horizontal and remains of the same size.
Parameters:
Pt1, Pt2, Pt3: | The three points to compute the mapping for.
|
---|
Returned Value:
IPObjectStruct *: A matrix object.
|
---|
See Also:
GM3Pts2EqltrlTriMat
Keywords:
transformations
shear
(geomat3d.c:1193)
Prototype:
int GMGenMatrix4Pts2Affine4Pts(const IrtPtType P0,
const IrtPtType P1,
const IrtPtType P2,
const IrtPtType P3,
const IrtPtType Q0,
const IrtPtType Q1,
const IrtPtType Q2,
const IrtPtType Q3,
IrtHmgnMatType Trans)
Description:
Computes an affine transform from R^3 to R^3 using four points in R^3
and their images under the transform. Such a transform is well defined
if and only if the four source points are not coplanar.
Parameters:
P0, P1, P2, P3: | The four source points.
|
---|
Q0, Q1, Q2, Q3: | The four image points.
|
---|
Trans: | The computed affine transform. This is a return
argument.
|
---|
Returned Value:
int: TRUE if four source points are non-coplanar, FALSE
otherwise.
|
---|
See Also:
GMGenMatrixZ2Dir
GMGenMatrixZ2Dir2
GMGenMatObjectZ2Dir2
GMGenMatrixRotVec
GMGenMatrixRotV2V
Keywords:
transformations
rotation
(geomat3d.c:1121)
Prototype:
void GMGenMatrixRotV2V(IrtHmgnMatType Mat,
const IrtVecType V1,
const IrtVecType V2)
Description:
Generates a transformation matrix that rotates V1 to V2.
Parameters:
Mat: | To place the computed transformation.
|
---|
V1, V2: | Vector to rotate from (V1) to (V2).
|
---|
Returned Value:
See Also:
GMGenMatrixZ2Dir
GMGenMatrixZ2Dir2
GMGenMatObjectZ2Dir2
GMGenMatrixRotVec
GMGenMatrix4Pts2Affine4Pts
Keywords:
transformations
rotation
(geomat3d.c:1393)
Prototype:
void GMGenMatrixRotVec(IrtHmgnMatType Mat,
const IrtVecType Vec,
IrtRType Degrees)
Description:
Generates a transformation matrix that rotates the object around Vec,
Angle degrees.
Parameters:
Mat: | To place the computed transformation.
|
---|
Vec: | Vector to rotate along its axis.
|
---|
Degrees: | Amount ofrotation, in degrees.
|
---|
Returned Value:
See Also:
GMGenMatrixZ2Dir
GMGenMatrixZ2Dir2
GMGenMatObjectZ2Dir2
GMGenMatrixRotV2V
Keywords:
transformations
rotation
(geomat3d.c:921)
Prototype:
void GMGenMatrixX2Dir(IrtHmgnMatType Mat, const IrtVecType Dir)
Description:
Routine to generate rotation matrix to rotate X to Dir:
Parameters:
Mat: | To place the computed transformation.
|
---|
Dir: | Direction to take X axis to.
|
---|
Returned Value:
Keywords:
rotation
transformations
(geomat3d.c:944)
Prototype:
void GMGenMatrixY2Dir(IrtHmgnMatType Mat, const IrtVecType Dir)
Description:
Routine to generate rotation matrix to rotate Y to Dir:
Parameters:
Mat: | To place the computed transformation.
|
---|
Dir: | Direction to take Y axis to.
|
---|
Returned Value:
Keywords:
rotation
transformations
(geomat3d.c:967)
Prototype:
void GMGenMatrixZ2Dir(IrtHmgnMatType Mat, const IrtVecType Dir)
Description:
Same as GMGenTransMatrixZ2Dir but with no scaling and/or translation.
Parameters:
Mat: | To place the computed transformation.
|
---|
Dir: | Direction to take Z axis to.
|
---|
Returned Value:
Keywords:
transformations
rotation
(geomat3d.c:1049)
Prototype:
void GMGenMatrixZ2Dir2(IrtHmgnMatType Mat,
const IrtVecType Dir,
const IrtVecType Dir2)
Description:
Same as GMGenTransMatrixZ2Dir2 but with no scaling and/or translation.
Parameters:
Mat: | To place the computed transformation.
|
---|
Dir: | Direction to take Z axis to.
|
---|
Dir2: | Direction to take X axis to.
|
---|
Returned Value:
Keywords:
transformations
rotation
(polyprop.c:397)
Prototype:
IPPolygonStruct *GMGenPolyline2Vrtx(IrtVecType V1,
IrtVecType V2,
IPPolygonStruct *Pnext)
Description:
Routine to create a polyline out of a list of 2 vertices V1/2.
No test is made to make sure the 2 points are not the same...
The points are placed in order.
Parameters:
V1, V2: | Two vertices of the constructed polyline.
|
---|
Pnext: | Next is chain of polylines, in linked list.
|
---|
Returned Value:
IPPolygonStruct *: The constructed polyline.
|
---|
See Also:
PrimGenPolygon3Vrtx
PrimGenPolygon4Vrtx
Keywords:
(geomat3d.c:1429)
Prototype:
void GMGenProjectionMat(const IrtPlnType ProjPlane,
const IrtRType EyePos[4],
IrtHmgnMatType Mat)
Description:
Constructs a matrix that projects 3D objects to the Projection Plane
ProjPlane, having the eye at EyePos.
This solution is derived by solving for the intersection point of the
line through the eye and the projected point and the given plane.
Parameters:
ProjPlane: | The plane to project the objects onto.
|
---|
EyePos: | The position of the eye.
|
---|
Mat: | Matrix to update.
|
---|
Returned Value:
See Also:
GMGenReflectionMat
Keywords:
(geomat3d.c:1477)
Prototype:
void GMGenReflectionMat(const IrtPlnType ReflectPlane, IrtHmgnMatType Mat)
Description:
Constructs a matrix that reflects 3D objects based upon the prescribed
reflection plane, ReflectPlane.
Uses a Householder reflection to immediately construct the refelction
matrix (around the origin).
Parameters:
ReflectPlane: | The plane to computed a reflection matrix for.
|
---|
Mat: | Matrix to update.
|
---|
Returned Value:
See Also:
GMGenProjectionMat
GMGenMatrixZ2Dir
Keywords:
(convex.c:126)
Prototype:
void GMGenRotateMatrix(IrtHmgnMatType Mat, const IrtVecType Dir)
Description:
Routine to prepare a transformation martix to rotate such that Dir is
parallel to the Z axes. Used by the convex decomposition to rotate the
polygons to be XY plane parallel.
Algorithm: form a 4 by 4 matrix from Dir as follows:
| Tx Ty Tz 0 | A transformation which takes the coord
| Bx By Bz 0 | system into T, N & B as required.
[X Y Z 1] * | Nx Ny Nz 0 |
| 0 0 0 1 |
N is exactly Dir, but we got freedom on T & B which must be on
a plane perpendicular to N and perpendicular between them but thats all!
T is therefore selected using this (heuristic ?) algorithm:
Let P be the axis of which the absolute N coefficient is the smallest.
Let B be (N cross P) and T be (B cross N).
Parameters:
Mat: | To place the constructed homogeneous transformation.
|
---|
Dir: | To derive a transformation such that Dir goes to Z axis.
|
---|
Returned Value:
Keywords:
transformations
(geomat3d.c:873)
Prototype:
void GMGenTransMatrixZ2Dir(IrtHmgnMatType Mat,
const IrtVecType Trans,
const IrtVecType Dir,
IrtRType Scale)
Description:
Routine to prepare a transformation martix to do the following (in this
order): scale by Scale, rotate such that the Z axis is in direction Dir
and then translate by Trans.
Algorithm: given the Trans vector, it forms the 4th line of Mat. Dir is
used to form the second line (the first 3 lines set the rotation), and
finally Scale is used to scale first 3 lines/columns to the needed scale:
| Tx Ty Tz 0 | A transformation which takes the coord
| Bx By Bz 0 | system into T, N & B as required and
[X Y Z 1] * | Nx Ny Nz 0 | then translate it to C. T, N, B are
| Cx Cy Cz 1 | scaled by Scale.
N is exactly Dir (unit vec) but we got freedom on T & B which must be on
a plane perpendicular to N and perpendicular between them but thats all!
T is therefore selected using this (heuristic ?) algorithm:
Let P be the axis of which the absolute N coefficient is the smallest.
Let B be (N cross P) and T be (B cross N).
Parameters:
Mat: | To place the computed transformation.
|
---|
Trans: | Translation factor.
|
---|
Dir: | Direction to take Z axis to.
|
---|
Scale: | Scaling factor.
|
---|
Returned Value:
Keywords:
transformations
rotation
(geomat3d.c:1006)
Prototype:
void GMGenTransMatrixZ2Dir2(IrtHmgnMatType Mat,
const IrtVecType Trans,
const IrtVecType Dir,
const IrtVecType Dir2,
IrtRType Scale)
Description:
Routine to prepare a transformation martix to do the following (in this
order): scale by Scale, rotate such that the Z axis is in direction Dir
and X axis is direction Dir2 and then translate by Trans.
Algorithm: given the Trans vector, it forms the 4th line of Mat. Dir is
used to form the second line (the first 3 lines set the rotation), and
finally Scale is used to scale first 3 lines/columns to the needed scale:
| Tx Ty Tz 0 | A transformation which takes the coord
| Bx By Bz 0 | system into T, N & B as required and
[X Y Z 1] * | Nx Ny Nz 0 | then translate it to C. T, N, B are
| Cx Cy Cz 1 | scaled by Scale.
N is exactly Dir (unit vec) and T is exactly Dir2.
Parameters:
Mat: | To place the computed transformation.
|
---|
Trans: | Translation factor.
|
---|
Dir: | Direction to take Z axis to.
|
---|
Dir2: | Direction to take X axis to.
|
---|
Scale: | Scaling factor.
|
---|
Returned Value:
Keywords:
transformations
rotation
(poly_pts.c:1859)
Prototype:
void GMGenUVValsForPolys(const IPObjectStruct *PObj,
IrtRType UTextureRepeat,
IrtRType VTextureRepeat,
IrtRType WTextureRepeat,
int HasXYZScale)
Description:
Generates UV values for polygonal geometry, based on the XY(Z)
coordinates of the geometry. Will NOT overwrite existing "uvvals", if any.
Parameters:
PObj: | A polygonal object to update UV vals for.
|
---|
UTextureRepeat, VTextureRepeat, WTextureRepeat: | Repeat texture factors.
|
---|
HasXYZScale: | If TRUE, WTextureRepeat is also valid - use XYZ coords.
|
---|
Returned Value:
See Also:
GMAffineTransUVVals
Keywords:
(box2BVH.c:132)
Prototype:
CagdBType GMGetGeneralAlignedFrustumPtsIntersection(
const IrtRType Center[3],
IrtRType SizeX,
IrtRType SizeY,
const IrtRType XAxis[3],
const IrtRType HeightAxis[3],
IrtRType Height,
IrtRType XAngle,
IrtRType YAngle,
const IrtRType **Pts,
int NumPts,
CagdBType RationalPts,
IrtRType Tol)
Description:
Checks if a set of points is outside of a frustum, within a given
tolerance. The frustum is constructed from its parameters. The points are
treated as a solid convex body. The frustum can have a general alignment.
Parameters:
Center: | The center of the narrow base of the frustum.
|
---|
SizeX, SizeY: | The size of the narrow base of the frustum.
|
---|
XAxis: | The X direction of the bases of the frustum.
|
---|
HeightAxis: | The height (Z) axis of the frustum.
|
---|
Height: | The height of the frustum.
|
---|
XAngle, YAngle: | The angles of the frustum in the X and Y directions,
respectively.
|
---|
Pts: | An array of points to be tested.
|
---|
NumPts: | The number of points in the array.
|
---|
RationalPts: | A flag indicating if the points are in projective
(rational) coordinates.
|
---|
Tol: | The allowed tolerance.
|
---|
Returned Value:
CagdBType: Non-zero if the frustum and box overlap.
|
---|
See Also:
GMGetGeneralAlignedFrustumPtsIntersection2
Keywords:
(box2BVH.c:42)
Prototype:
IrtBType GMGetGeneralAlignedFrustumPtsIntersection2(
const GMGeneralFrustumInfoStruct *Frustum,
const IrtRType **Pts,
int NumPts,
IrtBType RationalPts,
IrtRType Tolerance)
Description:
Checks if a set of points is outside of a frustum, within a given
tolerance. The points are treated as a solid convex body. The frustum can
have a general alignment.
Parameters:
Frustum: | The frustum info.
|
---|
Pts: | An array of points to be tested.
|
---|
NumPts: | The number of points in the array.
|
---|
RationalPts: | A flag indicating if the points are in projective
(rational) coordinates.
|
---|
Tolerance: | The allowed tolerance.
|
---|
Returned Value:
IrtBType: Non-zero if the frustum and box overlap.
|
---|
See Also:
GMGetGeneralAlignedFrustumPtsIntersection
Keywords:
(geomat3d.c:253)
Prototype:
IPObjectStruct *GMGetMatTransPortion(const IPObjectStruct *MatObj,
int TransPortion)
Description:
Routine to extract the translational part of a matrix or dump it.
Parameters:
MatObj: | To operate on.
|
---|
TransPortion: | TRUE to extract translational portion out of Mat, FALSE
to dump the translational portion from Mat.
|
---|
Returned Value:
IPObjectStruct *: A matrix object hold either the translational portion
of Mat or anything but the translational part.
|
---|
Keywords:
translation
transformations
(poly_pts.c:107)
Prototype:
int GMGetMaxNumVrtcsPoly(IPObjectStruct *PolyObj)
Description:
Go over all polygons in given object and return the maximal number of
vertices found in a single poly.
Parameters:
PolyObj: | Polygonal object to look for its largest poly.
|
---|
Returned Value:
int: Maximal number of vertices found in one poly.
|
---|
Keywords:
(poly_pts.c:2163)
Prototype:
int GMIdentifyTJunctions(IPObjectStruct *PObj,
GMIdentifyTJunctionFuncType TJuncCB,
IrtRType Eps)
Description:
Function to search for T junctions in given polygonal mesh Polys. The
call back function TJunCB is invoked on every such T junction.
This functions offers a naive and non-optimal (N^2) solution.
Parameters:
PObj: | Polygonal mesh to search for T junctions in.
|
---|
TJuncCB: | Call back function to invoke with every detected T junction.
If E0 = (V0, V0 -> Pnext) is adjacent to both
E1 = (V1, V1 -> Pnext) and E2 = (V2, V2 -> Pnext) so E2 is a T
junction vertex on edge E0, the TJuncCB will be invoked as
TJuncCB(V0, V1, V2, Pl0, Pl1, Pl2).
|
---|
Eps: | Tolerance of testing.
|
---|
Returned Value:
int: Number of detected T junctions, zero if none.
|
---|
See Also:
GMIsTJunction
Keywords:
(intrnrml.c:303)
Prototype:
void GMInterpVrtxNrmlBetweenTwo(IPVertexStruct *V,
const IPVertexStruct *V1,
const IPVertexStruct *V2)
Description:
Update Normal of the middle vertex V, assumed to be between V1 and V2.
Parameters:
V: | Vertex that its normal is to be updated.
|
---|
V1, V2: | Edge V is assumed to be on so that the two normals of V1
and V2 can be blended to form the normal of V.
|
---|
Returned Value:
See Also:
GMUpdateVerticesByInterp
GMInterpVrtxNrmlBetweenTwo2
GMInterpVrtxNrmlFromPl
GMInterpVrtxRGBBetweenTwo
GMInterpVrtxRGBFromPl
GMInterpVrtxUVBetweenTwo
GMInterpVrtxUVFromPl
Keywords:
normals
(intrnrml.c:354)
Prototype:
void GMInterpVrtxNrmlBetweenTwo2(IrtPtType Pt,
IrtVecType Normal,
const IPVertexStruct *V1,
const IPVertexStruct *V2,
int Normalize)
Description:
Update normal of middle position Pt, assumed to be between V1 and V2.
Parameters:
Pt: | Middle position at which a normal is to be computed.
|
---|
Normal: | Where resulting vector is to be placed.
|
---|
V1, V2: | Edge V is assumed to be on so that the two normals of V1
and V2 can be blended to form the normal of V.
|
---|
Normalize: | TRUE to return a unit size vector.
|
---|
Returned Value:
See Also:
GMUpdateVerticesByInterp
GMInterpVrtxNrmlBetweenTwo
GMInterpVrtxNrmlFromPl
GMInterpVrtxRGBBetweenTwo
GMInterpVrtxRGBFromPl
GMInterpVrtxUVBetweenTwo
GMInterpVrtxUVFromPl
Keywords:
normals
(intrnrml.c:402)
Prototype:
int GMInterpVrtxNrmlFromPl(IPVertexStruct *Vrtx, const IPPolygonStruct *Pl)
Description:
Update Normal of vertex V, based on surrounding polygon Pl.
Parameters:
Vrtx: | Vertex that its normal is to be updated.
|
---|
Pl: | Polygon surrounding V to interpolate normal from.
|
---|
Returned Value:
int: TRUE if point is inside polygon, FALSE otherwise.
|
---|
See Also:
GMUpdateVerticesByInterp
GMInterpVrtxNrmlBetweenTwo
GMInterpVrtxNrmlBetweenTwo2
GMInterpVrtxRGBBetweenTwo
GMInterpVrtxRGBFromPl
GMInterpVrtxUVBetweenTwo
GMInterpVrtxUVFromPl
Keywords:
normals
(intrnrml.c:456)
Prototype:
int GMInterpVrtxRGBBetweenTwo(IPVertexStruct *V,
const IPVertexStruct *V1,
const IPVertexStruct *V2)
Description:
Update RGB of the middle vertex V, assumed to be between V1 and V2.
Parameters:
V: | Vertex that its rgb color is to be updated.
|
---|
V1, V2: | Edge V is assumed to be on so that the two rgb colors of V1
and V2 can be blended to form the rgb color of V.
|
---|
Returned Value:
int: TRUE if successful, FALSE if failed.
|
---|
See Also:
GMUpdateVerticesByInterp
GMInterpVrtxNrmlBetweenTwo
GMInterpVrtxNrmlBetweenTwo2
GMInterpVrtxNrmlFromPl
GMInterpVrtxRGBFromPl
GMInterpVrtxUVBetweenTwo
GMInterpVrtxUVFromPl
Keywords:
rgb color
(intrnrml.c:502)
Prototype:
int GMInterpVrtxRGBFromPl(IPVertexStruct *Vrtx, const IPPolygonStruct *Pl)
Description:
Update rgb color of vertex V, based on surrounding polygon Pl.
Parameters:
Vrtx: | Vertex that its rgb color is to be updated.
|
---|
Pl: | Polygon surrounding V to interpolate rgb color from.
|
---|
Returned Value:
int: TRUE if point is inside polygon, FALSE otherwise.
|
---|
See Also:
GMUpdateVerticesByInterp
GMInterpVrtxNrmlBetweenTwo
GMInterpVrtxNrmlBetweenTwo2
GMInterpVrtxNrmlFromPl
GMInterpVrtxRGBBetweenTwo
GMInterpVrtxUVBetweenTwo
GMInterpVrtxUVFromPl
Keywords:
rgb color
(intrnrml.c:567)
Prototype:
int GMInterpVrtxUVBetweenTwo(IPVertexStruct *V,
const IPVertexStruct *V1,
const IPVertexStruct *V2)
Description:
Update UV of the middle vertex V, assumed to be between V1 and V2.
Parameters:
V: | Vertex that its UV coordinates are to be updated.
|
---|
V1, V2: | Edge V is assumed to be on so that the two UV coords of V1
and V2 can be blended to form the UV coords of V.
|
---|
Returned Value:
int: TRUE if successful, FALSE if failed.
|
---|
See Also:
GMUpdateVerticesByInterp
GMInterpVrtxNrmlBetweenTwo
GMInterpVrtxNrmlBetweenTwo2
GMInterpVrtxNrmlFromPl
GMInterpVrtxRGBBetweenTwo
GMInterpVrtxRGBFromPl
GMInterpVrtxUVFromPl
Keywords:
uv coordinates
(intrnrml.c:613)
Prototype:
int GMInterpVrtxUVFromPl(IPVertexStruct *Vrtx, const IPPolygonStruct *Pl)
Description:
Update UV coordinate of vertex V, based on surrounding polygon Pl.
Parameters:
Vrtx: | Vertex that its UV coordinate is to be updated.
|
---|
Pl: | Polygon surrounding V to interpolate UV coordinate from.
|
---|
Returned Value:
int: TRUE if successful, FALSE if failed.
|
---|
See Also:
GMUpdateVerticesByInterp
GMInterpVrtxNrmlBetweenTwo
GMInterpVrtxNrmlBetweenTwo2
GMInterpVrtxNrmlFromPl
GMInterpVrtxRGBBetweenTwo
GMInterpVrtxRGBFromPl
GMInterpVrtxUVBetweenTwo
Keywords:
uv coordinates
(geomvals.c:441)
Prototype:
int GMInverseBilinearMap(const IrtPtType P00,
const IrtPtType P01,
const IrtPtType P10,
const IrtPtType P11,
const IrtPtType PtInt,
IrtPtType UV[2])
Description:
Computes the inverse of the bilinear mapping. Given four points, Pij,
defining a bilinear mapping in the plane, and a point PtInt, inside it,
computes the UV coordinates of PtInt in this bilinear mapping:
B(u, v) = (1-u) * ((1- v) P00 + v P10) + u * ((1-v) P01 + V P11).
Solution follows the following steps:
1. Isolate v as a function of the 5 points and u.
Two equations for x and y.
2. Equate the two functions from 1, eliminating v.
We have only terms of u and (1-u) or get a polynomial quadratic Bezier,
once having a common denominator and examining only the numerator.
3. Solve the quadratic equation in u and then substitute to one of the
two equations of 1 to get v.
Parameters:
P00, P01, P10, P11: | The four points defining the bilinear.
|
---|
PtInt: | A 5th point in the plane, to computes its UV values.
|
---|
UV: | The computed solutions (up to two solutions are possible.
|
---|
Returned Value:
int: 0 if error. Otherwise number of solution in UV.
|
---|
Keywords:
(convex.c:479)
Prototype:
int GMIsConvexPolygon(IPPolygonStruct *Pl)
Description:
Routine to test if the given polygon is convex or not.
Algorithm: The polygon is convex iff the normals generated from cross
products of two consecutive edges points to the same direction.
Note a 5 star polygon satisfies this constraint but it is self
intersecting and we assume given polygon is not self intersecting.
The computed direction is also verified against the polygon's plane
normal.
The routine returns TRUE iff the polygon is convex. In addition the
polygon CONVEX tag (see IPPolygonStruct) is also updated.
If the polygon is already marked as convex, nothing is tested!
Parameters:
Pl: | To test its convexity condition. Reverses vertices in place
if needed.
|
---|
Returned Value:
int: TRUE if convex, FALSE otherwise.
|
---|
See Also:
GMConvertPolysToTriangles
GMConvexPolyObject
GMConvexPolyObjectN
SplitNonConvexPoly
GMIsConvexPolygon2
Keywords:
convexity
convex polygon
(convex.c:411)
Prototype:
int GMIsConvexPolygon2(const IPPolygonStruct *Pl)
Description:
Routine to test if the given polygon is convex (by IRIT definition) or
not. For both closed and open vertex lists.
Algorithm: The polygon is convex iff the normals generated from cross
products of two consecutive edges points to the same direction. The same
direction is tested by a positive dot product.
Parameters:
Pl: | To test for convexity.
|
---|
Returned Value:
int: TRUE if PL convex, FALSE otherwise.
|
---|
See Also:
GMIsConvexPolygon
Keywords:
convexity
files
parser
(polysmth.c:725)
Prototype:
static int GMIsInterLineLine2D(const IrtPtType A1,
const IrtPtType A2,
const IrtPtType B1,
const IrtPtType B2,
IrtRType *t)
Description:
Check if the two lines A1A2 and B1B2 interest in the XY plane.
End points intersections, up to IRIT_EPS, are ignored.
Parameters:
A1, A2: | The two points of first line.
|
---|
B1, B2: | The two points of second line.
|
---|
t: | The blending value from B1 to B2 where the intersection has
occurred. Can be NULL to ignore.
|
---|
Returned Value:
int: TRUE if the two lines intersect, FALSE otherwise.
|
---|
See Also:
GMAllIntersLinePolygon2D
GMIsInterLinePolygon2D
Keywords:
(polysmth.c:680)
Prototype:
int GMIsInterLinePolygon2D(const IPVertexStruct *VS,
const IrtPtType V1,
const IrtPtType V2,
IrtRType *t)
Description:
Check if a line V1V2 and polygon VS interest, in 2D.
Parameters:
VS: | Cyclic List of vertices of the Polygon.
|
---|
V1, V2: | The end points of the line.
|
---|
t: | The blending value from V1 to V2 where the intersection has
occurred. Can be NULL to ignore.
|
---|
Returned Value:
int: TRUE if line and polygon do interest, FALSE otherwise.
|
---|
See Also:
GMAllIntersLinePolygon2D
GMIsInterLineLine2D
Keywords:
(poly_cln.c:387)
Prototype:
int GMIsPolygonPlanar(const IPPolygonStruct *Pl, IrtRType Tol)
Description:
Examines the planarity of the given object.
Parameters:
Pl: | Polygons to examine for planairy up to tolerance Tol.
|
---|
Tol: | Of planarify verification.
|
---|
Returned Value:
int: TRUE if poly planar, FALSE if not.
|
---|
Keywords:
(geom_bsc.c:3174)
Prototype:
int GMIsPtInsideCirc(const IrtRType *Point,
const IrtRType *Center,
IrtRType Radius)
Description:
Tests if a point is contained in the given prescribed circle in XY
plane. Points on the circle are not considered inside (open domain).
Parameters:
Point: | Point to test for containment in the circle in XY plane.
|
---|
Center: | Center of the circle to test against.
|
---|
Radius: | Radius of the circle to test against.
|
---|
Returned Value:
int: TRUE if Point is indeed inside the circle, FALSE otherwise.
|
---|
See Also:
GM2PointsFromLineLine
GM2PointsFromCircCirc3D
GMCircleFrom3Points
GMCircleFrom2Pts2Tans
GM2BiTansFromCircCirc
GM2TanLinesFromCircCirc
GM2PointsFromCircCirc
GMIsPtOnCirc
Keywords:
(geom_bsc.c:3203)
Prototype:
int GMIsPtOnCirc(const IrtRType *Point,
const IrtRType *Center,
IrtRType Radius)
Description:
Tests if a point is on the given prescribed circle's boundary, in the N
XY plane.
Parameters:
Point: | Point to test for inclusing in circle boundary in XY plane.
|
---|
Center: | Center of the circle to test against.
|
---|
Radius: | Radius of the circle to test against.
|
---|
Returned Value:
int: TRUE if Point is indeed on the circle, FALSE otherwise.
|
---|
See Also:
GM2PointsFromLineLine
GM2PointsFromCircCirc3D
GMCircleFrom3Points
GMCircleFrom2Pts2Tans
GM2BiTansFromCircCirc
GM2TanLinesFromCircCirc
GM2PointsFromCircCirc
GMIsPtInsideCirc
Keywords:
(poly_pts.c:1659)
Prototype:
IPPolygonStruct *GMLimitTrianglesEdgeLen(const IPPolygonStruct *OrigPls,
IrtRType MaxLen)
Description:
Splits all triangles that has edge length larger than MaxLen. The
output will have no edge in no triangle with length larger than MaxLen.
Parameters:
OrigPls: | List of triangles.
|
---|
MaxLen: | Maximum allowed length of an edge of a triangle.
|
---|
Returned Value:
IPPolygonStruct *: Splitted polygons with edges smaller/equal to MaxLen.
|
---|
See Also:
ConvexPolyObjectN
GMConvertPolysToNGons
GMConvertPolysToTriangles
Keywords:
(geom_bsc.c:1331)
Prototype:
int GMLineFrom2Planes(const IrtPlnType Pl1,
const IrtPlnType Pl2,
IrtPtType Pt,
IrtVecType Dir)
Description:
Find the intersection line (if exists) of two planes.
Parameters:
Pl1, Pl2: | Two planes to consider.
|
---|
Pt, Dir: | Intersection line found (if any).
|
---|
Returned Value:
int: TRUE if exists an intersection point, FALSE otherwise.
|
---|
Keywords:
(geom_bsc.c:684)
Prototype:
int GMLineFrom2Points(IrtLnType Line, const IrtPtType Pt1, const IrtPtType Pt2)
Description:
Routine to construct a line through 2 points, in the plane. If the
points are the same it returns FALSE, otherwise (successful), TRUE.
Parameters:
Line: | To compute as Ax + By + C, such that A^2 + B^2 = 1.
|
---|
Pt1, Pt2: | Two points to fit a line through. Only XY coordinates are
considered.
|
---|
Returned Value:
int: TRUE if successful, FALSE otherwise.
|
---|
Keywords:
line
(ln_sweep.c:45)
Prototype:
void GMLineSweep(GMLsLineSegStruct **Lines)
Description:
Computes all intersections between all given lines, in the plane.
The Lines segments are updated so the Inters slot holds the list of
intersections with the other segments, NULL if none.
Returned is a list with possibly a different order than that is given.
Parameters:
Lines: | To compute all intersections against each other, in the plane.
|
---|
Returned Value:
Keywords:
line sweep
line line intersections
(text.c:42)
Prototype:
int GMLoadTextFont(const char *FName)
Description:
Loads the IRIT font file that is specified by the FName file name.
An IRIT font file contains the geometries of the characters as a list
ordered according to the ASCII table starting from 32 (space). Chars can,
alternatively, be prescribed by their names in the list as ASCII???
Parameters:
FName: | Name of IRIT font file to load.
|
---|
Returned Value:
int: TRUE if successful, FALSE otherwise.
|
---|
See Also:
GMMakeTextGeometry
Keywords:
(text.c:100)
Prototype:
IPObjectStruct *GMMakeTextGeometry(const char *Str,
const IrtVecType Spacing,
const IrtRType *Scaling)
Description:
Constructs a geometry representing the given text in Str, with Spacing
space between character and scaling factor of Scale.
If no font is loaded, this functions also loads the default font in
iritfont.itd in the directory that is prescribed by the IRIT_PATH
environment variable.
Parameters:
Str: | The text to convert to geometry.
|
---|
Spacing: | Between individual characters, in X, Y, Z.
|
---|
Scaling: | Relative, with scaling of one generates unit size chars.
|
---|
Returned Value:
IPObjectStruct *: Geometry representing the given text.
|
---|
See Also:
GMLoadTextFont
Keywords:
(geomat3d.c:1079)
Prototype:
int GMMatFromPosDir(const IrtPtType Pos,
const IrtVecType Dir,
const IrtVecType UpDir,
IrtHmgnMatType Mat)
Description:
Routine to create a viewing transformation matrix, standing at Pos, and
looking in direction Dir, with UpDir being the upper viewing direction
Creates a transformation matrix that takes Pos to DEFAULT_VIEW_POS
and rotate Dir into the Z axis, and UpDir into the Y axis.
Parameters:
Pos: | The location of the viewer.
|
---|
Dir: | The viewing direction.
|
---|
UpDir: | The direction of up. Must be different than Dir.
|
---|
Mat: | Matrix to update. N
|
---|
Returned Value:
int: TRUE if succesful, FALSE otherwise.
|
---|
Keywords:
transformations
(poly_pts.c:979)
Prototype:
IPPolygonStruct *GMMatchPointListIntoPolylines(IPObjectStruct *PtsList,
IrtRType MaxTol)
Description:
Connect the list of points into polylines by connecting the closest
point pairs, until the distances between adjacent points/polylines is more
than MaxTol. Points are assumed to be in E3.
Parameters:
PtsList: | Point list to connect into polylines.
|
---|
MaxTol: | Maximum distance allowed to connect to points.
|
---|
Returned Value:
IPPolygonStruct *: Connected polylines, upto MaxTol tolerance.
|
---|
Keywords:
(quatrnn.c:898)
Prototype:
void GMMatrixToTransform(IrtHmgnMatType Mat,
IrtVecType S,
GMQuatType R,
IrtVecType T)
Description:
Decompose the affine transformation matrix into uniform scaling, rotation
and translation components. Rotation is defined as normal and angle.
Parameters:
Mat: | Source matrix to decompose.
|
---|
S: | Scaling components.
|
---|
R: | Rotation Components.
|
---|
T: | Translation components.
|
---|
Returned Value:
Keywords:
(merge.c:663)
Prototype:
IPPolygonStruct *GMMergeClosedLoopHoles(IPPolygonStruct *PlMain,
IPPolygonStruct *PClosedPls)
Description:
This routines combines a given polygon with its interior closed loops
by adding an edge from the polygon boundary to each of its closed loops
For example:
+-----------------------+ +-----------------------+
| | | |
| / \ / \ | | / \________ / \ |
| \ / | | | | \ / | |_____|
| _ \ / | --> | _ \ / |
| / \_ | --> | / \_ |
| | | | | | |_____________|
| \__/ | | \__/ |
| | | |
+-----------------------+ +-----------------------+
Algorithm:
1. Transform the polygon and the closed loops to a plane parallel to XY
plane (Z = Const plane).
2. For each loop find its MaxX while keeping the information on the
vertex on that extremum.
3. For the loop with the biggest MaxX:
3.1. based on the sign of the area decide to reverse (or not) the inner
loop.
3.2. Fire a ray from the extremum vertex, to the +X direction outside
of the loop till it intersect the polygon, break the polygon at
that point and add two edges to beginning of loop from breaking
point and from end of loop to breaking point (beginning/end point
of loop is the extrema vertex point).
4. Repeat step 3, with all loops.
5. Transform the new polygon back (using the inverse matrix of step 1)
to its original orientation.
Parameters:
PlMain: | Main polygon to combine with the given closed loops, in place.
|
---|
PClosedPls: | losed loops inside polygon PlMain, to merge with, in place.
|
---|
Returned Value:
IPPolygonStruct *: Merged polygon, based on PlMain, or NULL if error.
|
---|
See Also:
MvarPolyMergePolylines
GMMergePolylines
GMMergeSameGeometry
Keywords:
merge
polygons
holes
(merge.c:894)
Prototype:
int *GMMergeFindSimilarPoints(IrtRType *VecPts,
int PtLen,
int VecLen,
IrtRType Tolerance)
Description:
Finds out similar (to Tolerance) points in the given vector of points
of length VecLen. Returned is a newly allocated vector VecIdx of length
VecLen so VecIdx[i] = j means point i is the same as point j.
Parameters:
VecPts: | Vector of points to seek similarities.
|
---|
PtLen: | Number of real valued coordinates in point (2 for E2, 4
for P3, etc.).
|
---|
VecLen: | Length of VecPts. VecPts should have PtLen * VecLen reals.
|
---|
Tolerance: | To consider two points the same, in L^2 norm.
|
---|
Returned Value:
int *: The dynamically allocated vector of indices, so that
VecIdx[i] = j means i and j are the same.
|
---|
See Also:
GMMergeSameGeometry
Keywords:
merge
(merge.c:474)
Prototype:
int GMMergeGeometry(void **GeomEntities,
int NumOfGEntities,
IrtRType Eps,
IrtRType IdenticalEps,
VoidPtr GenericData,
GMMergeGeomInitFuncType InitFunc,
GMMergeGeomDistFuncType DistSqrFunc,
GMMergeGeomKeyFuncType *KeyFuncs,
GMMergeGeomMergeFuncType MergeFunc)
Description:
Merges separated geometric entities into longer ones, in place, as much
as possible. Given a list of entities (typically points or polylines),
find and merge closest ones as possible and in place.
Parameters:
GeomEntities: | Geometry to merge, typically points or polylines, as a
vector of reference pointers to the entities.
Returned, merged, data will also be stored here.
|
---|
NumOfGEntities: | Number of geometric entities. Also length of
GeomEntities.
|
---|
Eps: | Epsilon of similarity to merge entities at. Entities
farther than Eps will not be merged.
|
---|
IdenticalEps: | Epsilon to consider two entities' distance as zero.
|
---|
GenericData: | Optional (can be NULL) data to transfer to all call
back functions.
|
---|
InitFunc: | A function to initialize all geometry. NULL for the
initialization of IPPolygonStruct polylines.
|
---|
DistSqrFunc: | A distance computation function. NULL for two
IPPolygonStruct polylines compare. This function
computes the minimal distance squared between two
entities.
|
---|
KeyFuncs: | A NULL terminated version of functions to return a Key
to sort the entities so that similar/adjacent entities
will get a similar Key.
A polyline, for example, can have two Key functions
of its two end points (to be merged).
|
---|
MergeFunc: | A merge function. NULL to merge two IPPolygonStructs
polylines merge. This function returns a merged entity
while destroying the two input entities.
|
---|
Returned Value:
int: Number of merged entities in the end or 0 if error.
|
---|
See Also:
MvarPolyMergePolylines
GMMergePolylines
GMMergeSameGeometry
Keywords:
merge
points
polylines
(poly_pts.c:911)
Prototype:
IPPolygonStruct *GMMergePolylines(IPPolygonStruct *Polys, IrtRType Eps)
Description:
Merges separated polylines into longer ones, in place, as possible.
Given a list of polylines, matches end points and merged as possible
polylines with common end points, in place.
Parameters:
Polys: | Polylines to merge, in place.
|
---|
Eps: | Epsilon of similarity to merge points at.
|
---|
Returned Value:
IPPolygonStruct *: Merged as possible polylines.
|
---|
See Also:
GMMergeGeometry
MvarPolyMergePolylines
GMMergePolylines2
Keywords:
merge
polyline
(merge.c:308)
Prototype:
int GMMergeSameGeometry(void **GeomEntities,
int NumOfGEntities,
IrtRType IdenticalEps,
VoidPtr GenericData,
GMMergeGeomInitFuncType InitFunc,
GMMergeGeomDistFuncType DistSqrFunc,
GMMergeGeomKeyFuncType *KeyFuncs,
GMMergeGeomMergeFuncType MergeFunc)
Description:
Merges separated geometric entities into longer ones, in place, as much
as possible. Given a list of entities (typically points or polylines),
find and merge closest ones as possible and in place. This function
should only be used to merge geometry that is very precise and adjacent
entities distance is very small.
Parameters:
GeomEntities: | Geometry to merge, typically points or polylines, as a
vector of reference pointers to the entities.
Returned, merged, data will also be stored here.
|
---|
NumOfGEntities: | Number of geometric entities. Also length of
GeomEntities.
|
---|
IdenticalEps: | Epsilon to consider two entities' distance as zero.
This epsilon is typically very small, i.e., IRIT_UEPS.
|
---|
GenericData: | Optional (can be NULL) data to transfer to all call
back functions.
|
---|
InitFunc: | A function to initialize all geometry. NULL for the
initialization of IPPolygonStruct polylines.
|
---|
DistSqrFunc: | A distance computation function. NULL for two
IPPolygonStruct polylines compare. This function
computes the minimal distance squared between two
entities.
|
---|
KeyFuncs: | Two function to return two Keys to sort the entities so
that similar/adjacent entities will get similar a Key.
For example for a polyline, they will return a key
related to the two end points of the polyline.
|
---|
MergeFunc: | A merge function. NULL to merge two IPPolygonStructs
polylines merge. This function destroys the two input
entities and returns the merged entity in the first
reference, setting the second reference to NULL.
|
---|
Returned Value:
int: Number of merged entities in the end or 0 if error.
|
---|
See Also:
GMMergeGeometry
Keywords:
(ms_circ.c:65)
Prototype:
int GMMinSpanCirc(IrtE2PtStruct *DTPts,
int NumOfPoints,
IrtE2PtStruct *Center,
IrtRType *Radius)
Description:
Minimum spanning circle (MSC) computation of a set of points.
Algorithm is based on Section 4.7 of "Computational Geometry, Algorithms
and Applications" by M. de Berg et. al.
Parameters:
DTPts: | The set of point to compute their MSC.
|
---|
NumOfPoints: | Number of points in set DTPts.
|
---|
Center: | Of computed MSC.
|
---|
Radius: | Of computed MSC.
|
---|
Returned Value:
int: TRUE if successful, FALSE otherwise.
|
---|
See Also:
GMMinSpanCone
Keywords:
minimum spanning circle
(ms_circ.c:284)
Prototype:
int GMMinSpanCone(IrtVecType *DTVecs,
int VecsNormalized,
int NumOfVecs,
IrtVecType ConeAxis,
IrtRType *ConeAngle)
Description:
Minimum spanning cone (MSC) computation of a set of vectors.
Algorithm is based on the Minimum Spanning Circle in Section 4.7 of
"Computational Geometry, Algorithms and Applications" by M. de Berg et. al.
Parameters:
DTVecs: | The set of vectors to compute their MSC.
|
---|
VecsNormalized: | TRUE if vectors are normalized, FALSE otherwise.
|
---|
NumOfVecs: | Number of vectors in set DTVecs.
|
---|
ConeAxis: | Of computed MSC.
|
---|
ConeAngle: | Of computed MSC, in radians.
|
---|
Returned Value:
int: TRUE if successful, FALSE otherwise.
|
---|
See Also:
GMMinSpanCirc
GMMinSpanConeAvg
Keywords:
(ms_circ.c:215)
Prototype:
int GMMinSpanConeAvg(IrtVecType *DTVecs,
int VecsNormalized,
int NumOfVecs,
IrtVecType ConeAxis,
IrtRType *ConeAngle)
Description:
Minimum spanning cone (MSC) computation of a set of vectors.
Find a central vector as the average of all given vectors and find the
vector with maximal angular distance from it.
Parameters:
DTVecs: | The set of vectors to compute their MSC.
|
---|
VecsNormalized: | TRUE if vectors are normalized, FALSE otherwise.
|
---|
NumOfVecs: | Number of vectors in set DTVecs.
|
---|
ConeAxis: | Of computed MSC.
|
---|
ConeAngle: | Of computed MSC, in radians.
|
---|
Returned Value:
int: TRUE if successful, FALSE otherwise.
|
---|
See Also:
GMMinSpanCirc
GMMinSpanCone
Keywords:
(ms_spher.c:60)
Prototype:
int GMMinSpanSphere(IrtE3PtStruct *DTPts,
int NumOfPoints,
IrtE3PtStruct *Center,
IrtRType *Radius)
Description:
Minimum spanning sphere (MSS) computation of a set of points.
Parameters:
DTPts: | The set of point to compute their MSS.
|
---|
NumOfPoints: | Number of points in set DTPts.
|
---|
Center: | Of computed MSS.
|
---|
Radius: | Of computed MSS.
|
---|
Returned Value:
int: TRUE if successful, FALSE otherwise.
|
---|
See Also:
GMMinSpanCirc
Keywords:
minimum spanning sphere
(cnvxhull.c:347)
Prototype:
int GMMonotonePolyConvex(IPVertexStruct *VHead, int Cnvx)
Description:
Compute the convex (concave) envelope of an X-monotone shape, in the XY
plane, by purging all concave (convex) vertices in the sequence, in place.
Parameters:
VHead: | An X-monotone polyline to make into a convex (concave) one.
Note the first and last vertices will always be in the output
sequence.
|
---|
Cnvx: | TRUE to make the vertex sequence Vhead convex, FALSE to make
it concave, in the functional sense.
|
---|
Returned Value:
int: TRUE if succesful, FALSE otherwise.
|
---|
See Also:
GMConvexHull
Keywords:
(geomat3d.c:774)
Prototype:
int GMObjectNumCoordinates(const IPObjectStruct *Obj)
Description:
Computes the number of dimensions the given object has, based on the
sub-object found with the hiest dimension.
Parameters:
Obj: | Object to figure its highest dimension.
|
---|
Returned Value:
int: The computed (highest) dimension, or 0 if no geometry was found.
|
---|
See Also:
Keywords:
(geom_bsc.c:391)
Prototype:
int GMOrthogonalVector(const IrtVecType V, IrtVecType OV, int UnitLen)
Description:
Computes an orthogonal vector in R^3 to the given vector.
Parameters:
V: | Input vector to find an orthogonal vector for.
|
---|
OV: | utput newly computed orthogonal (possibly unit) vector to V, in R^3.
|
---|
UnitLen: | If TRUE, normalize the outpt vector.
|
---|
Returned Value:
int: TRUE if successful, FALSE otherwise.
|
---|
Keywords:
(plycrvtr.c:55)
Prototype:
void GMPlCrvtrSetCurvatureAttr(IPPolygonStruct *PolyList,
int NumOfRings,
int EstimateNrmls)
Description:
Estimates the Gaussian and Mean curvature values for the given
triangular regular mesh and initializes the corresponding attributes:
for each vertex: "K1Curv", "K2Curv", "D1", "D2" and "K" and "H".
Uses a least sqaures osculating quadratic function in the estimate.
Mesh is assumed to be a triangular regular mesh.
Parameters:
PolyList: | The triangular two-manifold mesh data.
|
---|
NumOfRings: | Number of rings around a vertex in the paraboloid fitting.
|
---|
EstimateNrmls: | If TRUE estimate normals to the vertices on the fly.
This functions needs these normals for its proper work.
|
---|
Returned Value:
See Also:
GMPlCrvtrSetFitDegree
SymbEvalSrfCurvPrep
SymbEvalSrfCurvature
Keywords:
(plycrvtr.c:305)
Prototype:
int GMPlCrvtrSetFitDegree(int UseCubic)
Description:
Sets the degree for the continuous function we fit at the vertex.
Parameters:
UseCubic: | TRUE to use cubic fit, FALSE for a quadratic
|
---|
Returned Value:
int: Old value of fitting degree.
|
---|
See Also:
GMPlCrvtrSetCurvatureAttr
Keywords:
(plyimprt.c:34)
Prototype:
void GMPlSilImportanceAttr(IPPolygonStruct *PolyList)
Description:
Estimates the importance of vertices of a polygonal mesh based on the
probability of their adjacent edges to posses silhouettes.
Mesh is assumed to be a triangular regular mesh.
Each vertex in the mesh is assigned a new "SilImp" attribute which is
a positive value.
Parameters:
PolyList: | The triangular two-manifold mesh data.
|
---|
Returned Value:
See Also:
GMPlCrvtrSetCurvatureAttr
Keywords:
(plyimprt.c:235)
Prototype:
IPPolygonStruct *GMPlSilImportanceRange(IPPolygonStruct *PolyList)
Description:
Extract the silhouette importance range of a polygonal mesh with
"SilImp" attribute. See also GMPlSilImportanceAttr.
Mesh is assumed to be a triangular regular mesh.
Parameters:
PolyList: | The triangular two-manifold mesh data.
|
---|
Returned Value:
IPPolygonStruct *: the extracted geometry.
|
---|
See Also:
GMPlSilImportanceAttr
Keywords:
(geom_bsc.c:237)
Prototype:
IrtRType GMPlanarVecVecAngle(const IrtVecType V1,
const IrtVecType V2,
int Normalize)
Description:
Compute the angle between two planar vectors V1 and V2. Angle is zero
if V2 is in the exact same direction as V1, negative if V2 turns right and
positive if V2 turns left. Angle is returned in degrees in the domain of
(-180, +180]. Only the XY coefficients of V1 and V2 are considered.
Parameters:
V1, V2: | Planar vectors to compute their relative angle, in degrees.
|
---|
Normalize: | RUE if vectors need normalization first, FALSE if unit size.
|
---|
Returned Value:
IrtRType: Angle between V1 and V2, in degree.
|
---|
Keywords:
(geom_bsc.c:755)
Prototype:
int GMPlaneFrom3Points(IrtPlnType Plane,
const IrtPtType Pt1,
const IrtPtType Pt2,
const IrtPtType Pt3)
Description:
Routine to construct the plane from given 3 points. If two of the points
are the same or the three points are collinear it returns FALSE, otherwise
(successful), it returns TRUE.
Parameters:
Plane: | To compute.
|
---|
Pt1, Pt2, Pt3: | Three points to fit a plane through.
|
---|
Returned Value:
int: TRUE if successful, FALSE otherwise.
|
---|
Keywords:
plane
(poly_cvr.c:42)
Prototype:
IPObjectStruct *GMPointCoverOfPolyObj(IPObjectStruct *PolyObj,
int n,
IrtRType *Dir,
char *PlAttr)
Description:
Computes a uniform distribution of points on a polygonal object.
If an "Imprt" attribute is found in a polygon then it is used to weigh
the importance of this polygon and hence the number of points that will be
allocated to (on) it.
Parameters:
PolyObj: | Object to compute a uniform point distribution on.
|
---|
n: | Number of points to distribute (estimate).
|
---|
Dir: | If given - use it as view dependent uniform distribution.
Note that if Dir != NULL less than n points will be
generated.
|
---|
PlAttr: | If not NULL, the created points are placed as attributes
named PlAttr in each polygon in the return (copied) model.
|
---|
Returned Value:
IPObjectStruct *: A point list object.
|
---|
Keywords:
(sph_pts.c:30)
Prototype:
IPObjectStruct *GMPointCoverOfUnitHemiSphere(IrtRType HoneyCombSize)
Description:
Computes a honey comb distribution of points on a sphere. Result is
an approximation.
Parameters:
HoneyCombSize: | Size of honey comb, on the unit sphere. A fraction.
|
---|
Returned Value:
IPObjectStruct *: A point list object.
|
---|
Keywords:
(geom_bsc.c:1292)
Prototype:
int GMPointFrom3Planes(const IrtPlnType Pl1,
const IrtPlnType Pl2,
const IrtPlnType Pl3,
IrtPtType Pt)
Description:
Find the intersection point (if exists) of three planes.
Parameters:
Pl1, Pl2, Pl3: | Three planes to consider.
|
---|
Pt: | Intersection point found (if any).
|
---|
Returned Value:
int: TRUE if exists an intersection point, FALSE otherwise.
|
---|
Keywords:
(geom_bsc.c:1037)
Prototype:
int GMPointFromLinePlane(const IrtPtType Pl,
const IrtPtType Vl,
const IrtPlnType Plane,
IrtPtType InterPoint,
IrtRType *t)
Description:
Routine to find the intersection point of a line and a plane (if any).
The Plane is prescribed using four coefficients : Ax + By + Cz + D = 0
given as four elements vector. The line is define via a point on it Pl and
a direction vector Vl. Returns TRUE only if such point exists.
Parameters:
Pl, Vl: | Position and direction that defines the line.
|
---|
Plane: | To find the intersection with the line.
|
---|
InterPoint: | Where the intersection occurred.
|
---|
t: | Parameter along the line of the intersection location
(as Pl + Vl * t).
|
---|
Returned Value:
int: TRUE, if successful.
|
---|
Keywords:
line plane intersection
(geom_bsc.c:1090)
Prototype:
int GMPointFromLinePlane01(const IrtPtType Pl,
const IrtPtType Vl,
const IrtPlnType Plane,
IrtPtType InterPoint,
IrtRType *t)
Description:
Routine to find the intersection point of a line and a plane (if any).
The Plane is prescribed using four coefficients : Ax + By + Cz + D = 0
given as four elements vector. The line is define via a point on it Pl and
a direction vector Vl. Returns TRUE only if such point exists.
this routine accepts solutions only for t between zero and one.
Parameters:
Pl, Vl: | Position and direction that defines the line.
|
---|
Plane: | To find the intersection with the line.
|
---|
InterPoint: | Where the intersection occurred.
|
---|
t: | Parameter along the line of the intersection location
(as Pl + Vl * t).
|
---|
Returned Value:
int: TRUE, if successful and t between zero and one.
|
---|
Keywords:
line plane intersection
(geom_bsc.c:1153)
Prototype:
int GMPointFromPlanarLineLine(const IrtPtType Pl1,
const IrtPtType Vl1,
const IrtPtType Pl2,
const IrtPtType Vl2,
IrtPtType Pi,
IrtRType *t1,
IrtRType *t2)
Description:
Routine to find the intersection point Pi on the two coplanar lines
(Pli, Vli), i = 1, 2.
This function returns TRUE iff the two lines are not parallel!
Solved as the solution of the following two linear equations:
Vl1(x) t1 - Vl2(x) t2 = Pl2(x) - Pl1(x)
Vl1(y) t1 - Vl2(y) t2 = Pl2(y) - Pl1(y)
Parameters:
Pl1, Vl1: | Position and direction defining the first line.
|
---|
Pl2, Vl2: | Position and direction defining the second line.
|
---|
Pi: | Intersection point if lines are not parallel.
|
---|
t1: | Parameter value of Pi as (Pl1 + Vl1 * t1).
|
---|
t2: | Parameter value of Pi as (Pl2 + Vl2 * t2).
|
---|
Returned Value:
int: TRUE, if successful.
|
---|
See Also:
GM2PointsFromLineLine
Keywords:
line line intersection
(geom_bsc.c:808)
Prototype:
IrtRType GMPointFromPointLine(const IrtPtType Point,
const IrtPtType Pl,
const IrtPtType Vl,
IrtPtType ClosestPoint)
Description:
Routine to compute the closest point on a given 3d line to a given 3d
point. The line is prescribed using a point on it (Pl) and vector (Vl).
Parameters:
Point: | To find the closest to on the line.
|
---|
Pl, Vl: | Position and direction that defines the line. Vl need not
be a unit length vector.
|
---|
ClosestPoint: | Where closest point found on the line is to be saved.
|
---|
Returned Value:
IrtRType: Parameter along the line where if the closest point is Pl
equal zero and if closest point is Pl + Vl equal one.
In other words, the closest point is on the finite line
segment for return value in [0, 1].
|
---|
See Also:
MvarPointFromPointLine
Keywords:
point line distance
(geom_bsc.c:986)
Prototype:
int GMPointFromPointPlane(const IrtPtType Pt,
const IrtPlnType Plane,
IrtPtType ClosestPoint)
Description:
Routine to compute the closest point on a given plane to a given 3d
point.
The Plane is prescribed using four coefficients : Ax + By + Cz + D = 0
given as four elements vector.
Parameters:
Pt: | Point to find closest point on Plane to.
|
---|
Plane: | To find the closest point on to Pt.
|
---|
ClosestPoint: | Where the closest point on Plane to Pt is.
|
---|
Returned Value:
int: TRUE, if successful.
|
---|
Keywords:
point plane distance
(geomat3d.c:1525)
Prototype:
int GMPointInsideCnvxPolygon(const IrtPtType Pt, const IPPolygonStruct *Pl)
Description:
Test if a given points is contained in the given convex polygon.
Parameters:
Pt: | Point to test for inclusion in convex polygon Pl. Pt is assumed
to be on the plane holding polygon Pl.
|
---|
Pl: | Convex polygon to test for inclusion of Pt.
|
---|
Returned Value:
int: TRUE if Pt is inside Polygon Pl, FALSE otherwise.
|
---|
See Also:
GMPointOnPolygonBndry
Keywords:
(geomat3d.c:1574)
Prototype:
int GMPointOnPolygonBndry(const IrtPtType Pt,
const IPPolygonStruct *Pl,
IrtRType Eps)
Description:
Test if a given points is on the boundary of the given polygon.
Parameters:
Pt: | Point to test for inclusion in the boundary of polygon Pl. Pt is
assumed to be on the plane holding polygon Pl.
|
---|
Pl: | Polygon to test for inclusion of Pt.
|
---|
Eps: | Maximal distance from the boundary to be considered on boundary.
|
---|
Returned Value:
int: TRUE if Pt is on the boundary of Polygon Pl, FALSE otherwise.
|
---|
See Also:
GMPointInsideCnvxPolygon
Keywords:
(geom_bsc.c:719)
Prototype:
void GMPointVecFromLine(const IrtLnType Line, IrtPtType Pt, IrtVecType Dir)
Description:
Computes a point on and the direction of the given line
Parameters:
Line: | To extract and point and a direction for.
|
---|
Pt: | A point on line Line.
|
---|
Dir: | The direction of line Line.
|
---|
Returned Value:
Keywords:
(plystrct.c:393)
Prototype:
void GMPolyAdjacncyFree(VoidPtr PolyAdj)
Description:
Free the adjacency data structure associated with a polygonal model.
Parameters:
PolyAdj: | Data struct to free, as constructed by GMPolyAdjacncyGen.
|
---|
Returned Value:
See Also:
GMPolyAdjacncyGen
GMPolyAdjacncyVertex
Keywords:
(plystrct.c:175)
Prototype:
VoidPtr GMPolyAdjacncyGen(IPObjectStruct *PObj, IrtRType EqlEps)
Description:
Constructs an adjacency information data structure for the given
polygonal mesh in GMPolyAdjStruct:
VList: A list of vertices and for each all edges using the vertex.
EList: A list of edges, each referencing the two vertices using it.
PObj: A reference to the original model.
Parameters:
PObj: | A polygonal mesh to compute adjacency information for.
|
---|
EqlEps: | Epsilon for point equality.
|
---|
Returned Value:
VoidPtr: A reference to the data structure holding the adjacency info.
|
---|
See Also:
GMPolyAdjacncyVertex
GMPolyAdjacncyFree
Keywords:
(plystrct.c:336)
Prototype:
void GMPolyAdjacncyVertex(IPVertexStruct *V,
VoidPtr PolyAdj,
GMPolyAdjacncyVertexFuncType AdjVertexFunc)
Description:
Get the adjacency information of a vertex - all the edges that share it.
Invokes the given call back function on all edges.
Parameters:
V: | Vertex to find all edges that share it.
|
---|
PolyAdj: | Data struct to use, as constructed by GMPolyAdjacncyGen.
|
---|
AdjVertexFunc: | Call be function to invoke on every edge.
|
---|
Returned Value:
See Also:
GMPolyAdjacncyGen
GMPolyAdjacncyFree
Keywords:
(geomvals.c:66)
Prototype:
int GMPolyCentroid(const IPPolygonStruct *Pl, IrtPtType Centroid)
Description:
Computes the centroid of a poly, as an average of all input vertices.
Parameters:
Pl: | The poly to compute its centroid.
|
---|
Centroid: | Computed center point. Note it can be outside Pl!
|
---|
Returned Value:
int: TRUE if at least one vertex in input Pl, FALSE otherwise.
|
---|
See Also:
GMComputeAverageVertex
Keywords:
(poly_pts.c:221)
Prototype:
int GMPolyHasCollinearEdges(const IPPolygonStruct *Pl)
Description:
Examines if the given polygons has collinear edges (three consecutive
vertices that are collinear).
Parameters:
Pl: | Polygon to examine for collinear edges.
|
---|
Returned Value:
int: TRUE if Pl has collinear edges, FALSE otherwise.
|
---|
See Also:
Keywords:
(geom_bsc.c:2335)
Prototype:
IPPolygonStruct *GMPolyHierarchy2SimplePoly(IPPolygonStruct *Root,
IPPolygonStruct *Islands)
Description:
Converts a root polygons with islands into a closed, simple, polygon.
Interior islands are all connected into the root, outer, polygon.
The outer, root, loop is assumed to be oriented in opposite
direction to the islands.
Parameters:
Root: | The top most, outer polygon.
|
---|
Islands: | Interior islands to connected with root into one simply poly.
|
---|
Returned Value:
IPPolygonStruct *: Merged poly.
|
---|
Keywords:
polygonization
islands
holes
(geomvals.c:33)
Prototype:
IrtRType GMPolyLength(const IPPolygonStruct *Pl)
Description:
Computes the lengths of a poly, first vertex to last vertex.
Parameters:
Pl: | he poly to compute its length.
|
---|
Returned Value:
IrtRType: The length of the poly(line).
|
---|
Keywords:
(polysmth.c:84)
Prototype:
IPObjectStruct *GMPolyMeshSmoothing(IPObjectStruct *PolyObj,
const IPPolygonStruct *VerticesToRound,
int AllowBndryMove,
IrtRType RoundingRadius,
int NumIters,
IrtRType BlendFactor,
int CurvatureLimits)
Description:
Move designated Vertices (that are typically not on the boundary) of
the polygons in PolyObj to new (averages of their 1-rings) positions,
smoothing the shape of the mesh.
Parameters:
PolyObj: | Polygonal object to smooth, in place.
|
---|
VerticesToRound: | f not NULL, only vertices found in VerticesToRound are
allowed to move and other vertices are kept stationary.
|
---|
AllowBndryMove: | to keep boundary vertices fixed,
1 to allow the boundary vertices to move only in the
plane containing the boundary,
-1 to allow the boundary vertices to freely move.
|
---|
RoundingRadius: | If we have a restriction on the movable vertices
any other vertex that is at a Euclidean distance of less
than RoundingRadius from a restricted vertex will also be
tagged as such.
|
---|
NumIters: | Number of times to perform this smoothing algorithm.
|
---|
BlendFactor: | .0 to move the vertex all the way to average position.
Otherwise, (less than 1.0) to the proper fraction.
|
---|
CurvatureLimits: | If TRUE, estimate the curvature and make sure we are
within the desired rounding radius.
Available only for meshes with triangles only.
|
---|
Returned Value:
IPObjectStruct *: The smoothed out polygons, in place. Same as PolyObj.
|
---|
Keywords:
(geomvals.c:121)
Prototype:
IrtRType GMPolyObjectArea(const IPObjectStruct *PObj, int SignedArea)
Description:
Routine to evaluate the Area of the given geom. object, in object unit.
Algorithm (for each polygon): V3
1. Set Polygon Area to be zero. /\
Make a copy of the original polygon / \
and transform it to a XY parallel plane. / \V2
Find the minimum Y value of the polygon V4/ |
in the XY plane. \ |
2. Let V(0) be the first vertex, V(n) the last one. \ |
For i goes from 0 to n-1 add to Area the area \_______|
below edge V(i), V(i+1): V0 V1
PolygonArea += (V(i+1)x - V(i)x) * (V(i+1)y' - V(i)y') / 2
where V(i)y' is V(i)y - MinY, where MinY is polygon minimum Y value.
3. The result of step 2 is the area of the polygon itself.
However, it might be negative, so take the absolute result of step 2
and add it to the global ObjectArea.
Note step 2 is performed by another auxiliary routine: GMPolyOnePolyXYArea.
Parameters:
PObj: | A polyhedra object to compute its surface area.
|
---|
SignedArea: | True for sign area, FALSE always positive.
|
---|
Returned Value:
IrtRType: The area of object PObj.
|
---|
See Also:
GMPolyOnePolyArea
Keywords:
area
(geomvals.c:284)
Prototype:
IrtRType GMPolyObjectVolume(const IPObjectStruct *PObj)
Description:
Routine to evaluate the Volume of the given geom object, in object unit.
This routine has a side effect that all non-convex polygons will be
splitted to convex ones.
Algorithm (for each polygon, and let ObjMinY be the minimum OBJECT Y):
V3
1. Set Polygon Area to be zero. /\
Let V(0) be the first vertex, V(n) the last. / \
For i goes from 1 to n-1 form triangles / \V2
by V(0), V(i), V(i+1). V4/ |
For each such triangle di: \ |
1.1. Find the vertex (out of V(0), V(i), V(i+1)) \ |
with the minimum Z - TriMinY. \_______|
1.2. The volume below V(0), V(i), V(i+1) triangle, V0 V1
relative to ObjMinZ level, is the sum of:
1.2.1. volume of V'(0), V'(i), V'(i+1) - the
area of projection of V(0), V(i), V(i+1) on XY parallel
plane, times (TriMinZ - ObjMinZ).
1.2.2. Assume V(0) is the one with the PolyMinZ. Let V"(i) and
V"(i+1) be the projections of V(i) and V(i+1) on the plane
Z = PolyZMin. The volume above 1.2.1. and below the polygon
(triangle!) will be: the area of quadraliteral V(i), V(i+1),
V"(i+1), V"(i), times distance of V(0) for quadraliteral
plane divided by 3.
1.3. If Z component of polygon normal is negative add 1.2. result to
ObjectVolume, else subtract it.
Parameters:
PObj: | To compute volume for.
|
---|
Returned Value:
IrtRType: Computed volume.
|
---|
Keywords:
volume
(polyofst.c:83)
Prototype:
IPPolygonStruct *GMPolyOffset(const IPPolygonStruct *Poly,
int IsPolygon,
IrtRType Ofst,
GMPolyOffsetAmountFuncType AmountFunc)
Description:
Computes the offset of a given polygon/line in the XY plane by Ofst.
Parameters:
Poly: | To compute its offset in the XY plane.
|
---|
IsPolygon: | TRUE for a polygon, FALSE for a polyline.
|
---|
Ofst: | Amount of offset.
|
---|
AmountFunc: | Scale the offset amount according to this function. A NULL
here will use a constant scaling factor of one.
|
---|
Returned Value:
IPPolygonStruct *: Offset of Poly by Ofst amount.
|
---|
See Also:
GMPolyOffsetAmountDepth
GMPolyOffset3D
Keywords:
(polyofst.c:182)
Prototype:
IPPolygonStruct *GMPolyOffset3D(const IPPolygonStruct *Poly,
IrtRType Ofst,
int ForceSmoothing,
IrtRType MiterEdges,
GMPolyOffsetAmountFuncType AmountFunc)
Description:
Computes the offset of a given polygon object in R^3 by Ofst.
Computation is done by moving all vertices in the nomal direction by
ofst amount. If Poly does not contain vertex normals, they are estimated.
Parameters:
Poly: | To compute its offset in R^3.
|
---|
Ofst: | Amount of offset.
|
---|
ForceSmoothing: | True to force normal smoothing.
|
---|
MiterEdges: | Positive to properly handle dihedral angle, in which case
sets the maximal scale allowed. Zero to disable.
|
---|
AmountFunc: | Scale the offset amount according to this function. A NULL
here will use a constant scaling factor of one.
|
---|
Returned Value:
IPPolygonStruct *: Offset of Poly by Ofst amount.
|
---|
See Also:
GMPolyOffsetAmountDepth
GMPolyOffset
Keywords:
(polyofst.c:55)
Prototype:
IrtRType GMPolyOffsetAmountDepth(const IrtRType *Coord)
Description:
Sets the offset amount to be a function of the depth Z value by scaling
with 1/Z.
Parameters:
Coord: | Of point as XYZ values.
|
---|
Returned Value:
IrtRType: scaling factor of offset amount.
|
---|
See Also:
GMPolyOffset
Keywords:
(geomvals.c:157)
Prototype:
IrtRType GMPolyOnePolyArea(const IPPolygonStruct *Pl, int SignedArea)
Description:
Computes the area of a single polygon.
Parameters:
Pl: | To compute its area.
|
---|
SignedArea: | True for sign area, FALSE always positive.
|
---|
Returned Value:
IrtRType: Area of polygon Pl.
|
---|
See Also:
GMPolyObjectArea
GMPolyOnePolyXYArea
Keywords:
(geomvals.c:213)
Prototype:
IrtRType GMPolyOnePolyXYArea(const IPVertexStruct *VHead, int SignedArea)
Description:
Routine to evaluate the area of the given polygon projected on the XY
plane.
The polygon does not have to be on a XY parallel plane, as only its XY
projection is considered (Z is ignored).
Returned the area of its XY parallel projection.
See GMObjectArea above for algorithm.
Parameters:
VHead: | Of vertex list to compute area for.
|
---|
SignedArea: | True for sign area, FALSE always positive.
|
---|
Returned Value:
See Also:
GMPolyObjectArea
Keywords:
(geom_bsc.c:1803)
Prototype:
IrtRType GMPolyPlaneClassify(const IPPolygonStruct *Pl, const IrtPlnType Pln)
Description:
Classify a plane as (mostly) on the positive side of the plane,
returning a positive value, or (mostly) on the negative side of the plane,
returning a negative value.
Parameters:
Pl: | Polygon to consider and classify.
|
---|
Pln: | Plane to claassify against.
|
---|
Returned Value:
IrtRType: Positive or negative, classifying the polygon's side.
|
---|
Keywords:
(polyprop.c:304)
Prototype:
IPPolygonStruct *GMPolyPropFetch(IPPolygonStruct *Pls,
GMFetchVertexPropertyFuncType VertexProperty,
IrtRType ConstVal,
void *AuxData)
Description:
Computes the constant value over a polygonal model by processing each
polygons for edges that the values of the property are begin crossed.
The input polygonal model is assumed to hold triangles only.
Parameters:
Pls: | The polygons to process the constant value property for.
Assumed to hold triangles only.
|
---|
VertexProperty: | call back function to return the desired property for
the invoked vertex.
|
---|
ConstVal: | Constant value of property sought.
|
---|
AuxData: | to optionally pass to the VertexProperty call back func.
|
---|
Returned Value:
IPPolygonStruct *: List of polylines on the polygons for which the
property assumes the value ConstVal.
|
---|
See Also:
GMPolyPropFetchIsophotes
GMPolyPropFetchCurvature
GMFetchVertexPropertyFuncType
Keywords:
(polyprop.c:95)
Prototype:
IPPolygonStruct *GMPolyPropFetchAttribute(IPPolygonStruct *Pls,
IPAttrIDType AttrID,
IrtRType Value)
Description:
A function to derive curves over a polygonal model, Pls, based on given
prescribed attribute PropAttr.
Parameters:
Pls: | The polygons to process the constant value property
for. Assumed to hold triangles only.
|
---|
AttrID: | ID of attribute to extract.
|
---|
Value: | Value of property to seek.
|
---|
Returned Value:
IPPolygonStruct *: List of polylines on the polygons along the
requested property value.
|
---|
See Also:
GMPolyPropFetchIsophotes
GMPolyPropFetchCurvature
Keywords:
(polyprop.c:227)
Prototype:
IPPolygonStruct *GMPolyPropFetchCurvature(IPPolygonStruct *Pls,
int CurvatureProperty,
int NumOfRings,
IrtRType CrvtrVal)
Description:
A function to derive curvature properties for a polygonal model, Pls.
Parameters:
Pls: | The polygons to process the constant value property
for. Assumed to hold triangles only.
|
---|
CurvatureProperty: | for Gaussian curvature, 1 for Mean curvature.
|
---|
NumOfRings: | In the paraboloid fit estimation, usually 1-2.
|
---|
CrvtrVal: | Value of curvature property to seek.
|
---|
Returned Value:
IPPolygonStruct *: List of polylines on the polygons along the
requested curvature lines.
|
---|
See Also:
GMPolyPropFetchIsophotes
GMPolyPropFetchAttribute
Keywords:
(polyprop.c:156)
Prototype:
IPPolygonStruct *GMPolyPropFetchIsophotes(IPPolygonStruct *Pls,
const IrtVecType ViewDir,
IrtRType InclinationAngle)
Description:
A function to derive isophotes for a polygonal model, Pls.
Parameters:
Pls: | The polygons to process the constant value property
for. Assumed to hold triangles only.
|
---|
ViewDir: | Direction of view.
|
---|
InclinationAngle: | In degrees to consider the isophotes for. 90 degrees
would yield regular silhouettes viewed from LightDir.
|
---|
Returned Value:
IPPolygonStruct *: List of polylines on the polygons along the
requested isophotes.
|
---|
See Also:
GMPolyPropFetchCurvature
GMPolyPropFetchAttribute
Keywords:
(geom_bsc.c:1665)
Prototype:
int GMPolygonPlaneInter(const IPPolygonStruct *Pl,
const IrtPlnType Pln,
IrtRType *MinDist)
Description:
Test if the given polygon intersects the given plane.
Parameters:
Pl: | Polygon to test if interestes plane Pln.
|
---|
Pln: | Plane to examine if polygon Pl intersects. Assumed normalized
normal vector in Pln.
|
---|
MinDist: | eturns closest vertex in Pl to Pln.
|
---|
Returned Value:
int: TRUE if intersects, FALSE otherwise.
|
---|
See Also:
GMPolygonRayInter
GMSplitPolygonAtPlane
Keywords:
(geom_bsc.c:1884)
Prototype:
int GMPolygonPointInclusion(const IPPolygonStruct *Pl,
const IrtPtType Pt,
IrtRType OnBndryEps)
Description:
Routine to check if a point is inside a polygon, in the XY plane.
Uses winding number accumulation in the computation.
Parameters:
Pl: | Polygon to test if Pt is in it.
|
---|
Pt: | Point to test for inclusion in Pl.
|
---|
OnBndryEps: | If not zero, will also check if Pt is on boundary to within
this epsilon.
|
---|
Returned Value:
int: 1 if Pt inside Pl, 0 if on boundary (if OnBndryEps > 0),
-1 if Pt outside.
|
---|
See Also:
GMPolygonPointInclusion3D
GMPolygonPlaneInter
GMPolygonRayInter
Keywords:
ray polygon intersection
point inclusion
(geom_bsc.c:2028)
Prototype:
int GMPolygonPointInclusion3D(const IPPolygonStruct *Pl, const IrtPtType Pt)
Description:
Routine to check if a point is inside a polyhedra in 3D.
Computes the accumulated Gaussian sphere area deviation of Pt-vertices
over all triangles in the given Pl model, with respect to given point Pt.
Each angular deviation of each triangle is measured as area of spherical
triangle over the Gaussian sphere, formed from its three Pt-vertices dirs.
A point is inside a simple closed polyhedra if the sum is +/-4 Pi, zero
if the point is outside.
Parameters:
Pl: | Polyhedra in 3D to test if Pt is in it.
|
---|
Pt: | Point to test for inclusion in Pl.
|
---|
Returned Value:
int: TRUE if Pt inside Pl, FALSE otherwise.
|
---|
See Also:
GMPolygonPointInclusion
GMPolygonPlaneInter
GMPolygonRayInter
GMAreaSphericalTriangle
Keywords:
ray polygon intersection
point inclusion
(geom_bsc.c:2081)
Prototype:
int GMPolygonRayInter(const IPPolygonStruct *Pl,
const IrtPtType PtRay,
int RayAxes)
Description:
Routine that implements "Jordan Theorem". Same as GMPolygonRayInter2 but
does not return the first intersection info.
Parameters:
Pl: | To compute "Jordan Theorem" for the given ray.
Can be either a polygon or a closed polyline (first and last
points of polyline are equal).
|
---|
PtRay: | Origin of ray.
|
---|
RayAxes: | Direction of ray. 0 for X, 1 for Y, etc.
|
---|
Returned Value:
int: Number of intersections of ray with the polygon.
|
---|
See Also:
GMPolygonPlaneInter
GMPolygonPointInclusion
GMSplitPolygonAtPlane
Keywords:
ray polygon intersection
Jordan theorem
(geom_bsc.c:2153)
Prototype:
int GMPolygonRayInter2(const IPPolygonStruct *Pl,
const IrtPtType PtRay,
int RayAxes,
IPVertexStruct **FirstInterV,
IrtRType *FirstInterP,
IrtRType *AllInters)
Description:
Routine that implements "Jordan Theorem":
Fire a ray from a given point and find the number of intersections of a
ray with the polygon, excluding the given point Pt (start of ray) itself,
if on polygon boundary. The ray is fired in +X (Axes == 0) or +Y if
(Axes == 1).
Only the X/Y coordinates of the polygon are taken into account, i.e. the
orthogonal projection of the polygon on an X/Y parallel plane (equal to
polygon itself if on X/Y parallel plane...).
Note that if the point is on polygon boundary, the ray should not be in
its edge direction.
Algorithm:
1. 1.1. Set NumOfIntersection = 0;
1.2. Find vertex V not on Ray level and set AlgState to its level
(below or above the ray level). If none goto 3;
1.3. Mark VStart = V;
2. Do
2.1. While State(V) == AlgState do
2.1.1. V = V -> Pnext;
2.1.2. If V == VStart goto 3;
2.2. IntersectionMinX = IRIT_INFNTY;
2.3. While State(V) == ON_RAY do
2.3.1. IntersectionMin = IRIT_MIN(IntersectionMin,
V -> Coord[Axes]);
2.3.2. V = V -> Pnext;
2.4. If State(V) != AlgState do
2.4.1. Find the intersection point between polygon edge
VLast, V and the Ray and update IntersectionMin if
lower than it.
2.4.2. If IntersectionMin is greater than Pt[Axes] increase
the NumOfIntersection counter by 1.
2.5. AlgState = State(V);
2.6. goto 2.2.
3. Return NumOfIntersection;
Parameters:
Pl: | To compute "Jordan Theorem" for the given ray.
Can be either a polygon or a closed polyline (first and
last points of polyline are equal).
|
---|
PtRay: | Origin of ray.
|
---|
RayAxes: | Direction of ray. 0 for X, 1 for Y, etc.
|
---|
FirstInterV: | OUT - First intersection edge, between V and VNext.
|
---|
FirstInterP: | OUT - First intersection location, blending V and VNext.
|
---|
AllInters: | OUT - if not NULL, will be updated with a vector of all
intersction locations. First entry must hold number of
elements in this vector.
|
---|
Returned Value:
int: Number of intersections of ray with the polygon.
|
---|
See Also:
GMPolygonPlaneInter
GMSplitPolygonAtPlane
Keywords:
ray polygon intersection
Jordan theorem
(geom_bsc.c:2284)
Prototype:
int GMPolygonRayInter3D(const IPPolygonStruct *Pl,
const IrtPtType PtRay,
int RayAxes)
Description:
Same as GMPolygonRayInter but for arbitrary oriented polygon.
The polygon is transformed into the XY plane and then GMPolygonRayInter
is invoked on it.
Parameters:
Pl: | To compute "Jordan Theorem" for the given ray.
|
---|
PtRay: | Origin of ray.
|
---|
RayAxes: | Direction of ray. 0 for X, 1 for Y, etc.
|
---|
Returned Value:
int: Number of intersections of ray with the polygon.
|
---|
Keywords:
ray polygon intersection
Jordan theorem
(pt_morph.c:32)
Prototype:
IPPolygonStruct *GMPolygonalMorphosis(const IPPolygonStruct *Pl1,
const IPPolygonStruct *Pl2,
IrtRType t)
Description:
Computes a blend of the given two polyhedra as 't Pl1 + (1-t) Pl2'.
The two polyhedra are assumed to be of the same topology: same number of
(ordered) polygons and same number of vertices in each corresponding
polygon.
Parameters:
Pl1, Pl2: | The two polygonal object to meta-morph.
|
---|
t: | Linear blending factor: (1-t) * Pl1 + t * Pl2.
|
---|
Returned Value:
IPPolygonStruct *: Blended polyhedra.
|
---|
Keywords:
(polyquad.c:466)
Prototype:
IrtRType GMQuadAreaPerimeterRatioWeightFunc(const CagdPolylineStruct *P,
const int *VIndices,
int numV)
Description:
Returns the following quad weight function:
function WF. * The used weight function is:
(0.75 * QuadArea + 0.05 * QuadPerimeter + 0.10 * EdgesMaxMinRatio).
Parameters:
P: | The polygon the quad is formed from its vertices.
|
---|
VIndices: | rray of indices if the vertices in Pl that forms the quad.
|
---|
numV: | Length of VIndices array.
|
---|
Returned Value:
IrtRType: Value of the weight function described above.
|
---|
Keywords:
(polyquad.c:541)
Prototype:
struct IPPolygonStruct *GMQuadrangulatePolygon(const CagdPolylineStruct *Pl,
GMQuadWeightFuncType WF,
void *UserData)
Description:
Quadrangulates a closed polygon, by minimizing a given quad weight
function WF. * The used weight function is:
WF * (0.75 * QuadArea + 0.05 * QuadPerimeter +
0.10 * EdgesMaxMinRatio).
Parameters:
Pl: | A polygon to quadrangulate.
|
---|
WF: | eight function of a quad. Invalid/undesired quads should have a
negative weight, where in this case the weight of the quad is
infinity.
|
---|
UserData: | ser data that can be used for the weight function.
|
---|
Returned Value:
struct IPPolygonStruct *: List of quads (can contains triangles as well).
|
---|
See Also:
GMQuadrangulatePolygon2
Keywords:
(polyquad.c:614)
Prototype:
struct IPPolygonStruct *GMQuadrangulatePolygon2(const struct IPPolygonStruct
*Pl,
GMQuadWeightFuncType WF,
void *UserData)
Description:
Quadrangulates a closed polygon, by minimizing a given quad weight
function WF. * The used weight function is:
WF * (0.75 * QuadArea + 0.05 * QuadPerimeter +
0.10 * EdgesMaxMinRatio).
Parameters:
Pl: | polygon to quadrangulate.
|
---|
WF: | eight function of a quad. Invalid/undesired quads should have a
negative weight, where in this case the weight of the quad is
infinity.
|
---|
UserData: | ser data that can be used for the weight function.
|
---|
Returned Value:
struct IPPolygonStruct *: List of quads (can contains triangles as well).
|
---|
See Also:
GMQuadrangulatePolygon
Keywords:
(polyquad.c:650)
Prototype:
struct IPPolygonStruct *GMQuadrangulatePolygonList(const struct
IPPolygonStruct *PlgnList,
GMQuadWeightFuncType WF,
void *UserData)
Description:
Quadrangulates a closed polygon, by minimizing a given quad weight
function WF.
The used weight function is:
WF * (0.75 * QuadArea + 0.05 * QuadPerimeter + 0.10 * EdgesMaxMinRatio)
Parameters:
PlgnList: | polygon list to quadrangulate.
|
---|
WF: | The weight function.
|
---|
UserData: | ser data that can be used for the weight function.
|
---|
Returned Value:
struct IPPolygonStruct *: List of Quads (might contain triangles also).
|
---|
See Also:
GMQuadrangulatePolygon2
Keywords:
(quatrnn.c:231)
Prototype:
void GMQuatAdd(GMQuatType q1, GMQuatType q2, GMQuatType QRes)
Description:
Adds two quatenrions.
Parameters:
q1: | Left quaternion.
|
---|
q2: | Right quaternion.
|
---|
QRes: | Result quaternion.
|
---|
Returned Value:
See Also:
GMQuatMatToQuat
Keywords:
Quaternion
(quatrnn.c:418)
Prototype:
void GMQuatExp(IrtVecType SrcVec, GMQuatType DstQ)
Description:
Calculates the exponent quaternion of a vector.
Parameters:
SrcVec: | Source vector.
|
---|
DstQ: | Detination (result) quaternion.
|
---|
Returned Value:
See Also:
GMQuatLog
Keywords:
Quaternion
(quatrnn.c:315)
Prototype:
void GMQuatInverse(GMQuatType SrcQ, GMQuatType DstQ)
Description:
Creates q^(-1) from a quaternion.
Parameters:
SrcQ: | Source quaternion.
|
---|
DstQ: | Destination inversed quaternion.
|
---|
Returned Value:
See Also:
GMQuatNormalize
GMQuatMatToQuat
GMQuatIsUnitQuat
Keywords:
Quaternion
(quatrnn.c:257)
Prototype:
int GMQuatIsUnitQuat(GMQuatType q)
Description:
Checks if a given quaternion is of unit magnitude.
Parameters:
Returned Value:
See Also:
GMQuatMatToQuat
GMQuatNormalize
Keywords:
Quaternion
(quatrnn.c:382)
Prototype:
void GMQuatLog(GMQuatType SrcQ, IrtVecType DstVec)
Description:
Calculates the logarithm of a quaternion.
Parameters:
SrcQ: | Source quaternion.
|
---|
DstVec: | Detination (result) vector.
|
---|
Returned Value:
See Also:
GMQuatExp
Keywords:
Quaternion
(quatrnn.c:85)
Prototype:
void GMQuatMatToQuat(IrtHmgnMatType Mat, GMQuatType q)
Description:
Transforms a matrix to a quaternion.
Parameters:
Mat: | Source matrix.
|
---|
q: | Destination quaternion.
|
---|
Returned Value:
See Also:
GMQuatToMat
Keywords:
Quaternion
(quatrnn.c:561)
Prototype:
int GMQuatMatrixToAngles(IrtHmgnMatType Mat, IrtVecType *Vec)
Description:
Calculates the angle of rotation in each axis, from a given
rotation matrix.
The rotation, being axis-dependant, must be performed in a predefined
order: rotate by X, then by Y and finally by Z.
A rotation angle in the X-Y-Z order looks like this:
c2*c3 c2*s3 -s2 0
s1*s2*c3 - c1*s3 s1*s2*s3 + c1*c3 s1*c2 0
c1*s2*c3 + s1*s3 c1*s2*s3 - s1*c3 c1*c2 0
0 0 0 1
where c1 = cos x, c2 = cos y, c3 = cos z
s1 = sin x, s2 = sin y, s3 = sin z
This is compared to our matrix:
a b c 0
d e f 0
g h i 0
0 0 0 1
Parameters:
Mat: | Source roation matrix.
|
---|
Vec: | Destination angles vectors (up to 8).
|
---|
Returned Value:
int: The number of possible solutions (0 = no solution).
|
---|
See Also:
GMQuatMatrixToScale
GMQuatMatrixToTranslation
Keywords:
(quatrnn.c:653)
Prototype:
IrtRType GMQuatMatrixToScale(IrtHmgnMatType Mat)
Description:
Extract the uniform scale factor from a given transformation matrix.
Parameters:
Mat: | Source transformation matrix.
|
---|
Returned Value:
IrtRType: The uniform scale factor result.
|
---|
See Also:
GMQuatMatrixToAngles
GMQuatMatrixToTranslation
Keywords:
(quatrnn.c:630)
Prototype:
void GMQuatMatrixToTranslation(IrtHmgnMatType Mat, IrtVecType Vec)
Description:
Extract the translation vector from a given transformation matrix.
Parameters:
Mat: | Source transformation matrix.
|
---|
Vec: | Destination translation vector.
|
---|
Returned Value:
See Also:
GMQuatMatrixToScale
GMQuatRotMatrixToAngles
Keywords:
Transformation
Quaternion
(quatrnn.c:696)
Prototype:
int GMQuatMatrixToVector(IrtHmgnMatType Mat, GMQuatTransVecType TransVec)
Description:
Extract the transformation parameters vector
from a given transformation matrix.
A transformation vector contains the rotation angles in all 3 axis,
the translation in all 3 axis and a uniform scaling factor.
Since there are many ways to combine these parameters, we chose
the following order: To create a transformation matrix out of a
transformation vector - first create a rotation matrix (rotate by X then
by Y and then by Z), then create a uniform scaling matrix and finally
create a translation matrix.
Apply roation, then scale and finally translation to obtain the original
transformation matrix.
To create a transformation vector out of a transformation matrix, we
simply do it all in reverse : extract and cancel transformation effects,
extract and cancel scaling effects and then extract roation effects.
Parameters:
Mat: | Source transformation matrix.
|
---|
TransVec: | The result transformation parameters vector.
|
---|
Returned Value:
int: TRUE only if the input matrix is a transformation matrix.
|
---|
See Also:
GMQuatMatrixToScale
GMQuatMatrixToTranslation
GMQuatMatrixToAngles
Keywords:
Transformation
Quaternion
(quatrnn.c:202)
Prototype:
void GMQuatMul(GMQuatType q1, GMQuatType q2, GMQuatType QRes)
Description:
Mutliplies two quatenrions.
Order of arguments counts.
Parameters:
q1: | Left quaternion.
|
---|
q2: | Right quaternion.
|
---|
QRes: | Result quaternion.
|
---|
Returned Value:
See Also:
GMQuatMatToQuat
Keywords:
Quaternion
(quatrnn.c:279)
Prototype:
void GMQuatNormalize(GMQuatType q)
Description:
Normalizes a quaternion into a unit size quaternion (as a 4 vector)
Parameters:
Returned Value:
See Also:
GMQuatIsUnitQuat
GMQuatInverse
GMQuatIsUnitQuat
Keywords:
Quaternion
(quatrnn.c:455)
Prototype:
void GMQuatPow(GMQuatType MantisQ, IrtRType Expon, GMQuatType DstQ)
Description:
Calculates the quaternion to the power of a real exponenet.
Parameters:
MantisQ: | Mantisa quaternion.
|
---|
Expon: | Real exponent.
|
---|
DstQ: | Detination (result) quaternion.
|
---|
Returned Value:
See Also:
GMQuatLog
GMQuatExp
Keywords:
Quaternion
(quatrnn.c:345)
Prototype:
void GMQuatRotateVec(IrtVecType OrigVec, GMQuatType RotQ, IrtVecType DestVec)
Description:
Rotates a vector using a rotation quaternion.
Parameters:
OrigVec: | Original (source) vector.
|
---|
RotQ: | Rotation quaternion.
|
---|
DestVec: | Detination (rotated) vector.
|
---|
Returned Value:
See Also:
GMQuatMatToQuat
Keywords:
Quaternion
(quatrnn.c:143)
Prototype:
void GMQuatRotationToQuat(IrtRType Xangle,
IrtRType Yangle,
IrtRType Zangle,
GMQuatType q)
Description:
Creates a quaternion from an arbitrary rotation in X-Y-Z order.
Parameters:
Xangle: | Roation angle around X axis
|
---|
Yangle: | Roation angle around Y axis
|
---|
Zangle: | Roation angle around Z axis
|
---|
q: | Destination quaternion.
|
---|
Returned Value:
See Also:
GMQuatToMat
GMQuatToRotation
Keywords:
Quaternion
(quatrnn.c:34)
Prototype:
void GMQuatToMat(GMQuatType q, IrtHmgnMatType Mat)
Description:
Transforms a quaternion to a matrix.
Parameters:
q: | Source quaternion.
|
---|
Mat: | Destination matrix.
|
---|
Returned Value:
See Also:
GMQuatMatToQuat
GMQuatNormalize
Keywords:
Quaternion
(quatrnn.c:175)
Prototype:
void GMQuatToRotation(GMQuatType q, IrtVecType *Angles, int *NumSolutions)
Description:
Finds rotation angles in X-Y-Z order from a given
quaternion representation.
Parameters:
q: | Rotation quaternion.
|
---|
Angles: | All possible rotation angles (up to 8).
|
---|
NumSolutions: | ointer to buffer that holds number of solutions found.
|
---|
Returned Value:
See Also:
GMQuatToMat
GMQuatRotationToQuat
Keywords:
Quaternion
(quatrnn.c:827)
Prototype:
void GMQuatVecToRotMatrix(GMQuatTransVecType TransVec,
IrtHmgnMatType RotMatrix)
Description:
Extracts a rotation matrix from a transformation parameters vector.
The rotation, being axis-dependant, must be performed in a predefined
order: rotate by X, then by Y and finally by Z.
Parameters:
TransVec: | The source transformation parameters vector.
|
---|
RotMatrix: | The result rotation matrix.
|
---|
Returned Value:
See Also:
GMQuatVecToTransMatrix
GMQuatVecToScaleMatrix
Keywords:
Transformation
Quaternion
(quatrnn.c:798)
Prototype:
void GMQuatVecToScaleMatrix(GMQuatTransVecType TransVec,
IrtHmgnMatType ScaleMatrix)
Description:
Extracts a scale matrix from a transformation parameters vector.
Parameters:
TransVec: | The source transformation parameters vector.
|
---|
ScaleMatrix: | The result scale matrix.
|
---|
Returned Value:
See Also:
GMQuatVecToRotMatrix
GMQuatVecToTransMatrix
Keywords:
Transformation
Quaternion
(quatrnn.c:868)
Prototype:
void GMQuatVecToTransMatrix(GMQuatTransVecType TransVec,
IrtHmgnMatType TransMatrix)
Description:
Extracts a translation matrix from a transformation parameters vector.
Parameters:
TransVec: | The source transformation parameters vector.
|
---|
TransMatrix: | The result translation matrix.
|
---|
Returned Value:
See Also:
GMQuatVecToRotMatrix
GMQuatVecToScaleMatrix
Keywords:
Transformation
Quaternion
(quatrnn.c:765)
Prototype:
void GMQuatVectorToMatrix(GMQuatTransVecType TransVec, IrtHmgnMatType Mat)
Description:
Converts a transformation parameters vector to a transformation matrix.
A transformation vector contains the rotation angles in all 3 axis,
the translation in all 3 axis and a uniform scaling factor.
Since there are many ways to combine these parameters, we chose
the following order: To create a transformation matrix out of a
transformation vector - first create a rotation matrix (rotate by X, then
by Y, and then by Z), then create a uniform scaling matrix and finally
create a translation matrix.
Apply rotation, then scale and finally translation to obtain the original
transformation matrix.
To create a transformation vector out of a transformation matrix, we
simply do it all in reverse: extract and cancel transformation effects,
extract and cancel scaling effects and then extract rotation effects.
Parameters:
TransVec: | The source transformation parameters vector.
|
---|
Mat: | The result transformation matrix.
|
---|
Returned Value:
See Also:
GMQuatVecToScaleMatrix
GMQuatVecToRotMatrix
GMQuatVecToTransMatrix
Keywords:
Transformation
Quaternion
(geomat3d.c:1628)
Prototype:
int GMRayCnvxPolygonInter(const IrtPtType RayOrigin,
const IrtVecType RayDir,
const IPPolygonStruct *Pl,
IrtPtType InterPoint)
Description:
Tests if the given ray intersects the given convex polygon.
Parameters:
RayOrigin: | Starting point of ray.
|
---|
RayDir: | Direction of ray.
|
---|
Pl: | Convex polygon to test against ray for intersection.
|
---|
InterPoint: | Resulting intersection point.
|
---|
Returned Value:
int: TRUE if succesful, FALSE otherwise. *
|
---|
See Also:
GMPointFromLinePlane
GMPointInsideCnvxPolygon
Keywords:
(poly_pts.c:2462)
Prototype:
int GMRefineDeformedTriangle(IPPolygonStruct *Pl,
GMPointDeformVrtxFctrFuncType DeformVrtxFctrFunc,
GMPointDeformVrtxDirFuncType DeformVrtxDirFunc,
void *UserData,
IrtRType DeviationTol,
IrtRType MaxEdgeLen)
Description:
Given a triangle in some deformation function and a function to evaluate
deformation amount per vertex, refine the triangle as necessary to make
the deformation be accurate within tolerance Tol.
Only the vertices and mid-edge points on triangle are examined.
Newly created (refined) triangles are appended in place between Pl and
Pl -> Pnext. Note Pl will also be modified in place if refinement occurs.
Parameters:
Pl: | Triangle to refine if necessary.
|
---|
DeformVrtxFctrFunc: | Function to evaluate the deformation amount factor
of a given vertex.
|
---|
DeformVrtxDirFunc: | Function to evaluate the deformation vector
(direction and amount) of a given vertex.
|
---|
UserData: | Optional auxiliary data reference to be transfered
to DeformVrtxFctrFunc and DeformVrtxDirFunc.
|
---|
DeviationTol: | Of deformation approximation.
|
---|
MaxEdgeLen: | to allow in a triangle.
|
---|
Returned Value:
int: TRUE if triangle underwent refinement, FALSE otherwise.
|
---|
See Also:
GMRefineDeformedTriangle2
Keywords:
(poly_pts.c:2247)
Prototype:
int GMRefineDeformedTriangle2(IPPolygonStruct *Pl,
GMPointDeformVrtxFctrFuncType DeformVrtxFctrFunc,
void *UserData,
IrtBType Ref12,
IrtBType Ref23,
IrtBType Ref31)
Description:
Given a triangle Pl, divide and refine it along the edges as set by
Refij. The result can be between one (no refinement) and four (all edges
are defined) triangles that are substituted in place in Pl and before
Pl -> pnext.
Parameters:
Pl: | Triangle to refine if necessary.
|
---|
DeformVrtxFctrFunc: | Function to evaluate the deformation amount factor
of a given vertex.
|
---|
UserData: | Optional auxiliary data reference to be transfered
to DeformVrtxFctrFunc and DeformVrtxDirFunc.
|
---|
Ref12, Ref23, Ref31: | ooleans to set which edge must be refined.
|
---|
Returned Value:
int: TRUE if triangle underwent refinement, FALSE otherwise.
|
---|
See Also:
GMRefineDeformedTriangle
Keywords:
(poly_pts.c:1116)
Prototype:
IPObjectStruct *GMRegularizePolyModel(const IPObjectStruct *PObj,
int SplitCollinear,
IrtRType MinRefineDist)
Description:
Regularize a polygonal model by eliminating all T junction in the
polygonal mesh.
Parameters:
PObj: | A polygonal object to regularize.
|
---|
SplitCollinear: | TRUE to also split polygons at collinear edges.
|
---|
MinRefineDist: | new vertices closer than this distance to their
neighbors will NOT be added.
|
---|
Returned Value:
IPObjectStruct *: Regularized object.
|
---|
Keywords:
(geom_bsc.c:324)
Prototype:
void GMSLerp(const IrtVecType V1,
const IrtVecType V2,
IrtRType t,
IrtVecType VOut)
Description:
Compute an angle-linear interpolation between two unit vectors (as if
rotating vectors on a unit sphere). The Slerp function is based on:
Animating rotation with quaternion curves, K. Shoemake, 1985.
Parameters:
V1, V2: | The two vectors to interpolate.
|
---|
t: | The amount to interpolate (in the range [0,1]).
|
---|
VOut: | Output parameter. The resulting interpolated vector.
|
---|
Returned Value:
Keywords:
(scancnvt.c:33)
Prototype:
void GMScanConvertTriangle(int Pt1[2],
int Pt2[2],
int Pt3[2],
GMScanConvertApplyFuncType ApplyFunc)
Description:
Visits all pixels of the given triangle and invokes ApplyFunc on each
such pixel.
Parameters:
Pt1, Pt2, Pt3: | The three coordinates of the triangle.
|
---|
ApplyFunc: | The function that will be invoked on every pixel
that is visited in this triangle.
|
---|
Returned Value:
Keywords:
(poly_sil.c:616)
Prototype:
IPObjectStruct *GMSilExtractBndry(IPObjectStruct *PObjReg)
Description:
Generates the boundary of the polyhdral object PObjReg, assumed already
regularized.
Parameters:
PObjReg: | Object to extract the Boundary.
|
---|
Returned Value:
IPObjectStruct *: The Boundary Object.
|
---|
See Also:
GMSilExtractSil
GMSilExtractSilDirect
BoolGenAdjacencies
GMSilExtractDiscont
Keywords:
boundary
silhouette.
(poly_sil.c:541)
Prototype:
IPObjectStruct *GMSilExtractDiscont(IPObjectStruct *PObjReg,
IrtRType MinAngle)
Description:
Generates edges along adjacent polygons with a dihedral angle of more
than MinAngle degrees.
Parameters:
PObjReg: | Polyhedral Object to generate the silhouette for.
|
---|
MinAngle: | Minimal dihedral angle between adjacent polygons to consider
as discontinuity. In radians.
|
---|
Returned Value:
IPObjectStruct *: Discontinuities Object.
|
---|
See Also:
GMSilExtractBndry
GMSilExtractSil
GMSilExtractSilDirect2
GMSilExtractSilDirect
Keywords:
discontinuities.
(poly_sil.c:669)
Prototype:
IPObjectStruct *GMSilExtractSil(VoidPtr PrepSils, IrtHmgnMatType ViewMat)
Description:
Generates the silhouette of an object which has been already
preprocessed and is associated with a grid structure.
Parameters:
PrepSils: | Associated silhouette processing data structure of a
polygonal object to generate its silhouettes.
|
---|
ViewMat: | View Matrix.
|
---|
Returned Value:
IPObjectStruct *: Silhouette Object.
|
---|
See Also:
GMSilPreprocessPolys
GMSilOrigObjAlive
GMSilExtractSilDirect
GMSilExtractSilDirect2
Keywords:
silhouette.
(poly_sil.c:335)
Prototype:
IPObjectStruct *GMSilExtractSilDirect(IPObjectStruct *PObjReg,
IrtHmgnMatType ViewMat)
Description:
Generates the silhouette from a polyhedral object, assumed already
regularized with the straight forward method.
Parameters:
PObjReg: | Polyhedral Object to generate the silhouette for.
|
---|
ViewMat: | View Matrix.
|
---|
Returned Value:
IPObjectStruct *: Silhouette Object.
|
---|
See Also:
GMSilExtractBndry
GMSilExtractSil
GMSilExtractSilDirect2
GMSilExtractDiscont
Keywords:
silhouette.
(poly_sil.c:491)
Prototype:
IPObjectStruct *GMSilExtractSilDirect2(IPObjectStruct *PObjReg,
IrtHmgnMatType ViewMat)
Description:
Generates the silhouette from a polyhedral object consisting of only
triangles, and further assumed already regularized. The silhouettes
generated by this function are interior to the triangles and are computed
for each triangle individually, based on its vertices' normals.
Parameters:
PObjReg: | Polyhedral Object to generate the silhouette for. Assumed to
be regular and hold triangles only.
|
---|
ViewMat: | View Matrix.
|
---|
Returned Value:
IPObjectStruct *: Silhouette Object.
|
---|
See Also:
GMSilExtractBndry
GMSilExtractSil
GMSilExtractSilDirect
Keywords:
silhouette.
(poly_sil.c:770)
Prototype:
int GMSilOrigObjAlive(int ObjAlive)
Description:
If TRUE, this module is allowed to assume that the original polygonal
object is alive while silhouette queries are conducted. Default to FALSE.
Setting it to TRUE would allow certain optimization as well as the
propagation of attributes of vertices from the original object to the
detected silhouette edges.
Parameters:
ObjAlive: | If TRUE, assumes original object remains valid throughout.
|
---|
Returned Value:
int: Original vaolue of original object alive.
|
---|
See Also:
GMSilExtractSil
Keywords:
(poly_sil.c:222)
Prototype:
VoidPtr GMSilPreprocessPolys(IPObjectStruct *PObjReg, int n)
Description:
Generates the Grid Structure of a polyhedral object.
This is the preprocessing stage to the silhouette extraction method.
Polyhedra is assumed regular, and has adjacency information.
Parameters:
PObjReg: | Regular polyhedral Object.
|
---|
n: | Subdivision resolution of the Grid (n by n).
|
---|
Returned Value:
VoidPtr: Grid Structure of preprocessing data structure.
|
---|
See Also:
GMSilExtractBndry
GMSilExtractSil
BoolGenAdjacencies
Keywords:
silhouette
boundary.
(poly_sil.c:294)
Prototype:
int GMSilPreprocessRefine(VoidPtr PrepSils, int n)
Description:
Compute a new Grid if the subdivision resolution has been changed.
Parameters:
PrepSils: | Preprocessing data structure of silhouettes to refine to
a new resolution n.
|
---|
n: | New subdivision resolution of the grid.
|
---|
Returned Value:
int: TRUE if the grid was updated, FALSE otherwise.
|
---|
Keywords:
silhouette
boundary.
(poly_sil.c:729)
Prototype:
void GMSilProprocessFree(VoidPtr PrepSils)
Description:
Frees the proprocessing data structure of silhouettes.
Parameters:
Returned Value:
Keywords:
allocation
(geom_bsc.c:3404)
Prototype:
int GMSolveCubicEqn(IrtRType A, IrtRType B, IrtRType C, IrtRType *Sols)
Description:
Computes the solutions, if any, of the given cubic equation. Only real
solutions are considered.
Parameters:
A, B, C: | The equation's coefficients as x^3 + A x^2 + B x + C = 0.
|
---|
Sols: | Where to place the solutions. At most three.
|
---|
Returned Value:
int: Number of real solutions.
|
---|
See Also:
GMSolveQuadraticEqn
GMSolveQuadraticEqn2
GMSolveCubicEqn2
GMSolveQuarticEqn
Keywords:
(geom_bsc.c:3500)
Prototype:
int GMSolveCubicEqn2(IrtRType A,
IrtRType B,
IrtRType C,
IrtRType *RSols,
IrtRType *ISols)
Description:
Calculates the three roots (complex & real) of the cubic equation
x^3 + Ax^2 + Bx + C = 0
Note: Cubic equations have at least one real root; this function always
calculates the real root first, and the other two (possibly complex) later.
This order of filling RSols & ISols is CRUCIAL for GMSolveQuarticEqn()
Parameters:
A, B, C: | The coefficients of the cubic polynomial.
|
---|
RSols, ISols: | Each pair (RSols[i], ISols[i]) is the complex root(i)
|
---|
Returned Value:
int: The number of REAL solutions of the cubic polynomial.
|
---|
See Also:
GMSolveCubicEqn
GMSolveQuadraticEqn
GMSolveQuadraticEqn2
GMSolveQuarticEqn
Keywords:
(geom_bsc.c:3253)
Prototype:
int GMSolveQuadraticEqn(IrtRType A, IrtRType B, IrtRType *Sols)
Description:
Computes the solutions, if any, of the given quadratic equation. Only
real solutions are considered.
Parameters:
A, B: | The equation's coefficients as x^2 + A x + B = 0.
|
---|
Sols: | Where to place the solutions. At most two.
|
---|
Returned Value:
int: Number of real solutions.
|
---|
See Also:
GMSolveCubicEqn
GMSolveCubicEqn2
GMSolveQuadraticEqn2
GMSolveQuarticEqn
Keywords:
(geom_bsc.c:3296)
Prototype:
int GMSolveQuadraticEqn2(IrtRType B,
IrtRType C,
IrtRType *RSols,
IrtRType *ISols)
Description:
Calculates the two square roots of the quadratic equation:
x^2 + Bx + C = 0
Parameters:
B, C: | The coefficients of the quadratic polynomial.
|
---|
RSols, ISols: | olutions such that each pair RSols[i], ISols[i] is the
complex root(i).
|
---|
Returned Value:
int: The number of REAL solutions of the polynomial.
|
---|
See Also:
GMSolveCubicEqn
GMSolveCubicEqn2
GMSolveQuadraticEqn
GMSolveQuarticEqn
Keywords:
(geom_bsc.c:3666)
Prototype:
int GMSolveQuarticEqn(IrtRType a,
IrtRType b,
IrtRType c,
IrtRType d,
IrtRType *Sols)
Description:
Computes the (upto) four real roots of the quartic equation
x^4 + Ax^3 + Bx^2 + Cx + D = 0
Note 1
------
In order to avoid building a library for complex numbers arithmetics, two
arrays are used ISols[] and RSols[], where each RSols[i] and ISols[i],
represent a complex number, and so calculation where made on the fly;
Anyway, some of these calculations where performed in a specific way to
reduce errors of double-precision nature. (especially calculating square
roots of complex numbers).
Note 2.
----------
In the case of Cubic and Quadratic equations, the number of real solutions
is determined via the value of D (the descrimenant); As such, the number
of real solutions is easier to depict.
However, Euler's solution for quartic equations manipulates all the
three solutions of the cubic (real and complex), hoping to find some real
roots by eliminating the imaginary part of the complex solutions.
This, however, is a weakness of dependency upon the accuracy of the
numbers' representation as a double-precision floating point.
Parameters:
a, b, c, d: | The coefficients of the quartic polynomial.
|
---|
Sols: | The real roots of the polynomial.
|
---|
Returned Value:
int: The number of REAL solutions of the polynomial.
|
---|
See Also:
GMSolveCubicEqn
GMSolveCubicEqn2
GMSolveQuadraticEqn
GMSolveQuadraticEqn2
Keywords:
(sph_cone.c:455)
Prototype:
const IrtVecType *GMSphConeGetPtsDensity(int *n)
Description:
Returns unit vectors on the unit sphere spread uniformly, in a number
that closely approximate given n.
Parameters:
n: | Number of pts to be distributed on the sphere (approximately).
n will be updated to the actual size of the returned vector of
unit vectors.
|
---|
Returned Value:
const IrtVecType *: A vector of ~n unit vectors equally spead over the
unit sphere.
|
---|
See Also:
GMSphConeSetConeDensity
Keywords:
(sph_cone.c:688)
Prototype:
void GMSphConeQuery2GetVectors(VoidPtr SphConePtr,
GMSphConeQueryDirFuncType SQQuery,
GMSphConeQueryCallBackFuncType SQFunc)
Description:
Invokes SQFunc with all vectors in the preprocessed data set that the
cone containing them satisfy the query function SQQuery.
Each such vector is guaranteed to be invoked once only.
Parameters:
SphConePtr: | Processed data struct for efficient Direction querying.
|
---|
SQQuery: | Query function to invoke.
|
---|
SQFunc: | Function to invoke on detected elements.
|
---|
Returned Value:
See Also:
GMSphConeQueryInit
GMSphConeQueryFree
GMSphConeSetConeDensity
GMSphConeQuery2GetVectors
Keywords:
(sph_cone.c:589)
Prototype:
void GMSphConeQueryFree(VoidPtr SphConePtr)
Description:
Release all data allocated by GMSphConeQueryInit function.
Parameters:
SphConePtr: | Cone data structure to free.
|
---|
Returned Value:
See Also:
GMSphConeQueryInit
GMSphConeQueryGetVectors
GMSphConeSetConeDensity
Keywords:
(sph_cone.c:628)
Prototype:
void GMSphConeQueryGetVectors(VoidPtr SphConePtr,
IrtVecType Dir,
IrtRType Angle,
GMSphConeQueryCallBackFuncType SQFunc)
Description:
Invokes SQFunc with all vectors in the preprocessed data set that are
at most Angle degrees for the prescibed Dir. Each such vector is
guaranteed to be invoked once only.
Parameters:
SphConePtr: | Processed data struct for efficient Direction querying.
|
---|
Dir: | Direction to query.
|
---|
Angle: | Angular span to query.
|
---|
SQFunc: | Function to invoke on detected elements.
|
---|
Returned Value:
See Also:
GMSphConeQueryInit
GMSphConeQueryFree
GMSphConeSetConeDensity
GMSphConeQuery2GetVectors
Keywords:
(sph_cone.c:490)
Prototype:
VoidPtr GMSphConeQueryInit(IPObjectStruct *PObj, int n)
Description:
Proeprocess the given set of points into the different bounding cones of
the unit sphere.
Parameters:
PObj: | A point list object to preprocess.
|
---|
n: | Number of cones to distribute on the sphere (approximately).
|
---|
Returned Value:
VoidPtr: Processed data structure for fast cone queries.
|
---|
See Also:
GMSphConeQueryFree
GMSphConeQueryGetVectors
GMSphConeSetConeDensity
Keywords:
(ms_spher.c:300)
Prototype:
int GMSphereWith3Pts(IrtE3PtStruct *Pts, IrtRType *Center, IrtRType *RadiusSqr)
Description:
Given three points, compute the sphere through the set of points.
Initially, the three points are rotated to a plane paraellel to XY-plane
and then using GMCircleFrom3Points, the circle through them is computed.
The center is then rotated back to form the center of the sphere in 3D.
Parameters:
Pts: | The set of point to compute their sphere.
|
---|
Center: | Of computed sphere.
|
---|
RadiusSqr: | Of computed Sphere.
|
---|
Returned Value:
int: TRUE if successful, FALSE otherwise.
|
---|
See Also:
GMCircleFrom3Points
Keywords:
(ms_spher.c:359)
Prototype:
int GMSphereWith4Pts(IrtE3PtStruct *Pts, IrtRType *Center, IrtRType *RadiusSqr)
Description:
Given four points, compute the sphere through the set of points.
It is identified by solving the following equidistant conditions.
< P - P1, P - P1 > = < P - P2, P - P2 >,
< P - P1, P - P1 > = < P - P3, P - P3 >,
< P - P1, P - P1 > = < P - P4, P - P4 >,
or,
2(P2 - P1) P = P2^2 - P1^2,
2(P3 - P1) P = P3^2 - P1^2,
2(P4 - P1) P = P4^2 - P1^2.
We can solve for P (the sphere's center) using the Cramer's rule.
Parameters:
Pts: | The set of point to compute their sphere.
|
---|
Center: | Of computed sphere.
|
---|
RadiusSqr: | Of computed Sphere.
|
---|
Returned Value:
int: TRUE if successful, FALSE otherwise.
|
---|
See Also:
GMMinSpanSphere
Keywords:
(convex.c:573)
Prototype:
IPPolygonStruct *GMSplitNonConvexPoly(IPPolygonStruct *Pl,
int HandleNormals)
Description:
Routine to split non convex polygon into a list of convex ones.
1. Search for non convex corner. If not found stop - polygon is convex.
Otherwise let the non convex corner found be V(i).
2. Fire a ray from V(i) in the opposite direction to V(i-1). Find the
closest intersection of the ray with polygon boundary P.
3. Split the polygon into two at V(i)-P edge and push the two new polygons
on the GlblList.
4. Goto 1.
Parameters:
Pl: | Non convex polygon to split into convex ones.
|
---|
HandleNormals: | TRUE to also handle normals.
|
---|
Returned Value:
IPPolygonStruct *: A list of convex polygons resulting from splitting
up Pl.
|
---|
See Also:
GMConvertPolysToTriangles
GMConvexPolyObject
GMConvexPolyObjectN
GMIsConvexPolygon
Keywords:
convexity
convex polygon
(poly_pts.c:1522)
Prototype:
IPPolygonStruct *GMSplitPolyInPlaceAt2Vertices(IPPolygonStruct *Pl,
IPVertexStruct *V1,
IPVertexStruct *V2)
Description:
Splits the given convex polygon, in place, into two, returning second
half of the polygon while updating Pl to hold the first half.
Parameters:
Pl: | Convex polygon to split into two.
|
---|
V1: | First Vertex to split Pl at.
|
---|
V2: | Second Vertex to split Pl at.
|
---|
Returned Value:
IPPolygonStruct *: The second half of the splitted polygon (first half
is returned, in place, in Pl).
This function returns a NULL if split failed due to
the fact that the polygon degenerated into a line.
Pl is not affected if NULL is returned.
The second polygon is added as next to the first
polygon.
|
---|
See Also:
GMSplitPolyInPlaceAtVertex
Keywords:
(poly_pts.c:1446)
Prototype:
IPPolygonStruct *GMSplitPolyInPlaceAtVertex(IPPolygonStruct *Pl,
IPVertexStruct *VHead)
Description:
Splits the given convex polygon, in place, into two, returning second
half of the polygon while updating Pl to hold the first half.
Polygon is split so that VHead is on border between the two polygons.
Parameters:
Pl: | Convex polygon to split into two.
|
---|
VHead: | Vertex to split Pl at.
|
---|
Returned Value:
IPPolygonStruct *: The second half of the splitted polygon (first half
is returned, in place, in Pl).
This function returns a NULL if split failed due to
the fact that the polygon degenerated into a line.
Pl is not affected if NULL is returned.
|
---|
See Also:
GMSplitPolyInPlaceAt2Vertices
Keywords:
(geom_bsc.c:1723)
Prototype:
int GMSplitPolygonAtPlane(IPPolygonStruct *Pl, const IrtPlnType Pln)
Description:
Split the given convex polygon where it intersects the given plane.
Pl is updated to in inside potion (where the normal is point into) and
Pl -> Pnext will hold the second half.
Parameters:
Pl: | Polygon to split if interestes plane Pln.
|
---|
Pln: | Plane to split polygon Pl at. Assumed normalized
normal vector in Pln.
|
---|
Returned Value:
int: TRUE if intersects, FALSE otherwise.
|
---|
See Also:
GMPolygonRayInter
GMPolygonPlaneInter
Keywords:
(poly_pts.c:1372)
Prototype:
IPPolygonStruct *GMSplitPolysAtCollinearVertices(IPPolygonStruct *Pls)
Description:
Splits the given polygons in vertices that connect two adjacent
collinear edges.
Polygons are assumed convex other than this collinearity conditions.
Parameters:
Pls: | List of polygons to split at collinear edges.
|
---|
Returned Value:
IPPolygonStruct *: New list of polygons with no collinear adjacent edges.
|
---|
Keywords:
(analyfit.c:48)
Prototype:
IrtPtType *GMSrfBilinearFit(IrtPtType *ParamDomainPts,
IrtPtType *EuclideanPts,
int FirstAtOrigin,
int NumPts,
IrtPtType *FitPts)
Description:
Fits a bilinear surface to the set of given points as
F(u,v) = A + B * u + C * v + D * u * v, A,B,C,D points in R^3.
Parameters:
ParamDomainPts: | Array of UV points prescribing the parametric values.
|
---|
EuclideanPts: | Array of XYZ points defining the Euclidean values of
the ParamDomainPts with obviously the same order.
|
---|
FirstAtOrigin: | If TRUE, the first points is set to be at U = V = 0.
|
---|
NumPts: | Number of points in ParamDomainPts and EuclideanPts.
|
---|
FitPts: | Array of four points values, A, B, C, D.
Will hold the returned value.
|
---|
Returned Value:
IrtPtType *: Array of four points values, A, B, C, D. Same as Fit Pts.
|
---|
See Also:
GMSrfQuadricFit
Keywords:
(analyfit.c:345)
Prototype:
IrtPtType *GMSrfCubicQuadOnly(IrtPtType *ParamDomainPts,
IrtPtType *EuclideanPts,
int FirstAtOrigin,
int NumEucDim,
int NumPts,
IrtPtType *CubicData)
Description:
Fits a cubic surface (cubic and quad terms only) to the set of given
points as
F(u,v) = A + B * u + C * v + D * u^2 + E * u * v + F * v^2 +
G * u^3 + H * u^2 * v + I * u * v^2 + J * v^3,
A,B,C,D,E,F,G,H,I,J points in R^3.
Parameters:
ParamDomainPts: | Array of UV points prescribing the parametric values.
|
---|
EuclideanPts: | Array of XYZ points defining the Euclidean values of
the ParamDomainPts with obviously the same order.
|
---|
FirstAtOrigin: | If TRUE, the first points is set to be at U = V = 0.
|
---|
NumEucDim: | Number of Euclidean dimension. 1 for scalar surface and
up to 3 for parametric surface in R^3.
|
---|
NumPts: | Number of points in ParamDomainPts and EuclideanPts.
|
---|
CubicData: | The fitted cubic data. Should be given as a vector of
10 reals.
|
---|
Returned Value:
IrtPtType *: Array of 10 point values,
A,B,C,D,E,F,G,H,I,J in order,
where A = B = C = 0 always. Same as CubicData.
|
---|
See Also:
GMSrfBilinearFit
GMSrfQuadricFit
GMSrfQuadricQuadOnly
Keywords:
(analyfit.c:142)
Prototype:
IrtPtType *GMSrfQuadricFit(IrtPtType *ParamDomainPts,
IrtPtType *EuclideanPts,
int FirstAtOrigin,
int NumPts,
IrtPtType *FitPts)
Description:
Fits a quadric surface to the set of given points as
F(u,v) = A + B * u + C * v + D * u * u + E * u * v + F * v * v,
A,B,C,D,E,F points in R^3.
Parameters:
ParamDomainPts: | Array of UV points prescribing the parametric values.
|
---|
EuclideanPts: | Array of XYZ points defining the Euclidean values of
the ParamDomainPts with obviously the same order.
|
---|
FirstAtOrigin: | If TRUE, the first points is set to be at U = V = 0.
|
---|
NumPts: | Number of points in ParamDomainPts and EuclideanPts.
|
---|
FitPts: | Array of six point values, A,B,C,D,E,F in order.
Will hold the returned value.
|
---|
Returned Value:
IrtPtType *: Array of six point values, A,B,C,D,E,F in order.
Same as Fit Pts.
|
---|
See Also:
GMSrfBilinearFit
GMSrfQuadricQuadOnly
GMSrfCubicQuadOnly
Keywords:
(analyfit.c:242)
Prototype:
IrtPtType *GMSrfQuadricQuadOnly(IrtPtType *ParamDomainPts,
IrtPtType *EuclideanPts,
int FirstAtOrigin,
int NumEucDim,
int NumPts,
IrtPtType *QuadData)
Description:
Fits a quadric surface (quad terms only) to the set of given points as
F(u,v) = A + B * u + C * v + D * u * u + E * u * v + F * v * v,
A,B,C,D,E,F points in R^3.
Parameters:
ParamDomainPts: | Array of UV points prescribing the parametric values.
|
---|
EuclideanPts: | Array of XYZ points defining the Euclidean values of
the ParamDomainPts with obviously the same order.
|
---|
FirstAtOrigin: | If TRUE, the first points is set to be at U = V = 0.
|
---|
NumEucDim: | Number of Euclidean dimension. 1 for scalar surface and
up to 3 for parametric surface in R^3.
|
---|
NumPts: | Number of points in ParamDomainPts and EuclideanPts.
|
---|
QuadData: | The returned fitted quadratic data. Should be given as
a vector of 6 reals.
|
---|
Returned Value:
IrtPtType *: Array of 6 point values,
A,B,C,D,E,F in order,
where A = B = C = 0 always. Same as QuadData.
|
---|
See Also:
GMSrfBilinearFit
GMSrfQuadricFit
GMSrfCubicQuadOnly
Keywords:
(sbdv_srf.c:156)
Prototype:
IPObjectStruct *GMSubButterfly(const IPObjectStruct *OriginalObj,
IrtRType ButterflyWCoef)
Description:
Refines a polygonal object according to Butterfly subdivision rules.
One iteration is performed.
Parameters:
OriginalObj: | A pointer to the original polygonal object.
|
---|
ButterflyWCoef: | he scalar butterfly blending coefficient.
|
---|
Returned Value:
IPObjectStruct *: pointer to refined polygonal object after subdivision.
|
---|
Keywords:
(sbdv_srf.c:102)
Prototype:
IPObjectStruct *GMSubCatmullClark(const IPObjectStruct *OriginalObj)
Description:
Refines a polygonal object according to Catmull-Clark subdivision rules.
One iteration is performed.
Parameters:
OriginalObj: | A pointer to the original polygonal object.
|
---|
Returned Value:
IPObjectStruct *: Pointer to refined polygonal object after subdivision.
|
---|
Keywords:
(sbdv_srf.c:128)
Prototype:
IPObjectStruct *GMSubLoop(const IPObjectStruct *OriginalObj)
Description:
Refines a polygonal object according to Loop subdivision rules.
One iteration is performed.
Parameters:
OriginalObj: | A pointer to the original polygonal object.
|
---|
Returned Value:
IPObjectStruct *: Pointer to refined polygonal object after subdivision.
|
---|
Keywords:
(geomat3d.c:402)
Prototype:
GMTransObjUpdateAnimCrvsFuncType GMTransObjSetAnimCrvUpdateFunc(
GMTransObjUpdateAnimCrvsFuncType AnimUpdateFunc)
Description:
Sets the function to update the animation curves to work properly after
the applied transformation Mat to the parent object whose PAnim are his.
Parameters:
AnimUpdateFunc: | New animation crvs update function for obj transform.
|
---|
Returned Value:
GMTransObjUpdateAnimCrvsFuncType: Old function
|
---|
See Also:
GMTransformObject
GMTransObjSetUpdateFunc
GMTransObjUpdateAnimCrvs
Keywords:
(geomat3d.c:371)
Prototype:
GMTransObjUpdateFuncType GMTransObjSetUpdateFunc(GMTransObjUpdateFuncType
UpdateFunc)
Description:
Set the update transform call back function to a new function. This
call back function is invoked with the original object, the transformed
object and the transformation matrix, just before GMTransformObject is
returned.
Parameters:
UpdateFunc: | New call back function for GMTransformObject
|
---|
Returned Value:
GMTransObjUpdateFuncType: Old value of call back function.
|
---|
See Also:
GMTransformObject
GMTransObjSetAnimCrvUpdateFunc
Keywords:
(geomat3d.c:670)
Prototype:
IPObjectStruct *GMTransObjUpdateAnimCrvs(IPObjectStruct *PAnim,
IrtHmgnMatType Mat)
Description:
Update the animation curves to work properly after the applied
transformation Mat to the parent object whose PAnim are his.
Parameters:
PAnim: | Animation curves to update following transformation matrix Mat.
|
---|
Mat: | The transformation matrix.
|
---|
Returned Value:
IPObjectStruct *: The updated animation curves' list.
|
---|
See Also:
GMTransformObject
Keywords:
transformations
(geomat3d.c:464)
Prototype:
IPObjectStruct *GMTransformObject(const IPObjectStruct *PObj,
IrtHmgnMatType Mat)
Description:
Routine to transform an object according to the transformation matrix.
Parameters:
PObj: | Object to be transformed.
|
---|
Mat: | Transformation matrix.
|
---|
Returned Value:
IPObjectStruct *: Transformed object.
|
---|
See Also:
GMTransObjUpdateAnimCrvs
GMTransObjSetUpdateFunc
GMTransformPolyList
GMTransformObjectInPlace
Keywords:
transformations
(geomat3d.c:435)
Prototype:
IPObjectStruct *GMTransformObjectInPlace(IPObjectStruct *PObj,
IrtHmgnMatType Mat)
Description:
Routine to transform an object according to the transformation matrix.
Input object, PObj, is freed.
Parameters:
PObj: | Object to be transformed.
|
---|
Mat: | Transformation matrix.
|
---|
Returned Value:
IPObjectStruct *: Transformed object.
|
---|
See Also:
GMTransObjUpdateAnimCrvs
GMTransObjSetUpdateFunc
GMTransformPolyList
GMTransformObject
Keywords:
transformations
(geomat3d.c:739)
Prototype:
IPObjectStruct *GMTransformObjectList(const IPObjectStruct *PObj,
IrtHmgnMatType Mat)
Description:
Routine to transform an list of objects according to a transformation
matrix.
Parameters:
PObj: | Object list to transform.
|
---|
Mat: | Transformation matrix.
|
---|
Returned Value:
IPObjectStruct *: Transformed object list.
|
---|
Keywords:
transformations
(geomat3d.c:294)
Prototype:
IPPolygonStruct *GMTransformPolyList(const IPPolygonStruct *Pls,
IrtHmgnMatType Mat,
int IsPolygon)
Description:
Routine to transform a list of polygons according to the prescribed
transformation matrix.
Parameters:
Pls: | List of polygons to transform.
|
---|
Mat: | Transformation matrix.
|
---|
IsPolygon: | RUE for polygons, for for polylines/points.
|
---|
Returned Value:
IPPolygonStruct *: A list of transformed polygons.
|
---|
See Also:
GMTransformObject
Keywords:
(geom_bsc.c:1841)
Prototype:
int GMTrianglePointInclusion(const IrtRType *V1,
const IrtRType *V2,
const IrtRType *V3,
const IrtPtType Pt)
Description:
Routine to check if a point is inside a triangle, in the XY plane.
Parameters:
V1, V2, V3: | riangle to test if Pt is in it.
|
---|
Pt: | Point to test for inclusion in triangle.
|
---|
Returned Value:
int: TRUE if Pt inside triangle, FALSE otherwise.
|
---|
See Also:
GMPolygonPointInclusion
GMPolygonPlaneInter
GMPolygonRayInter
Keywords:
point inclusion
(poly_tri.c:385)
Prototype:
IPPolygonStruct *GMTriangulatePolygon(const CagdPolylineStruct *Pl)
Description:
Triangulates a closed polygon. The triangulation based on the paper:
Klincsek, G.T. (1980), Minimal triangulations of polygonal domains,
Annals of Discrete Mathematics 9, 121-123
The used weight function is:
0.75 * TriangleArea + 0.05 * TrianglePerimeter +
0.10 * EdgesMaxMinRatio + 0.10 * AnglesMaxMinRatio
Parameters:
Pl: | polygon to triangulate.
|
---|
Returned Value:
IPPolygonStruct *: List of triangles.
|
---|
See Also:
GMTriangulatePolygon2
Keywords:
(poly_tri.c:469)
Prototype:
IPPolygonStruct *GMTriangulatePolygon2(const IPPolygonStruct *Pl)
Description:
Triangulates a closed polygon. The triangulation based on minimum weight
triangulation(https://en.wikipedia.org/wiki/Minimum-weight_triangulation)
The used weight function is:
0.75 * TriangleArea + 0.05 * TrianglePerimeter +
0.10 * EdgesMaxMinRatio + 0.10 * AnglesMaxMinRatio
Parameters:
Pl: | polygon to triangulate.
|
---|
Returned Value:
IPPolygonStruct *: List of triangles.
|
---|
See Also:
GMTriangulatePolygon
GMConvertPolysToTriangles
Keywords:
(poly_tri.c:501)
Prototype:
IPPolygonStruct *GMTriangulatePolygonList(const IPPolygonStruct *PlgnList)
Description:
Triangulates a closed polygon. The triangulation based on minimum weight
triangulation(https://en.wikipedia.org/wiki/Minimum-weight_triangulation)
The used weight function is:
0.75 * TriangleArea + 0.05 * TrianglePerimeter +
0.10 * EdgesMaxMinRatio + 0.10 * AnglesMaxMinRatio
Parameters:
PlgnList: | polygon list to triangulate.
|
---|
Returned Value:
IPPolygonStruct *: List of triangles.
|
---|
See Also:
GMConvertPolysToTriangles
GMTriangulatePolygon2
Keywords:
(poly_cln.c:42)
Prototype:
int GMTwoPolySameGeom(const IPPolygonStruct *Pl1,
const IPPolygonStruct *Pl2,
IrtRType Eps)
Description:
Compare two polygons if share the same geometry. Two polygons are
considered same if the share the same vertices in order (or in reverse).
Parameters:
Pl1, Pl2: | Two polygons to compare.
|
---|
Eps: | Tolerance of vertices equality, etc.
|
---|
Returned Value:
int: TRUE if two polygons posses same geometry, FALSE otherwise.
|
---|
See Also:
GMCleanUpDupPolys
Keywords:
(intrnrml.c:77)
Prototype:
void GMUpdateVerticesByInterp(IPPolygonStruct *PlList,
const IPPolygonStruct *OriginalPl)
Description:
For each polygon in PlList update any vertex with a proper normal, uv
uv coord, rgb color, etc. if available in the Original polygon vertex list
OriginalPl.
All the new vertices are enclosed within the original polygon which
must be convex as well.
Parameters:
PlList: | List of polygons to update normal for.
|
---|
OriginalPl: | Original polygons PlList was derived from, probably using
Boolean operations.
|
---|
Returned Value:
See Also:
GMBlendNormalsToVertices
GMInterpVrtxNrmlBetweenTwo
GMInterpVrtxNrmlBetweenTwo2
GMInterpVrtxNrmlFromPl
GMInterpVrtxRGBBetweenTwo
GMInterpVrtxRGBFromPl
GMInterpVrtxUVBetweenTwo
GMInterpVrtxUVFromPl
Keywords:
normals
uv coords
rgb color
(geom_bsc.c:88)
Prototype:
void GMVecCopy(IrtVecType Vdst, const IrtVecType Vsrc)
Description:
Routine to copy one vector to another:
Parameters:
Vdst: | Destination vector.
|
---|
Vsrc: | Source vector.
|
---|
Returned Value:
Keywords:
copy
(geom_bsc.c:207)
Prototype:
void GMVecCrossProd(IrtVecType Vres,
const IrtVecType V1,
const IrtVecType V2)
Description:
Routine to compute the cross product of two vectors.
Note Vres may be the same as V1 or V2.
Parameters:
Vres: | Result of cross product
|
---|
V1, V2: | Two vectors of the cross product.
|
---|
Returned Value:
Keywords:
cross prod
(geom_bsc.c:515)
Prototype:
IrtRType GMVecDotProd(const IrtVecType V1, const IrtVecType V2)
Description:
Routine to compute the dot product of two vectors.
Parameters:
V1, V2: | Two vector to compute dot product of.
|
---|
Returned Value:
IrtRType: Resulting dot product.
|
---|
Keywords:
GMVecDotProdLen
dot product
(geom_bsc.c:534)
Prototype:
IrtRType GMVecDotProdLen(const IrtRType *V1, const IrtRType *V2, int Len)
Description:
Routine to compute the dot product of two vectors of length Len.
Parameters:
V1, V2: | Two vector to compute dot product of.
|
---|
Len: | Length of vectors.
|
---|
Returned Value:
IrtRType: Resulting dot product.
|
---|
Keywords:
GMVecDotProd
dot product
(geom_bsc.c:131)
Prototype:
IrtRType GMVecLength(const IrtVecType V)
Description:
Routine to compute the magnitude (length) of a given 3D vector:
Parameters:
V: | To compute its magnitude.
|
---|
Returned Value:
IrtRType: Magnitude of V.
|
---|
Keywords:
magnitude
(geom_bsc.c:179)
Prototype:
int GMVecMaxAbsValueIndex(const IrtVecType V)
Description:
Routine to compute the axis in vector with the largest absolute value.
Parameters:
V: | To compute its maximal axis.
|
---|
Returned Value:
See Also:
GMVecMinAbsValueIndex
Keywords:
magnitude
(geom_bsc.c:152)
Prototype:
int GMVecMinAbsValueIndex(const IrtVecType V)
Description:
Routine to compute the axis in vector with the smallest absolute value.
Parameters:
V: | To compute its minimal axis.
|
---|
Returned Value:
See Also:
GMVecMaxAbsValueIndex
Keywords:
magnitude
(geom_bsc.c:106)
Prototype:
void GMVecNormalize(IrtVecType V)
Description:
Routine to normalize the vector length to a unit size.
Parameters:
Returned Value:
Keywords:
normalize
(geom_bsc.c:561)
Prototype:
void GMVecReflectPlane(IrtVecType Dst, IrtVecType Src, IrtVecType PlaneNormal)
Description:
Reflects a 3D vector through a plane with normal PlaneNormal
Parameters:
Dst: | Reflected vector.
|
---|
Src: | Input Vector to reflect.
|
---|
PlaneNormal: | Normal of plane (through origin) to reflect Src through.
|
---|
Returned Value:
Keywords:
(geom_bsc.c:285)
Prototype:
IrtRType GMVecVecAngle(const IrtVecType V1, const IrtVecType V2, int Normalize)
Description:
Computes the angle between two space vectors.
Angle is returned in radians in the domain of [-Pi, +Pi].
Parameters:
V1, V2: | Vectors to compute their relative angle, in radians.
|
---|
Normalize: | RUE if vectors need normalization first, FALSE if unit size.
|
---|
Returned Value:
See Also:
GMAreaSphericalTriangle
Keywords:
(geom_bsc.c:861)
Prototype:
int GMVectorFromVectorPlane(const IrtVecType Vec,
const IrtVecType PlaneN,
IrtPtType ProjVec)
Description:
Compute the normalized projection of a vector onto a plane. Only the
normal direction of the plane id used. This function is invariant to
translation of the plane in Euclidean space.
Parameters:
Vec: | Vector for which find projection onto Plane.
|
---|
PlaneN: | On which to project Vec.
|
---|
ProjVec: | The projection of Vec onto Plane, as a normalized vector.
|
---|
Returned Value:
int: TRUE, if successful.
|
---|
See Also:
GMPointFromPointPlane
Keywords:
(poly_cln.c:423)
Prototype:
IPPolygonStruct *GMVerifyPolygonsPlanarity(IPPolygonStruct *Pls, IrtRType Tol)
Description:
Scans all input polygons and split any non coplanar polygons into
triangles.
Parameters:
Pls: | Polygons to scan and modify, if necessary, in place.
|
---|
Tol: | Of planarity verification.
|
---|
Returned Value:
IPPolygonStruct *: Refined list with no coplanar polygons.
|
---|
Keywords:
(poly_cln.c:474)
Prototype:
void GMVrtxListToCircOrLin(IPPolygonStruct *Pls, int DoCirc)
Description:
Routine to make sure all polys given are circular/linear. Update in
place.
Parameters:
Pls: | List of polys to make sure are circular/linear, in place.
|
---|
DoCirc: | f TRUE, list are made circular. If FALSE, vertices are NULL
terminated.
|
---|
Returned Value:
See Also:
GMCleanUpPolylineList
GMCleanUpPolygonList
GMFilterInteriorVertices
GMVrtxListToCircOrLinDup
IPOpenPolysToClosed
IPClosedPolysToOpen
IPSetPolyListCirc
Keywords:
circular lists
(poly_cln.c:513)
Prototype:
void GMVrtxListToCircOrLinDup(IPPolygonStruct *Pls, int DoCirc)
Description:
Routine to make sure all polys given are circular/linear. Update in
place.
If circular and made linear, first vertex is duplicated as last and same
when linear is made circular.
Parameters:
Pls: | List of polys to make sure are circular/linear, in place.
|
---|
DoCirc: | f TRUE, list are made circular. If FALSE, vertices are NULL
terminated.
|
---|
Returned Value:
See Also:
GMCleanUpPolylineList
GMCleanUpPolygonList
GMFilterInteriorVertices
GMVrtxListToCircOrLin
IPOpenPolysToClosed
IPClosedPolysToOpen
Keywords:
circular lists
(zbuffer.c:129)
Prototype:
void GMZBufferClear(VoidPtr ZbufferID)
Description:
Clears the Z buffer to initialization state.
Parameters:
ZbufferID: | ID of the zbuffer to use.
|
---|
Returned Value:
See Also:
GMZBufferClearSet
Keywords:
(zbuffer.c:171)
Prototype:
void GMZBufferClearSet(VoidPtr ZbufferID, IrtRType Depth)
Description:
Clears the Z buffer to initialization state of depth value Depth.
Parameters:
ZbufferID: | ID of the zbuffer to use.
|
---|
Depth: | Initial depth to use.
|
---|
Returned Value:
See Also:
GMZBufferClear
Keywords:
(zbuffer.c:97)
Prototype:
void GMZBufferFree(VoidPtr ZbufferID)
Description:
Free the given Zbuffer.
Parameters:
ZbufferID: | ID of the zbuffer to free.
|
---|
Returned Value:
Keywords:
(zbuffer.c:60)
Prototype:
VoidPtr GMZBufferInit(int Width, int Height)
Description:
Sets up the Zbuffer software implementation.
Parameters:
Width, Height: | idth and Height of the Z buffer.
|
---|
Returned Value:
VoidPtr: An I.D. of the constructed Z buffer.
|
---|
Keywords:
(zbuffer.c:296)
Prototype:
VoidPtr GMZBufferInvert(VoidPtr ZbufferID)
Description:
Invert the depth values. That is z -> -z.
Parameters:
ZbufferID: | ID of the zbuffer to use.
|
---|
Returned Value:
VoidPtr: An I.D. of the constructed Z buffer.
|
---|
Keywords:
(zbuffer.c:365)
Prototype:
VoidPtr GMZBufferLaplacian(VoidPtr ZbufferID)
Description:
Apply a Laplacian operator to the Z buffer.
Parameters:
ZbufferID: | ID of the zbuffer to use.
|
---|
Returned Value:
VoidPtr: An I.D. of the constructed Z buffer.
|
---|
Keywords:
(zbuf_ogl.c:805)
Prototype:
void GMZBufferOGLClear(void)
Description:
Clears the Z buffer to initialization state.
Parameters:
Returned Value:
Keywords:
(zbuf_ogl.c:972)
Prototype:
void GMZBufferOGLFlush(void)
Description:
Make sure all drawing commands are flushed and we are in sync.
Parameters:
Returned Value:
Keywords:
(zbuf_ogl.c:603)
Prototype:
IritIntPtrSizeType GMZBufferOGLInit(int Width,
int Height,
IrtRType ZMin,
IrtRType ZMax,
int OffScreen)
Description:
Sets up the Zbuffer implementation. This one is employing Open GL.
Parameters:
Width, Height: | idth and Height of the Z buffer.
|
---|
ZMin, ZMax: | Z domain that the Z buffer will have to support.
|
---|
OffScreen: | Z buffer should be hidden (TRUE) or displayed (FALSE).
|
---|
Returned Value:
IritIntPtrSizeType: An I.D. of the constructed Z buffer.
|
---|
Keywords:
(zbuf_ogl.c:860)
Prototype:
void GMZBufferOGLMakeActive(IritIntPtrSizeType Id)
Description:
Make active context. Once this function called drawing commands may be
issued. Here, the drawing commands are in Open GL. Necessary only if
other Open GL applications are active simultaneously.
Parameters:
Id: | I.D. of the Zbuffer to activate.
|
---|
Returned Value:
Keywords:
(zbuf_ogl.c:943)
Prototype:
void GMZBufferOGLQueryColor(IrtRType x,
IrtRType y,
int *Red,
int *Green,
int *Blue)
Description:
Returns the color at the given location in the Zbuffer.
Parameters:
x, y: | The XY coordinates of the point to consider for color.
|
---|
Red, Green, Blue: | he color specifications.
|
---|
Returned Value:
See Also:
GMZBufferOGLQueryZ
Keywords:
(zbuf_ogl.c:891)
Prototype:
IrtRType GMZBufferOGLQueryZ(IrtRType x, IrtRType y)
Description:
Returns depth at the given location in the Zbuffer.
Parameters:
x, y: | The XY coordinates of the point to consider for visibility.
|
---|
Returned Value:
IrtRType: The depth found at that XY location.
|
---|
See Also:
GMZBufferOGLQueryColor
Keywords:
(zbuf_ogl.c:836)
Prototype:
void GMZBufferOGLSetColor(int Red, int Green, int Blue)
Description:
Sets the colors of all drawing operations to come.
Parameters:
Red, Green, Blue: | The color specifications, each between 0 and 255.
|
---|
Returned Value:
Keywords:
(zbuffer.c:442)
Prototype:
VoidPtr GMZBufferQueryInfo(VoidPtr ZbufferID, int x, int y)
Description:
Returns the user information at the given location in the Zbuffer.
Parameters:
ZbufferID: | ID of the zbuffer to use.
|
---|
x, y: | The XY coordinates of the point to consider its info.
|
---|
Returned Value:
VoidPtr: The pointer to the user infromation at that XY location.
|
---|
Keywords:
(zbuffer.c:417)
Prototype:
IrtRType GMZBufferQueryZ(VoidPtr ZbufferID, int x, int y)
Description:
Returns depth at the given location in the Zbuffer.
Parameters:
ZbufferID: | ID of the zbuffer to use.
|
---|
x, y: | The XY coordinates of the point to consider its depth.
|
---|
Returned Value:
IrtRType: The depth found at that XY location.
|
---|
Keywords:
(zbuffer.c:326)
Prototype:
VoidPtr GMZBufferRoberts(VoidPtr ZbufferID)
Description:
Apply a Roberts Edge detection operator to the Z buffer.
Parameters:
ZbufferID: | ID of the zbuffer to use.
|
---|
Returned Value:
VoidPtr: An I.D. of the constructed Z buffer.
|
---|
Keywords:
(zbuffer.c:271)
Prototype:
GMZBufferUpdateFuncType GMZBufferSetUpdateFunc(VoidPtr ZbufferID,
GMZBufferUpdateFuncType
UpdateFunc)
Description:
Sets a call back function for each pixel update in the Z buffer.
Parameters:
ZbufferID: | ID of the zbuffer to use.
|
---|
UpdateFunc: | The call back function to invote for each pixel that is
updated in the Z buffer.
|
---|
Returned Value:
GMZBufferUpdateFuncType: Old call back function
|
---|
Keywords:
(zbuffer.c:242)
Prototype:
GMZTestsType GMZBufferSetZTest(VoidPtr ZbufferID, GMZTestsType ZTest)
Description:
Sets the Z testing option with the assumption that largers Z values
mean closers to the viewer.
Parameters:
ZbufferID: | ID of the zbuffer to use.
|
---|
ZTest: | The new Z test to consider.
|
---|
Returned Value:
GMZTestsType: The old Z test used.
|
---|
Keywords:
(zbuffer.c:548)
Prototype:
void GMZBufferUpdateHLn(VoidPtr ZbufferID,
int x1,
int x2,
int y,
IrtRType z1,
IrtRType z2)
Description:
Set the depth for all points on a given horizontal line in the Zbuffer.
Parameters:
ZbufferID: | ID of the zbuffer to use.
|
---|
x1, x2, y: | The XY coordinates of the points on the horizontal line.
|
---|
z1, z2: | The new z's to set into the z buffer, if larger (==closer).
|
---|
Returned Value:
See Also:
GMZBufferUpdatePt
GMZBufferUpdateTri
GMZBufferUpdateLine
Keywords:
(zbuffer.c:510)
Prototype:
VoidPtr GMZBufferUpdateInfo(VoidPtr ZbufferID, int x, int y, VoidPtr Info)
Description:
Set new user information at the given location in the Zbuffer.
This update always affects the Z buffer regardless of the depth.
Parameters:
ZbufferID: | ID of the zbuffer to use.
|
---|
x, y: | The XY coordinates of the point to set its user information.
|
---|
Info: | The new user information to set into the z buffer.
|
---|
Returned Value:
VoidPtr: Old user information.
|
---|
See Also:
GMZBufferUpdatePt
GMZBufferUpdateLn
GMZBufferUpdateTri
Keywords:
(zbuffer.c:608)
Prototype:
void GMZBufferUpdateLine(VoidPtr ZbufferID,
int x1,
int y1,
int x2,
int y2,
IrtRType z1,
IrtRType z2)
Description:
Set the depth for all points on a givenline in the Zbuffer.
Parameters:
ZbufferID: | ID of the zbuffer to use.
|
---|
x1, y1, x2, y2: | The XY coordinates of the end points of the line.
|
---|
z1, z2: | The new z's to set into the z buffer, if larger (==closer).
|
---|
Returned Value:
See Also:
GMZBufferUpdatePt
GMZBufferUpdateHLn
GMZBufferUpdateTri
Keywords:
(zbuffer.c:474)
Prototype:
IrtRType GMZBufferUpdatePt(VoidPtr ZbufferID, int x, int y, IrtRType z)
Description:
Set the depth at the given location in the Zbuffer.
This update affects the Z buffer only if the z test succeeds.
Parameters:
ZbufferID: | ID of the zbuffer to use.
|
---|
x, y: | The XY coordinates of the point to set its depth.
No clipping/validity test is conducted to make sure that
the point is inside the Z buffer!
|
---|
z: | The new z to set into the z buffer, if z test succeeds.
|
---|
Returned Value:
See Also:
GMZBufferUpdateInfo
GMZBufferUpdateLn
GMZBufferUpdateTri
Keywords:
(zbuffer.c:709)
Prototype:
void GMZBufferUpdateTri(VoidPtr ZbufferID,
int x1,
int y1,
IrtRType z1,
int x2,
int y2,
IrtRType z2,
int x3,
int y3,
IrtRType z3)
Description:
Set the depth for all points in a given triangular line in the Zbuffer.
Parameters:
ZbufferID: | ID of the zbuffer to use.
|
---|
x1, y1, z1: | irst point of triangle.
|
---|
x2, y2, z2: | econd point of triangle.
|
---|
x3, y3, z3: | hird point of triangle.
|
---|
Returned Value:
See Also:
GMZBufferUpdatePt
GMZBufferUpdateeHLn
GMZBufferUpdateLine
Keywords:
(geom_err.c:77)
Prototype:
const char *GeomDescribeError(GeomFatalErrorType ErrorNum)
Description:
Returns a string describing a the given error. Errors can be raised by
any member of this geom library as well as other users. Raised error will
cause an invokation of GeomFatalError function which decides how to handle
this error. GeomFatalError can for example, invoke this routine with the
error type, print the appropriate message and quit the program.
Parameters:
ErrorNum: | Type of the error that was raised.
|
---|
Returned Value:
const char *: A string describing the error type.
|
---|
Keywords:
error handling
(geom_ftl.c:56)
Prototype:
void GeomFatalError(GeomFatalErrorType ErrID)
Description:
Trap Geom_lib errors right here. Provides a default error handler for the
geom library. Gets an error description using GeomDescribeError, prints it
and exit the program using exit.
Parameters:
ErrID: | Error type that was raised.
|
---|
Returned Value:
Keywords:
error handling
(geom_ftl.c:28)
Prototype:
GeomSetErrorFuncType GeomSetFatalErrorFunc(GeomSetErrorFuncType ErrorFunc)
Description:
Sets the error function to be used by Geom_lib.
Parameters:
ErrorFunc: | New error function to use.
|
---|
Returned Value:
GeomSetErrorFuncType: Old error function reference.
|
---|
Keywords:
error handling
(anim_aux.c:27)
Prototype:
void IGRedrawViewWindow(void)
Description:
Redraws the view window.
Parameters:
Returned Value:
Keywords:
(primitv1.c:149)
Prototype:
IPObjectStruct *PrimGenBOXObject(const IrtVecType Pt,
IrtRType WidthX,
IrtRType WidthY,
IrtRType WidthZ)
Description:
Routine to create a BOX geometric object defined by Pt - the minimum
3d point, and Width - Dx Dy & Dz vector. 4
Order of vertices is as 5 7
follows in the picture: | 6 |
| | |
(Note vertex 0 is hidden behind edge 2-6) | | |
1 | 3
2
All dimensions can be negative, denoting the reversed direction.
Parameters:
Pt: | Low end corner of BOX.
|
---|
WidthX: | Width of BOX (X axis).
|
---|
WidthY: | Depth of BOX( Y axis).
|
---|
WidthZ: | Height of BOX( Z axis).
|
---|
Returned Value:
IPObjectStruct *: A BOX primitive
|
---|
See Also:
PrimSetGeneratePrimType
PrimGenGBOXObject
PrimGenCONEObject
PrimGenCONE2Object
PrimGenCYLINObject
PrimGenSPHEREObject
PrimGenTORUSObject
PrimGenBOXWIREObject
Keywords:
box
primitives
(primitv1.c:240)
Prototype:
IPObjectStruct *PrimGenBOXWIREObject(const IrtVecType Pt,
IrtRType WidthX,
IrtRType WidthY,
IrtRType WidthZ)
Description:
Routine to create a BOX Wireframe geometric object defined by Pt - the
minimum 3d point, and Width - Dx Dy & Dz vector. 4
Order of vertices is as 5 7
follows in the picture: | 6 |
| | |
(Note vertex 0 is hidden behind edge 2-6) | | |
1 | 3
2
All dimensions can be negative, denoting the reversed direction.
Parameters:
Pt: | Low end corner of BOX.
|
---|
WidthX: | Width of BOX (X axis).
|
---|
WidthY: | Depth of BOX( Y axis).
|
---|
WidthZ: | Height of BOX( Z axis).
|
---|
Returned Value:
IPObjectStruct *: A BOX primitive
|
---|
See Also:
PrimSetGeneratePrimType
PrimGenGBOXObject
PrimGenCONEObject
PrimGenCONE2Object
PrimGenCYLINObject
PrimGenSPHEREObject
PrimGenTORUSObject
PrimGenBOXObject
Keywords:
box
primitives
(primitv1.c:582)
Prototype:
IPObjectStruct *PrimGenCONE2Object(const IrtVecType Pt,
const IrtVecType Dir,
IrtRType R1,
IrtRType R2,
int Bases)
Description:
Routine to create a truncated CONE, CON2, geometric object defined by
Pt - the base 3d center point, Dir - the cone direction and height, and
two base radii R1 and R2.
See also PrimSetResolution on fineness control of approximation of the
primitive using flat faces.
Parameters:
Pt: | Center location of Base of CON2.
|
---|
Dir: | Direction and distance from Pt to center of other base of CON2.
|
---|
R1, R2: | Two base radii of the truncated CON2
|
---|
Bases: | 0 for none, 1 for bottom, 2 for top, 3 for both.
|
---|
Returned Value:
IPObjectStruct *: A CON2 Primitive.
|
---|
See Also:
PrimSetGeneratePrimType
PrimGenBOXObject
PrimGenGBOXObject
PrimGenCONEObject
PrimGenCYLINObject
PrimGenSPHEREObject
PrimGenTORUSObject
Keywords:
cone
primitives
(primitv1.c:392)
Prototype:
IPObjectStruct *PrimGenCONEObject(const IrtVecType Pt,
const IrtVecType Dir,
IrtRType R,
int Bases)
Description:
Routine to create a CONE geometric object defined by Pt - the base
3d center point, Dir - the cone direction and height, and base radius R.
See also PrimSetResolution on fineness control of approximation of the
primitive using flat faces.
Parameters:
Pt: | Center location of Base of CONE.
|
---|
Dir: | Direction and distance from Pt to apex of CONE.
|
---|
R: | Radius of Base of the cone.
|
---|
Bases: | 0 for none, 1 for bottom, 2 for top, 3 for both.
|
---|
Returned Value:
IPObjectStruct *: A CONE Primitive.
|
---|
See Also:
PrimSetGeneratePrimType
PrimGenBOXObject
PrimGenGBOXObject
PrimGenCONE2Object
PrimGenCYLINObject
PrimGenSPHEREObject
PrimGenTORUSObject
Keywords:
cone
primitives
(primitv1.c:797)
Prototype:
IPObjectStruct *PrimGenCYLINObject(const IrtVecType Pt,
const IrtVecType Dir,
IrtRType R,
int Bases)
Description:
Routine to create a CYLINder geometric object defined by Pt - the base
3d center point, Dir - the cylinder direction and height, and radius R.
See also PrimSetResolution on fineness control of approximation of the
primitive using flat faces.
Parameters:
Pt: | Center location of Base of CYLINder.
|
---|
Dir: | Direction and distance from Pt to other base of cylinder.
|
---|
R: | Radius of Base of the cylinder.
|
---|
Bases: | 0 for none, 1 for bottom, 2 for top, 3 for both.
|
---|
Returned Value:
IPObjectStruct *: A CYLINDER Primitive.
|
---|
See Also:
PrimSetGeneratePrimType
PrimGenBOXObject
PrimGenGBOXObject
PrimGenCONEObject
PrimGenCONE2Object
PrimGenSPHEREObject
PrimGenTORUSObject
Keywords:
cylinder
primitives
(primitv2.c:441)
Prototype:
IPObjectStruct *PrimGenEXTRUDEObject(const IPObjectStruct *Cross,
const IrtVecType Dir,
int Bases)
Description:
Routine to a create an extrusion surface out of the given cross section
and the given direction.
Input can either be a polygon/line or a freefrom curve object.
If input is a polyline/gon, it must never be coplanar with Dir.
See also PrimSetResolution on fineness control of approximation of the
primitive using flat faces.
Parameters:
Cross: | To extrude in direction Dir.
|
---|
Dir: | Direction and magnitude of extrusion.
|
---|
Bases: | 0 for none, 1 for bottom, 2 for top, 3 for both.
|
---|
Returned Value:
IPObjectStruct *: An extrusion surface.
|
---|
See Also:
PrimSetResolution
PrimGenSURFREVObject
PrimGenSURFREVAxisObject
PrimGenSURFREV2Object
PrimGenSURFREV2AxisObject
PrimGenRULEDObject
Keywords:
extrusion surface
primitives
(primitv3.c:919)
Prototype:
IPObjectStruct *PrimGenFrameController(IrtRType BBoxLen,
IrtRType NLeverLen,
IrtRType TLeverLen,
const char *HandleName)
Description:
Constructs a frame handle with axes parallel to XYZ, at the origin.
Parameters:
BBoxLen: | The length along the X axis of the deformed object.
|
---|
NLeverLen: | The length of the normal Levers.
|
---|
TLeverLen: | The length of the tangent Lever.
|
---|
HandleName: | The name of the handle, required for naming sub-objects.
|
---|
Returned Value:
IPObjectStruct *: A list object with the proper sub-objects named as
O for the sphere Object in the origin,
for objects of T/N/B levers.
|
---|
See Also:
PrimGenTransformController
PrimGenTransformController2DCrvs
Keywords:
(primitv1.c:302)
Prototype:
IPObjectStruct *PrimGenGBOXObject(const IrtVecType Pt,
const IrtVecType Dir1,
const IrtVecType Dir2,
const IrtVecType Dir3)
Description:
Routine to create a GBOX geometric object defined by Pt - the minimum
3d point, and 3 direction Vectors Dir1, Dir2, Dir3.
If two of the direction vectors are parallel the GBOX degenerates to
a zero volume object. A NULL pointer is returned in that case.
4
Order of vertices is as 5 7
follows in the picture: | 6 |
| | |
(Note vertex 0 is hidden behind edge 2-6) | | |
1 | 3
2
Parameters:
Pt: | Low end corner of GBOX.
|
---|
Dir1, Dir2, Dir3: | Three independent directional vectors to define GBOX.
|
---|
Returned Value:
IPObjectStruct *: A GBOX primitive.
|
---|
See Also:
PrimSetGeneratePrimType
PrimGenBOXObject
PrimGenCONEObject
PrimGenCONE2Object
PrimGenCYLINObject
PrimGenSPHEREObject
PrimGenTORUSObject
Keywords:
general box
box
primitives
(primitv1.c:1612)
Prototype:
IPObjectStruct *PrimGenObjectFromPolyList(IPObjectStruct *PObjList)
Description:
Routine to create an OBJECT directly from set of specified polys.
No test is made for the validity of the model in any sense.
Parameters:
PObjList: | List of polygonal objects.
|
---|
Returned Value:
IPObjectStruct *: A single object containing all polygons in all
provided objects, by a simple union.
|
---|
Keywords:
primitives
(primitv1.c:1405)
Prototype:
IPObjectStruct *PrimGenPOLYDISKObject(const IrtVecType Nrml,
const IrtVecType Trns,
IrtRType R)
Description:
Routine to create a POLYDISK geometric object defined by the normal N
and the translation vector T. The object is a planar disk (a circle of
_PrimGlblResolution points in it...) and its radius is equal to R.
The normal direction is assumed to point to the inside of the object.
See also PrimSetResolution on fineness control of approximation of the
primitive using flat faces.
Parameters:
Nrml: | Normal to the plane this disk included in.
|
---|
Trns: | A translation factor of the center of the disk.
|
---|
R: | Radius of the disk.
|
---|
Returned Value:
IPObjectStruct *: A single polygon object - a disk.
|
---|
Keywords:
disk
primitives
(primitv1.c:1480)
Prototype:
IPObjectStruct *PrimGenPOLYGONObject(IPObjectStruct *PObjList, int IsPolyline)
Description:
Routine to create a POLYGON/LINE directly from its specified vertices.
The validity of the elements in the provided list is tested to make sure
they are vectors or points.
No test is made to make sure all vertices are on one plane, and that no
two vertices are similar.
Parameters:
PObjList: | List of vertices/points to construct as a polygon/line.
|
---|
IsPolyline: | If TRUE, make a polyline, otherwise a polygon.
|
---|
Returned Value:
IPObjectStruct *: A polygon/line constructed from PObjList.
|
---|
Keywords:
polygon
polyline
primitives
(primitv1.c:1850)
Prototype:
IPPolygonStruct *PrimGenPolygon3Vrtx(const IrtVecType V1,
const IrtVecType V2,
const IrtVecType V3,
const IrtVecType Vin,
int *VrtcsRvrsd,
IPPolygonStruct *Pnext)
Description:
Routine to create a polygon out of a list of 3 vertices V1/2/3.
The fourth vertex is inside (actually, this is not true, as this point
will be in the positive part of the plane, which only locally in the
object...) the object, so the polygon's normal direction can be evaluated
uniquely.
No test is made to make sure the 3 points are not co-linear...
The points are placed in order.
Parameters:
V1, V2, V3: | Three vertices of the constructed polygon.
|
---|
Vin: | A vertex that can be assumed to be inside the
object for normal evaluation of the plane of polygon.
Can be NULL in which case vrtcs order is kept.
|
---|
VrtcsRvrsd: | set to TRUE if has Vin and order of vertices is oriented
in reverse. Can be NULL to be ignored. M
|
---|
Pnext: | Next is chain of polygons, in linked list.
|
---|
Returned Value:
IPPolygonStruct *: The constructed polygon.
|
---|
See Also:
PrimGenPolygon4Vrtx
GMGenPolyline2Vrtx
Keywords:
(primitv1.c:1715)
Prototype:
IPPolygonStruct *PrimGenPolygon4Vrtx(const IrtVecType V1,
const IrtVecType V2,
const IrtVecType V3,
const IrtVecType V4,
const IrtVecType Vin,
int *VrtcsRvrsd,
IPPolygonStruct *Pnext)
Description:
Routine to create a polygon out of a list of 4 vertices V1/2/3/4.
The fifth vertex is inside (actually, this is not true, as this point
will be in the positive part of the plane, which only locally in the
object...) the object, so the polygon's normal direction can be evaluated
uniquely.
No test is made to make sure the 4 points are co-planar...
The points are placed in order.
Parameters:
V1, V2, V3, V4: | Four vertices of the constructed polygon.
|
---|
Vin: | A vertex that can be assumed to be inside the
object for normal evaluation of the plane of polygon.
Can be NULL in which case vrtcs order is kept.
|
---|
VrtcsRvrsd: | Set to TRUE if has Vin and order of vertices is
oriented in reverse. Can be NULL to be ignored.
|
---|
Pnext: | Next is chain of polygons, in linked list.
|
---|
Returned Value:
IPPolygonStruct *: The constructed polygon.
|
---|
See Also:
PrimGenPolygon3Vrtx
PrimGenPolygon4Vrtx2
GMGenPolyline2Vrtx
Keywords:
(primitv1.c:1760)
Prototype:
IPPolygonStruct *PrimGenPolygon4Vrtx2(const IrtVecType V1,
const IrtVecType V2,
const IrtVecType V3,
const IrtVecType V4,
const IrtVecType Vin,
int *VrtcsRvrsd,
int *Singular,
IPPolygonStruct *Pnext)
Description:
Routine to create a polygon out of a list of 4 vertices V1/2/3/4.
The fifth vertex is inside (actually, this is not true, as this point
will be in the positive part of the plane, which only locally in the
object...) the object, so the polygon's normal direction can be evaluated
uniquely.
No test is made to make sure the 4 points are co-planar...
The points are placed in order.
Parameters:
V1, V2, V3, V4: | Four vertices of the constructed polygon.
|
---|
Vin: | A vertex that can be assumed to be inside the
object for normal evaluation of the plane of polygon.
Can be NULL in which case vrtcs order is kept.
|
---|
VrtcsRvrsd: | Set to TRUE if has Vin and order of vertices is
oriented in reverse. Can be NULL to be ignored.
|
---|
Singular: | -1 if regular, index of singular vertex if this
rectangle is singular and a triangle is returned.
|
---|
Pnext: | Next is chain of polygons, in linked list.
|
---|
Returned Value:
IPPolygonStruct *: The constructed polygon.
|
---|
See Also:
PrimGenPolygon3Vrtx
PrimGenPolygon4Vrtx
GMGenPolyline2Vrtx
Keywords:
(primitv3.c:997)
Prototype:
IPPolygonStruct *PrimGenPolyline4Vrtx(const IrtVecType V1,
const IrtVecType V2,
const IrtVecType V3,
const IrtVecType V4,
IPPolygonStruct *Pnext)
Description:
Routine to create a polyline out of a list of 4 vertices V1/2/3/4.
No test is made to make sure the 4 points are co-planar...
The points are placed in order.
Parameters:
V1, V2, V3, V4: | Four vertices of the constructed polyline. V1 is
duplicated as fifth last point as well.
|
---|
Pnext: | Next is chain of polyline, in linked list.
|
---|
Returned Value:
IPPolygonStruct *: The constructed polygon.
|
---|
See Also:
PrimGenPolyline4Vrtx
PrimGenPolygon3Vrtx
GMGenPolyline2Vrtx
Keywords:
(primitv2.c:685)
Prototype:
IPObjectStruct *PrimGenRULEDObject(const IPObjectStruct *Cross1,
const IPObjectStruct *Cross2)
Description:
Routine to a create a ruled surface out of the given two cross sections.
Parameters:
Cross1, Cross2: | Polylines to rule a surface between.
If both cross sections are in the XY plane, a single
planar polygon is constructed. Otherwise, the number
of vertices in Cross1 and Cross2 must be equal and
a rectangular polygon is constructed for each edge.
|
---|
Returned Value:
IPObjectStruct *: A single polygon representing the ruled surface.
|
---|
See Also:
PrimSetResolution
PrimGenSURFREVObject
PrimGenSURFREVAxisObject
PrimGenSURFREV2Object
PrimGenSURFREV2AxisObject
PrimGenEXTRUDEObject
Keywords:
ruled surface
primitives
(primitv1.c:1014)
Prototype:
IPObjectStruct *PrimGenSPHEREObject(const IrtVecType Center, IrtRType R)
Description:
Routine to create a SPHERE geometric object defined by Center, the
center of the sphere and R, its radius.
See also PrimSetResolution on fineness control of approximation of the
primitive using flat faces.
Parameters:
Center: | Center location of SPHERE.
|
---|
R: | Radius of sphere.
|
---|
Returned Value:
IPObjectStruct *: A SPHERE Primitive.
|
---|
See Also:
PrimSetGeneratePrimType
PrimGenBOXObject
PrimGenGBOXObject
PrimGenCONEObject
PrimGenCONE2Object
PrimGenCYLINObject
PrimGenTORUSObject
Keywords:
sphere
primitives
(primitv2.c:391)
Prototype:
IPObjectStruct *PrimGenSURFREV2AxisObject(IPObjectStruct *Cross,
IrtRType StartAngle,
IrtRType EndAngle,
const IrtVecType Axis)
Description:
Routine to a create surface of revolution by rotating the given cross
section along the Axis axis.
Input can either be a polygon/line or a freefrom curve object.
Parameters:
Cross: | To rotate around Axis axis forming a surface of revolution.
|
---|
StartAngle, EndAngle: | angles of portion of surface of revolution,
in degrees, between 0 and 360.
|
---|
Axis: | Axis of rotation.
|
---|
Returned Value:
IPObjectStruct *: A (portion of) a surface of revolution.
|
---|
See Also:
PrimSetResolution
PrimGenSURFREVObject
PrimGenSURFREVAxisObject
PrimGenSURFREV2Object
PrimGenEXTRUDEObject
PrimGenRULEDObject
Keywords:
surface of revolution
primitives
(primitv2.c:234)
Prototype:
IPObjectStruct *PrimGenSURFREV2Object(const IPObjectStruct *Cross,
IrtRType StartAngle,
IrtRType EndAngle)
Description:
Routine to a create surface of revolution by rotating the given cross
section along the Z axis, from StartAngle to EndAngle.
Input can either be a polygon/line or a freefrom curve object.
If input is a polyline/gon, it must never be coplanar with the Z axis.
Parameters:
Cross: | To rotate around the Z axis forming a surface of revolution.
|
---|
StartAngle, EndAngle: | angles of portion of surface of revolution,
in degrees, between 0 and 360.
|
---|
Returned Value:
IPObjectStruct *: A (portion of) a surface of revolution.
|
---|
See Also:
PrimSetResolution
PrimGenSURFREVObject
PrimGenSURFREVAxisObject
PrimGenSURFREV2AxisObject
PrimGenEXTRUDEObject
PrimGenRULEDObject
Keywords:
surface of revolution
primitives
(primitv2.c:186)
Prototype:
IPObjectStruct *PrimGenSURFREVAxisObject(IPObjectStruct *Cross,
const IrtVecType Axis)
Description:
Routine to a create surface of revolution by rotating the given cross
section along the Axis axis.
Input can either be a polygon/line or a freefrom curve object.
Parameters:
Cross: | To rotate around Axis axis forming a surface of revolution.
|
---|
Axis: | Axis of rotation.
|
---|
Returned Value:
IPObjectStruct *: A surface of revolution.
|
---|
See Also:
PrimSetResolution
PrimGenSURFREVObject
PrimGenSURFREV2Object
PrimGenSURFREV2AxisObject
PrimGenEXTRUDEObject
PrimGenRULEDObject
Keywords:
surface of revolution
primitives
(primitv2.c:44)
Prototype:
IPObjectStruct *PrimGenSURFREVObject(const IPObjectStruct *Cross)
Description:
Routine to a create surface of revolution by rotating the given cross
section along the Z axis.
Input can either be a polygon/line or a freefrom curve object.
If input is a polyline/gon, it must never be coplanar with the Z axis.
Parameters:
Cross: | To rotate around the Z axis forming a surface of revolution.
|
---|
Returned Value:
IPObjectStruct *: A surface of revolution.
|
---|
See Also:
PrimSetResolution
PrimGenSURFREVAxisObject
PrimGenSURFREV2Object
PrimGenSURFREV2AxisObject
PrimGenEXTRUDEObject
PrimGenRULEDObject
Keywords:
surface of revolution
primitives
(primitv1.c:1233)
Prototype:
IPObjectStruct *PrimGenTORUSObject(const IrtVecType Center,
const IrtVecType Normal,
IrtRType Rmajor,
IrtRType Rminor)
Description:
Routine to create a TORUS geometric object defined by Center - torus 3d
center point, the main torus plane normal Normal, major radius Rmajor and
minor radius Rminor (Tube radius).
Teta runs on the major circle, Fee on the minor one. Then
X = (Rmajor + Rminor * cos(Fee)) * cos(Teta)
Y = (Rmajor + Rminor * cos(Fee)) * sin(Teta)
Z = Rminor * sin(Fee)
See also PrimSetResolution on fineness control of approximation of the
primitive using flat faces.
Parameters:
Center: | Center location of the TORUS primitive.
|
---|
Normal: | Normal to the major plane of the torus.
|
---|
Rmajor: | Major radius of torus.
|
---|
Rminor: | Minor radius of torus.
|
---|
Returned Value:
IPObjectStruct *: A TOURS Primitive.
|
---|
See Also:
PrimSetGeneratePrimType
PrimGenBOXObject
PrimGenGBOXObject
PrimGenCONEObject
PrimGenCONE2Object
PrimGenCYLINObject
PrimGenSPHEREObject
Keywords:
torus
primitives
(primitv3.c:120)
Prototype:
IPObjectStruct *PrimGenTransformController2D(const GMBBBboxStruct *BBox,
int HasRotation,
int HasTranslation,
int HasScale)
Description:
Constructs a 2D bounding box with transformation handles to control the
way an object is transformed in the plane.
Parameters:
BBox: | Dimensions of constructed box.
|
---|
HasRotation: | Should we add rotational handles?
|
---|
HasTranslation: | Should we add translation handles?
|
---|
HasScale: | Should we add scale handles?
|
---|
Returned Value:
IPObjectStruct *: A list object with the proper sub-objects named as
R for (Z) rotations, {X,Y} for translations.
|
---|
See Also:
PrimGenTransformController
PrimGenTransformController2DCrvs
Keywords:
(primitv3.c:260)
Prototype:
IPObjectStruct *PrimGenTransformController2DCrvs(const GMBBBboxStruct *BBox)
Description:
Constructs a 2D bounding box with transformation handles to control the
way an object is transformed in the plane. This transform is formed out
of curves only.
Parameters:
BBox: | Dimensions of constructed box (only XY).
|
---|
Returned Value:
IPObjectStruct *: A list object with the proper sub-objects named as
R for (Z) rotations, {X,Y} for translations
|
---|
See Also:
PrimGenTransformController
PrimGenTransformController2D
Keywords:
(primitv3.c:617)
Prototype:
IPObjectStruct *PrimGenTransformControllerBox(const GMBBBboxStruct *BBox,
int HasRotation,
int HasTranslation,
int HasUniformScale,
IrtRType BoxOpacity,
IrtRType RelTesalate)
Description:
Constructs a bounding box with transformation handles to control the
way an object is transformed.
Parameters:
BBox: | Dimensions of constructed box.
|
---|
HasRotation: | Should we add rotational handles?
|
---|
HasTranslation: | Should we add translation handles?
|
---|
HasUniformScale: | Should we add uniform scale handles?
|
---|
BoxOpacity: | Opacity of the bbox itself, between zero and one. If
one, no bbox geometry is created.
|
---|
RelTesalate: | Relative tessallations of elements of the handles.
1.0 for default values.
|
---|
Returned Value:
IPObjectStruct *: A list object with the proper sub-objects named as
R{X,Y,Z} for rotations, T{X,Y,Z} for translations, and
SXYZ for scaling.
|
---|
See Also:
PrimGenTransformController2D
PrimGenTransformController2DCrvs
PrimGenTransformControllerSphere
Keywords:
(primitv3.c:435)
Prototype:
IPObjectStruct *PrimGenTransformControllerSphere(const GMBBBboxStruct *BBox,
int HasRotation,
int HasTranslation,
int HasUniformScale,
IrtRType BoxOpacity,
IrtRType RelTesalate)
Description:
Constructs a bounding box with transformation handles to control the
way an object is transformed.
Parameters:
BBox: | Dimensions of constructed box.
|
---|
HasRotation: | Should we add rotational handles?
|
---|
HasTranslation: | Should we add translation handles?
|
---|
HasUniformScale: | Should we add uniform scale handles?
|
---|
BoxOpacity: | Opacity of the bbox itself, between zero and one. If
one, no bbox geometry is created.
|
---|
RelTesalate: | Relative tessallations of elements of the handles.
1.0 for default values.
|
---|
Returned Value:
IPObjectStruct *: A list object with the proper sub-objects named as
R{X,Y,Z} for rotations, T{X,Y,Z} for translations, and
SXYZ for scaling.
|
---|
See Also:
PrimGenTransformController2D
PrimGenTransformController2DCrvs
PrimGenTransformControllerBox
Keywords:
(primitv1.c:73)
Prototype:
int PrimSetGeneratePrimType(int SetGeneratePrimitive)
Description:
Sets the way primitives are constructed - as polygons, as a freeform
surface, or as a model surface.
Parameters:
SetGeneratePrimitive: | 0 - polygonal primitive.
1 - surface primitive.
2 - model primitive.
3 - trivariate volumetric primitive.
4 - VModel primitive.
5 - Singular (having locations with vanishing
Jacobian) primitive.
|
---|
Returned Value:
int: Old value of PolygonalPrimitive flag.
|
---|
See Also:
PrimSetSurfacePrimitiveRational
PrimGenBOXObject
PrimGenGBOXObject
PrimGenCONEObject
PrimGenCONE2Object
PrimGenCYLINObject
PrimGenSPHEREObject
PrimGenTORUSObject
Keywords:
(primitv1.c:1946)
Prototype:
int PrimSetResolution(int Resolution)
Description:
Routine to set the polygonal resolution (fineness).
Resolution sroutghly the number of edges a circular primitive will have
along the entire circle.
Parameters:
Resolution: | To set as new resolution for all primitve constructors.
|
---|
Returned Value:
int: Old resolution value.
|
---|
Keywords:
primitives
resolution
(primitv1.c:105)
Prototype:
int PrimSetSurfacePrimitiveRational(int SurfaceRational)
Description:
Sets the way surface primitives are constructed - as exact rational
form or approximated polynomial (integral) form.
Parameters:
SurfaceRational: | TRUE for rational, FALSE for integral form.
|
---|
Returned Value:
int: Old value of PolygonalPrimitive flag.
|
---|
See Also:
PrimSetGeneratePrimType
PrimGenBOXObject
PrimGenGBOXObject
PrimGenCONEObject
PrimGenCONE2Object
PrimGenCYLINObject
PrimGenSPHEREObject
PrimGenTORUSObject
Keywords:
(poly_tri.c:272)
Prototype:
static int *TriangulatePolygonIndices(const CagdPolylineStruct *P,
const IPPolygonStruct *IrtP,
CagdBType EnsureNoLeakingTrs,
int *NumTriangles)
Description:
Triangulates a closed polygon. The triangulation based on the paper:
Klincsek, G.T. (1980), Minimal triangulations of polygonal domains,
Annals of Discrete Mathematics 9, 121-123
The used weight function is:
0.75 * TriangleArea + 0.05 * TrianglePerimeter +
0.10 * EdgesMaxMinRatio + 0.10 * AnglesMaxMinRatio
Parameters:
P, IrtP: | A polygon to triangulate.
(in two representations - for efficiency)
|
---|
EnsureNoLeakingTrs: | f TRUE, the weight function gives a weight of
infinity to triangles that leak of the polygon.
|
---|
NumTriangles: | n output parameter that stores the number of generated
Triangles.
|
---|
Returned Value:
int *: List of triangle indices orginazied in tuples of three.
Each index refers to a vertex in the input polygon.
Each Three consequence indices forms a triangle.
|
---|
See Also:
TriangulatePolygon
Keywords:
(fit2pts.c:265)
Prototype:
const GMFitFittingShapeStruct *_GMFitGetFittingModel(GMFittingModelType
FittingModel)
Description:
This function returns the matching GMFitFittingShapeStruct to the given
enum, or NULL if none exist. THIS POINTER MUST NOT BE FREED!!!
Parameters:
FittingModel: | he enum of the needed fitting model.
|
---|
Returned Value:
const GMFitFittingShapeStruct *: A pointer to a staticly allocated
fitting struct.
|
---|
See Also:
FitData
FitDataWithOutliers
Keywords:
(geom_bsc.c:3848)
Prototype:
void main(void)
Description:
Test routines for the polynomial equation solvers.
Parameters:
Returned Value:
Keywords: