environment.h File Reference Detailed DescriptionDefinition of the Tenvironment type and the associated functions.
Definition in file environment.h.
Macro Definition Documentation
Initial room for obstacles. It will be enlarged if necessary.
Definition at line 29 of file environment.h. Referenced by InitEnvironment(). Function Documentation
Creates an empty environment.
Definition at line 13 of file environment.c. References CopyVoidPtr(), DeleteVoidPtr(), INIT_NUM_OBSTACLES, InitVector(), Tenvironment::maxCoord, Tenvironment::names, and Tenvironment::obstacles. Referenced by InitWorld().
Adds an obstacle (i.e., a convex polyhedron) to the environment.
Definition at line 20 of file environment.c. References CopyPolyhedron(), EmptyPolyhedron(), GetPolyhedronMaxCoordinate(), Tenvironment::maxCoord, Tenvironment::names, NEW, NewVectorElement(), Tenvironment::obstacles, and SetVectorElement(). Referenced by AddObstacle2World().
Gets the number of obstacles in the environment.
Definition at line 43 of file environment.c. References Tenvironment::obstacles, and VectorSize(). Referenced by DeleteEnvironment(), InitPQPCD(), InitSolidCD(), InitVcollideCD(), PlotEnvironment(), PrintEnvironment(), WorldPrintAtoms(), and WorldStoreRigidGroups().
Gets the idetifier of an obstacles given its name. The identifier of an obstacle is its position in the vectors name/obstacles of included in the Tenvironment structure.
Definition at line 48 of file environment.c. References FALSE, GetVectorElement(), Tenvironment::names, NO_UINT, TRUE, and VectorSize(). Referenced by GetWorldObstacleID().
Gets the name of an obstacle given its identifier.
Definition at line 74 of file environment.c. References GetVectorElement(), and Tenvironment::names. Referenced by DeleteEnvironment(), PrintCollisionInfoInt(), PrintCollisions(), and PrintEnvironment().
Gets the convex polyhedron of an obstacle given its identifier.
Definition at line 85 of file environment.c. References GetVectorElement(), and Tenvironment::obstacles. Referenced by DeleteEnvironment(), InitPQPCD(), InitSolidCD(), InitVcollideCD(), PlotEnvironment(), and PrintEnvironment().
Gets the status (NORMAL, HIDDEN, DECOR) of an obstacle given its identifier.
Definition at line 96 of file environment.c. References GetPolyhedronStatus(), GetVectorElement(), NO_UINT, and Tenvironment::obstacles. Referenced by CheckAllCollisions(), InitPQPCD(), InitSolidCD(), and InitVcollideCD().
Gets the color of an obstacle given its identifier.
Definition at line 107 of file environment.c. References Error(), GetPolyhedronColor(), GetVectorElement(), and Tenvironment::obstacles.
Returns the sum of the maximum coordinate value (either for X,Y or Z) for all the convex polyhedrons in the environment. This is used in higher levels to define an over-estimate bounding-box of the world. This bounding box is used to define the ranges for some of the coordinate and separating planes variables.
Definition at line 118 of file environment.c. References Tenvironment::maxCoord. Referenced by GenerateWorldEquations().
Stores the environment information into a file in the format valid to be read by InitWorldFromFile.
Definition at line 123 of file environment.c. References GetEnvironmentNObstacles(), GetObstacleName(), GetObstacleShape(), and PrintPolyhedron(). Referenced by PrintWorld().
Displays the obstacles in the environment in a 3D geometry.
Definition at line 146 of file environment.c. References Close3dObject(), DCP3D_G, DCP3D_R, DeleteColor(), GetEnvironmentNObstacles(), GetObstacleShape(), NewColor(), PlotPolyhedron(), and StartNew3dObject(). Referenced by PlotWorld().
Deletes the information stored in a Tenvironment and frees the allocated memory.
Definition at line 169 of file environment.c. References DeletePolyhedron(), DeleteVector(), GetEnvironmentNObstacles(), GetObstacleName(), GetObstacleShape(), Tenvironment::names, and Tenvironment::obstacles. Referenced by DeleteWorld(). |
Follow us!