Help for this page

Select Code to Download


  1. or download this
       float fOrient = GetFacing( GetFirstPC() -90.0 );
    
       float fX = cos( fOrient/2 );
       float fY = sin( fOrient/2);
    
  2. or download this
        # The below section should do the math right.
    
        my $pi = 3.14159265358979;
    ...
        my @cam_quats = calc_quatcam($cam_ori1, $cam_ori4);
        my $qx = @cam_quats[0];
        my $qy = @cam_quats[1];
    
  3. or download this
        my $ori_deglab = $ori_framey->Label(-text=>"Facing (in Degrees):")
    +->pack(-side=>left);
        my $ori_deg = $ori_framey->Spinbox(-from=>0.0, -to=>360.0, -increm
    +ent=>0.5, -width=>12, -command=>sub {
                    my $deg = shift;
    ...
        $ori_deg->set($qy);
        $ori_xlab = $ori_framey1->Label(-text=>"X Quaternion Value: $quatx
    +", -font=>[-family=>'fixed', -size=>10], -width=>30)->pack(-expand=>1
    +, -fill=>x);
        $ori_ylab = $ori_framey2->Label(-text=>"Y Quaternion Value: $quaty
    +", -font=>[-family=>'fixed', -size=>10], -width=>30)->pack(-expand=>1
    +, -fill=>x);