私はPythonコードとCコードの構造を持っています。これらのフィールドに入力します
("bones_pos_vect",((c_float*4)*30)),
("bones_rot_quat",((c_float*4)*30))
正しい値のPythonコードで、しかしCコードでそれらを要求すると、すべての配列セルから0.0しか取得されません。なぜ値を失うのですか?私の構造の他のすべてのフィールドは正常に機能します。
class SceneObject(Structure):
_fields_ = [("x_coord", c_float),
("y_coord", c_float),
("z_coord", c_float),
("x_angle", c_float),
("y_angle", c_float),
("z_angle", c_float),
("indexes_count", c_int),
("vertices_buffer", c_uint),
("indexes_buffer", c_uint),
("texture_buffer", c_uint),
("bones_pos_vect",((c_float*4)*30)),
("bones_rot_quat",((c_float*4)*30))]
typedef struct
{
float x_coord;
float y_coord;
float z_coord;
float x_angle;
float y_angle;
float z_angle;
int indexes_count;
unsigned int vertices_buffer;
unsigned int indexes_buffer;
unsigned int texture_buffer;
float bones_pos_vect[30][4];
float bones_rot_quat[30][4];
} SceneObject;