I am writing an object to draw a cube. I draw each polygon by using `DrawPolygon()`

to draw it. I did not use `DrawBox()`

to draw because I don't know how to set the length of the side. When I use `DrawPolygon()`

to draw, the shadow of the cube is wrong, how to set its shadow.

```
DRAWRESULT Box_Obj::Draw(BaseObject *op, DRAWPASS drawpass, BaseDraw *bd, BaseDrawHelp *bh)
{
if (drawpass == DRAWPASS::OBJECT)
{
if (op == nullptr || bd == nullptr)
{
return DRAWRESULT::FAILURE;
}
GeData Ge_Date;
//Get side length information from parameters.
op->GetParameter(RIGID_SHAPE_SIZE_X, Ge_Date, DESCFLAGS_GET::NONE);
Float rigid_size_x = Ge_Date.GetFloat();
op->GetParameter(RIGID_SHAPE_SIZE_Y, Ge_Date, DESCFLAGS_GET::NONE);
Float rigid_size_y = Ge_Date.GetFloat();
op->GetParameter(RIGID_SHAPE_SIZE_Z, Ge_Date, DESCFLAGS_GET::NONE);
Float rigid_size_z = Ge_Date.GetFloat();
op->GetParameter(RIGID_GROUP_ID, Ge_Date, DESCFLAGS_GET::NONE);
//Set the drawing matrix to world coordinates.
bd->SetMatrix_Matrix(nullptr, Matrix());
//Get object coordinates.
Vector pos = op->GetAbsPos();
bd->SetLightList(BDRAW_SETLIGHTLIST_NOLIGHTS);
bd->SetTransparency(127);
Vector Box_vc[4] = {Vector(0)};
Vector Box_vp0[4] = {
Vector(pos.x + rigid_size_x, pos.y + rigid_size_y, pos.z + rigid_size_z),
Vector(pos.x + rigid_size_x, pos.y + rigid_size_y, pos.z - rigid_size_z),
Vector(pos.x + rigid_size_x, pos.y - rigid_size_y, pos.z - rigid_size_z),
Vector(pos.x + rigid_size_x, pos.y - rigid_size_y, pos.z + rigid_size_z),
};
Vector Box_vp1[4] = {
Vector(pos.x + rigid_size_x, pos.y + rigid_size_y, pos.z + rigid_size_z),
Vector(pos.x + rigid_size_x, pos.y + rigid_size_y, pos.z - rigid_size_z),
Vector(pos.x - rigid_size_x, pos.y + rigid_size_y, pos.z - rigid_size_z),
Vector(pos.x - rigid_size_x, pos.y + rigid_size_y, pos.z + rigid_size_z),
};
Vector Box_vp2[4] = {
Vector(pos.x + rigid_size_x, pos.y + rigid_size_y, pos.z + rigid_size_z),
Vector(pos.x + rigid_size_x, pos.y - rigid_size_y, pos.z + rigid_size_z),
Vector(pos.x - rigid_size_x, pos.y - rigid_size_y, pos.z + rigid_size_z),
Vector(pos.x - rigid_size_x, pos.y + rigid_size_y, pos.z + rigid_size_z),
};
Vector Box_vp3[4] = {
Vector(pos.x - rigid_size_x, pos.y + rigid_size_y, pos.z + rigid_size_z),
Vector(pos.x - rigid_size_x, pos.y + rigid_size_y, pos.z - rigid_size_z),
Vector(pos.x - rigid_size_x, pos.y - rigid_size_y, pos.z - rigid_size_z),
Vector(pos.x - rigid_size_x, pos.y - rigid_size_y, pos.z + rigid_size_z),
};
Vector Box_vp4[4] = {
Vector(pos.x + rigid_size_x, pos.y - rigid_size_y, pos.z + rigid_size_z),
Vector(pos.x + rigid_size_x, pos.y - rigid_size_y, pos.z - rigid_size_z),
Vector(pos.x - rigid_size_x, pos.y - rigid_size_y, pos.z - rigid_size_z),
Vector(pos.x - rigid_size_x, pos.y - rigid_size_y, pos.z + rigid_size_z),
};
Vector Box_vp5[4] = {
Vector(pos.x + rigid_size_x, pos.y + rigid_size_y, pos.z - rigid_size_z),
Vector(pos.x + rigid_size_x, pos.y - rigid_size_y, pos.z - rigid_size_z),
Vector(pos.x - rigid_size_x, pos.y - rigid_size_y, pos.z - rigid_size_z),
Vector(pos.x - rigid_size_x, pos.y + rigid_size_y, pos.z - rigid_size_z),
};
bd->DrawPolygon(Box_vp0, Box_vc, true);
bd->DrawPolygon(Box_vp1, Box_vc, true);
bd->DrawPolygon(Box_vp2, Box_vc, true);
bd->DrawPolygon(Box_vp3, Box_vc, true);
bd->DrawPolygon(Box_vp4, Box_vc, true);
bd->DrawPolygon(Box_vp5, Box_vc, true);
}
return SUPER::Draw(op, drawpass, bd, bh);
}
```

Thank，

AiMiDi