将基于外部存储的对象转换为基于内部存储的Raw形式。
语法
sfmesh ST_AsRaw(sfmesh sfmeshObject,
boolean rawGeometry default true,
boolean rawMesh default true,
boolean rawMaterialdefault true,
boolean rawTexture default true );
meshgeom ST_AsRaw(meshgeom meshgeom);
texture ST_AsRaw(texture texture);
material ST_AsRaw(material material);参数
| 参数名称 | 描述 |
|---|---|
| material | material对象。 |
| texture | texture对象。 |
| sfmeshObject | sfmesh对象。 |
| meshgeom | meshgeom对象。 |
| rawGeometry | 是否需要将引用的geometry转为raw形式。 |
| rawMesh | 是否需要将引用的sfmesh转为raw形式。 |
| rawMaterial | 是否需要将引用的material转为raw形式。 |
| rawTexture | 是否需要将引用的texture转为raw形式。 |
描述
将基于外部存储的对象转换为基于内部存储的Raw形式。
示例
- 示例一:
-- texture SELECT ST_AsText(ST_AsRaw(ST_MakeTexture(225,225,'/home/example.jpeg'::cstring, false))); ------------------------------------------------------------------------------ {"compressionType" : "None", "format" : "JPEG", "wrap" : "Wrap", "type" : "Raw", "depth" : 3, "width" : 225, "height" : 225, "size" : 7921, "data" : "FFD8FFE0001...."} - 示例二:
-- Material SELECT ST_AsText(ST_AsRaw(ST_MakeMaterial('t_material'::text, 'the_material'::text, 'num=1'::text))); ----------------------------------------------------------------- {"type":"raw", "attributes": "ambient":"#FFDDEEAA", "diffuse" :"#FFDDEEAA","specular":"#FFDDEEAA","shininess":30,"transparency":70,"texture":2}}