RiPolygonBuilder

Takes a series of points representing a polygon and Builds a set of objects.

[ Polygon | Source | Search | Keywords | Summary | Ancestors | All Members | Descendants ]

Quick Index

DESCRIPTION

Class Summary

class RiPolygonBuilder : public RiObjectBuilder
{
public:
// Constructors and assignment
RiPolygonBuilder(Products wanted );
~RiPolygonBuilder() ;;
// Members
void SetMaterial(RiMaterial *);
void SetNormal(const RiUnitVector3 &normal);
void SetUV(const RiVector2 &uv);
void AddPoint(const RiVector3 &point);
bool Build();
bool BuildTriMesh(int numVertices, int numTris, RiVector3 *verts, RiUnitVector3 *norms, RiVector2 *uvs, int *vertexIndices);
protected:
}; // RiPolygonBuilder


DESCRIPTION

This class handles all problems with input data, such as collinear points, Identical points, Non-coplanar polygons, etc and returns a set of objects that best represents it. Non-coplanar polygons are chopped up arbitrarily.


RiPolygonBuilder(Products wanted );

Default Constructor

    RiPolygonBuilder(Products wanted = noneFlag);

~RiPolygonBuilder() ;;

Destructor

    virtual ~RiPolygonBuilder()   ;
;

Function is currently defined inline.


void SetMaterial(RiMaterial *);

Set the material to be used for all subsequent polygons until a new material is set

    void		SetMaterial(RiMaterial *);

void SetNormal(const RiUnitVector3 &normal);

Set a normal to be used FOR THIS POLYGON ONLY stays valid until it is set again, and should be set before the AddPoint associated with it

    void		SetNormal(const RiUnitVector3 &normal);

void SetUV(const RiVector2 &uv);

Set a uv to be used FOR THIS POLYGON ONLY stays valid until it is set again, and should be set before the AddPoint associated with it

    void		SetUV(const RiVector2 &uv);

void AddPoint(const RiVector3 &point);

Add another point on the polygon. Assumes they are added in counter-clockwise order.

    void		AddPoint(const RiVector3 &point);

bool Build();

Build the objects.

    virtual bool  	Build();

bool BuildTriMesh(int numVertices, int numTris, RiVector3 *verts, RiUnitVector3 *norms, RiVector2 *uvs, int *vertexIndices);

Data adopted

    bool  	 BuildTriMesh(int numVertices, int numTris, RiVector3 *verts, RiUnitVector3 *norms,
			      RiVector2 *uvs, int *vertexIndices);

All Members

public:
enum Products ;
// Accessors
int GetNumRayObjects() const;
RiRayObject *GetRayObject(int i) const;
// Members
bool Build(); // pure virtual
void Reset();
// Members
void SetMaterial(RiMaterial *);
void SetNormal(const RiUnitVector3 &normal);
void SetUV(const RiVector2 &uv);
void AddPoint(const RiVector3 &point);
bool BuildTriMesh(int numVertices, int numTris, RiVector3 *verts, RiUnitVector3 *norms, RiVector2 *uvs, int *vertexIndices);
protected:
// Accessors for Derived classes
bool WantRayObjects() const;
void AddRayObject(RiRayObject *obj);

Ancestors

Inheritance chain for RiPolygonBuilder:


Descendants

Class is not inherited by any others.


Generated from source by the Cocoon utilities on Fri Feb 25 15:15:41 2000 .