Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

PGFrameStyle Class Reference

#include <pgFrameStyle.h>

List of all members.

Public Types

enum  Type {
  T_none, T_flat, T_bevel_out, T_bevel_in,
  T_groove, T_ridge
}

Public Member Functions

 PGFrameStyle ()
 PGFrameStyle (const PGFrameStyle &copy)
void operator= (const PGFrameStyle &copy)
 ~PGFrameStyle ()
void set_type (Type type)
 Sets the basic type of frame.

Type get_type () const
 Returns the basic type of frame.

void set_color (float r, float g, float b, float a)
 Sets the dominant color of the frame.

void set_color (const Colorf &color)
 Sets the dominant color of the frame.

const Colorfget_color () const
 Returns the dominant color of the frame.

void set_width (float x, float y)
 Sets the width parameter, which has meaning only for certain frame types.

void set_width (const LVecBase2f &width)
 Sets the width parameter, which has meaning only for certain frame types.

const LVecBase2f & get_width () const
 Returns the width parameter, which has meaning only for certain frame types.

void output (ostream &out) const
bool xform (const LMatrix4f &mat)
 Applies the indicated transform to the FrameStyle.

NodePath generate_into (const NodePath &parent, const LVecBase4f &frame)
 Generates geometry representing a frame of the indicated size, and parents it to the indicated node, with a scene graph sort order of -1.


Private Member Functions

PointerTo< PandaNodegenerate_flat_geom (const LVecBase4f &frame)
 Generates the GeomNode appropriate to a T_flat frame.

PointerTo< PandaNodegenerate_bevel_geom (const LVecBase4f &frame, bool in)
 Generates the GeomNode appropriate to a T_bevel_in or T_bevel_out frame.

PointerTo< PandaNodegenerate_groove_geom (const LVecBase4f &frame, bool in)
 Generates the GeomNode appropriate to a T_groove or T_ridge frame.


Private Attributes

Type _type
Colorf _color
LVecBase2f _width


Member Enumeration Documentation

enum PGFrameStyle::Type
 

Enumeration values:
T_none 
T_flat 
T_bevel_out 
T_bevel_in 
T_groove 
T_ridge 

Definition at line 47 of file pgFrameStyle.h.

Referenced by ~PGFrameStyle().


Constructor & Destructor Documentation

PGFrameStyle::PGFrameStyle  )  [inline]
 

Definition at line 32 of file pgFrameStyle.I.

References INLINE.

PGFrameStyle::PGFrameStyle const PGFrameStyle &  copy  )  [inline]
 

Definition at line 47 of file pgFrameStyle.I.

References _color, _type, _width, and INLINE.

PGFrameStyle::~PGFrameStyle  )  [inline]
 

Definition at line 78 of file pgFrameStyle.I.

References _type, INLINE, and Type.


Member Function Documentation

PointerTo< PandaNode > PGFrameStyle::generate_bevel_geom const LVecBase4f &  frame,
bool  in
[private]
 

Generates the GeomNode appropriate to a T_bevel_in or T_bevel_out frame.

Definition at line 226 of file pgFrameStyle.cxx.

References _width.

PointerTo< PandaNode > PGFrameStyle::generate_flat_geom const LVecBase4f &  frame  )  [private]
 

Generates the GeomNode appropriate to a T_flat frame.

Definition at line 184 of file pgFrameStyle.cxx.

PointerTo< PandaNode > PGFrameStyle::generate_groove_geom const LVecBase4f &  frame,
bool  in
[private]
 

Generates the GeomNode appropriate to a T_groove or T_ridge frame.

Definition at line 390 of file pgFrameStyle.cxx.

References _width.

NodePath PGFrameStyle::generate_into const NodePath parent,
const LVecBase4f &  frame
 

Generates geometry representing a frame of the indicated size, and parents it to the indicated node, with a scene graph sort order of -1.

The return value is the generated NodePath, if any, or an empty NodePath if nothing is generated.

Definition at line 133 of file pgFrameStyle.cxx.

References T_ridge.

const Colorf & PGFrameStyle::get_color void   )  const [inline]
 

Returns the dominant color of the frame.

Definition at line 142 of file pgFrameStyle.I.

References _width, and INLINE.

PGFrameStyle::Type PGFrameStyle::get_type void   )  const [inline]
 

Returns the basic type of frame.

Definition at line 103 of file pgFrameStyle.I.

References _color.

const LVecBase2f & PGFrameStyle::get_width void   )  const [inline]
 

Returns the width parameter, which has meaning only for certain frame types.

For instance, this is the width of the bevel for T_bevel_in or T_bevel_out. The units are in screen units.

Definition at line 199 of file pgFrameStyle.I.

void PGFrameStyle::operator= const PGFrameStyle &  copy  )  [inline]
 

Definition at line 63 of file pgFrameStyle.I.

void PGFrameStyle::output ostream &  out  )  const
 

Definition at line 65 of file pgFrameStyle.cxx.

References _width, and x.

void PGFrameStyle::set_color const Colorf color  )  [inline]
 

Sets the dominant color of the frame.

Definition at line 129 of file pgFrameStyle.I.

References _width, INLINE, and width.

void PGFrameStyle::set_color float  r,
float  g,
float  b,
float  a
[inline]
 

Sets the dominant color of the frame.

Definition at line 116 of file pgFrameStyle.I.

References INLINE, set_width(), x, and y.

Referenced by set_type().

void PGFrameStyle::set_type PGFrameStyle::Type  type  )  [inline]
 

Sets the basic type of frame.

Definition at line 90 of file pgFrameStyle.I.

References Colorf, INLINE, and set_color().

void PGFrameStyle::set_width const LVecBase2f &  width  )  [inline]
 

Sets the width parameter, which has meaning only for certain frame types.

For instance, this is the width of the bevel for T_bevel_in or T_bevel_out. The units are in screen units.

Definition at line 180 of file pgFrameStyle.I.

void PGFrameStyle::set_width float  x,
float  y
[inline]
 

Sets the width parameter, which has meaning only for certain frame types.

For instance, this is the width of the bevel for T_bevel_in or T_bevel_out. The units are in screen units.

Definition at line 161 of file pgFrameStyle.I.

Referenced by set_color().

bool PGFrameStyle::xform const LMatrix4f &  mat  ) 
 

Applies the indicated transform to the FrameStyle.

The return value is true if the frame style is transformed, or false if it was not affected by the transform.

Definition at line 84 of file pgFrameStyle.cxx.

References _width, T_bevel_in, T_bevel_out, T_flat, T_groove, T_none, and T_ridge.


Member Data Documentation

Colorf PGFrameStyle::_color [private]
 

Definition at line 80 of file pgFrameStyle.h.

Referenced by get_type(), and PGFrameStyle().

Type PGFrameStyle::_type [private]
 

Definition at line 79 of file pgFrameStyle.h.

Referenced by PGFrameStyle(), and ~PGFrameStyle().

LVecBase2f PGFrameStyle::_width [private]
 

Definition at line 81 of file pgFrameStyle.h.

Referenced by generate_bevel_geom(), generate_groove_geom(), get_color(), output(), PGFrameStyle(), set_color(), and xform().


The documentation for this class was generated from the following files:
Generated on Fri May 2 00:53:24 2003 for Panda by doxygen1.3