Panda3D
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
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 EggPatch EggPoint EggPolygon EggSurface EggLine EggTriangleFan EggTriangleStrip EggNurbsCurve EggNurbsSurface

Public Member Functions

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

Static Public Member Functions

static TypeHandle getClassType ()
 

Public Attributes

EggMorphNormalList _dnormals
 
EggMorphColorList _drgbas
 

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.

Member Function Documentation

◆ __init__() [1/2]

__init__ ( )

◆ __init__() [2/2]

__init__ ( const EggAttributes  copy)

◆ clearColor()

clearColor ( )

◆ clearNormal()

clearNormal ( )

◆ compareTo()

int compareTo ( const EggAttributes  other)

An ordering operator to compare two vertices for sorting order.

This imposes an arbitrary ordering useful to identify unique vertices.

◆ copyColor()

copyColor ( const EggAttributes  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()

copyNormal ( const EggAttributes  other)

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

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

◆ getClassType()

static TypeHandle getClassType ( )
static

◆ getColor()

LColor getColor ( )

Returns the color set on this particular attribute.

If there is no color set, returns white.

◆ getNormal()

const LNormald getNormal ( )

◆ hasColor()

bool hasColor ( )

◆ hasNormal()

bool hasNormal ( )

◆ matchesColor()

bool matchesColor ( const EggAttributes  other)

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

◆ matchesNormal()

bool matchesNormal ( const EggAttributes  other)

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

◆ operator=()

EggAttributes operator= ( const EggAttributes  copy)

◆ setColor()

setColor ( const LColor  Color)

◆ setNormal()

setNormal ( const LNormald  normal)

◆ sortsLessThan()

bool sortsLessThan ( const EggAttributes  other)

An ordering operator to compare two vertices for sorting order.

This imposes an arbitrary ordering useful to identify unique vertices.

◆ transform()

transform ( const LMatrix4d  mat)

Applies the indicated transformation matrix to the attributes.

◆ write()

write ( Ostream  out,
int  indent_level 
)

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

Member Data Documentation

◆ _dnormals

EggMorphNormalList _dnormals

◆ _drgbas

EggMorphColorList _drgbas