当前位置: 首页>>代码示例>>C++>>正文


C++ vsx_module_param_float3::get方法代码示例

本文整理汇总了C++中vsx_module_param_float3::get方法的典型用法代码示例。如果您正苦于以下问题:C++ vsx_module_param_float3::get方法的具体用法?C++ vsx_module_param_float3::get怎么用?C++ vsx_module_param_float3::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在vsx_module_param_float3的用法示例。


在下文中一共展示了vsx_module_param_float3::get方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: run

void vsx_module_texture_rotate::run() {
//printf("rotate_begin\n");

	vsx_texture** texture_info_in = texture_info_param_in->get_addr();
	//printf("validness: %d\n",texture_info_param_in->valid);
//	if (texture_info_in->valid)
  if (texture_info_in)
  {

    texture_out->valid = (*texture_info_in)->valid;

//	if (texture_info_in->texture_info) {
  	texture_out->texture_info = (*texture_info_in)->texture_info;
//  }

  	float x = rotation_axis->get(0);
  	float y = rotation_axis->get(1);
  	float z = rotation_axis->get(2);
  	float a = rotation_angle->get()*360;
  	vsx_transform_obj* prev_transform = (*texture_info_in)->get_transform();
  	transform.set_previous_transform(prev_transform);
  	transform.update(a, x, y, z);
    //	if (texture_out)
  	texture_out->set_transform(&transform);
  	((vsx_module_param_texture*)texture_result)->set(texture_out);
  }	else {
    //printf("fooble\n");
    texture_result->valid = false;
  }
}
开发者ID:datar-pl,项目名称:vsxu,代码行数:30,代码来源:main.cpp

示例2: output

  // this is run for each connection to this in-param.
  void output(vsx_module_param_abs* param) 
  {
    glMatrixMode(GL_MODELVIEW);
    glPushMatrix();
    // translation
    glTranslatef(position->get(0),position->get(1),position->get(2));
    // rotation
    glRotatef(
      (float)angle->get()*360, 
      rotation_axis->get(0), 
      rotation_axis->get(1), 
      rotation_axis->get(2)
    );
    // scaling
    glScalef(size->get(0), size->get(1), size->get(2));
    // color
    glColor4f(
      color_rgb->get(0),
      color_rgb->get(1),
      color_rgb->get(2),
      color_rgb->get(3)
    );

    glBegin(GL_QUADS);
      glTexCoord2f(0.0f,0.0f);
      glVertex3f(-1.0f, -1.0f, 0.0f);
      glTexCoord2f(0.0f,1.0f);
      glVertex3f(-1.0f,  1.0f, 0.0f);
      glTexCoord2f(1.0f,1.0f);
      glVertex3f( 1.0f,  1.0f, 0.0f);
      glTexCoord2f(1.0f,0.0f);
      glVertex3f( 1.0f, -1.0f, 0.0f);
    glEnd();

    if (border->get()) 
    {
      glEnable(GL_LINE_SMOOTH);
      glLineWidth(1.5);
      glEnable(GL_BLEND);
      glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

      glBegin(GL_LINE_STRIP);
        glColor3f(0, 0, 0);
        glVertex3f(-2, -0.4f, 0);
        glVertex3f(-2, -0.2f, 0);
        glVertex3f( 2, -0.2f, 0);
        glVertex3f( 2, -0.4f, 0);
        glVertex3f(-2, -0.4f, 0);
      glEnd();
    }

    glPopMatrix();
    render_result->set(1);
    loading_done = true;
  }
开发者ID:CJFocke,项目名称:vsxu,代码行数:56,代码来源:main.cpp

示例3: output

	void output(vsx_module_param_abs* param) {
		gr.friction = friction->get();
	  gr.color0[0] = color0->get(0);
	  gr.color0[1] = color0->get(1);
	  gr.color0[2] = color0->get(2);
	  gr.color0[3] = color0->get(3);

	  gr.color1[0] = color1->get(0);
	  gr.color1[1] = color1->get(1);
	  gr.color1[2] = color1->get(2);
	  gr.step_freq = 10.0f * step_length->get();
	  if (last_updated != engine->vtime)
	  {
			gr.update(engine->dtime, pos->get(0), pos->get(1), pos->get(2));
			last_updated = engine->vtime;
	  }
		gr.render();
	  render_result->set(1);
	}
开发者ID:Who828,项目名称:vsxu,代码行数:19,代码来源:main.cpp

示例4: output

  void output(vsx_module_param_abs* param)
  {
    VSX_UNUSED(param);
    if (text_in->updates)
    {
      if (process_lines())
      text_in->updates = 0;
    }
    if (text_alpha->get() <= 0)
      return;

    if (!ftfont)
    {
      user_message = "module||error loading font "+cur_font;
      return;
    }

    if (text_in->get() == "_")
      return;


    float obj_size = size->get();

    gl_state->matrix_mode (VSX_GL_MODELVIEW_MATRIX );
    gl_state->matrix_push();

    gl_state->matrix_rotate_f( (float)angle->get()*360, rotation_axis->get(0), rotation_axis->get(1), rotation_axis->get(2) );

    if (obj_size < 0)
      obj_size = 0;

    gl_state->matrix_scale_f( obj_size*0.8*0.01, obj_size*0.01, obj_size*0.01 );

    int l_align = align->get();
    float l_leading = leading->get();
    float ypos = 0;

    if (cur_render_type == 0)
      glEnable(GL_TEXTURE_2D);

    glColor4f(red->get(),green->get(),blue->get(),text_alpha->get());

    for (unsigned long i = 0; i < lines.size(); ++i)
    {
      float ll = limit_line->get();
      if (ll != -1.0f)
      {
        if (trunc(ll) != i) continue;
      }
      gl_state->matrix_push();
      if (l_align == 0)
      {
        gl_state->matrix_translate_f( 0, ypos, 0 );
      } else
      if (l_align == 1)
      {
        gl_state->matrix_translate_f( -lines[i].size_x*0.5f,ypos,0 );
      }
      if (l_align == 2)
      {
        gl_state->matrix_translate_f( -lines[i].size_x,ypos,0 );
      }

      if (cur_render_type == 1)
      {
        if (outline_alpha->get() > 0.0f && ftfont2) {
          float pre_linew;
          pre_linew = gl_state->line_width_get();
          gl_state->line_width_set( outline_thickness->get() );
          glColor4f(outline_color->get(0),outline_color->get(1),outline_color->get(2),outline_alpha->get()*outline_color->get(3));
          ftfont2->Render(lines[i].string.c_str());
          gl_state->line_width_set( pre_linew );
        }
        glColor4f(red->get(),green->get(),blue->get(),text_alpha->get());
      }

      ftfont->Render(lines[i].string.c_str());
      gl_state->matrix_pop();
      ypos += l_leading;
    }

    if (cur_render_type == 0)
      glDisable(GL_TEXTURE_2D);


    gl_state->matrix_pop();

    render_result->set(1);
    loading_done = true;
  }
开发者ID:vovoid,项目名称:vsxu,代码行数:90,代码来源:main_render.text.cpp


注:本文中的vsx_module_param_float3::get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。