next up previous contents index
Next: TimeScene Up: Chain Previous: Memory Methods on Chain

Other Methods on Chain

 

     

GRAPE(chain, "get-object")(chain_inter, time)
CHAIN *chain
CHAIN *chain_inter
double time

This method assumes that chain has components on which also a "get-object" method exist. Then a copy of chain is returned in chain-inter but with the result of sending "get-object" to chain->object as objects instances. If chain-inter is NULL a new chain is allocated and returned.

     

GRAPE(chain, "get-link")(obj_index)
CHAIN *chain
int obj_index

This method returns the obj_index_th link in chain. If no chain is found NULL is returned.

     

(INSTANCE *)GRAPE(chain, "get-link-step")(obj-index, time)
CHAIN *chain
int obj-index
double time

This method assumes that the instance object points to an instance of class TimeStep. It searches the obj_index-th link in the chain and searches in (TIMESTEP *)link->object for the step with the next smaller step->time than time.

           

(INSTANCE *)GRAPE(chain, "get-link-pre-obj")(obj_index, time)
(INSTANCE *)GRAPE(chain, "get-link-post-obj")(obj_index, time)
CHAIN *chain
int obj_index
double time

Like "get-link-step" but instead of returning the timestep its pre or post object is returned.

     

GRAPE(chain, "universal")(method)
CHAIN *chain
char *method

The method method is send to chain->object and all of its next-scenes objects.

     

GRAPE(chain, "interpol")(chain1, chain2, factor)
GRAPE(chain, "interpol-fac")(chain1, chain2, fac1, fac2)
CHAIN *chain
CHAIN *chain1, *chain2
double factor
double fac1, fac2

This methods assumes that chain1 and chain2 have objects on which also "interpol" methods exist. Then an ``interpolated'' chain is returned ((1 - factor) * chain1 + factor * chain2 respectively fac1 * chain1 + fac2 * chain2) which has the result of sending "interpol" to chain1->object and chain2->object as chain->object.

     

GRAPE(chain, "refine")(time)
GRAPE(chain, "coarsen")(time)
CHAIN *chain
double time

Refine or coarsen the objects of chain and all of its next-scenes around time by sending "refine" or "coarsen" to chain->object and chain->next-scene.

     

(CHAIN *)GRAPE(chain, "cons-close")()
CHAIN *chain

During "close-send" on a Geom2d instance some parameter lines or boundary curves may become unused. These lines are detected and removed with this routine. Be careful: on return the original list pointer may have changed when the first list link is removed, therefore the new pointer is returned.

     

GRAPE(chain, "find-pick-index")(v, obj_index, index, u, w, obj, dist)
CHAIN *chain
VEC3 v
int *obj_index, *index
double u, w double *dist
INSTANCE **obj

Search for a point v in the chain chain for which the distance from the straight line (u, w, .) to mat * v is less than sqrt(dist). If such a point is found *obj is set to the found chain, v to the new point, *index to the index of the point, *obj_index to the index of the picked object and *dist to the new distance. The picked chain instance is returned.


next up previous contents index
Next: TimeScene Up: Chain Previous: Memory Methods on Chain

SFB 256 Universität Bonn and IAM Universität Freiburg

Copyright © by the Sonderforschungsbereich 256 at the Institut für Angewandte Mathematik, Universität Bonn.