在VSL中,为了获取 GUID,你得使用 GetGUID 函数:
返回值 | 函数 | 参数 |
---|---|---|
GUID | GetGUID | iGuidEnum (PGUID ) |
以下为枚举PGUID的描述:
PGUID
- GUID_DIRECTION
GUID_NONE
GUID_FLOAT
GUID_ANGLE
GUID_PERCENTAGE
GUID_INT
GUID_KEY
GUID_BOOL
GUID_STRING
GUID_RECT
GUID_VECTOR
GUID_2DVECTOR
GUID_QUATERNION
GUID_EULERANGLES
GUID_MATRIX
GUID_COLOR
GUID_BOX
GUID_OBJECTARRAY
GUID_OBJECT
GUID_BEOBJECT
GUID_MESH
GUID_MATERIAL
GUID_TEXTURE
GUID_SPRITE
GUID_3DENTITY
GUID_CURVEPOINT
GUID_LIGHT
GUID_TARGETLIGHT
GUID_ID
GUID_CAMERA
GUID_TARGETCAMERA
GUID_SPRITE3D
GUID_OBJECT3D
GUID_BODYPART
GUID_CHARACTER
GUID_CURVE
GUID_2DCURVE
GUID_LEVEL
GUID_PLACE
GUID_GROUP
GUID_2DENTITY
GUID_RENDEROBJECT
GUID_SPRITETEXT
GUID_SOUND
GUID_WAVESOUND
GUID_MIDISOUND
GUID_OBJECTANIMATION
GUID_ANIMATION
GUID_KINEMATICCHAIN
GUID_SCENE
GUID_BEHAVIOR
GUID_MESSAGE
GUID_SYNCHRO
GUID_CRITICALSECTION
GUID_STATE
GUID_ATTRIBUTE
GUID_CLASSID
GUID_VOIDBUF
GUID_BLENDMODE
GUID_FILTERMODE
GUID_BLENDFACTOR
GUID_FILLMODE
GUID_LITMODE
GUID_SHADEMODE
GUID_GLOBALEXMODE
GUID_ZFUNC
GUID_ADDRESSMODE
GUID_WRAPMODE
GUID_3DSPRITEMODE
GUID_FOGMODE
GUID_LIGHTTYPE
GUID_SPRITEALIGN
GUID_SCRIPT
GUID_LAYERTYPE
GUID_STATECHUNK
GUID_DATAARRAY
GUID_COMPOPERATOR
GUID_BINARYOPERATOR
GUID_SETOPERATOR
GUID_SPRITETEXTALIGNMENT
GUID_OBSTACLEPRECISION
GUID_OBSTACLEPRECISIONBEH
GUID_OBSTACLE
GUID_PATCHMESH
GUID_POINTER
GUID_ENUMS
GUID_STRUCTS
GUID_FLAGS
GUID_FILTER
GUID_TIME
GUID_OLDTIME
GUID_COPYDEPENDENCIES
GUID_DELETEDEPENDENCIES
GUID_SAVEDEPENDENCIES
GUID_REPLACEDEPENDENCIES
GUID_SCENEACTIVITYFLAGS
GUID_SCENEOBJECT
GUID_SCENERESETFLAGS
GUID_ARRAYTYPE
GUID_RENDEROPTIONS
GUID_PARAMETERTYPE
GUID_MATERIALEFFECT
GUID_TEXGENEFFECT
GUID_TEXGENREFEFFECT
GUID_COMBINE2TEX
GUID_COMBINE3TEX
GUID_BUMPMAPPARAM
GUID_TEXCOMBINE
GUID_PIXELFORMAT
GUID_AXIS
GUID_SUPPORT
GUID_BITMAP_SYSTEMCACHING
GUID_OLDMESSAGE
GUID_OLDATTRIBUTE
实例:
void main()
{
// Create an array.
Array myArray = bc.CreateArray("MyArray", false, true);
/// Then we add some columns.
//
// Add an Entity3D column.
myArray.InsertColumn(-1, CKARRAYTYPE_OBJECT, "entity", GetGUID(GUID_3DENTITY) );
// Add an int column.
myArray.InsertColumn(-1, CKARRAYTYPE_INT, "age", GetGUID(GUID_INT) );
// Add 10 Vector columns.
GUID guid_vector = GetGUID(GUID_VECTOR) ;
String columnName;
for (int i = 0; i < 10; ++i) {
columnName = "vector";
columnName += i;
myArray.InsertColumn(-1, CKARRAYTYPE_PARAMETER, columnName.Str(), guid_vector );
}
}