From:          "Jonathan Wolff" <RODNEY/JON>
To:            "Marty 'Bunny' kins" <BAGPUSS/MARTINP>
Date:          Thu, 22 May 1997 12:50:18 +0
Subject:       Re: Little query for you.
X-mailer: Pegasus Mail v3.22
X-PMFLAGS: 1048704

> Before I go through the render pass I need to calculate the exact 3D 
> postion of a point inside one of the leaf models. This is for the 
> purpose of adding special effects at certain positions.

It's not clear to me if you want to take a point in the model's 
coordinate space and generate an object there, or if you want to take 
a point in world space and find out what point it corresponds to in 
model space.

If it's the former case, then can't you just create the object as the 
child of the actor it's relative to?

It it's the latter case, or you want the object to stay where it 
is in world space when the other actor moves, you can use 
BrActorToActorMatrix34 to generate the transformation from one actor's 
coordinate space to another, and BrMatrixApplyV to transform the 
coordinate, so to transform a point in model space into world space 
you would do (I haven't checked it, you might need to swap the 
actor pointers around):

    br_actor *object;
    br_actor *world;
    br_vector3 vm;

    br_matrix34 m_to_w;
    br_vector3 vw;
    
    BrActorToActorMatrix34(&m_to_w, object, world);
    BrMatrix34ApplyV(&vw, &vm, &m_to_w);




--
                                            .-----------------------------.
                                            `-----.  .---.-----.-.--.----.'
                                                  `.  `.|  .-.  |`.  .-.  |
                                             .-----'   ||  `-'  | |  |.'  |
                                            |  .------'  `-----'  `--'`--'
                                            `--'
