Jump to content

  • Log In with Google      Sign In   
  • Create Account

AhmedSaleh

Member Since 27 Nov 2001
Offline Last Active Mar 24 2014 03:18 AM

Topics I've Started

Implementing bicycle audio

10 March 2014 - 03:46 PM

Hi All,

 

I have a bicycle, and a sound that's "clicking" simulation of the freewheel. How would you implement that clicking noise ?

Would you change the pitch of the sound?


Knowing the symobls positions out of a stopping angle

12 November 2013 - 11:51 AM

  that I'm trying to simulate a 3D Symbols on a wheel.


Knowing the symobls positions out of a stopping angle

12 November 2013 - 11:48 AM

I have a 3D Slot Reel, that I'm trying to simulate a 3D Slot Machine. I have 3D Cylinder that is composed out of 36 meshes ( symbols ) as shown in the figure. There are only 12 symbols, and I'm repeating it 3 times around the cylinder.

 

When the reel is spinning, I can get the stopping angle, but giving the above information, I would like to change the 3 symbols, that are behind the three symbols which will be appeared to the viewer or the player. My problem is, I can not find the symbol or the meshes indices, at any desired stop angle when its spinning at any time

 

 


3D Movement in Cubic Grids

20 September 2011 - 02:24 PM

Hi,
I would like to do a simple movement effect for a grid of cubes. I would like to move a cube in a grid a specified distance, then after few seconds, it should go back to its initial position. I've written few codes, but the cube can go only forward but can't move back.

void ocvCaptureApp::update()
{
	if( mCap && mCap.checkNewFrame() ) {

		ci::Surface surface(mCap.getSurface()); 
		cv::Mat input( toOcv( surface ) ); 
		cv::Mat sobel; 
		cv::Sobel(input, sobel, CV_32F, 1, 1); 

		if(numBlocks==0)
			return;

		int h = input.rows / temp; 
		int w = input.cols / temp; 
		float pos;
	
		for (int r = 0; r<temp; r++)="" {="" for(int="" c="0;" c<temp;="" c++)="" cv::scalar="" weight="cv::sum(sobel(cv::Range(h*r," (r+1)*h),="" cv::range(c*w,="" (c+1)*w)));="" if="" (weight[0]="" +="" weight[1]=""> colorThershold)  // if motion is detected
				{
					input(cv::Range(h*r, (r+1)*h-1), cv::Range(c*w, (c+1)*w-1)).setTo(cv::Scalar(0,0,255)); // put a red color in the cube

					pos = cubes[r][c].Get_Position().y; // get its position
					pos-=x;
					cubes[r][c]._pos.y=pos;
					if(cubes[r][c]._pos.y&lt;-40.0f )	// if its lower than -40
					{
						cubes[r][c]._pos.y=-40.0f;
						savedY = cubes[r][c]._pos.y;
						mTimer.start();
						bEffect=true;
					}

				}

			
		if(mTimer.isOver(delayThershold) &amp;&amp; bEffect==true)
		{
			pos = cubes[r][c].Get_Position().y;
			pos+=x;
			cubes[r][c]._pos.y=pos;
			if(cubes[r][c]._pos.y&gt;=savedY)
			{
				cubes[r][c]._pos.y=savedY;
				mTimer.stop();
				mTimer.reset();
				bEffect=false;
			}
		}
			
	}
	}
	mTexture = gl::Texture(fromOcv(input));
	
	}

	
}

</temp;>

C++ Timer

19 September 2011 - 12:37 PM

Hi All,
I would like to start a timer, and after passing number of seconds, it should call something else. Sure a timer that is can't block the main loop of the game. I would like to know the best method for achieving that

PARTNERS