Panda3D
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties
Public Member Functions | Static Public Member Functions
EggCompositePrimitive Class Reference

The base class for primitives such as triangle strips and triangle fans, which include several component triangles, each of which might have its own color and/or normal. More...

Inheritance diagram for EggCompositePrimitive:
EggPrimitive EggNode EggAttributes EggRenderMode EggNamedObject MemoryBase EggObject EggLine EggTriangleFan EggTriangleStrip

List of all members.

Public Member Functions

EggAttributes getComponent (int i)
 Returns the attributes for the nth component triangle.
EggAttributes const getComponent (int i)
 Returns the attributes for the nth component triangle.
list getComponents ()
int getNumComponents ()
 Returns the number of individual component triangles within the composite.
EggCompositePrimitive operator= (EggCompositePrimitive const copy)
 setComponent (int i, EggAttributes const attrib)
 Changes the attributes for the nth component triangle.
EggCompositePrimitive triangulateInPlace ()
 Subdivides the composite primitive into triangles and adds those triangles to the parent group node in place of the original primitive.
bool triangulateInto (EggGroupNode container)
 Subdivides the composite primitive into triangles and adds those triangles to the indicated container.

Static Public Member Functions

static TypeHandle getClassType ()

Detailed Description

The base class for primitives such as triangle strips and triangle fans, which include several component triangles, each of which might have its own color and/or normal.


Member Function Documentation

static TypeHandle getClassType ( ) [static]

Reimplemented from EggPrimitive.

Reimplemented in EggTriangleStrip, EggTriangleFan, and EggLine.

Returns the attributes for the nth component triangle.

EggAttributes const getComponent ( int  i)

Returns the attributes for the nth component triangle.

list getComponents ( )

Returns the number of individual component triangles within the composite.

Each one of these might have a different set of attributes.

EggCompositePrimitive operator= ( EggCompositePrimitive const  copy)
setComponent ( int  i,
EggAttributes const  attrib 
)

Changes the attributes for the nth component triangle.

Subdivides the composite primitive into triangles and adds those triangles to the parent group node in place of the original primitive.

Returns a pointer to the original primitive, which is likely about to be destructed.

If convex_also is true, both concave and convex polygons will be subdivided into triangles; otherwise, only concave polygons will be subdivided, and convex polygons will be copied unchanged into the container.

bool triangulateInto ( EggGroupNode  container)

Subdivides the composite primitive into triangles and adds those triangles to the indicated container.

Does not remove the primitive from its existing parent or modify it in any way.

Returns true if the triangulation is successful, or false if there was some error (in which case the container may contain some partial triangulation).

 All Classes Namespaces Functions Variables Enumerations Enumerator Properties