Have you seen this before? It is from some of the bullet examples posted (not sure who gets the credit)
/// Converts a Bullet quaternion to an Irrlicht euler angle
void QuaternionToEuler(const btQuaternion &TQuat, btVector3 &TEuler)
{
btScalar W = TQuat.getW();
btScalar X = TQuat.getX ...
Search found 11 matches
- Thu Jul 03, 2014 5:42 am
- Forum: Advanced Help
- Topic: Weird Rotation values updating from bullet
- Replies: 4
- Views: 1334
- Tue Jul 01, 2014 8:26 am
- Forum: Advanced Help
- Topic: Draw highlited 2d region on golf field
- Replies: 8
- Views: 2395
Re: Draw highlited 2d region on golf field
Hello
Thank you a lot for your answer. I appreciate that.
In fact I really like to use shaders for this to learn more about shaders so i can utilize them in my future projects as well.
I reviewed Irrlicht shader tutorial throughly and examined many GLES tutorials to have a better understanding ...
Thank you a lot for your answer. I appreciate that.
In fact I really like to use shaders for this to learn more about shaders so i can utilize them in my future projects as well.
I reviewed Irrlicht shader tutorial throughly and examined many GLES tutorials to have a better understanding ...
- Sat Jun 28, 2014 10:35 am
- Forum: Advanced Help
- Topic: Draw highlited 2d region on golf field
- Replies: 8
- Views: 2395
Re: Draw highlited 2d region on golf field
Hello
Thank you so much smso . That code is really helpful.
I will try to utilize that in my code.
hendu ,
your approach sound interesting and easy. But what i need to know is how to pass those parameters to Shader?
for example i want to draw a circle at point X,Y with radios R on one side of my ...
Thank you so much smso . That code is really helpful.
I will try to utilize that in my code.
hendu ,
your approach sound interesting and easy. But what i need to know is how to pass those parameters to Shader?
for example i want to draw a circle at point X,Y with radios R on one side of my ...
- Fri Jun 27, 2014 9:58 am
- Forum: Advanced Help
- Topic: Draw highlited 2d region on golf field
- Replies: 8
- Views: 2395
Re: Draw highlited 2d region on golf field
Hi
Thanks for your answer. i thought shader should be the right approach.
Can anyone give me a hint how to start doing it?
I know what shaders are and how they work in general, what i dont know is how to program this kind of shader and
how can i pass position of overlay texture that i want to show ...
Thanks for your answer. i thought shader should be the right approach.
Can anyone give me a hint how to start doing it?
I know what shaders are and how they work in general, what i dont know is how to program this kind of shader and
how can i pass position of overlay texture that i want to show ...
- Fri Jun 27, 2014 5:31 am
- Forum: Advanced Help
- Topic: Draw highlited 2d region on golf field
- Replies: 8
- Views: 2395
Draw highlited 2d region on golf field
Hello
Im working on a simulation program which contains a flat golf field.
I used a Box shape for ground with a green grass texture.
I want to high lite some areas on this box. for example a 2d circle around Pole or golf ball.
Take a look at these two screen-shots and you will understand what im ...
Im working on a simulation program which contains a flat golf field.
I used a Box shape for ground with a green grass texture.
I want to high lite some areas on this box. for example a 2d circle around Pole or golf ball.
Take a look at these two screen-shots and you will understand what im ...
- Wed Jun 18, 2014 3:20 pm
- Forum: Advanced Help
- Topic: Draw line in correct direction
- Replies: 10
- Views: 1972
Re: Draw line in correct direction
1) Dot product of two vectors through a common point = 0, gives you the perpendicular line.
2) From there on you can calculate separation point based on the desired distance.
3) After that just use the direction of the original vector to find the end point of both the mirrowed lines.
Goodluck ...
2) From there on you can calculate separation point based on the desired distance.
3) After that just use the direction of the original vector to find the end point of both the mirrowed lines.
Goodluck ...
- Wed Jun 18, 2014 12:58 pm
- Forum: Advanced Help
- Topic: Draw line in correct direction
- Replies: 10
- Views: 1972
Re: Draw line in correct direction
I guess your problem is the drawing. Please show the part where you draw the lines and make sure that you set up the proper transformation matrix before that.
Thank you for your answer. So you say my approach is correct? i mean Direction.rotateXZBy(30); really does what i wanted?
I dont think ...
Thank you for your answer. So you say my approach is correct? i mean Direction.rotateXZBy(30); really does what i wanted?
I dont think ...
- Tue Jun 17, 2014 1:13 pm
- Forum: Advanced Help
- Topic: Draw line in correct direction
- Replies: 10
- Views: 1972
Re: Draw line in correct direction
Hi,
Isn't your next line end point is below?
End Point = Direction*500
yea, that was a typo, actually its like this :
End point = Node->getPosition()+ (Direction*500)
Actually the middle line (without angle) is working fine , im not sure how to apply an angle to a direction vector, problem ...
Isn't your next line end point is below?
End Point = Direction*500
yea, that was a typo, actually its like this :
End point = Node->getPosition()+ (Direction*500)
Actually the middle line (without angle) is working fine , im not sure how to apply an angle to a direction vector, problem ...
- Tue Jun 17, 2014 12:58 pm
- Forum: Advanced Help
- Topic: Weird Rotation values updating from bullet
- Replies: 4
- Views: 1334
Weird Rotation values updating from bullet
Hello
I am using Bullet physic in my simulation.
I have a cylinder at pos(0,0,0) and rotation(0,0,0)
Then i apply an angular velocity to Cylinder to make it rotating over Y axis :
btScalar AngVelocity = 1;
CylinderRigidBody->setAngularVelocity(btVector3(0,AngVelocity,0));
Everything is fine ...
I am using Bullet physic in my simulation.
I have a cylinder at pos(0,0,0) and rotation(0,0,0)
Then i apply an angular velocity to Cylinder to make it rotating over Y axis :
btScalar AngVelocity = 1;
CylinderRigidBody->setAngularVelocity(btVector3(0,AngVelocity,0));
Everything is fine ...
- Tue Jun 17, 2014 8:47 am
- Forum: Advanced Help
- Topic: Draw line in correct direction
- Replies: 10
- Views: 1972
Re: Draw line in correct direction
Any suggestion how to calculate three lines directions?
- Tue Jun 17, 2014 7:57 am
- Forum: Advanced Help
- Topic: Draw line in correct direction
- Replies: 10
- Views: 1972
Draw line in correct direction
Hello
I have a problem and i hope someone can help me out.
I have a cylinder in my scene, this cylinder can rotate around itself (over Y axis)
I want to draw 3 direct horizontal lines from center of this cylinder according to its rotation.
Each line make a 30 degree angle to previous one.(see the ...
I have a problem and i hope someone can help me out.
I have a cylinder in my scene, this cylinder can rotate around itself (over Y axis)
I want to draw 3 direct horizontal lines from center of this cylinder according to its rotation.
Each line make a 30 degree angle to previous one.(see the ...