Developer Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
BSplineSurfaceObject Class Reference

#include <ObjectTypes/BSplineSurface/BSplineSurfaceObject.hh>

Inheritance diagram for BSplineSurfaceObject:
BaseObjectData BaseObject

Public Member Functions

 BSplineSurfaceObject ()
 Constructor. More...
 
 BSplineSurfaceObject (const BSplineSurfaceObject &_object)
 copy constructor More...
 
virtual ~BSplineSurfaceObject ()
 Destructor. More...
 
virtual void cleanup ()
 Reset current object, including all related nodes. More...
 
BaseObjectcopy ()
 
Name and Path handling
void setName (QString _name)
 Set the name of the Object. More...
 
Object Information
QString getObjectinfo ()
 Get all Info for the Object as a string. More...
 
Picking
bool picked (uint _node_idx)
 detect if the node has been picked More...
 
void enablePicking (bool _enable)
 Enable or disable picking for this Object.
 
bool pickingEnabled ()
 Check if picking is enabled for this Object.
 
- Public Member Functions inherited from BaseObjectData
 BaseObjectData (const BaseObjectData &_object)
 copy constructor More...
 
 BaseObjectData ()
 constructor
 
virtual ~BaseObjectData ()
 destructor
 
virtual ACG::Vec3d refinePick (ACG::SceneGraph::PickTarget _pickTarget, const ACG::Vec3d _hitPoint, const ACG::Vec3d _start, const ACG::Vec3d _dir, const unsigned int _targetIdx)
 Refine picking. More...
 
virtual void show ()
 Sets the whole Scenegraph subtree of this node to visible.
 
virtual void hide ()
 Sets the whole Scenegraph subtree of this node to invisible.
 
virtual bool visible ()
 return visiblity
 
virtual void visible (bool _visible)
 Sets visiblity of the whole Scenegraph subtree of this node.
 
SeparatorNodebaseNode ()
 
virtual bool hasNode (BaseNode *_node)
 Check if the given node is owned by this object. More...
 
virtual BaseNodeprimaryNode ()
 
QtTranslationManipulatorNodemanipulatorNode ()
 
MaterialNodematerialNode ()
 get a pointer to the materialnode
 
BoundingBoxNodeboundingBoxNode ()
 get a pointer to the bounding box node
 
StencilRefNodestencilRefNode ()
 get a pointer to the stencil reference node
 
bool manipPlaced ()
 Check if the manipulator has been placed.
 
void manipPlaced (bool _placed)
 set the manipulator place status
 
void getBoundingBox (ACG::Vec3d &bbmin, ACG::Vec3d &bbmax)
 get the bounding box of the object
 
void setObjectDrawMode (const ACG::SceneGraph::DrawModes::DrawMode &_mode, const bool &_force=false)
 Set the draw mode for the object. More...
 
template<typename NodeT >
bool addAdditionalNode (NodeT *_node, QString _pluginName, QString _nodeName, int _id=0)
 add an additional node to the object More...
 
bool hasAdditionalNode (QString _pluginName, QString _nodeName, int _id=0)
 check if an object has the additional node More...
 
template<typename NodeT >
bool getAdditionalNode (NodeT *&_node, QString _pluginName, QString _nodeName, int _id=0)
 get an addition node from the object More...
 
template<typename NodeT >
bool removeAdditionalNode (NodeT *&_node, QString _pluginName, QString _nodeName, int _id=0)
 remove an additional node from the object More...
 
- Public Member Functions inherited from BaseObject
 BaseObject (const BaseObject &_object)
 
 BaseObject (BaseObject *_parent=0)
 
virtual void printObjectInfo ()
 Print all information about the object.
 
void dumpTree ()
 Debugging function, writing the subtree to output.
 
int row () const
 get the row of this item from the parent
 
BaseObjectparent ()
 Get the parent item ( 0 if rootitem )
 
const BaseObjectparent () const
 get the row of this item from the parent
 
void setParent (BaseObject *_parent)
 Set the parent pointer.
 
BaseObjectchildExists (int _objectId)
 Check if the element exists in the subtree of this element.
 
BaseObjectchildExists (QString _name)
 Check if the element exists in the subtree of this element.
 
void appendChild (BaseObject *child)
 add a child to this node
 
BaseObjectchild (int row)
 return a child
 
int childCount () const
 get the number of children
 
void removeChild (BaseObject *_item)
 Remove a child from this object.
 
