Panda3D
Public Member Functions | Static Public Member Functions

EggAttributes Class Reference

The set of attributes that may be applied to vertices as well as polygons, such as surface normal and color. More...

Inheritance diagram for EggAttributes:
EggPrimitive EggVertex EggCompositePrimitive EggCurve EggPoint EggPolygon EggSurface EggLine EggTriangleFan EggTriangleStrip EggNurbsCurve EggNurbsSurface

List of all members.

Public Member Functions

 EggAttributes ()
 EggAttributes (EggAttributes const copy)
 clearColor ()
 clearNormal ()
int compareTo (EggAttributes const other)
 An ordering operator to compare two vertices for sorting order.
 copyColor (EggAttributes const other)
 Sets this color to be the same as the other's, include morphs.
 copyNormal (EggAttributes const other)
 Sets this normal to be the same as the other's, include morphs.
VBase4 getColor ()
 Returns the color set on this particular attribute.
Vec3D const getNormal ()
bool hasColor ()
bool hasNormal ()
bool matchesColor (EggAttributes const other)
 Returns true if this color matches that of the other EggAttributes object, include the morph list.
bool matchesNormal (EggAttributes const other)
 Returns true if this normal matches that of the other EggAttributes object, include the morph list.
EggAttributes operator= (EggAttributes const copy)
 setColor (VBase4 const Color)
 setNormal (Vec3D const normal)
bool sortsLessThan (EggAttributes const other)
 An ordering operator to compare two vertices for sorting order.
 transform (Mat4D const mat)
 Applies the indicated transformation matrix to the attributes.
 write (ostream out, int indent_level)
 Writes the attributes to the indicated output stream in Egg format.

Static Public Member Functions

static TypeHandle getClassType ()

Detailed Description

The set of attributes that may be applied to vertices as well as polygons, such as surface normal and color.

This class cannot inherit from EggObject, because it causes problems at the EggPolygon level with multiple appearances of the EggObject base class. And making EggObject a virtual base class is just no fun.


Constructor & Destructor Documentation

EggAttributes ( EggAttributes const  copy)

Member Function Documentation

clearColor ( )
clearNormal ( )
int compareTo ( EggAttributes const  other)

An ordering operator to compare two vertices for sorting order.

This imposes an arbitrary ordering useful to identify unique vertices.

copyColor ( EggAttributes const  other)

Sets this color to be the same as the other's, include morphs.

If the other has no color, this clears the color.

copyNormal ( EggAttributes const  other)

Sets this normal to be the same as the other's, include morphs.

If the other has no normal, this clears the normal.

static TypeHandle getClassType ( ) [static]
VBase4 getColor ( )

Returns the color set on this particular attribute.

If there is no color set, returns white.

Vec3D const getNormal ( )
bool hasColor ( )
bool hasNormal ( )
bool matchesColor ( EggAttributes const  other)

Returns true if this color matches that of the other EggAttributes object, include the morph list.

bool matchesNormal ( EggAttributes const  other)

Returns true if this normal matches that of the other EggAttributes object, include the morph list.

EggAttributes operator= ( EggAttributes const  copy)
setColor ( VBase4 const  Color)
setNormal ( Vec3D const  normal)
bool sortsLessThan ( EggAttributes const  other)

An ordering operator to compare two vertices for sorting order.

This imposes an arbitrary ordering useful to identify unique vertices.

transform ( Mat4D const  mat)

Applies the indicated transformation matrix to the attributes.

Reimplemented in EggVertex.

write ( ostream  out,
int  indent_level 
)

Writes the attributes to the indicated output stream in Egg format.

Reimplemented in EggVertex, and EggPrimitive.

 All Classes Namespaces Functions Variables Enumerations Enumerator Properties