GLC_lib  2.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
glc_point.cpp
Go to the documentation of this file.
1 /****************************************************************************
2 
3  This file is part of the GLC-lib library.
4  Copyright (C) 2005-2008 Laurent Ribon (laumaya@users.sourceforge.net)
5  http://glc-lib.sourceforge.net
6 
7  GLC-lib is free software; you can redistribute it and/or modify
8  it under the terms of the GNU Lesser General Public License as published by
9  the Free Software Foundation; either version 3 of the License, or
10  (at your option) any later version.
11 
12  GLC-lib is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU Lesser General Public License for more details.
16 
17  You should have received a copy of the GNU Lesser General Public License
18  along with GLC-lib; if not, write to the Free Software
19  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 
21 *****************************************************************************/
22 
24 
25 #include "glc_point.h"
26 #include "../glc_openglexception.h"
27 
28 using namespace glc;
30 // Constructor Destructor
32 
33 
36 , m_Coordinate(setCoord)
37 , m_Size(1.0f)
38 {
40 }
41 
42 GLC_Point::GLC_Point(double x, double y, double z)
44 , m_Coordinate(x, y, z)
45 , m_Size(1.0f)
46 {
48 }
49 
51 :GLC_PointCloud(point)
52 , m_Coordinate(point.m_Coordinate)
53 , m_Size(point.m_Size)
54 {
55 
56 }
57 
59 // Get Functions
61 
62 // Get a 4D point represent point coordinate
64 {
65  return m_Coordinate;
66 }
67 
68 // Return a copy of the current geometry
70 {
71  return new GLC_Point(*this);
72 }
73 
75 // Set Functions
77 
78 // Set Point coordinate by 4D Vector
80 {
81  m_Coordinate= point;
83  QList<GLC_Point3d> points;
84  points.append(m_Coordinate);
86 
87 }
88 // Set Point coordinate by 3 double
89 void GLC_Point::setCoordinate(double x, double y, double z)
90 {
91  setCoordinate(GLC_Point3d(x, y, z));
92 }
93 
95 // OpenGL Functions
97 
98 void GLC_Point::glDraw(const GLC_RenderProperties& renderProperties)
99 {
100  glPointSize(m_Size);
101  // Point Display
102  GLC_PointCloud::glDraw(renderProperties);
103 }
104 

©2005-2013 Laurent Ribon