BRL-CAD
Collaboration diagram for Fortran:

Files

file  fortray.c
 

Data Structures

struct  context
 

Macros

#define CONTEXT_LEN   6 /* Reserve this many FORTRAN Doubles for each */
 

Functions

HIDDEN int fr_hit (struct application *ap, struct partition *headp, struct seg *segp)
 
HIDDEN int fr_miss (struct application *ap)
 
void fr_string_c2f (register char *fstr, register char *cstr, register int flen)
 
void BU_FORTRAN (frdir, FRDIR)
 
void BU_FORTRAN (frtree, FRTREE)
 
void BU_FORTRAN (frprep, FRPREP)
 
void BU_FORTRAN (frshot, FRSHOT)
 
void BU_FORTRAN (frnorm, FRNORM)
 
void BU_FORTRAN (frnreg, FRNREG)
 
void BU_FORTRAN (frname, FRNAME)
 

Detailed Description

Macro Definition Documentation

#define CONTEXT_LEN   6 /* Reserve this many FORTRAN Doubles for each */

Definition at line 160 of file fortray.c.

Function Documentation

HIDDEN int fr_hit ( struct application ap,
struct partition headp,
struct seg segp 
)

Definition at line 43 of file fortray.c.

References partition::pt_back, partition::pt_forw, RT_CK_AP, RT_CK_PT_HD, and RT_CK_SEG.

Referenced by BU_FORTRAN().

HIDDEN int fr_miss ( struct application ap)

Definition at line 63 of file fortray.c.

References partition::pt_back, partition::pt_forw, and RT_CK_AP.

Referenced by BU_FORTRAN().

void fr_string_c2f ( register char *  fstr,
register char *  cstr,
register int  flen 
)

Take a null-terminated C string, and place it with space padding on the right into a FORTRAN string of given length.

Definition at line 77 of file fortray.c.

Referenced by BU_FORTRAN().

void BU_FORTRAN ( frdir  ,
FRDIR   
)

FORTRAN to RT interface for rt_dirbuild()

XXX NOTE Apollo FORTRAN passes string length as extra (invisible) argument, by value. Other systems probably are different.

XXX On some systems, the C standard I/O library may need to be initialized here (e.g., Cray).

Definition at line 125 of file fortray.c.

References rt_dirbuild().

Here is the call graph for this function:

void BU_FORTRAN ( frtree  ,
FRTREE   
)

Add another top-level tree to the in-core geometry.

Definition at line 138 of file fortray.c.

References RT_CHECK_RTI, and rt_gettree().

Here is the call graph for this function:

void BU_FORTRAN ( frprep  ,
FRPREP   
)

Definition at line 153 of file fortray.c.

References RT_CHECK_RTI, and rt_prep().

Here is the call graph for this function:

void BU_FORTRAN ( frshot  ,
FRSHOT   
)

NOTE that the [0] element here corresponds with the caller's (1) element.

Definition at line 174 of file fortray.c.

References application::a_hit, application::a_level, application::a_miss, application::a_onehit, application::a_purpose, application::a_ray, application::a_resource, application::a_rt_i, bu_log(), context::co_inflip, context::co_priv, context::co_stp, context::co_vpriv, fr_hit(), fr_miss(), FREE_PT, partition::pt_forw, xray::r_dir, xray::r_pt, resource::re_magic, RESOURCE_MAGIC, RT_APPLICATION_INIT, RT_CHECK_RTI, rt_shootray(), rt_uniresource, X, Y, and Z.

Here is the call graph for this function:

void BU_FORTRAN ( frnorm  ,
FRNORM   
)

Given the data returned by a previous call to frshot(), compute the surface normal at the entry point to the indicated solid.

In order to save storage, and copying time, frshot() saved only the minimum amount of data required. Here, the hit and xray structures are reconstructed, suitable for passing to RT_HIT_NORMAL.

Definition at line 273 of file fortray.c.

References context::co_inflip, context::co_priv, context::co_stp, context::co_vpriv, hit::hit_dist, hit::hit_private, hit::hit_vpriv, and RT_HIT_NORMAL.

void BU_FORTRAN ( frnreg  ,
FRNREG   
)

Return the number of regions that exist in the model

Definition at line 303 of file fortray.c.

void BU_FORTRAN ( frname  ,
FRNAME   
)

Given a region number (range 1..nregions), return the right-hand portion of the name in the provided buffer.

XXX buflen is provided "automatically" on the Apollo.

Definition at line 316 of file fortray.c.

References BU_LIST_FOR, bu_strlcpy, fr_string_c2f(), region::reg_bit, and region::reg_name.

Here is the call graph for this function: