mirror of
				https://github.com/scottdraves/flam3.git
				synced 2025-11-03 18:00:41 -05:00 
			
		
		
		
	Changed 'prepare_xform_fn_ptrs' to 'prepare_precalc_flags' as the old name no longer applied. Removed dependency of said function on the random context as it is not used in the function.
git-svn-id: https://flam3.googlecode.com/svn/trunk@5 77852712-ef1d-11de-8684-7d64432d61a3
This commit is contained in:
		
				
					committed by
					
						
						Scott Draves
					
				
			
			
				
	
			
			
			
						parent
						
							52c9c10b8e
						
					
				
				
					commit
					9e40cff938
				
			
							
								
								
									
										14
									
								
								src/flam3.c
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								src/flam3.c
									
									
									
									
									
								
							@ -309,7 +309,7 @@ int flam3_xform_preview(flam3_genome *cp, int xi, double range, int numvals, int
 | 
			
		||||
   cp->xform[xi].density = 1.0;
 | 
			
		||||
   
 | 
			
		||||
   /* Prepare the function pointers */
 | 
			
		||||
   if (prepare_xform_fn_ptrs(cp,rc)) {
 | 
			
		||||
   if (prepare_precalc_flags(cp)) {
 | 
			
		||||
      cp->xform[xi].density = oldweight;
 | 
			
		||||
      return(1);
 | 
			
		||||
   }
 | 
			
		||||
@ -369,7 +369,7 @@ int flam3_colorhist(flam3_genome *cp, int num_batches, double *hist) {
 | 
			
		||||
    sub_batch[3] = 0;
 | 
			
		||||
 | 
			
		||||
    // get into the attractor
 | 
			
		||||
    if (prepare_xform_fn_ptrs(cp,&rc))
 | 
			
		||||
    if (prepare_precalc_flags(cp))
 | 
			
		||||
       return(1);
 | 
			
		||||
      
 | 
			
		||||
    xform_distrib = flam3_create_xform_distrib(cp);
 | 
			
		||||
@ -3419,7 +3419,7 @@ int flam3_estimate_bounding_box(flam3_genome *cp, double eps, int nsamples,
 | 
			
		||||
   points[2] = 0.0;
 | 
			
		||||
   points[3] = 0.0;
 | 
			
		||||
 | 
			
		||||
   if (prepare_xform_fn_ptrs(cp,rc))
 | 
			
		||||
   if (prepare_precalc_flags(cp))
 | 
			
		||||
      return(-1);
 | 
			
		||||
   xform_distrib = flam3_create_xform_distrib(cp);
 | 
			
		||||
   if (xform_distrib==NULL)
 | 
			
		||||
@ -3834,7 +3834,7 @@ double flam3_dimension(flam3_genome *cp, int ntries, int clip_to_camera) {
 | 
			
		||||
    subb[1] = flam3_random_isaac_11(&rc);
 | 
			
		||||
    subb[2] = 0.0;
 | 
			
		||||
    subb[3] = 0.0;
 | 
			
		||||
    if (prepare_xform_fn_ptrs(cp,&rc))
 | 
			
		||||
    if (prepare_precalc_flags(cp))
 | 
			
		||||
      return(-1.0);
 | 
			
		||||
    xform_distrib = flam3_create_xform_distrib(cp);
 | 
			
		||||
    if (xform_distrib==NULL)
 | 
			
		||||
@ -3929,7 +3929,7 @@ double flam3_lyapunov(flam3_genome *cp, int ntries) {
 | 
			
		||||
    p[3] = 0.0;
 | 
			
		||||
 | 
			
		||||
    // get into the attractor
 | 
			
		||||
    if (prepare_xform_fn_ptrs(cp,&rc))
 | 
			
		||||
    if (prepare_precalc_flags(cp))
 | 
			
		||||
      return(-1.0);
 | 
			
		||||
    xform_distrib = flam3_create_xform_distrib(cp);
 | 
			
		||||
    if (xform_distrib==NULL)
 | 
			
		||||
@ -3944,7 +3944,7 @@ double flam3_lyapunov(flam3_genome *cp, int ntries) {
 | 
			
		||||
    // take one deterministic step
 | 
			
		||||
    srandom(i);
 | 
			
		||||
 | 
			
		||||
    if (prepare_xform_fn_ptrs(cp,&rc))
 | 
			
		||||
    if (prepare_precalc_flags(cp))
 | 
			
		||||
      return(-1.0);
 | 
			
		||||
    xform_distrib = flam3_create_xform_distrib(cp);
 | 
			
		||||
    if (xform_distrib==NULL)
 | 
			
		||||
@ -3973,7 +3973,7 @@ double flam3_lyapunov(flam3_genome *cp, int ntries) {
 | 
			
		||||
 | 
			
		||||
    // take the same step but with eps
 | 
			
		||||
    srandom(i);
 | 
			
		||||
    if (prepare_xform_fn_ptrs(cp,&rc))
 | 
			
		||||
    if (prepare_precalc_flags(cp))
 | 
			
		||||
      return(-1.0);
 | 
			
		||||
    xform_distrib = flam3_create_xform_distrib(cp);
 | 
			
		||||
    if (xform_distrib==NULL)
 | 
			
		||||
 | 
			
		||||
@ -746,7 +746,7 @@ static int render_rectangle(flam3_frame *spec, void *out,
 | 
			
		||||
         flam3_interpolate(spec->genomes, spec->ngenomes, temporal_sample_time, 0, &cp);
 | 
			
		||||
 | 
			
		||||
         /* Get the xforms ready to render */
 | 
			
		||||
         if (prepare_xform_fn_ptrs(&cp, &spec->rc)) {
 | 
			
		||||
         if (prepare_precalc_flags(&cp)) {
 | 
			
		||||
            fprintf(stderr,"prepare xform pointers returned error: aborting.\n");
 | 
			
		||||
            return(1);
 | 
			
		||||
         }
 | 
			
		||||
 | 
			
		||||
@ -1982,7 +1982,7 @@ void xform_precalc(flam3_genome *cp, int xi) {
 | 
			
		||||
   wedgeJulia_precalc(&(cp->xform[xi]));   
 | 
			
		||||
}   
 | 
			
		||||
 | 
			
		||||
int prepare_xform_fn_ptrs(flam3_genome *cp, randctx *rc) {
 | 
			
		||||
int prepare_precalc_flags(flam3_genome *cp) {
 | 
			
		||||
 | 
			
		||||
   double d;
 | 
			
		||||
   int i,j,totnum;
 | 
			
		||||
 | 
			
		||||
@ -133,7 +133,7 @@ void supershape_precalc(flam3_xform *xf);
 | 
			
		||||
void wedgeJulia_precalc(flam3_xform *xf);
 | 
			
		||||
 | 
			
		||||
void xform_precalc(flam3_genome *cp, int xi);
 | 
			
		||||
int prepare_xform_fn_ptrs(flam3_genome *, randctx *);
 | 
			
		||||
int prepare_precalc_flags(flam3_genome *);
 | 
			
		||||
 | 
			
		||||
int apply_xform(flam3_genome *cp, int fn, double *p, double *q, randctx *rc);
 | 
			
		||||
void initialize_xforms(flam3_genome *thiscp, int start_here);
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user