OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [torture/] [pr51482.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
 
3
typedef enum { CLASS_IN = 1, CLASS_OUT = -1 } FERGUSON_KEY_CLASS, BEZIER_KEY_CLASS;
4
typedef class flag_interface { } VECT3DF_SIMPLE;
5
typedef struct vect3df {
6
    float x,y,z;
7
} VECT3DF, VECT;
8
typedef struct vect4df : public vect3df {
9
    float w;
10
} VECT4DF, WVECT;
11
typedef class llist_item { } ANIM_KEY;
12
typedef class anim_track : public flag_interface, public llist_item { } ANIM_KEY_BEZ;
13
typedef class anim_track_bezier : public anim_track { } ANIM_KEY_BEZ_WVECT;
14
typedef class anim_track_bez_wvect : public anim_track_bezier {
15
    WVECT * tangent(int kn, BEZIER_KEY_CLASS key_class, WVECT *p_tn);
16
} ANIM_TRACK_BEZ_WVECT;
17
WVECT * anim_track_bez_wvect::tangent(int kn, BEZIER_KEY_CLASS key_class, WVECT *p_tn)
18
{
19
  float bias,continuity,tension,tn1,bp1;
20
  WVECT *p_p0,*p_p1,*p_p2,         t1,         g1,g2,g3;
21
  g1.x = (p_p1->x - p_p0->x)*bp1;
22
  g1.y = (p_p1->y - p_p0->y)*bp1;
23
  g1.z = (p_p1->z - p_p0->z)*bp1;
24
  g1.w = (p_p1->w - p_p0->w)*bp1;
25
  bp1 = (0.5f + key_class*0.5f*continuity);
26
  p_tn->x = (g1.x + g3.x*bp1)*tn1;
27
  p_tn->y = (g1.y + g3.y*bp1)*tn1;
28
  p_tn->z = (g1.z + g3.z*bp1)*tn1;
29
  p_tn->w = (g1.w + g3.w*bp1)*tn1;
30
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.