Пример #1
0
void drawFrame(const p3d::Matrix4 &frame, const std::string &name, double size,int pos) {
  p3d::ambientColor=Vector4(1,0,0,1);
  p3d::drawArrow(frame.column(3).xyz(),frame.column(0).xyz()*size,0.01*size);
  p3d::ambientColor=Vector4(0,1,0,1);
  p3d::drawArrow(frame.column(3).xyz(),frame.column(1).xyz()*size,0.01*size);
  p3d::ambientColor=Vector4(0,0,1,1);
  p3d::drawArrow(frame.column(3).xyz(),frame.column(2).xyz()*size,0.01*size);
  Vector3 posString=frame.column(3).xyz()+frame.column(0).xyz();
  if (pos==1) posString+=Vector3(0,-0.15,0);
  p3d::draw(name,posString);
}
Пример #2
0
void drawFrame(const p3d::Matrix4 &frame,double size) {
  p3d::diffuseColor=Vector3(1,0,0);
  p3d::drawArrow(frame.column(3).xyz(),frame.column(0).xyz()*size,0.01*size);
  p3d::diffuseColor=Vector3(0,1,0);
  p3d::drawArrow(frame.column(3).xyz(),frame.column(1).xyz()*size,0.01*size);
  p3d::diffuseColor=Vector3(0,0,1);
  p3d::drawArrow(frame.column(3).xyz(),frame.column(2).xyz()*size,0.01*size);
}