Wrong type of rotation, this fixed it.
void rotatesp(JSGEfloat angle, JSGEfloat* X, JSGEfloat* Y)
{
float ra;
ra = (angle/360) * (2*M_PI);
float normalx=*X;
Type: Posts; User: jonshouse
Wrong type of rotation, this fixed it.
void rotatesp(JSGEfloat angle, JSGEfloat* X, JSGEfloat* Y)
{
float ra;
ra = (angle/360) * (2*M_PI);
float normalx=*X;
16569
16570
I have a 3D game with a simple opengl game engine. Each object in the game has an X,Y,Z position.
I want to make a rotating map of an overview of the objects positions. I can...
This is just my mental block, I've made this same mistake before. data is char* so I always expect (wrongly) data+offset to behave at pointer + offset bytes. I will try and learn ! Thanks again.
Great job, thanks :)
I originally started with this:
struct dev_state *ds = (struct dev_state *)data+sizeof(struct jcp_header);
Compiled ok, but did not work? The extra brackets are...
void jcp_parse_and_reply(char *data, int len, char *ipaddr)
{
struct jcp_header *jcpheader = (struct jcp_header*)data;
struct dev_state *ds = (char*)data+sizeof(struct...
That works a treat, thanks :-)
I am getting careless in my old age...
Returns 17 not my expected 15 as GCC quite reasonably aligns data[] to a 32 bit boundary.
I am trying to work out the difference (in bytes) between two members of a packed structure.
The structure is defined like this:
struct __attribute__((packed)) jcamsys_msg_image
{
...