User manual:   Main Page   Overview   Installation   User Interface   Tutorial   Example   FAQ   Version Updates
Reference manual:   Class List   Class Members   Globals, enums and defines

params.h File Reference

Go to the source code of this file.

Max and min functions

#define MAX3(a, b, c)   ((a>b) ? (a>c ? a : c) : (b>c ? b : c))
#define MAX(a, b)   ((a>b) ? a : b)
#define MIN3(a, b, c)   ((a<b) ? (a<c ? a : c) : (b<c ? b : c))
#define MIN(a, b)   ((a<b) ? a : b)

Constants

#define MAX_STRING_SIZE   100
#define MAX_FACE_VERTICES   3
#define DEFAULT_LINE_WIDTH   5.0
#define DEFAULT_SPHERE_RADIUS   1.0
#define DEFAULT_CYLINDER_RADIUS   1.0

Object IDs

typedef long VertexID
typedef long EdgeID
typedef long FaceID
typedef long LineID
typedef long SphereID
typedef long CylinderID
typedef long SceneID

Enumerations

enum  RESULT {
  OK, NullPointerGiven, OversizedString, FileNotFound,
  MeshNotValid, WrongFileFormat, VertexNotFound, EdgeNotFound,
  FaceNotFound, LineNotFound, SphereNotFound, CylinderNotFound,
  SceneNotFound, VerticesNotIncident, EdgesNotIncident, FacesNotIncident,
  SameVertexGiven, SameEdgeGiven, SameFaceGiven, FaceExists,
  TimeOut, VertexIsOrphan, SceneUnremovable
}
enum  RENDER_MODE {
  SOLID, WIREFRAME, SOLID_AND_WIREFRAME, VERTICES,
  HIGHLIGHT_ONLY
}
enum  AXIS { AXIS_X, AXIS_Y, AXIS_Z }
enum  COLOR { R = 0, G, B }

Functions

RESULT getVersion (char *version)


Define Documentation

#define DEFAULT_CYLINDER_RADIUS   1.0
 

Default Cylinder radius.

#define DEFAULT_LINE_WIDTH   5.0
 

Default Line width.

#define DEFAULT_SPHERE_RADIUS   1.0
 

Default Sphere radius.

#define MAX a,
     ((a>b) ? a : b)
 

Calculate maximum of 2 values.

#define MAX3 a,
b,
     ((a>b) ? (a>c ? a : c) : (b>c ? b : c))
 

Calculate maximum of 3 values.

#define MAX_FACE_VERTICES   3
 

Maximum number of vertices in a Face (currently, only triangles are allowed).

#define MAX_STRING_SIZE   100
 

Maximum allowed string size.

#define MIN a,
     ((a<b) ? a : b)
 

Calculate minimum of 2 values.

#define MIN3 a,
b,
     ((a<b) ? (a<c ? a : c) : (b<c ? b : c))
 

Calculate minimum of 3 values.


Typedef Documentation

typedef long CylinderID
 

Identifies a cylinder.

A cylinder will retain its ID throughout the program unless it has been removed.

typedef long EdgeID
 

Identifies a half-edge, which is an edge with a direction (or side).

For example, the edge between vertices 0 and 2 has 2 half-edges: one is (0,2) and the other is (2,0). A half-edge will retain its ID throughout the program unless it has been removed. This leads to an edge having 2 ID's (one for each half-edge).

typedef long FaceID
 

Identifies a face.

A face will retain its ID throughout the program unless it has been removed. The connection between a FaceID and an EdgeID is as follows: An edge of a face (with a faceID of j), will have one of the following ID's: (j*3, j*3+1, j*3+2). The edge with the ID of j*3 defines the 1st and 2nd vertices of the face. The edge with the ID of j*3+1 defines the face's 2nd and 3rd vertices, and the edge with the ID of j*3+2 defines the face's 3rd and 1st vertices. This is illustrated below:

faceid.jpg
It can be seen from this example, that most edges will have more than one edgeID (one for every face with which they are associated).

typedef long LineID
 

Identifies a line.

A line will retain its ID throughout the program unless it has been removed.

typedef long SceneID
 

Identifies a scene.

A scene will retain its ID throughout the program unless it has been removed.

typedef long SphereID
 

Identifies a sphere.

A sphere will retain its ID throughout the program unless it has been removed.

typedef long VertexID
 

Identifies a vertex.

A vertex will retain its ID throughout the program unless it has been removed.


Enumeration Type Documentation

enum AXIS
 

Defines an axis - X, Y or Z.

Enumeration values:
AXIS_X 
AXIS_Y 
AXIS_Z 

enum COLOR
 

Defines an R, G or B color component.

Enumeration values:
R 
G 
B 

enum RENDER_MODE
 

Describes the render mode.

In all these modes, the highlighted items are always shown

Enumeration values:
SOLID  Render faces only.
WIREFRAME  Render edges only.
SOLID_AND_WIREFRAME  Render faces with the wireframe rendered on top.
VERTICES  Render vertices only.
HIGHLIGHT_ONLY  Render only highlighted items.

enum RESULT
 

The result of each operation.

Enumeration values:
OK  Operation completed successfully.
NullPointerGiven  One of the input parameters was NULL.
OversizedString  A problem with the given string length.
FileNotFound  Couldn't find the file to open.
MeshNotValid  Mesh is either non valid or is not specified
WrongFileFormat  VRML file in the wrong format (has no IndexedFaceSets or has other Geometry shapes as well).
VertexNotFound  No vertex was found with the given VertexID.
EdgeNotFound  No edge was found with the given EdgeID.
FaceNotFound  No face was found with the given FaceID.
LineNotFound  No line was found with the given LineID.
SphereNotFound  No sphere was found with the given SphereID.
CylinderNotFound  No cylinder was found with the given CylinderID.
SceneNotFound  No scene was found with given SceneID.
VerticesNotIncident  The 2 given vertices are not incident (do not share an edge).
EdgesNotIncident  The 2 given edges are not incident (do not share a common vertex).
FacesNotIncident  The 2 given faces are not incident (do not share an edge).
SameVertexGiven  The 2 given VertexID's represent the same vertex.
SameEdgeGiven  The 2 given EdgeID's represent the same edge.
SameFaceGiven  The 2 given FaceID's represent the same face.
FaceExists  Given face already exists in the mesh.
TimeOut  There was a time-out while waiting for the user to pick an object.
VertexIsOrphan  The given vertex is orphan (is not associated with any face, therefore doesn't have a neighborhood).
SceneUnremovable  Scene cannot be removed (usually because the user asked to remove the current scene).


Function Documentation

RESULT getVersion char *    version
 

Get the current sotware version.

Parameters:
version An allocated
Return values:
OK Operation succeeded
NullPointerGiven version is NULL
Note:
If version is not NULL, the function will copy the version into it. version needs to be allocated by the user before use, and it should be long enough to contain the current version


MeshMaker 5.2 Manual
This software library was written by Roni Raab, ronir@cs.technion.ac.il.
Last updated on May 2003.
This software is for academic and research use only.