![]() |
![]() |
![]() |
V_Sim API - Reference Manual | ![]() |
---|---|---|---|---|
#define RESOURCES_CYLINDER_RADIUS_MIN #define RESOURCES_CYLINDER_RADIUS_MAX PairsExtension* initPairsCylinder (); PairsExtension* cylinderGet_static (); int setCylinderGeneralRadius (float val); float getCylinderGeneralRadius (); int setCylinderRadius (VisuPairData *data, float val); float getCylinderRadius (VisuPairData *data); int setCylinderColorType (int val); int getCylinderColorType ();
The cylinders have two characteristics: their radius and their colour. Their radius are in the units of the rendered box. They can be specific to each kind of pairs (e.g. Si-Si) or they have a default value. Only the default value is stored in the resource file with the flag "pairCylinder_radius". Their color is herited by the colour of the pair. The lighting values (i.e. emi., shi., spe. ...) are not movable and are fixed to amb = 0.5, dif = 0.5, shi = 0, spe = 0, emi = 0.
#define RESOURCES_CYLINDER_RADIUS_MIN 0.01f
Minimum value for the radius of cylinder pairs.
#define RESOURCES_CYLINDER_RADIUS_MAX 3.f
Maximum value for the radius of cylinder pairs.
PairsExtension* initPairsCylinder ();
This method is used by V_Sim on startup, don't use it on your own.
Returns : |
the cylinder pair extension. |
int setCylinderGeneralRadius (float val);
This method allows to change the default value of radius for cylinder pairs.
When a pair is rendered via a cylinder, it first checks if that pairs has
a specific radius value. If not, it uses the default value set by this method.
If the default value is indeed changed, the pairs OpenGl list is not
recreated automatically and the calling method should call the visuPairBuild()
method
according to the return value.
|
a float value. |
Returns : |
1 if the calling method should call the visuPairBuild() method, 0 if not.
|
float getCylinderGeneralRadius ();
Get the default value for cylinder radius.
Returns : |
the default value for cylinder radius. |
int setCylinderRadius (VisuPairData *data, float val);
This method allows to change the radius value of a specific pair.
When a pair is rendered via a cylinder, it first checks if that pairs has
a specific radius value set by this method. If not, it uses the default value.
If the specific value is indeed changed, the pairs OpenGl list is not
recreated automatically and the calling method should call the visuPairBuild()
method
according to the return value.
|
a VisuPairData object ; |
|
a float value. |
Returns : |
1 if the calling method should call the visuPairBuild() method, 0 if not.
|
float getCylinderRadius (VisuPairData *data);
Get the radius value for the specified pair.
|
a VisuPairData object. |
Returns : |
the radius value. |
int setCylinderColorType (int val);
It set the color scheme for cylinder pairs. It can be 0 or 1.
|
a integer that identify the color scheme. |
Returns : |
1 if the calling method should call visuPairBuild() and then
emit the redrawing signal, 0 if not.
|