version 3.3

VRS::LineStyle Class Reference

Line Style Attribute. More...

#include <vrs/linestyle.h>

Inheritance diagram for VRS::LineStyle:

VRS::MonoAttribute VRS::Attribute VRS::RenderObj VRS::SharedObj VRS::Visitable

List of all members.

Public Types

enum  AAMode { AANone = 0, AAFastest = 1, AANicest = 2 }

Public Member Functions

 VRS_SERIALIZABLE_CLASS_ENUM (AAMode)
 LineStyle (double pixelsize=1.0, bool lighting=false, AAMode antialiasing=LineStyle::AANone, unsigned short pattern=0xffff, int factor=1)
bool operator== (const LineStyle &other) const
void setPixelSize (double pixelsize)
double getPixelSize () const
void setLighting (bool onOff)
bool getLighting () const
void setAntialiasing (LineStyle::AAMode antialiasingmode)
LineStyle::AAMode getAntialiasing () const
void setStipplePattern (unsigned short pattern)
void setStippleFactor (int factor)
unsigned short getStipplePattern () const
int getStippleFactor () const
 VRS_TYPEINFO (LineStyle, MonoAttribute)
 VRS_SERIALIZABLE (LineStyle)


Detailed Description

Line Style Attribute.

Member Enumeration Documentation

Enumerator:
AANone 
AAFastest 
AANicest 


Constructor & Destructor Documentation

VRS::LineStyle::LineStyle ( double  pixelsize = 1.0,
bool  lighting = false,
AAMode  antialiasing = LineStyle::AANone,
unsigned short  pattern = 0xffff,
int  factor = 1 
)

The width of lines can be specified in pixels or in model coordinates. Line painters will use one of these values depending on the underlying 3D rendering system.


Member Function Documentation

VRS::LineStyle::VRS_SERIALIZABLE_CLASS_ENUM ( AAMode   ) 

bool VRS::LineStyle::operator== ( const LineStyle other  )  const

void VRS::LineStyle::setPixelSize ( double  pixelsize  ) 

double VRS::LineStyle::getPixelSize (  )  const [inline]

Size of a point in pixels. If set, it overwrites the object size which is reset to zero.

void VRS::LineStyle::setLighting ( bool  onOff  ) 

bool VRS::LineStyle::getLighting (  )  const [inline]

The lighting flag specifies if lightsources are applied to the lines. If lighting is turned on, a normal for each is line point is required and has to be specified by a corresponding iterator in the line set. Note that sometimes OpenGL does not accelerate lit lines!

void VRS::LineStyle::setAntialiasing ( LineStyle::AAMode  antialiasingmode  ) 

LineStyle::AAMode VRS::LineStyle::getAntialiasing (  )  const [inline]

Turns on or off antialiasing for lines. Antialiasing is required if lines with a pixel size other than one should be drawn with an approximately round shape.

void VRS::LineStyle::setStipplePattern ( unsigned short  pattern  ) 

void VRS::LineStyle::setStippleFactor ( int  factor  ) 

unsigned short VRS::LineStyle::getStipplePattern (  )  const [inline]

int VRS::LineStyle::getStippleFactor (  )  const [inline]

Sets line stippling, i.e., allows to render dashed or dotted lines. The pattern argument is a 16-bit series of 0s and 1s, with 1 indicates that drawing occurs, and 0 that it does not. The pattern can be stretched by a value given by factor, that is restricted to [1, 256].

VRS::LineStyle::VRS_TYPEINFO ( LineStyle  ,
MonoAttribute   
)

VRS::LineStyle::VRS_SERIALIZABLE ( LineStyle   ) 


The documentation for this class was generated from the following file:

Generated on Mon May 21 06:00:19 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact