|
|
moving in 3D
HI
I've two positions, one is nearer than the other in z. Both have
different x. Now how should I turn them together?
-----------
double theta = (double) heading * 3.14 / 180.0;
SourcesPos[i][0] = -float(cos(theta)); //not ok if i do: -0.2
SourcesPos[i][1] = -float(rand()%2);
SourcesPos[i][2] = -float(sin(theta)) //not ok if i do +0.7
---------
Many thanks
Michael
|
|
0
|
|
|
|
Reply
|
Mike
|
5/25/2010 8:56:13 AM |
|
On May 25, 11:56=A0am, Mike <michael.sg...@gmail.com> wrote:
> HI
> I've two positions, one is nearer than the other in z. Both have
> different x. Now how should I turn them together?
>
> -----------
>
> double theta =3D (double) heading * 3.14 / 180.0;
>
> SourcesPos[i][0] =3D -float(cos(theta)); //not ok if i do: -0.2
>
> SourcesPos[i][1] =3D -float(rand()%2);
>
> SourcesPos[i][2] =3D -float(sin(theta)) //not ok if i do +0.7
Huh? Mike, maybe someone smarter gets what you are doing, i don't.
If no one replies something helpful then read that post:
http://groups.google.com/group/comp.lang.c++/browse_frm/thread/942ca0869815=
4dfd#
There it eventually describes how to post in a way so we can help
you.
|
|
0
|
|
|
|
Reply
|
ISO
|
5/25/2010 10:01:27 AM
|
|
it works but not if i move a source away either in z or x axis.
|
|
0
|
|
|
|
Reply
|
Mike
|
5/25/2010 11:34:39 AM
|
|
On 5/25/2010 7:34 AM, Mike wrote:
> it works but not if i move a source away either in z or x axis.
I think you're lacking proper algorithm, for which you can seek help in
the 'comp.programming' NG or the 'sci.math.*' hierarchy. When you have
a question on the C++ *language*, come back and ask it.
V
--
I do not respond to top-posted replies, please don't ask
|
|
0
|
|
|
|
Reply
|
Victor
|
5/25/2010 12:42:28 PM
|
|
|
3 Replies
244 Views
(page loaded in 0.095 seconds)
Similiar Articles: moving in 3D - comp.lang.c++HI I've two positions, one is nearer than the other in z. Both have different x. Now how should I turn them together? ----- double theta... move object under mouse - comp.graphics.api.openglhow could move an object under the mouse on a 3d plane? the complete simple project is on http://www.geocities.com/cannellag/opengl.zip the procedur... Drag point in 3d using mouse - comp.graphics.api.openglHi all! I'm trying to pick a point in 3d space using the mouse, and then move the camera on a plane by dragging the mouse, keeping the 3d point alwa... Moving columns below other columns, in a matrix - comp.soft-sys ...moving in 3D - comp.lang.c++ Moving columns below other columns, in a matrix - comp.soft-sys ... Say I have a 6x6 matrix - what is the easiest way of moving the rightmost ... How to track a ball moving using Kalman filter? - comp.soft-sys ...For simplicity, for a moving ball in 2D without gravity: A =3D [1 0 dt 0; % x =3D x + dt * vx 0 1 0 dt; % y =3D y + dt * vy 0 0 1 0; % vx =3D vx ... glTranslate, glRotate - comp.graphics.api.openglmoving in 3D - comp.lang.c++ glTranslate, glRotate - comp.graphics.api.opengl Also note that rotation is not that simple in 3D, glRotate() uses Euler rotation ... NIO UDP and TCP - comp.lang.java.programmerWhen people receivethem in their clients, I use dead reckoning to move the peoplecharacters.But if there's many people in the 3d place moving, I will need to senda huge ... Class for load 3d model in obj format - comp.graphics.api.opengl ...Class for load 3d model in obj format - comp.graphics.api.opengl ... How in ... moving in 3D - comp.lang.c++ Class for load 3d model in obj format - comp.graphics.api ... Selecting a background frame for a moving object differentiation ...moving in 3D - comp.lang.c++ Selecting a background frame for a moving object differentiation ... Drag point in 3d using mouse - comp.graphics.api.opengl Selecting a ... Why are lights moving? - comp.graphics.api.openglmoving in 3D - comp.lang.c++ Moving 3D Objects | CAD Tips Why not just use the XYZ filters? Move or copy in 3d space using ... models, as well as build your own scenes ... How to Move Objects in 3D Max Studio | eHow.com3D Studio Max is a modeling, animating and rendering package. You can create your own 3D models, as well as build your own scenes, props and environments, light and ... Moving 3D Objects | CAD TipsWhy not just use the XYZ filters? Move or copy in 3d space using individual parameters for XYZ by answering the prompts with .X,.Y or .Z - note the point in front of ... 7/28/2012 5:20:43 AM
|
|
|
|
|
|
|
|
|