Added extra constructors

This commit is contained in:
Robert Osfield
2008-03-12 20:15:45 +00:00
parent db256b962c
commit 1b9cefa10f
5 changed files with 25 additions and 4 deletions

View File

@@ -24,6 +24,10 @@ class OSG_EXPORT LineStipple : public StateAttribute
LineStipple();
LineStipple(GLint factor, GLushort pattern):
_factor(factor),
_pattern(pattern) {}
/** Copy constructor using CopyOp to manage deep vs shallow copy.*/
LineStipple(const LineStipple& lw,const CopyOp& copyop=CopyOp::SHALLOW_COPY):
StateAttribute(lw,copyop),

View File

@@ -26,6 +26,8 @@ class OSG_EXPORT Point : public StateAttribute
Point();
Point(float size);
/** Copy constructor using CopyOp to manage deep vs shallow copy.*/
Point(const Point& point,const CopyOp& copyop=CopyOp::SHALLOW_COPY):
StateAttribute(point,copyop),

View File

@@ -26,6 +26,8 @@ class OSG_EXPORT PolygonStipple : public StateAttribute
PolygonStipple();
PolygonStipple(const GLubyte* mask);
/** Copy constructor using CopyOp to manage deep vs shallow copy.*/
PolygonStipple(const PolygonStipple& lw,const CopyOp& copyop=CopyOp::SHALLOW_COPY);

View File

@@ -29,15 +29,23 @@ using namespace osg;
Point::Point()
{
_size = 1.0f; // TODO find proper default
_fadeThresholdSize = 1.0f; // TODO find proper default
// TODO find proper default
_distanceAttenuation = Vec3(1, 0.0, 0.0);
_size = 1.0f; // TODO find proper default
_fadeThresholdSize = 1.0f; // TODO find proper default
_distanceAttenuation = Vec3(1, 0.0, 0.0); // TODO find proper default
_minSize = 0.0;
_maxSize = 100.0;//depends on mulitsampling ... some default necessary
}
Point::Point(float size)
{
_size = size;
_fadeThresholdSize = 1.0f; // TODO find proper default
_distanceAttenuation = Vec3(1, 0.0, 0.0); // TODO find proper default
_minSize = 0.0;
_maxSize = 100.0;//depends on mulitsampling ... some default necessary
}
Point::~Point()
{

View File

@@ -43,6 +43,11 @@ PolygonStipple::PolygonStipple()
setMask(defaultPolygonStippleMask);
}
PolygonStipple::PolygonStipple(const GLubyte* mask)
{
setMask(mask);
}
PolygonStipple::PolygonStipple(const PolygonStipple& ps,const CopyOp& copyop):
StateAttribute(ps,copyop)
{