本文整理汇总了C++中MATRIX::SetOMatrix方法的典型用法代码示例。如果您正苦于以下问题:C++ MATRIX::SetOMatrix方法的具体用法?C++ MATRIX::SetOMatrix怎么用?C++ MATRIX::SetOMatrix使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MATRIX
的用法示例。
在下文中一共展示了MATRIX::SetOMatrix方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetObject
static void SetObject(OBJECT *obj, void *data)
{
MATRIX m;
UNDO_TRANSFORM_OBJECT *cur;
if(obj)
{
cur = ((TRANS_DATA*)data)->root;
m.SetOMatrix(&obj->orient_x, &obj->orient_y, &obj->orient_z);
while(cur)
{
if(obj == cur->object)
{
obj->SetActiveObject(((TRANS_DATA*)data)->display, &((TRANS_DATA*)data)->stack, TRUE);
obj->SetObject(((TRANS_DATA*)data)->display,
&((TRANS_DATA*)data)->display->pos,
&((TRANS_DATA*)data)->display->orient_x,
&((TRANS_DATA*)data)->display->orient_y,
&((TRANS_DATA*)data)->display->orient_z,
&((TRANS_DATA*)data)->display->size);
break;
}
cur = (UNDO_TRANSFORM_OBJECT*)cur->GetNext();
}
((TRANS_DATA*)data)->stack.Push(&m);
}
else
{
((TRANS_DATA*)data)->stack.Pop();
}
}
示例2: SetObject
/*************
* DESCRIPTION: sets the new object specs
* INPUT: disp pointer to display structure
* pos translate factor
* ox,oy,oz rotate factor
* size scale factor
* OUTPUT: none
*************/
void CAMERA::SetObject(DISPLAY *disp, VECTOR *pos, VECTOR *ox, VECTOR *oy, VECTOR *oz, VECTOR *size)
{
MATRIX m;
if(disp)
{
if(disp->view->viewmode == VIEW_CAMERA)
{
VecAdd(pos,&this->pos,&disp->view->pos);
if(!track)
{
InvOrient(ox, oy, oz, &disp->view->axis_x, &disp->view->axis_y, &disp->view->axis_z);
m.SetOMatrix(&orient_x,&orient_y,&orient_z);
m.MultVectMat(&disp->view->axis_x);
m.MultVectMat(&disp->view->axis_y);
m.MultVectMat(&disp->view->axis_z);
}
else
{
UpdateTracking(&disp->view->pos);
InvOrient(&orient_x, &orient_y, &orient_z, &disp->view->axis_x, &disp->view->axis_y, &disp->view->axis_z);
}
}
}
SetVector(&bboxmin, -this->size.z*.5f, -this->size.z*.5f, -this->size.z);
SetVector(&bboxmax, this->size.z*.5f, this->size.z*1.3f, this->size.z*1.5f);
}
示例3:
/*************
* DESCRIPTION: convert rscn version 100 brushes and textures
* INPUT: root surface root object
* OUTPUT: -
*************/
void SURFACE::ConvertV100(OBJECT *root)
{
BRUSH_OBJECT *brush;
TEXTURE_OBJECT *texture;
VECTOR ox,oy,oz;
MATRIX m;
InvOrient(&root->orient_x, &root->orient_y, &root->orient_z, &ox, &oy, &oz);
m.SetOMatrix(&ox,&oy,&oz);
brush = root->brush;
while(brush)
{
VecSub(&brush->pos, &root->pos, &brush->pos);
m.MultVectMat(&brush->orient_x);
m.MultVectMat(&brush->orient_y);
m.MultVectMat(&brush->orient_z);
brush = (BRUSH_OBJECT*)brush->GetNext();
}
texture = root->texture;
while(texture)
{
VecSub(&texture->pos, &root->pos, &texture->pos);
m.MultVectMat(&texture->orient_x);
m.MultVectMat(&texture->orient_y);
m.MultVectMat(&texture->orient_z);
texture = (TEXTURE_OBJECT*)texture->GetNext();
}
}