class trianglef

Declared in: Primitive++.h
Library: libVector++.so
Derived from: primitivef << BArchivable

Description

The trianglef class is an implementation of a trianglerilateral in 3 dimensions.

Constructors

trianglef(); trianglef(vectorf, vectorf, vectorf); trianglef(trianglef *)
The trianglef data type is assigned its vectors respectively. Passing it () results in an assignment of the triangle resting from (0,0) to (1,0) to (0,1). Passing it a pointer to another triangle will copy the other triangle into it.

trianglef(BMessage *)
Takes a BMessage with triangle data and creates a trianglef with the passed data.

Members

void transform(basisf) and
void translate(vectorf)
do as they are described in primitivef.

void draw()
rests unimplemented.

status_t Archive(BMessage *, bool)
Archived information:
NAME TYPE VALUE
GType B_STRING_TYPE "TRIANGLE"
Coords B_RAW_TYPE {dump of coordinates}
class B_STRING_TYPE trianglef

static BArchivable *Instantiate(BMessage *)
Takes a BMessage and returns the BArchivable-cast pointer to the new trianglef. The calling procedure now owns the trianglef.

vectorf vertices[3]
The array of vectors comprising the triangle.