All pastes #795205 Raw Edit

houlala

public cpp v1 · immutable
#795205 ·published 2007-11-23 22:17 UTC
rendered paste body
#include <point.h>#include <GL/gl.h>Point :: Point() : m_coords(vec3::zero), m_selected(false), m_next(NULL), m_prev(NULL){}Point :: Point(const vec3 & _v) : m_coords(_v), m_selected(false), m_next(NULL), m_prev(NULL){}Point :: Point(double _x, double _y, double _z) : m_coords(_x, _y, _z), m_selected(false), m_next(NULL), m_prev(NULL){}vec3 Point :: coords() const{	return m_coords;}void Point :: coords(const vec3 & _v){	m_coords = _v;}void Point :: coords(double _x, double _y, double _z){	m_coords = vec3(_x, _y, _z);}bool Point :: selected() const{	return m_selected;}void Point :: selected(bool _s){	m_selected = _s;}Point * Point :: next() const{	return m_next;}void Point :: next(Point * _p){	m_next = _p;}Point * Point :: prev() const{	return m_prev;}void Point :: prev(Point * _p){	m_prev = _p;}void Point :: display() const{	if(m_selected == true)		glColor3f(1.0, 0.21, 0.0);	else		glColor3f(1.0, 0.51, 0.0);		glVertex3fv(m_coords);}