#include <builder.h>
Public Member Functions | |
Builder () | |
~Builder () | |
bool | add_prim (const BuilderBucket &bucket, const BuilderPrim &prim) |
Adds the indicated nonindexed primitive, along with its associated bucket, to the builder's internal structures. | |
bool | add_prim (const BuilderBucket &bucket, const BuilderPrimI &prim) |
Adds the indicated indexed primitive, along with its associated bucket, to the builder's internal structures. | |
bool | add_prim_nonindexed (const BuilderBucket &bucket, const BuilderPrimI &prim) |
Adds the specified indexed primitive as if it were nonindexed. | |
GeomNode * | build (const string &default_name="") |
Creates Geoms for all the primitives added to all buckets, and adds them where appropriate to place them in the scene graph under their respective parents, and/or returns a single GeomNode that contains all geometry whose bucket did not reference a particular scene graph node to parent them to. | |
Protected Types | |
typedef pset< BuilderBucketNode > | Buckets |
Protected Member Functions | |
void | add_bucket (const BuilderBucket &bucket) |
Adds a new BuilderBucket just like the given one to the set of all used BuilderBuckets, and makes it the current bucket. | |
Protected Attributes | |
Buckets | _buckets |
Buckets::iterator | _bi |
See the comments above.
Definition at line 195 of file builder.h.
|
|
|
Definition at line 39 of file builder.cxx. References _buckets. |
|
Definition at line 51 of file builder.cxx. |
|
Adds a new BuilderBucket just like the given one to the set of all used BuilderBuckets, and makes it the current bucket. Future primitives will be added to this bucket. Definition at line 251 of file builder.cxx. Referenced by add_prim(). |
|
Adds the indicated indexed primitive, along with its associated bucket, to the builder's internal structures. This copies all relevant information into the builder. Returns true if the primitive was successfully added, false if it was invalid for some reason (for instance, a polygon with two vertices). Definition at line 77 of file builder.I. References add_bucket(), and INLINE. |
|
Adds the indicated nonindexed primitive, along with its associated bucket, to the builder's internal structures. This copies all relevant information into the builder. Returns true if the primitive was successfully added, false if it was invalid for some reason (for instance, a polygon with two vertices). Definition at line 47 of file builder.I. References add_bucket(), and INLINE. |
|
Adds the specified indexed primitive as if it were nonindexed. This simply looks up each coordinate value on the prim in its associated array and stores a nonindexed primitive with the actual coordinate values, instead of the index numbers. This is handy for having code that calls the builder and might want to build either indexed or nonindexed geometry, as selected by the user at run-time. Simply build indexed geometry in all cases, then call either add_prim or add_prim_nonindexed, according to the user's selection. |
|
Creates Geoms for all the primitives added to all buckets, and adds them where appropriate to place them in the scene graph under their respective parents, and/or returns a single GeomNode that contains all geometry whose bucket did not reference a particular scene graph node to parent them to. If a bucket's _node pointer was a GeomNode, the geometry will be added directly to that node. If the _node pointer was any other kind of node, a GeomNode will be created and parented to that node, and its name will be the name of the bucket. In this case, the name of the bucket can also be used to different nodes: if two buckets reference the same node, but have different names, then two different GeomNodes are created, one with each name. Definition at line 142 of file builder.cxx. |
|
|
|
Definition at line 214 of file builder.h. Referenced by Builder(). |