| |||||||||
| 
             
  | 
             
  | 
             
  | |||||||
| 
             
  | 
            
  | ||||||||
| 
             
  | |||||||||
| 
                 
 #include "vg.h"           // Required for the standard Vega classes
 
 void getVegaObjectsWorldXYZ( vgObject *obj, float *x, float *y, float *z ){ // ################################################################## // # Public function // # // # Function shows to retrieve the current World(WCS) X,Y,Z // # coordinates of the give Vega Object // # // ################################################################## float d = 0.0f; vgPosition *pos = NULL; 
 
 // // Sanity check we need a vgObject // if( obj == NULL ) return; 
 
 // // Create a vgPos // pos = vgNewPos(); if( pos == NULL ) return; 
 
 // // Retrieve the current World(WCS) position from the object // vgGetWCSPos( obj, pos ); 
 
 // // Now retrieve the position translation vector // vgGetPos( pos, x, y, z, d, d, d ); 
 
 
 // // Release the vgPos as where done // vgDelPos( pos); 
 } // getVegaObjectsWorldXYZ 
 
 void getVegaObjectsWorldHPR( vgObject *obj, float *h, float *p, float *r ){ // ################################################################## // # Public function // # // # Function shows to retrieve the current World(WCS) H,P,R // # coordinates of the give Vega Object // # // ################################################################## float d = 0.0f; vgPosition *pos = NULL; 
 
 // // Sanity check we need a vgObject // if( obj == NULL ) return; 
 
 // // Create a vgPos // pos = vgNewPos(); if( pos == NULL ) return; 
 
 // // Retrieve the current World(WCS) position from the object // vgGetWCSPos( obj, pos ); 
 
 // // Now retrieve the positions orientation vector // vgGetPos( pos, d, d, d, h, p, r ); 
 
 
 // // Release the vgPos as where done // vgDelPos( pos); 
 } // getVegaObjectsWorldHPR 
 
 
 void getVegaObjectsWorldPos( vgObject *obj , float *x, float *y, float *z , float *h, float *p, float *r ){ 
 // ################################################################## // # Public function // # // # Function shows to retrieve the current World(WCS) X,Y,Z H,P,R // # coordinates of the give Vega Object // # // ################################################################## vgPosition *pos = NULL; 
 
 // // Sanity check we need a vgObject // if( obj == NULL ) return; 
 
 // // Create a vgPos // pos = vgNewPos(); if( pos == NULL ) return; 
 
 // // Retrieve the current World(WCS) position from the object // vgGetWCSPos( obj, pos ); 
 
 // // Now retrieve the position translation vector // vgGetPos( pos, x, y, z, h, p, r ); 
 
 
 // // Release the vgPos as where done // vgDelPos( pos); 
 } // getVegaObjectsWorldPos 
 
 
 
  | ||
| 
  
 
 © Copyright 2004 Gordon Tomlinson All Rights Reserved. All logos, trademarks and copyrights in this site are property of their respective owner.  | ||