|
|
关于positonColored构造函数的问题
public PositionColored( float xvalue, float yvalue, float zvalue, int c );
对参数的说明Parameters
第一个参数(xvalue)
System.Single Floating-point value that represents the x coordinate of the position.
第二个参数(yvalue )
System.Single Floating-point value that represents the y coordinate of the position.
第三个参数(zvalue)
System.Single Floating-point value that represents the z coordinate of the position.
第四个参数(c)
System.Int32 Integer that represents the diffuse color value.
我想问的是
1、如果我想画一个长宽高分别为600mm,500mm,300mm的长方体如何将长度转化成float类型,如何实例化PositonColored呢?还是简单的写成600f,500f,300f呢
2、构造函数中的第四个参数已int类型表示颜色值,我如何才能知道想得到的颜色的Int值表示呢,比如蓝色的int值是多少呢?这个颜色值如何和windows应用程序联系起来呢?如果我已经知道了颜色RGB值,如何转换成这里需要的int类型呢?
小弟拜谢了!!!
|
|