本文整理汇总了C++中FluidSystem::Initialize方法的典型用法代码示例。如果您正苦于以下问题:C++ FluidSystem::Initialize方法的具体用法?C++ FluidSystem::Initialize怎么用?C++ FluidSystem::Initialize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FluidSystem
的用法示例。
在下文中一共展示了FluidSystem::Initialize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init
void init ()
{
glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
glHint(GL_POLYGON_SMOOTH_HINT, GL_NICEST);
srand ( time ( 0x0 ) );
glClearColor( 0.49, 0.49, 0.49, 1.0 );
glShadeModel( GL_SMOOTH );
glEnable ( GL_COLOR_MATERIAL );
glEnable (GL_DEPTH_TEST);
glEnable (GL_BLEND);
glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glDepthMask ( 1 );
glEnable ( GL_TEXTURE_2D );
// callbacks
glutDisplayFunc( display );
glutReshapeFunc( reshape );
glutKeyboardFunc( keyboard_func );
glutMouseFunc( mouse_click_func );
glutMotionFunc( mouse_move_func );
glutIdleFunc( idle_func );
glutSetCursor ( GLUT_CURSOR_NONE );
cam_angs.x = 29; cam_angs.y = 75; cam_angs.z = 80.0;
cam_to.x = 0; cam_to.y = 0; cam_to.z = 5;
cam_fov = 35.0;
light[0].x = 39; light[0].y = -60; light[0].z = 43;
light_to[0].x = 0; light_to[0].y = 0; light_to[0].z = 0;
light[1].x = 15; light[1].y = -5; light[1].z = 145;
light_to[1].x = 0; light_to[1].y = 0; light_to[1].z = 0;
light_fov = 45;
#ifdef USE_SHADOWS
createShadowTextures();
createFrameBuffer ();
setShadowLight ( light[0].x, light[0].y, light[0].z, light_to[0].x, light_to[0].y, light_to[0].z, light_fov );
setShadowLightColor ( .7, .7, .7, 0.2, 0.2, 0.2 );
#endif
obj_from.x = 0; obj_from.y = 0; obj_from.z = 20; // emitter
obj_angs.x = 118.7; obj_angs.y = 200; obj_angs.z = 1.0;
obj_dang.x = 1; obj_dang.y = 1; obj_dang.z = 0;
psys.Initialize ( BFLUID, psys_nmax );
psys.SPH_CreateExample ( 0, psys_nmax );
psys.SetVec ( EMIT_ANG, Vector3DF ( obj_angs.x, obj_angs.y, obj_angs.z ) );
psys.SetVec ( EMIT_POS, Vector3DF ( obj_from.x, obj_from.y, obj_from.z ) );
psys.SetParam ( PNT_DRAWMODE, int(bPntDraw ? 1:0) );
psys.SetParam ( CLR_MODE, iClrMode );
}
示例2: init
void init ()
{
srand ( time ( 0x0 ) );
obj_from.x = 0; obj_from.y = 0; obj_from.z = 20; // emitter
obj_angs.x = 118.7; obj_angs.y = 200; obj_angs.z = 1.0;
psys.Initialize ( BFLUID, psys_nmax );
psys.SPH_CreateExample ( 0, psys_nmax );
psys.SetVec ( EMIT_ANG, Vector3DF ( obj_angs.x, obj_angs.y, obj_angs.z ) );
psys.SetVec ( EMIT_POS, Vector3DF ( obj_from.x, obj_from.y, obj_from.z ) );
psys.SetParam ( PNT_DRAWMODE, int(bPntDraw ? 1:0) );
psys.SetParam ( CLR_MODE, iClrMode );
}