51 this->frame[0]->SetRotation(this->
rotation.
x, this->rotation.y, this->rotation.z);
57 float local_to_world[4][4];
58 float local_to_eye[4][4];
67 if (this->frame[0] == NULL) {
80 if (highest < lowest) {
84 if (lowest == highest) {
88 if (this->frame[lod] != NULL) {
98 this->frame[0]->SetPosition(this->
pos);
99 this->frame[0]->SetRotation(this->
rotation.
x, this->rotation.y, this->rotation.z);
100 this->frame[0]->GetLWMatrix(local_to_world);
101 MulMatrix(local_to_eye, mgRenderInfo.
view_scaled, local_to_world);
102 eye_distance = local_to_eye[3][0] * local_to_eye[3][0] + local_to_eye[3][1] * local_to_eye[3][1] + local_to_eye[3][2] * local_to_eye[3][2];
106 for (lod = 0; lod < 4; lod++) {
107 if (eye_distance < distance[lod] * distance[lod]) {
114 if (level <= lowest) {
118 if (level >= highest) {
125 if (this->frame[lod] != NULL) {
133 if (this->frame[lod] != NULL) {
134 this->frame[lod]->SetPosition(this->
pos);
135 this->frame[lod]->SetRotation(this->
rotation.
x, this->rotation.y, this->rotation.z);
136 this->frame[lod]->SetScale(this->
scale[0], this->
scale[1], this->
scale[2]);
137 MGDraw(this->frame[lod]);
140 if (out_level != NULL) {