i.e: a standard 2D plane is: z+d=0(0x+0y+1z+d=0), now then, if i wanted to pull a square out of that plane, i'd simply specify 4 x/y values in the 4 quadrants, now then, this works fine and dandy in 2D because i know that the plane is facing forward, and only the x/y values can give me the shape i want from the plane, however what if the plane is say: .5y+.5z+d=0?, i want to still specify a 4 x/y points along the plane, but how would i translate those relative x/y points to world space?
sorry if this doesn't make much sense, i tried to explain it the best i could, and most of the material i found on the web has to do with distances and intercepts to a plane, but not how to specify points on the plane.
anywho, here's my current working code:
void CreatePlane(SPEVector4 Plane, float Size, SPEObject *Obj){ SPEVector4 P; memcpy(P, Plane, sizeof(SPEVector4)); Normalize(P); SPEVertice *Verts = new SPEVertice[4]; Verts[0].x = (P[1]*Size+P[2]*Size);//+P[3]; Verts[0].y = (P[0]*Size+P[2]*Size);//+P[3]; Verts[0].z = (P[0]*Size+P[1]*Size);//+P[3]; Verts[1].x = (P[1]*Size+P[2]*Size);//+P[3]; Verts[1].y = (-P[0]*Size+P[2]*Size);//+P[3]; Verts[1].z = (-P[0]*Size+P[1]*Size);//+P[3]; Verts[2].x = (-P[1]*Size+P[2]*Size);//+P[3]; Verts[2].y = (-P[0]*Size+P[2]*Size);//+P[3]; Verts[2].z = (-P[0]*Size-P[1]*Size);//+P[3]; Verts[3].x = (-P[1]*Size+P[2]*Size);//+P[3]; Verts[3].y = (P[0]*Size+P[2]*Size);//+P[3]; Verts[3].z = (P[0]*Size-P[1]*Size);//+P[3]; ... return;}
that doesn't work, i tried some things, but just couldn't figure it out, and i don't know the right words to google for something like this.