QList< BaseObject * > getLeafs ()
 get all leafes of the tree below this object ( These will be all visible objects )
 
void deleteSubtree ()
 delete the whole subtree below this item ( The item itself is not touched )
 
int group () const
 
bool isGroup () const
 Check if object is a group.
 
bool isInGroup (int _id) const
 
bool isInGroup (QString _name) const
 
std::vector< int > getGroupIds ()
 
QStringList getGroupNames ()
 
void setObjectData (QString _dataName, PerObjectData *_data)
 
void clearObjectData (QString _dataName)
 Clear the object data pointer ( this will not delete the object!! )
 
bool hasObjectData (QString _dataName)
 Checks if object data with given name is available.
 
PerObjectDataobjectData (QString _dataName)
 Returns the object data pointer.
 
void deleteData ()
 Delete all data attached to this object ( calls delete on each object )
 
int id () const
 
int persistentId () const
 
void persistentId (int _id)
 
bool dataType (DataType _type) const
 
DataType dataType () const
 
void setDataType (DataType _type)
 
bool target ()
 
void target (bool _target)
 
bool source ()
 
void source (bool _source)
 
bool flag (QString _flag)
 
void setFlag (QString _flag, bool _set)
 
QStringList flags ()
 
BaseObjectlast ()
 
BaseObjectnext ()
 
int level ()
 
void setFromFileName (const QString &_filename)
 
QString path () const
 return the path to the object ( defaults to "." if unset )
 
void setPath (const QString &_path)
 set the path to the object.
 
QString name () const
 return the name of the object. The name defaults to NONAME if unset.
 
QString filename () const
 return the filename of the object
 
void setFileName (const QString &_filename)
 set the filename for this object
 
QMap< QString, PerObjectData * > & getPerObjectDataMap ()
 get reference to map of all perObject Datas More...
 
QString & getCommentByKey (const QString &key)
 Get comment for the specified key. More...
 
const QString getCommentByKey (const QString &key) const
 Get comment for the specified key. More...
 
bool hasCommentForKey (const QString &key) const
 
bool hasComments () const
 
void clearComment (const QString &key)
 Get comment for the specified key. More...
 
void clearAllComments ()
 Get comment for the specified key. More...
 
const QMap< QString, QString > & getAllComments () const
 
const QString getAllCommentsFlat () const
 

Protected Member Functions

virtual void init (BSplineSurface *_surface=0)
 Initialise current object, including all related nodes. More...
 
Update handling

This is mostly private. Updates have to be triggered via emit updatedObject()

virtual void update (UpdateType _type=UPDATE_ALL)
 Update the whole Object (Selection,Topology,...)
 
Update handling
Update handling

Friends

class TypeBSplineSurfacePlugin
 

Content

BSplineSurfacesplineSurface_
 return a pointer to the spline curve More...
 
BSplineSurfacesplineSurface ()
 return a pointer to the spline curve More...
 

Visualization

ACG::SceneGraph::BSplineSurfaceNodeT
< BSplineSurface > * 
splineSurfaceNode_
 Scenegraph BSplineSurface Node.
 
ACG::SceneGraph::ShaderNodeshaderNode_
 Scenegraph ShaderNode.
 
ACG::SceneGraph::EnvMapNodetextureNode_
 Scenegraph TextureNode (whoch is actually an environment node)
 
ACG::SceneGraph::BSplineSurfaceNodeT
< BSplineSurface > * 
splineSurfaceNode ()
 Return pointer to the bspline surface node. More...
 
ACG::SceneGraph::ShaderNodeshaderNode ()
 Return pointer to the shader node. More...
 
ACG::SceneGraph::EnvMapNodetextureNode ()
 Get the TextureNode (actually its an environment map node) of the bspline surface. More...
 

Additional Inherited Members

- Signals inherited from BaseObject
void objectSelectionChanged (int _objectId)
 
void visibilityChanged (int _objectId)
 
void objectPropertiesChanged (int _objectId)
 
- Static Public Attributes inherited from BaseObject
static int NOOBJECT = -1
 
- Protected Attributes inherited from BaseObject
bool visible_
 

Detailed Description

This class provides the functionality for bspline surfaces

Definition at line 86 of file BSplineSurfaceObject.hh.

Constructor & Destructor Documentation

BSplineSurfaceObject::BSplineSurfaceObject ( )

Constructor.

