glc_point.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00024
00025 #include "glc_point.h"
00026 #include "../glc_openglexception.h"
00027
00028 using namespace glc;
00030
00032
00033
00034 GLC_Point::GLC_Point(const GLC_Point3d &setCoord)
00035 :GLC_PointCloud()
00036 , m_Coordinate(setCoord)
00037 , m_Size(1.0f)
00038 {
00039 setCoordinate(m_Coordinate);
00040 }
00041
00042 GLC_Point::GLC_Point(double x, double y, double z)
00043 :GLC_PointCloud()
00044 , m_Coordinate(x, y, z)
00045 , m_Size(1.0f)
00046 {
00047 setCoordinate(m_Coordinate);
00048 }
00049
00050 GLC_Point::GLC_Point(const GLC_Point& point)
00051 :GLC_PointCloud(point)
00052 , m_Coordinate(point.m_Coordinate)
00053 , m_Size(point.m_Size)
00054 {
00055
00056 }
00057
00059
00061
00062
00063 GLC_Point3d GLC_Point::coordinate(void) const
00064 {
00065 return m_Coordinate;
00066 }
00067
00068
00069 GLC_Geometry* GLC_Point::clone() const
00070 {
00071 return new GLC_Point(*this);
00072 }
00073
00075
00077
00078
00079 void GLC_Point::setCoordinate(const GLC_Point3d &point)
00080 {
00081 m_Coordinate= point;
00082 GLC_PointCloud::clear();
00083 QList<GLC_Point3d> points;
00084 points.append(m_Coordinate);
00085 GLC_PointCloud::addPoint(points);
00086
00087 }
00088
00089 void GLC_Point::setCoordinate(double x, double y, double z)
00090 {
00091 setCoordinate(GLC_Point3d(x, y, z));
00092 }
00093
00095
00097
00098 void GLC_Point::glDraw(const GLC_RenderProperties& renderProperties)
00099 {
00100 glPointSize(m_Size);
00101
00102 GLC_PointCloud::glDraw(renderProperties);
00103 }
00104