59 #define BSPLINESURFACEOBJECT_C
83 splineSurfaceNode_(NULL),
123 std::cerr <<
"Destructor error : Spline surface already deleted" << std::endl;
143 std::cerr <<
"Cleanup error : Spline surface already deleted" << std::endl;
188 std::cerr <<
"Error when creating BSplineSurface Object! materialNode is NULL!" << std::endl;
197 QString shaderDir = OpenFlipper::Options::shaderDirStr() +
198 OpenFlipper::Options::dirSeparator();
200 std::string shaderDirectory = std::string( shaderDir.toUtf8() );
201 shaderNode_->setShaderDir( shaderDirectory );
214 std::string nodename = std::string(
"BSplineSurfaceNode for BSpline surface " + _name.toUtf8() );
217 nodename = std::string(
"TextureNode for BSpline surface " + _name.toUtf8() );
220 nodename = std::string(
"ShaderNode for BSpline surface " + _name.toUtf8() );
313 output +=
"========================================================================\n";
317 output +=
"Object Contains BSpline Surface : ";
319 output +=
"Error: Object Contains NO BSpline Surface!";
320 output +=
"========================================================================\n";
324 output += QString::number(
splineSurface()->n_control_points_m() ) +
" control points in m direction, ";
325 output += QString::number(
splineSurface()->n_control_points_n() ) +
" control points in n direction, ";
326 output += QString::number(
splineSurface()->n_knots_m() ) +=
" knots in m direction";
327 output += QString::number(
splineSurface()->n_knots_n() ) +=
" knots in n direction.\n";
329 output +=
"========================================================================\n";
Knotvector * get_knotvector_n_ref()
Get a reference to the knotvector in n direction.
bool picked(uint _node_idx)
detect if the node has been picked
ACG::SceneGraph::ShaderNode * shaderNode()
Return pointer to the shader node.
ACG::SceneGraph::ShaderNode ShaderNode
Simple Name for ShaderNode.
void request_edge_selections()
request edge selection property
const UpdateType UPDATE_GEOMETRY(UpdateTypeSet(1)<< 2)
Geometry updated.
std::string name() const
Returns: name of node (needs not be unique)
const UpdateType UPDATE_SELECTION_VERTICES(UpdateTypeSet(1)<< 5)
Vertex selection has changed.
void request_controlpoint_selections()
request control point selection property
virtual QString getObjectinfo()
Get all Info for the Object as a string.
QString name() const
return the name of the object. The name defaults to NONAME if unset.
bool contains(const UpdateType &_type) const
Check if this update contains the given UpdateType.
void deleteData()
Delete all data attached to this object ( calls delete on each object )
ACG::SceneGraph::EnvMapNode * textureNode()
Get the TextureNode (actually its an environment map node) of the bspline surface.
const UpdateType UPDATE_ALL(UpdateTypeSet(1))
Identifier for all updates.
virtual void setName(QString _name)
path to the file from which the object is loaded ( defaults to "." )
bool pickingEnabled()
Check if picking is enabled for this Object.
MaterialNode * materialNode()
get a pointer to the materialnode
DataType dataType() const
virtual void cleanup()
Reset current object, including all related nodes.
ACG::BSplineSurfaceT< ACG::Vec3d > BSplineSurface
Simple Name for BSpline surfaces.
const UpdateType UPDATE_SELECTION(UpdateTypeSet(1)<< 4)
Selection updated.
virtual ~BSplineSurfaceObject()
Destructor.
BSplineSurface * splineSurface()
return a pointer to the spline curve
virtual void update(UpdateType _type=UPDATE_ALL)
Update the whole Object (Selection,Topology,...)
ACG::SceneGraph::BSplineSurfaceNodeT< BSplineSurface > * splineSurfaceNode_
Scenegraph BSplineSurface Node.
ACG::SceneGraph::BSplineSurfaceNodeT< BSplineSurface > * splineSurfaceNode()
Return pointer to the bspline surface node.
Knotvector * get_knotvector_m_ref()
Get a reference to the knotvector in m direction.
const UpdateType UPDATE_TEXTURE(UpdateTypeSet(1)<< 11)
Textures have changed.
void setDataType(DataType _type)
#define DATA_BSPLINE_SURFACE
const UpdateType UPDATE_SELECTION_KNOTS(UpdateTypeSet(1)<< 9)
Knot selection has changed.
ACG::SceneGraph::ShaderNode * shaderNode_
Scenegraph ShaderNode.
ACG::SceneGraph::EnvMapNode * textureNode_
Scenegraph TextureNode (whoch is actually an environment node)
BSplineSurfaceObject()
Constructor.
virtual void init(BSplineSurface *_surface=0)
Initialise current object, including all related nodes.
QString getObjectinfo()
Get all Info for the Object as a string.
void enablePicking(bool _enable)
Enable or disable picking for this Object.
BSplineSurface * splineSurface_
return a pointer to the spline curve
void setName(QString _name)
Set the name of the Object.
void enablePicking(bool _enable)