| |||||||||
|
|
| |||||||
|
| ||||||||
| |||||||||
#include "vg.h" // Required for the standard Vega classes
int setVegaObjectPosition( vgObject *object , 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 vgObject // # // # returns VG_SUCCESS if the Object can be positioned // # // # otherwise returns VG_FAILURE // # // # // ################################################################## vgPosition *pos = NULL; int result = VG_FAILURE;
// // Sanity check we need a vgObject // if( object == NULL ) return VG_FAILURE;
// // Retrieve the coord type of the object // int cstype = vgGetProp ( object, VGOBJ_CS );
// // If the object is a Static we cannot position it // if( cstype == VGPOBJ_STATIC ) return VG_FAILURE;
// // Create a vgPos // pos = vgNewPos(); if( pos == NULL ) return VG_FAILURE;
// // Set the vgPos to the passed in coordinates // vgPosVec( pos, x, y, z, h, p, r );
// // Set position of the object // vgPos( object, pos );
// // Release the vgPos as where done // vgDelPos( pos);
return VG_SUCCESS;
} // setVegaObjectsPosition
| ||
© Copyright 2004 Gordon Tomlinson All Rights Reserved. All logos, trademarks and copyrights in this site are property of their respective owner. |