| |||||||||
|
|
| |||||||
|
| ||||||||
| |||||||||
#include "vg.h" // Required for the standard Vega classes
int setVegaPartsPosition( vgPart *part , const float x, const float y, const float z , const float h, const float p, const float r ){
// ################################################################## // # Public function // # // # Function shows how to set the position of a vgPart // # returns VG_SUCCESS if the Part can be positioned // # otherwise retruns VG_FAILURE // # // ################################################################## vgPosition *pos = NULL; int result = VG_FAILURE;
// // Sanity check we need a vgPart // if( part == NULL ) return result;
// // Retrieve the node type of the part // int parttype = vgGetProp ( part, VGPART_TYPE );
// // If the part is a DCS we can position it // if( parttype == VGPART_DCS ){
// // Create a vgPos // pos = vgNewPos(); if( pos == NULL ) return result;
// // Set the vgPos to the passed in coordinates // vgPosVec( pos, x, y, z, h, p, r );
// // Set position of the vgpart // vgPos( part, pos );
result = VG_SUCCESS;
// // Release the vgPos as where done // vgDelPos( pos); }
return result;
} // setVegaPartsPosition
| ||
© Copyright 2004 Gordon Tomlinson All Rights Reserved. All logos, trademarks and copyrights in this site are property of their respective owner. |