spline alignment issue



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 15/04/2005 at 09:09, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   9.1 
    Platform:   Windows  ;   
    Language(s) :     C++  ;

    ---------
    Hello all.
    I'm trying to align an object to a spline.
    All works great as long as the spline's axis is aligned to it's parent's axis.

    I know I'm missing something obvious, but if someone feels like nudging me in the right direction it would be much appreciated.

    Here's what I've got:

      
    vPosition = splineObj->GetSplinePoint(splinePos, 0, NULL);  
    vTangent = splineObj->GetSplineTangent(splinePos, 0, NULL);  
      
    m.off = vPosition;  
    m.v3 = vTangent;  
    m.v2 = Vector(0,1,0);  
    m.v1 = m.v3 % m.v2;  
    m.v2 = m.v3 % m.v1;  
      
    op->SetMg(m);  
    

    -chris



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 21/04/2005 at 13:35, xxxxxxxx wrote:

    Do "op->SetMg(splineObj->GetMg() * m)" to convert m, which is currently expressed in local coordinates of the spline, to world coordinates.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 21/04/2005 at 14:40, xxxxxxxx wrote:

    Thanks Mikael... I knew it was something simple....

    -chris


Log in to reply