Title |
Data B> |
Data Name |
No |
typedef struct SprObject3D {
Uint16 no; / * Object number * /
Uint16 dispFlag / * Display flag * /
Uint16 vertCount; / * Number of vertices * /
Uint16 surfaceCount; / * Number of surfaces * /
MthXyz * vertPoint; / * Vertex coordinate table * /
MthXyz * vertNormal; / * Vertex normal vector table * /
SprSurface * surface; / * Surface definition table * /
MthXyz * surfaceNormal; / * Surface normal vector table * /
MthXyz * surfaceVert; / * Surface representative point coordinate table * /
Uint16 ** shdIdxTbl; / * Shading index table * /
Fixed32 surfNormK; / * Surface normal vector calculation correction value * /
SprObject3D * next; / * Next 3D object * /
} SprObject3D;
no is for user callback routines to identify the object table and is optional.
dispFlag b15, b14 = 00: Polygon display = 10: Polyline displayb12 = 1: Double-sided polygon
b9, b8 = 00: No shading 01: Flat shading 10: Gouraud shading
b4 = 1: Inter-object connection polygon object
vertNormal: Set when performing Gouraud shading. surface: Pointer of the table that defines the vertices constituting the surface and color information for each surface surfaceNormal: table pointer that defines normals for each surface surfaceVert: Sets the pointer of the representative point (center point) coordinate table of the surface to be referenced when calculating the brightness of the surface. Set. If 0 is set, the first vertex of the surface definition is used as the representative point. shdIdxTbl: When performing flat shading with a shading table, shading Set the table index table. When Gouraud shading is specified, ∙ When this parameter is specified, shdIdxTbl [0] is set to Gouraud shading gray code. This is a table. Flat shading and surface definition drawing mode is texture If this parameter is specified when specified, shdIdxTbl [0] is set to flat shaded. グ Gray code table. surfNormK: Calculates the surface normal vector for this object using the SPR_3SetNormVect () routine. When calculating, or when this object is an inter-object connected polygon object Specify in. For details, see sur on the MTH_ComputeNormVect () routine of the mathematical calculation library. Refer to the fNormK parameter. ∙ Specify a negative value for inter-object connection polygon objects.