Constructor for BSpline Surface Objects. This object class gets a Separator Node giving the root node to which it should be connected. The spline surface is generated internally and all nodes for visualization will be added below the scenegraph node.
You dont need to create an object of this type manually. Use PluginFunctions::addBSplineSurface instead. ( see Types.hh::DataType )

Definition at line 80 of file BSplineSurfaceObject.cc.

BSplineSurfaceObject::BSplineSurfaceObject ( const BSplineSurfaceObject _object)

copy constructor

Copy Constructor - generates a copy of the given object

Definition at line 97 of file BSplineSurfaceObject.cc.

BSplineSurfaceObject::~BSplineSurfaceObject ( )
virtual

Destructor.

Destructor for BSpline Surface Objects. The destructor deletes the spline surface and all Scenegraph nodes associated with the surface or the object.

Definition at line 109 of file BSplineSurfaceObject.cc.

Member Function Documentation

void BSplineSurfaceObject::cleanup ( void  )
virtual

Reset current object, including all related nodes.

Cleanup Function for spline surface Objects. Deletes the contents of the whole object and calls BSplineSurfaceObject::init afterwards.

Reimplemented from BaseObjectData.

Definition at line 137 of file BSplineSurfaceObject.cc.

BaseObject * BSplineSurfaceObject::copy ( )
virtual

return a full copy of this object ( All scenegraph nodes will be created ) but the object will not be a part of the object tree.

Generate a copy

Reimplemented from BaseObject.

Definition at line 162 of file BSplineSurfaceObject.cc.

QString BSplineSurfaceObject::getObjectinfo ( )
virtual

Get all Info for the Object as a string.

Returns a string containing all information about the current object. This also includes the information provided by BaseObjectData::getObjectinfo

Returns
String containing the object information

Reimplemented from BaseObject.

Definition at line 310 of file BSplineSurfaceObject.cc.

void BSplineSurfaceObject::init ( BSplineSurface _surface = 0)
protectedvirtual

Initialise current object, including all related nodes.

This function initalizes the spline object. It creates the scenegraph nodes, the spline.

Definition at line 173 of file BSplineSurfaceObject.cc.

bool BSplineSurfaceObject::picked ( uint  _node_idx)
virtual

detect if the node has been picked

Given an node index from PluginFunctions::scenegraphPick this function can be used to check if the bsplineSurface of the object has been picked.

Parameters
_node_idxIndex of the picked spline surface node
Returns
bool if the splineSurfaceNode of this object is the picking target.

Reimplemented from BaseObjectData.

Definition at line 343 of file BSplineSurfaceObject.cc.

void BSplineSurfaceObject::setName ( QString  _name)
virtual

Set the name of the Object.

Set the name of an object. All Scenegraph nodes are renamed too. It also calls BaseObjectData::setName.

Reimplemented from BaseObjectData.

Definition at line 211 of file BSplineSurfaceObject.cc.

ACG::SceneGraph::ShaderNode * BSplineSurfaceObject::shaderNode ( )
virtual

Return pointer to the shader node.

Returns a pointer to the shader node

Returns
Pointer to the shader node

Reimplemented from BaseObjectData.

Definition at line 289 of file BSplineSurfaceObject.cc.

BSplineSurface * BSplineSurfaceObject::splineSurface ( )

return a pointer to the spline curve

Get a pointer to the objects spline surface.

Returns
Pointer to the spline surface

Definition at line 231 of file BSplineSurfaceObject.cc.

ACG::SceneGraph::BSplineSurfaceNodeT< BSplineSurface > * BSplineSurfaceObject::splineSurfaceNode ( )

Return pointer to the bspline surface node.

Returns a pointer to the bspline surface node

Returns
Pointer to the bspline surface node

Definition at line 281 of file BSplineSurfaceObject.cc.

ACG::SceneGraph::EnvMapNode * BSplineSurfaceObject::textureNode ( )

Get the TextureNode (actually its an environment map node) of the bspline surface.

Returns a pointer to the texture node

Returns
Pointer to the texture node

Definition at line 297 of file BSplineSurfaceObject.cc.

Member Data Documentation

BSplineSurface* BSplineSurfaceObject::splineSurface_
private

return a pointer to the spline curve

Get a pointer to the objects spline surface.

Returns
Pointer to the spline surface

Definition at line 136 of file BSplineSurfaceObject.hh.


The documentation for this class was generated from the following files: