|
|
cpolyhedron.h File ReferenceDefinition of the Tcpolyhedron type and the associated functions. More... #include "plot3d.h" #include "htransform.h" #include "color.h" #include <stdlib.h> Go to the source code of this file.
Detailed DescriptionDefinition of the Tcpolyhedron type and the associated functions.
Definition in file cpolyhedron.h. Define Documentation
One of the possible type of shapes. A normal shape is show and considered for collisions.
Definition at line 27 of file cpolyhedron.h.
One of the possible type of shapes. A hiden shape is not show but it is considered for collisions.
Definition at line 36 of file cpolyhedron.h.
One of the possible type of shapes. A decor(ation) shape is show but it is not considered for collisions.
Definition at line 45 of file cpolyhedron.h.
One of the possible type of convex polyhedrons. An OFF is a general polyhedron defined by its vertices and its faces. This is a standard geomview construction.
Definition at line 57 of file cpolyhedron.h. Referenced by GetCPolyhedronDefiningPoint(), GetCpolyhedronRadius(), PlotCPolyhedron(), ReadOFF(), and SaveCPolyhedron().
One of the possible type of convex polyhedrons. An SPHERE is defined by a center (x,y,z) and a radius. This is a standard geomview construction.
Definition at line 68 of file cpolyhedron.h. Referenced by GenerateSphereOFF(), GetCPolyhedronDefiningPoint(), NewSphere(), PlotCPolyhedron(), ReadSphere(), and SaveCPolyhedron().
One of the possible type of convex polyhedrons. An CYLINDER is defined by two 3d points. This is not standard in geomview.
Definition at line 78 of file cpolyhedron.h. Referenced by GenerateCylinderOFF(), GetCPolyhedronDefiningPoint(), NewCylinder(), PlotCPolyhedron(), ReadCylinder(), and SaveCPolyhedron(). Function Documentation
Define a Tcpolyhedron from a file.
Definition at line 314 of file cpolyhedron.c. References Tcpolyhedron::color, CopyColor(), Error(), NEW, NO_UINT, Tcpolyhedron::obj3d, ReadCylinder(), ReadOFF(), and ReadSphere(). Referenced by main().
Here is the call graph for this function:
Here is the caller graph for this function:
Defines a sphere (and its polyhedric approximation for collision detection).
Definition at line 353 of file cpolyhedron.c. References Tcpolyhedron::center, Tcpolyhedron::color, CopyColor(), GenerateSphereOFF(), NO_UINT, Tcpolyhedron::obj3d, Tcpolyhedron::p1, Tcpolyhedron::p2, Tcpolyhedron::rad, SPHERE, and Tcpolyhedron::type.
Here is the call graph for this function:
Defines a cylinder (and its polyhedric approximation for collision detection).
Definition at line 376 of file cpolyhedron.c. References Tcpolyhedron::center, Tcpolyhedron::color, CopyColor(), CYLINDER, GenerateCylinderOFF(), NO_UINT, Tcpolyhedron::obj3d, Tcpolyhedron::p1, Tcpolyhedron::p2, Tcpolyhedron::rad, and Tcpolyhedron::type.
Here is the call graph for this function:
Defines a polyhedron from another polyhedron.
Definition at line 403 of file cpolyhedron.c. References Tcpolyhedron::center, Tcpolyhedron::color, CopyColor(), Tcpolyhedron::fv, Tcpolyhedron::maxCoord, Tcpolyhedron::ne, NEW, Tcpolyhedron::nf, Tcpolyhedron::nv, Tcpolyhedron::nvf, Tcpolyhedron::obj3d, Tcpolyhedron::p1, Tcpolyhedron::p2, Tcpolyhedron::rad, Tcpolyhedron::type, and Tcpolyhedron::v. Referenced by AddBody2Link().
Here is the call graph for this function:
Here is the caller graph for this function:
Applies a homogenoeus transform to a convex polyhedron.
Definition at line 451 of file cpolyhedron.c. References Tcpolyhedron::center, HTransformApply(), Tcpolyhedron::maxCoord, Tcpolyhedron::nv, Tcpolyhedron::p1, Tcpolyhedron::p2, and Tcpolyhedron::v. Referenced by main().
Here is the call graph for this function:
Here is the caller graph for this function:
Retrives the type of a convex polyhedron.
Definition at line 475 of file cpolyhedron.c. References Tcpolyhedron::type.
Changes the color of a convex polyhedron.
Definition at line 480 of file cpolyhedron.c. References Tcpolyhedron::color, and CopyColor().
Here is the call graph for this function:
Gets the color of a convex polyhedron.
Definition at line 485 of file cpolyhedron.c. References Tcpolyhedron::color, and CopyColor().
Here is the call graph for this function:
Gets the number of vertexes of a convex polyhedron.
Definition at line 490 of file cpolyhedron.c. References Tcpolyhedron::nv.
Gets the coordinates of a point defining of a convex object. A CYLINDER is defined by two points: the initial and the end points of the cylinder. A SPHERE is defined by one point: the center of the sphere. For OFFs, all vertexes are considered defining points. If the convex polyhedron has less defining points than the requested number, this function triggers an error.
Definition at line 495 of file cpolyhedron.c. References Tcpolyhedron::center, CYLINDER, Error(), GetCPolyhedronVertex(), OFF, Tcpolyhedron::p1, Tcpolyhedron::p2, SPHERE, and Tcpolyhedron::type. Referenced by GetMechanismDefiningPoint().
Here is the call graph for this function:
Here is the caller graph for this function:
Returns the radius used in the definition of the convex object. This function is only defined for SPHEREs and CYLINDERs. It triggers an error if used on a OFF.
Definition at line 535 of file cpolyhedron.c. References Error(), OFF, Tcpolyhedron::rad, and Tcpolyhedron::type.
Here is the call graph for this function:
Gets the coordinates of the vertex of a convex polyhedron. For cylinders and spheres point on the approximating OFF are returned. If the convex polyhedron has less vertexes than the requested element, this function triggers an error.
Definition at line 542 of file cpolyhedron.c. References Error(), Tcpolyhedron::nv, and Tcpolyhedron::v. Referenced by GetCPolyhedronDefiningPoint().
Here is the call graph for this function:
Here is the caller graph for this function:
Returns the maximum coordinate value (either in X, Y, or Z) used in a convex polyhedron. This is used in higher levels to define an over-estimate bounding-box of the mechanism. This bounding box is used to define the ranges for some of the coordinate and separating planes variables.
Definition at line 553 of file cpolyhedron.c. References Tcpolyhedron::maxCoord. Referenced by AddBody2Link().
Here is the caller graph for this function:
Adds the convex polyhedron to a 3D geometry. Each object in a 3D scene gets an identifier that is stored in the cpolyhedron object for future reference.
Definition at line 558 of file cpolyhedron.c. References Tcpolyhedron::center, Close3dObject(), Tcpolyhedron::color, CYLINDER, Tcpolyhedron::fv, Tcpolyhedron::ne, Tcpolyhedron::nf, Tcpolyhedron::nv, Tcpolyhedron::nvf, Tcpolyhedron::obj3d, OFF, Tcpolyhedron::p1, Tcpolyhedron::p2, Plot3dObject(), PlotCylinder(), PlotSphere(), Tcpolyhedron::rad, SPHERE, StartNew3dObject(), Tcpolyhedron::type, and Tcpolyhedron::v. Referenced by PlotLink().
Here is the call graph for this function:
Here is the caller graph for this function:
Moves an object previously added to a 3D scene.
Definition at line 594 of file cpolyhedron.c. References Move3dObject(), NO_UINT, and Tcpolyhedron::obj3d. Referenced by MoveLink().
Here is the call graph for this function:
Here is the caller graph for this function:
Stores the geometic information of a convex polyhedron into a file. Basically, it creates a file that can be latter read using InitCPolyhedronFromFile
Definition at line 600 of file cpolyhedron.c. References Tcpolyhedron::center, CYLINDER, Error(), Tcpolyhedron::fv, Tcpolyhedron::nf, Tcpolyhedron::nv, Tcpolyhedron::nvf, OFF, Tcpolyhedron::p1, Tcpolyhedron::p2, Tcpolyhedron::rad, SPHERE, Tcpolyhedron::type, and Tcpolyhedron::v. Referenced by main().
Here is the call graph for this function:
Here is the caller graph for this function:
Deletes the information stored in a Tcpolyhedron and frees the allocated memory.
Definition at line 641 of file cpolyhedron.c. References Tcpolyhedron::fv, Tcpolyhedron::nf, Tcpolyhedron::nv, Tcpolyhedron::nvf, and Tcpolyhedron::v. Referenced by DeleteLink(), and main().
Here is the caller graph for this function:
|