473,396 Members | 1,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

bvh hell

bob
I'm trying to write a BVH file loader to get my feet wet with skeletal
animation, and I'm having a lot of trouble getting it working.

I can get the skeleton to draw, and he moves around a little bit.
However, the motion just isn't right. I must be doing the angles or
something wrong.

Please let me know if you see anything obviously wrong with the drawing
code:

struct Joint {
char name[80];
float offset[3];
int numchannels;
vector<Joint> v;
};

void drawwell(Joint j)
{
vector<Joint>::iterator iter = j.v.begin();
int fctr = mikectr % frames.size();
if (j.numchannels == 3) {
glPushMatrix();
glRotatef(0, 0, 1, frames[fctr][globalctr]);
glRotatef(1, 0, 0, frames[fctr][globalctr+1]);
glRotatef(0, 1, 0, frames[fctr][globalctr+2]);
glTranslatef(j.offset[0], j.offset[1], j.offset[2]);
glBegin(GL_POINTS);
glVertex3f(0, 0, 0);
glEnd();
globalctr+=j.numchannels;
while (iter != j.v.end()) drawwell(*iter++, 0, 0, 0);
glPopMatrix();
}
else
{
// this is for the root node
globalctr+=j.numchannels;
glPushMatrix();
glRotatef(0, 0, 1, frames[fctr][globalctr+3]);
glRotatef(1, 0, 0, frames[fctr][globalctr+4]);
glRotatef(0, 1, 0, frames[fctr][globalctr+5]);
glTranslatef(j.offset[0], j.offset[1], j.offset[2]);
glBegin(GL_POINTS);
glVertex3f(0, 0, 0);
glEnd();
while (iter != j.v.end()) drawwell(*iter++);
glPopMatrix();
}
}

Jul 23 '05 #1
1 2918
bo*@coolgroups.com wrote:
I'm trying to write a BVH file loader to get my feet wet with skeletal
animation, and I'm having a lot of trouble getting it working.
I can't find "BVH" in the C++ Standard. What is it? How is it related
to the subject of this newsgroup?
I can get the skeleton to draw, and he moves around a little bit.
However, the motion just isn't right. I must be doing the angles or
something wrong.
How is it a C++ language problem?
Please let me know if you see anything obviously wrong with the drawing
code:

struct Joint {
char name[80];
float offset[3];
int numchannels;
vector<Joint> v;
};

void drawwell(Joint j)
Here is something that could improve it ever slightly: pass by reference

void drawwell(Joint const& j)
{
[...OpenGL-specific stuff snipped...]
}


Did you mean to post this to comp.graphics.api.opengl?

V
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: kayodeok | last post by:
We're Mad As Hell And We're Not Going To Take It Anymore http://hownow.brownpau.com/index.html The web is a mess. We're tired of this deluge of <font> tags, nested tables, spacer GIFs, and...
3
by: .DLL hell II - The Evil Empire Strikes Back | last post by:
I can't figure out how this side-by-side assembly stuff it supposed to work. I have a stack of four assemblies A has no references B references A & C C References A & B D References A, B and C...
22
by: Jim Hubbard | last post by:
I am reposting a portion of a thread that I am involved in under a new topic because it seems that there are still people that believe the whole "DLL Hell" myth. I hope I can shed some light on...
2
by: Nad | last post by:
Hello, dll hell has been eliminated in .NET using assembly versioning. I am new in .NET and would like to know if there is any dll-hell-equivalent in .NET Windows or Web development...
21
by: Nx | last post by:
Hi I am unpacking a list into variables, for some reason they need to be unpacked into variable names like a0,a1,a2....upto aN whatever is in the list. How to create the variables dynamically...
1
by: GreatB | last post by:
Bill Gates died in a car accident. He found himself in Purgatory being sized up by God . .. "Well, Bill, I'm really confused on this call. I'm not sure whether to send you to Heaven or Hell....
18
by: Dave Sauny | last post by:
Ok, its a friday, I'm at work and I cant get this to work: I have 3 listboxes on one tab control page. when i select an item in listbox1 i want whatever is selected on the other 2 listboxes...
3
by: fyleow | last post by:
I just spent hours trying to figure out why even after I set my SQL table attributes to UTF-8 only garbage kept adding into the database. Apparently you need to execute "SET NAMES 'utf8'" before...
2
by: Scott M. | last post by:
I need a little help please... I'm simply trying to set up a very basic event for a class and then create an event handler for that class in a Console application. I think I'm very close, but...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.