Index

 E3d_CameraUpdateViewDirection
 E3d_CameraCalcOrbit
 E3d_CameraDefault
 E3d_CameraSet
 E3d_CameraAllocate
 E3d_CameraFree


E3d_CameraUpdateViewDirection

Calculate ViewDistance and the unit-length vector of the line of sight

Syntax
 void E3d_CameraUpdateViewDirection(E3dCamera* LCamera)
Argument
 E3dCamera* LCamera        Pointer to the Camera structure
Description
  Calculates the ViewDistance and the unit-length vector of the line of sight for the given Camera and sets the appropriate fields in the Camera structure.

Return value
None.

See also
E3d_CameraCalcUpVector

E3d_CameraCalcOrbit

Calculate camera Longitude & Latitude angles from position

Syntax
 void E3d_CameraCalcOrbit(E3dCamera* LCamera)
Argument
 E3dCamera* LCamera        Pointer to the Camera structure
Description
Computes the Longitude & Latitude angles from the cameara and interest position.

Return value
None.

See also
E3d_CameraCalcUpVector, E3d_CameraUpdateViewDirection

E3d_CameraDefault

Initialize Camera structure

Syntax
 void E3d_CameraDefault(E3dCamera* LCamera)
Argument
 E3dCamera* LCamera      Pointer to the Camera structure
Description
E3d_CameraDefault initializes an E3dCamera structure to reasonable default values. This function must be called for E3dCamera structures not allocated by E3d_CameraAllocate().

Return value
None.

E3d_CameraSet

Initialize Camera position and field-of-view

Syntax
 void E3d_CameraSet(E3dCamera* LCamera, double LXPos, double LYPos, double LZPos,
                    double LFieldOfView, double LZoom, double LZNear, double LZFar,
                    double LEyeDistance)
Argument
 E3dCamera* LCamera        Pointer to the Camera structure
 double     LXPos          Position X
 double     LYPos          Position Y
 double     LZPos          Position Z
 double     LFieldOfView   Field of view in degrees in the Y direction
 double     LZoom          Zoom factor for orthogonal views
 double     LZNear         Near clipping plane Z depth
 double     LZFar          Far clipping plane Z depth
 double     LEyeDistance   Eye distance for stereoscopic 3D
Description
E3d_CameraSet initializes an E3dCamera structure to the given values and updates the Camera's auxiliary information.

Return value
None.

E3d_CameraAllocate

Allocate and initialize a Camera structure

Syntax
 E3dCamera* E3d_CameraAllocate(void)
Arguments
None.

Description
E3d_CameraAllocate allocates and initializes an new E3dCamera structure.

Return value
Pointer to the newly allocated E3dCamera structure or NULL in case of an error.

E3d_CameraFree

Free a Camera structure

Syntax
 void E3d_CameraFree(E3dCamera* LCamera)
Argument
 E3dCamera* LCamera    The Camera structure to be freed
Description
This function first decrements the reference count (RefCnt) of the given Camera structure (if it's not already zero). After that, if RefCnt is still greater than zero, it means that something other than the function calling E3d_CameraFree() is still referring to this Camera, so E3d_CameraFree() will simply return. If RefCnt is zero, E3d_CameraFree() will free the Camera structure.

Return value
None.