Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

X3DTextureCoordinateNode.cpp

Go to the documentation of this file.
00001 #include "X3DTextureCoordinateNode.h"
00002 
00003 #include <iostream>
00004 
00005 using namespace X3DTK;
00006 using namespace std;
00007 
00008 X3DTextureCoordinateNode::X3DTextureCoordinateNode()
00009 : X3DGeometricPropertyNode()
00010 {
00011   defineTagName("X3DTextureCoordinateNode", "Texturing");
00012 }
00013 
00014 X3DTextureCoordinateNode::X3DTextureCoordinateNode(const MFVec2f &point)
00015 : X3DGeometricPropertyNode(), point(point)
00016 {
00017   defineTagName("X3DTextureCoordinateNode", "Texturing");
00018 }
00019 
00020 X3DTextureCoordinateNode::X3DTextureCoordinateNode(const X3DTextureCoordinateNode &N)
00021 : X3DGeometricPropertyNode(N), point(N.point)
00022 {
00023   defineTagName("X3DTextureCoordinateNode", "Texturing");
00024 }
00025 
00026 SFNode X3DTextureCoordinateNode::clone() const
00027 {
00028   return 0;
00029 }
00030 
00031 X3DTextureCoordinateNode::~X3DTextureCoordinateNode()
00032 {
00033 }
00034 
00035 void X3DTextureCoordinateNode::setPoint(const MFVec2f &point)
00036 {
00037   this->point = point;
00038 }
00039 
00040 void X3DTextureCoordinateNode::loadAttributes(const X3DFileElement *element)
00041 {
00042   int index;
00043   index = element->getIndexAttribute("point");
00044   if (index != -1)
00045     point = MFVec2f(element->getAttribute(index));
00046 }
00047 
00048 SFString X3DTextureCoordinateNode::writeAttributes() const
00049 {
00050   SFString attr;
00051   if (!point.empty())
00052     attr += " point=\"" + toSFString(point) + "\"";
00053   
00054   return attr;
00055 }

Generated on Wed May 14 10:03:12 2003 for X3DToolKit by doxygen1.3